Re: Resetting USB modems and USB to serial converters increases ttyUSBXX counter

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

 



On Wed, 21 Oct 2015, Erwin Van de Velde wrote:

> Hi all,
> 
> As advised, I retried with a more recent kernel (4.2.0), but I get a
> similar result:
> 
> I tested via 'echo 1 > /sys/bus/pci/ehci-pci/0000\:00\:1a.0/remove'
> and 'echo 1 > /sys/bus/pci/rescan'. There are two possible results: no
> errors when removing the device and then the devices are reinserted
> with the same ttyUSB number or, with an error:
> 'usb_wwan_indat_callback: resubmit read urb failed. (-19)' (as shown
> in the dmesg copied below) and then the numbers increase, even though
> the ttyUSB devices with the previously used numbers have been removed
> from /dev. On following attempts the numbers only remain the same or
> increase, never reusing the freed ttyUSB numbers. Can someone please
> tell me how I can prevent the error or circumvent the issue otherwise?
> Sometimes the devices get stuck and resetting them via removal seems
> to be the only option.

It's simple.  All you have to do is stop whatever program is using the 
ttyUSB device (or tell the program to stop using the device).  If you 
do this before the device is removed, those errors won't occur.  If you 
do this after the device is removed, the error will occur but the 
ttyUSB number will be reused (provided you replug the device after the 
program is stopped).

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