Re: more than 255 usbserial interfaces

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

 



On Fri, Jun 08, 2012 at 09:53:20AM +0200, Bjørn Mork wrote:
> Bjørn Mork <bjorn@xxxxxxx> writes:
> > Bjørn Mork <bjorn@xxxxxxx> writes:
> >> Italo Migotto <imigotto@xxxxxxxxx> writes:
> >>
> >>> they are modems. yes, I only use one of the interfaces, but couldn´t
> >>> find a way to unbind individual interfaces, only the whole device.
> >>
> >> You can unbind individual ports like this:
> >>
> >>  echo ttyUSB0 > /sys/bus/usb-serial/drivers/<drivername>/unbind 
> >
> > Sorry.  That didn't work as expected.  Should be fixed...
> 
> ... or maybe not.
> 
> Took a quick peek at drivers/usb/serial/bus.c and became more confused.
> usb_serial_device_remove() will just unregister the tty device, and
> usb_serial_device_probe() will the let you register it again.  So you
> save a tty device, but unbinding from the usb-serial driver this way
> doesn't free any other resources.  In particular not the precious ttyUSB
> minors.
> 
> I find that behaviour a bit confusing.  I did expect that unbinding
> would cause all resources related to the unbound port to be freed and
> made available for other drivers and/or devices.
> 
> But I don't see any way this can be changed either.  If we propagate the
> unbind to the usb driver, then there is no way to keep usb-serial "bind"
> working like before.  And I guess that's not acceptable...

Yeah, I don't think we can really do this properly, as we allow multiple
minors to a single device, and sometimes, we control them together
through the same interface.  If the device has multiple interfaces, it
should work by handling the bind/unbind from the USB driver layer, not
the USB-Serial layer.

thanks,

greg k-h
--
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