Re: Huawei E398 cdc/serialmodem-ppp 3G/4G

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 19 Jan 2012, Bjørn Mork wrote:

> Alan Stern <stern@xxxxxxxxxxxxxxxxxxx> writes:
> > On Wed, 18 Jan 2012, Oliver Neukum wrote:
> >
> >> how hard would it be to "fake" a device that is a child of the real
> >> device, so that we could write a tiny driver for a "union" interface
> >> that would probe "subdrivers" using the generic probe() calls?
> >
> > All you have to do is call device_register(), with the parent field set
> > to the interface.  Is that what you mean?
> 
> I believe the wish was for a device which an USB interface driver could
> bind to.  Is it possible to create such a "virtual USB interface" using
> that procedure? Or would it be necessary to modify the interface driver
> to understand the concept?

There could be some difficulties involved in creating a "clone"
interface structure.  For example, the name couldn't follow our current 
naming scheme (device name followed by ':' config number '.' interface 
number) because that would give it exactly the same name as the 
original interface -- but userspace programs might get confused by any 
other sort of name.

Also, there could be practical problems.  Two drivers bound to 
essentially the same interface might tend to interfere with each other.  
What if one wants to change altsettings and the other doesn't?

In addition, several parts of the USB core iterate through all the 
interfaces in a configuration.  They would all have to be changed if a 
config could have "clone" interfaces as well as real ones.

However, if we ignore these relatively minor issues, I don't think 
there's any fundamental reason it couldn't be done.

Alan Stern

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux