Re: AW: add usb option device

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

 



On Wed, 2016-11-16 at 22:11 +0100, Giuseppe Lippolis wrote:
> > 
> > > 
> > > This will make option grab all the ports, as shown by your dmesg
> > > output.  But USB interfaces 0 and 1 are actually cdc-ether and
> > > should
> > > *not* be grabbed by option.
> 
> I also have another curiosity:
> Why the driver architecture doesn't recognize autonomously the cdc-
> ether
> Interface and only gets the serial ports?

I'm not 100% sure, but driver loading order is undependable enough (for
good reason) to be effectively random.  So you must do the right thing
in each driver for ID matching or you will sometimes get the wrong
result.  This also prevents people from being lazy :)

But also, it's not just about automatically loading.  You can
rmmod/modprobe any driver at any time (as long as it's a module and not
built-in) and if you don't do the right thing for ID matching, this
sequence ends up with the wrong driver bound:

rmmod cdc-ether
rmmod option
modprobe option
modprobe cdc-ether

Now option is bound to the ether port and cdc-ether can't bind to it.

The point is, drivers should *only* claim interfaces and devices they
actually should drive.  They should not claim interfaces they should
not or cannot drive.

Dan

> Thanks,
> Bye.
> 
> > 
> > -----Ursprüngliche Nachricht-----
> > Von: Oliver Neukum [mailto:oneukum@xxxxxxxx]
> > Gesendet: Mittwoch, 16. November 2016 21:57
> > An: Dan Williams <dcbw@xxxxxxxxxx>
> > Cc: Giuseppe Lippolis <giu.lippolis@xxxxxxxxx>; linux-usb@xxxxxxxxx
> > el.org
> > Betreff: Re: add usb option device
> > 
> > On Wed, 2016-11-16 at 11:49 -0600, Dan Williams wrote:
> > > 
> > > This will make option grab all the ports, as shown by your dmesg
> > > output.  But USB interfaces 0 and 1 are actually cdc-ether and
> > > should
> > > *not* be grabbed by option.
> > > 
> > > You want to limit option to grabbing bInterfaceClass=255 to make
> > > sure
> > > it only gets the serial ports.
> > 
> > Hi,
> > 
> > what happens if you actually use these ethernet interfaces while
> > somebody
> > uses the serial interfaces?
> > 
> > 	Regards
> > 		Oliver
> > 
> 
> 
--
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