Re: more than 255 usbserial interfaces

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

 



Hi,

Great, thanks! using /sys/bus/usb/drivers/option/unbind instead of
usb-serial worked just fine. Not sure why, I leave that for you guys.

root@italo-desktop:~/g# ls -l /dev/serial/by-path/pci-0000:00:1d.7-usb-0:2.6:*
lrwxrwxrwx 1 root root 14 2012-06-08 03:16
/dev/serial/by-path/pci-0000:00:1d.7-usb-0:2.6:1.0-port0 ->
../../ttyUSB75
lrwxrwxrwx 1 root root 14 2012-06-08 03:16
/dev/serial/by-path/pci-0000:00:1d.7-usb-0:2.6:1.1-port0 ->
../../ttyUSB76
lrwxrwxrwx 1 root root 14 2012-06-08 03:16
/dev/serial/by-path/pci-0000:00:1d.7-usb-0:2.6:1.2-port0 ->
../../ttyUSB77
lrwxrwxrwx 1 root root 14 2012-06-08 03:16
/dev/serial/by-path/pci-0000:00:1d.7-usb-0:2.6:1.3-port0 ->
../../ttyUSB78
lrwxrwxrwx 1 root root 14 2012-06-08 03:16
/dev/serial/by-path/pci-0000:00:1d.7-usb-0:2.6:1.4-port0 ->
../../ttyUSB79

root@italo-desktop:/etc# echo -n "1-2.6:1.1" >
/sys/bus/usb/drivers/option/unbind
root@italo-desktop:/etc# echo -n "1-2.6:1.2" >
/sys/bus/usb/drivers/option/unbind
root@italo-desktop:/etc# echo -n "1-2.6:1.3" >
/sys/bus/usb/drivers/option/unbind
root@italo-desktop:/etc# echo -n "1-2.6:1.4" >
/sys/bus/usb/drivers/option/unbind

root@italo-desktop:~/g# ls -l /dev/serial/by-path/pci-0000:00:1d.7-usb-0:2.6:*
lrwxrwxrwx 1 root root 14 2012-06-08 03:16
/dev/serial/by-path/pci-0000:00:1d.7-usb-0:2.6:1.0-port0 ->
../../ttyUSB75

the device is still up and running on ttyUSB75, and I´ve been able to
plug new devices as I wanted.

So right now its just a matter of cleaning it up before plugging in
new devices, works for me, as it should take a while to get to 255
devices (right now I have 80).

Do you guys still want the information on the devices? Like models,
output from lsusb, dmesg, etc?


On Fri, Jun 8, 2012 at 4:53 AM, Bjørn Mork <bjorn@xxxxxxx> 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...
>
> And the tools to do what I want are already there:  Just unbind from the
> usb driver instead of the usb-serial driver.  So better leave it as it is.
>
> This is probably even already documented somewhere :-)
>
>
> Bjørn
--
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