Package: usbip
Version: 0.1.7-3
Severity: important

I have two identical USB to RS-232 dongles which I export from one
machine to another using USB/IP.  The devices appear correctly as
/dev/ttyUSB0 and ttyUSB1 when attached one at time with a short delay
between them (e.g.  60 seconds).  When the attach commands are run
immediately after each other only the second device attaches, and a
kernel error appears.

In more detail...

The USB/IP server is Debian Lenny set up using this procedure:
http://www.howtoforge.com/how-to-set-up-a-usb-over-ip-server-and-client-with-debian-lenny

Although USB/IP is not supported by Debian in Lenny, I feel this bug
is unrelated, as the problem appear specific to the client, not the
server.

Here's the USB state on the server:

root@arc:~# lsusb
Bus 005 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 005: ID 0557:2008 ATEN International Co., Ltd UC-232A Serial 
Port [pl2303]
Bus 001 Device 004: ID 0557:2008 ATEN International Co., Ltd UC-232A Serial 
Port [pl2303]
Bus 001 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
root@arc:~# usbip_bind_driver  --list
List USB devices
 - busid 1-1 (0557:2008)
         1-1:1.0 -> usbip

 - busid 1-2 (0557:2008)
         1-2:1.0 -> usbip

root@arc:~#              

The USB/IP client is a virtualbox virtual machine running on the same
hardware.  The USB devices are attached with this script:

        # in the order that services have been migrated
        usbip --attach arc.castrov.cuug.ab.ca 1-2
        # sleep 60s
        usbip --attach arc.castrov.cuug.ab.ca 1-1

Without the sleep, only /dev/ttyUSB0 appears and it's attached to the
server's 1-1 (rather than 1-2 which is the first attach command).

dmesg reports:

[  122.722421] usbip: rhport(0) sockfd(3) devid(65541) speed(2)
[  122.723954] usbip: changed 1
[  122.798059] usbip: rhport(1) sockfd(3) devid(65540) speed(2)
[  122.798422] usbip: changed 1
[  122.848444] usbip: changed 1
[  122.956236] usb 1-1: new full speed USB device using vhci_hcd and address 2
[  123.074085] usb 1-1: SetAddress Request (2) to port 1
[  123.100356] usb 1-1: New USB device found, idVendor=0557, idProduct=2008
[  123.100373] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[  123.100385] usb 1-1: Product: USB-Serial Controller D
[  123.100395] usb 1-1: Manufacturer: Prolific Technology Inc.
[  123.103098] usb 1-1: configuration #1 chosen from 1 choice
[  123.128821] usbcore: registered new interface driver usbserial
[  123.129594] USB Serial support registered for generic
[  126.200997] hub 1-0:1.0: Cannot enable port 2.  Maybe the USB cable is bad?
[  129.169756] hub 1-0:1.0: Cannot enable port 2.  Maybe the USB cable is bad?


With the delay, both /dev/ttyUSB0 and /dev/ttyUSB1 appear, assigned in the order
of attachment.

dmesg reports:

[  198.394924] usbip: rhport(0) sockfd(3) devid(65541) speed(2)
[  198.396397] usbip: changed 1
[  198.524343] usbip: changed 0
[  198.634295] usb 1-1: new full speed USB device using vhci_hcd and address 2
[  198.750389] usb 1-1: SetAddress Request (2) to port 0
[  198.775179] usb 1-1: New USB device found, idVendor=0557, idProduct=2008
[  198.775194] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[  198.775208] usb 1-1: Product: USB-Serial Controller D
[  198.775219] usb 1-1: Manufacturer: Prolific Technology Inc.
[  198.779150] usb 1-1: configuration #1 chosen from 1 choice
[  198.803280] usbcore: registered new interface driver usbserial
[  198.805470] USB Serial support registered for generic
[  198.806535] usbcore: registered new interface driver usbserial_generic
[  198.806547] usbserial: USB Serial Driver core
[  198.811176] USB Serial support registered for pl2303
[  198.811915] pl2303 1-1:1.0: pl2303 converter detected
[  198.825061] usb 1-1: pl2303 converter now attached to ttyUSB0
[  198.825113] usbcore: registered new interface driver pl2303
[  198.825123] pl2303: Prolific PL2303 USB to serial adaptor driver
[  258.478490] usbip: rhport(1) sockfd(3) devid(65540) speed(2)
[  258.478881] usbip: changed 1
[  258.720155] usb 1-2: new full speed USB device using vhci_hcd and address 3
[  258.832893] usb 1-2: SetAddress Request (3) to port 1
[  258.859331] usb 1-2: New USB device found, idVendor=0557, idProduct=2008
[  258.859348] usb 1-2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[  258.859360] usb 1-2: Product: USB-Serial Controller D
[  258.859370] usb 1-2: Manufacturer: Prolific Technology Inc.
[  258.863357] usb 1-2: configuration #1 chosen from 1 choice
[  258.865405] pl2303 1-2:1.0: pl2303 converter detected
[  258.877196] usb 1-2: pl2303 converter now attached to ttyUSB1


Please note that I have not tested with non-identical devices.  If this
bug extends to the rapid attachment of all types of devices, it may be
the same as Debian bug 597161.


For completeness, here's what the USB/IP server report with "bugreport
--print usbip".

# Package: usbip
# Version: 0.1.7-3
# Severity: important
# 
# 
# 
# -- System Information:
# Debian Release: 5.0.8
# Architecture: i386 (i686)
# 
# Kernel: Linux 2.6.26-2-686-bigmem (SMP w/2 CPU cores)
# Locale: LANG=en_CA.UTF-8, LC_CTYPE=en_CA.UTF-8 (charmap=UTF-8)
# Shell: /bin/sh linked to /bin/bash
# 
# Versions of packages usbip depends on:
# ii  libc6                      2.11.2-9      Embedded GNU C Library: Shared 
lib
# ii  libglib2.0-0               2.16.6-3      The GLib library of C routines
# ii  libsysfs2                  2.1.0-5       interface library to sysfs
# ii  libusbip0                  0.1.7-3       USB device sharing system over IP
# ii  usbutils                   0.73-10lenny2 Linux USB utilities
# 
# usbip recommends no packages.
# 
# usbip suggests no packages.
# 
# -- no debconf information

The regular configuration information below was produced on the USB/IP client.

-- System Information:
Debian Release: 6.0
  APT prefers stable
  APT policy: (500, 'stable')
Architecture: i386 (i686)

Kernel: Linux 2.6.32-5-686 (SMP w/1 CPU core)
Locale: LANG=en_CA.UTF-8, LC_CTYPE=en_CA.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages usbip depends on:
ii  libc6                     2.11.2-10      Embedded GNU C Library: Shared lib
ii  libglib2.0-0              2.24.2-1       The GLib library of C routines
ii  libsysfs2                 2.1.0+repack-1 interface library to sysfs
ii  libusbip0                 0.1.7-3        USB device sharing system over IP 
ii  usbutils                  0.87-5         Linux USB utilities

usbip recommends no packages.

usbip suggests no packages.

-- no debconf information



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to