Hi, I am working on a driver for an Option G3 card which effectively is a USB device (though physically it's a cardbus card). The interesting part is that the driver for it needs to implement both serial interfaces (for control/diagnostics) and a network interface (for IP data). The serial interfaces are muxed over the control pipe or get their own bulk pipe pair, alternatively. The network interface has its own pair of bulk pipes, but the interface those are on also provides an intr pipe for the muxed serials.
My question is this: For the driver to implement both a serial i/f and a GLDv3 i/f, I would be easier to have different cb_ops (or at least a different streamtab) per *instance*. Is anything like that possible? I have searched for "per-instance cb-ops" or "per-instance streamtab" but have not found any hints except to implement per-instance configs in the driver like the VFS layer does for filesystems. If there is no better way, I think I'll have to implement "proxy interfaces" which determine the type of interface the respective instance implements and call the correct functions. I have also considered the alternative of using two drivers, but the problem is that the serial function and the network function share a USB interface, so I'd need something like a "per-endpoint driver binding" (which I believe would be complete nonsense). If I have not missed an important aspect, then what usb_mid does is not sufficient. At any rate, before I start implementing the proxy-approach, I would like to make sure that I am not missing a more elegant solution and would appreciate any good pointers or advice. Thank you, Nils _______________________________________________ driver-discuss mailing list [email protected] http://mail.opensolaris.org/mailman/listinfo/driver-discuss
