Regression since 2.6.35: mct_u232 and U232-P9 usb serial adapter

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

 



I have a purple "U232-P9(2.4)" USB to Serial adapter. The distributor
I bought it from made a big deal about the purple color distinguishing
this from other similar adapters.

This adapter works with kernel 2.6.34.7 and breaks with kernel 2.6.35,
both mainline for Ubuntu from:
http://kernel.ubuntu.com/~kernel-ppa/mainline/

Steps to reproduce the issue:

$ uname -r
2.6.35-020635-generic

$ sudo modprobe usbserial debug=1
$ sudo modprobe mct_u232 debug=1

$ dmesg
[  612.946015] usbcore: registered new interface driver usbserial
[  612.946020] /home/kernel-ppa/COD/linux/drivers/usb/serial/usb-serial.c:
Had to override the open usb serial operation with the generic one.
[  612.946023] /home/kernel-ppa/COD/linux/drivers/usb/serial/usb-serial.c:
Had to override the write usb serial operation with the generic one.
[  612.946026] /home/kernel-ppa/COD/linux/drivers/usb/serial/usb-serial.c:
Had to override the close usb serial operation with the generic one.
[  612.946029] /home/kernel-ppa/COD/linux/drivers/usb/serial/usb-serial.c:
Had to override the write_room usb serial operation with the generic
one.
[  612.946032] /home/kernel-ppa/COD/linux/drivers/usb/serial/usb-serial.c:
Had to override the chars_in_buffer usb serial operation with the
generic one.
[  612.946035] /home/kernel-ppa/COD/linux/drivers/usb/serial/usb-serial.c:
Had to override the read_bulk_callback usb serial operation with the
generic one.
[  612.946038] /home/kernel-ppa/COD/linux/drivers/usb/serial/usb-serial.c:
Had to override the write_bulk_callback usb serial operation with the
generic one.
[  612.946041] /home/kernel-ppa/COD/linux/drivers/usb/serial/usb-serial.c:
Had to override the process_read_urb usb serial operation with the
generic one.
[  612.946044] /home/kernel-ppa/COD/linux/drivers/usb/serial/usb-serial.c:
Had to override the prepare_write_buffer usb serial operation with the
generic one.
[  612.946062] USB Serial support registered for generic
[  612.946546] usbcore: registered new interface driver usbserial_generic
[  612.946549] usbserial: USB Serial Driver core
[  618.868804] /home/kernel-ppa/COD/linux/drivers/usb/serial/usb-serial.c:
Had to override the write usb serial operation with the generic one.
[  618.868809] /home/kernel-ppa/COD/linux/drivers/usb/serial/usb-serial.c:
Had to override the write_room usb serial operation with the generic
one.
[  618.868812] /home/kernel-ppa/COD/linux/drivers/usb/serial/usb-serial.c:
Had to override the chars_in_buffer usb serial operation with the
generic one.
[  618.868815] /home/kernel-ppa/COD/linux/drivers/usb/serial/usb-serial.c:
Had to override the read_bulk_callback usb serial operation with the
generic one.
[  618.868818] /home/kernel-ppa/COD/linux/drivers/usb/serial/usb-serial.c:
Had to override the write_bulk_callback usb serial operation with the
generic one.
[  618.868821] /home/kernel-ppa/COD/linux/drivers/usb/serial/usb-serial.c:
Had to override the disconnect usb serial operation with the generic
one.
[  618.868824] /home/kernel-ppa/COD/linux/drivers/usb/serial/usb-serial.c:
Had to override the process_read_urb usb serial operation with the
generic one.
[  618.868827] /home/kernel-ppa/COD/linux/drivers/usb/serial/usb-serial.c:
Had to override the prepare_write_buffer usb serial operation with the
generic one.
[  618.868850] USB Serial support registered for MCT U232
[  618.868887] usbcore: registered new interface driver mct_u232
[  618.868889] mct_u232: z2.1:Magic Control Technology USB-RS232
converter driver

# insert U232-P9 adapter

$ dmesg
[  655.873178] usb 6-2: new full speed USB device using uhci_hcd and address 4
[  656.538058] /home/kernel-ppa/COD/linux/drivers/usb/serial/usb-serial.c:
static descriptor matches
[  656.538069] /home/kernel-ppa/COD/linux/drivers/usb/serial/usb-serial.c:
found interrupt in on endpoint 0
[  656.538077] /home/kernel-ppa/COD/linux/drivers/usb/serial/usb-serial.c:
found interrupt in on endpoint 1
[  656.538084] /home/kernel-ppa/COD/linux/drivers/usb/serial/usb-serial.c:
found bulk out on endpoint 2
[  656.538092] mct_u232 6-2:1.0: MCT U232 converter detected
[  656.538098] /home/kernel-ppa/COD/linux/drivers/usb/serial/usb-serial.c:
usb_serial_probe - setting up 2 port structures for this device
[  656.538119] /home/kernel-ppa/COD/linux/drivers/usb/serial/usb-serial.c:
get_free_serial 1
[  656.538127] /home/kernel-ppa/COD/linux/drivers/usb/serial/usb-serial.c:
get_free_serial - minor base = 0
[  656.538136] /home/kernel-ppa/COD/linux/drivers/usb/serial/usb-serial.c:
usb_serial_probe - registering ttyUSB0
[  656.538309] usb 6-2: MCT U232 converter now attached to ttyUSB0

# Run "arduino" Java-based IDE which accesses serial port

$ dmesg
[  711.975992] /home/kernel-ppa/COD/linux/drivers/usb/serial/usb-serial.c:
serial_install
[  711.976044] /home/kernel-ppa/COD/linux/drivers/usb/serial/usb-serial.c:
serial_open - port 0
[  711.976050] /home/kernel-ppa/COD/linux/drivers/usb/serial/mct_u232.c:
mct_u232_open port 0
[  711.977915] /home/kernel-ppa/COD/linux/drivers/usb/serial/mct_u232.c:
set_modem_ctrl: state=0x6 ==> mcr=0xb
[  711.978911] /home/kernel-ppa/COD/linux/drivers/usb/serial/mct_u232.c:
set_line_ctrl: 0x3
[  711.979910] /home/kernel-ppa/COD/linux/drivers/usb/serial/mct_u232.c:
get_modem_stat: 0x0
[  711.979915] /home/kernel-ppa/COD/linux/drivers/usb/serial/mct_u232.c:
msr_to_state: msr=0x0 ==> state=0x6
[  711.980909] /home/kernel-ppa/COD/linux/drivers/usb/serial/mct_u232.c:
set_modem_ctrl: state=0x6 ==> mcr=0xb
[  711.980925] /home/kernel-ppa/COD/linux/drivers/usb/serial/usb-serial.c:
serial_ioctl - port 0, cmd 0x5401
[  711.980939] /home/kernel-ppa/COD/linux/drivers/usb/serial/usb-serial.c:
serial_ioctl - port 0, cmd 0x5401
[  711.980945] /home/kernel-ppa/COD/linux/drivers/usb/serial/usb-serial.c:
serial_ioctl - port 0, cmd 0x5402
[  711.980952] /home/kernel-ppa/COD/linux/drivers/usb/serial/usb-serial.c:
serial_set_termios - port 0
[  711.981904] /home/kernel-ppa/COD/linux/drivers/usb/serial/mct_u232.c:
set_baud_rate: value: 0x2580, divisor: 0x8
[  711.982908] /home/kernel-ppa/COD/linux/drivers/usb/serial/mct_u232.c:
set_baud_rate: send second control message, data = 00
[  711.984899] /home/kernel-ppa/COD/linux/drivers/usb/serial/mct_u232.c:
set_line_ctrl: 0x3
[  711.984914] /home/kernel-ppa/COD/linux/drivers/usb/serial/usb-serial.c:
serial_ioctl - port 0, cmd 0x5401
[  711.984933] /home/kernel-ppa/COD/linux/drivers/usb/serial/usb-serial.c:
serial_ioctl - port 0, cmd 0x5401
[  711.984943] /home/kernel-ppa/COD/linux/drivers/usb/serial/usb-serial.c:
serial_ioctl - port 0, cmd 0x5402
[  711.984953] /home/kernel-ppa/COD/linux/drivers/usb/serial/usb-serial.c:
serial_set_termios - port 0
[  711.985897] /home/kernel-ppa/COD/linux/drivers/usb/serial/mct_u232.c:
set_baud_rate: value: 0x2580, divisor: 0x8
[  711.986915] /home/kernel-ppa/COD/linux/drivers/usb/serial/mct_u232.c:
set_baud_rate: send second control message, data = 00
[  711.988898] /home/kernel-ppa/COD/linux/drivers/usb/serial/mct_u232.c:
set_line_ctrl: 0x3
[  711.988913] /home/kernel-ppa/COD/linux/drivers/usb/serial/usb-serial.c:
serial_ioctl - port 0, cmd 0x5401
[  711.988997] /home/kernel-ppa/COD/linux/drivers/usb/serial/usb-serial.c:
serial_close - port 0
[  711.989034] /home/kernel-ppa/COD/linux/drivers/usb/serial/usb-serial.c:
serial_chars_in_buffer - port 0
[  711.989045] /home/kernel-ppa/COD/linux/drivers/usb/serial/generic.c:
usb_serial_generic_chars_in_buffer - port 0
[  711.989056] /home/kernel-ppa/COD/linux/drivers/usb/serial/generic.c:
usb_serial_generic_chars_in_buffer - returns 0
[  711.989910] /home/kernel-ppa/COD/linux/drivers/usb/serial/mct_u232.c:
set_modem_ctrl: state=0x0 ==> mcr=0x8
[  711.989920] /home/kernel-ppa/COD/linux/drivers/usb/serial/mct_u232.c:
mct_u232_close port 0
[  711.989927] /home/kernel-ppa/COD/linux/drivers/usb/serial/generic.c:
usb_serial_generic_close - port 0
[  711.989935] /home/kernel-ppa/COD/linux/drivers/usb/serial/generic.c:
generic_cleanup - port 0
[  711.990884] /home/kernel-ppa/COD/linux/drivers/usb/serial/mct_u232.c:
mct_u232_read_int_callback - urb shutting down with status: -2
[  711.990924] /home/kernel-ppa/COD/linux/drivers/usb/serial/usb-serial.c:
serial_cleanup - port 0
[  712.001901] /home/kernel-ppa/COD/linux/drivers/usb/serial/usb-serial.c:
serial_install
[  712.001924] /home/kernel-ppa/COD/linux/drivers/usb/serial/usb-serial.c:
serial_open - port 0
[  712.001933] /home/kernel-ppa/COD/linux/drivers/usb/serial/mct_u232.c:
mct_u232_open port 0
[  712.003901] /home/kernel-ppa/COD/linux/drivers/usb/serial/mct_u232.c:
set_modem_ctrl: state=0x6 ==> mcr=0xb
[  712.004907] /home/kernel-ppa/COD/linux/drivers/usb/serial/mct_u232.c:
set_line_ctrl: 0x3
[  712.005890] /home/kernel-ppa/COD/linux/drivers/usb/serial/mct_u232.c:
get_modem_stat: 0x0
[  712.005898] /home/kernel-ppa/COD/linux/drivers/usb/serial/mct_u232.c:
msr_to_state: msr=0x0 ==> state=0x6
[  712.005908] mct_u232 ttyUSB0: usb_submit_urb(read bulk) failed pipe
0x40410480 err -22
[  712.005919] /home/kernel-ppa/COD/linux/drivers/usb/serial/usb-serial.c:
serial_close - port 0
[  712.006883] /home/kernel-ppa/COD/linux/drivers/usb/serial/mct_u232.c:
set_modem_ctrl: state=0x0 ==> mcr=0x8
[  712.006914] /home/kernel-ppa/COD/linux/drivers/usb/serial/usb-serial.c:
serial_cleanup - port 0

And so ttyUSB0 is not usable.

What happens when it is working:

$ uname -r
2.6.34-02063407-generic

$ sudo modprobe usbserial debug=1
$ sudo modprobe mct_u232 debug=1

$ dmesg
[  801.416561] usbcore: registered new interface driver usbserial
[  801.416565] /home/kernel-ppa/COD/linux/drivers/usb/serial/usb-serial.c:
Had to override the open usb serial operation with the generic one.
[  801.416568] /home/kernel-ppa/COD/linux/drivers/usb/serial/usb-serial.c:
Had to override the write usb serial operation with the generic one.
[  801.416571] /home/kernel-ppa/COD/linux/drivers/usb/serial/usb-serial.c:
Had to override the close usb serial operation with the generic one.
[  801.416574] /home/kernel-ppa/COD/linux/drivers/usb/serial/usb-serial.c:
Had to override the write_room usb serial operation with the generic
one.
[  801.416577] /home/kernel-ppa/COD/linux/drivers/usb/serial/usb-serial.c:
Had to override the chars_in_buffer usb serial operation with the
generic one.
[  801.416580] /home/kernel-ppa/COD/linux/drivers/usb/serial/usb-serial.c:
Had to override the read_bulk_callback usb serial operation with the
generic one.
[  801.416582] /home/kernel-ppa/COD/linux/drivers/usb/serial/usb-serial.c:
Had to override the write_bulk_callback usb serial operation with the
generic one.
[  801.416596] USB Serial support registered for generic
[  801.416635] usbcore: registered new interface driver usbserial_generic
[  801.416637] usbserial: USB Serial Driver core
[  812.468040] /home/kernel-ppa/COD/linux/drivers/usb/serial/usb-serial.c:
Had to override the write usb serial operation with the generic one.
[  812.468045] /home/kernel-ppa/COD/linux/drivers/usb/serial/usb-serial.c:
Had to override the write_room usb serial operation with the generic
one.
[  812.468048] /home/kernel-ppa/COD/linux/drivers/usb/serial/usb-serial.c:
Had to override the chars_in_buffer usb serial operation with the
generic one.
[  812.468051] /home/kernel-ppa/COD/linux/drivers/usb/serial/usb-serial.c:
Had to override the read_bulk_callback usb serial operation with the
generic one.
[  812.468054] /home/kernel-ppa/COD/linux/drivers/usb/serial/usb-serial.c:
Had to override the write_bulk_callback usb serial operation with the
generic one.
[  812.468057] /home/kernel-ppa/COD/linux/drivers/usb/serial/usb-serial.c:
Had to override the disconnect usb serial operation with the generic
one.
[  812.468080] USB Serial support registered for MCT U232
[  812.468113] usbcore: registered new interface driver mct_u232
[  812.468115] mct_u232: z2.1:Magic Control Technology USB-RS232
converter driver

# insert U232-P9 adapter

$ dmesg
[  905.373173] usb 6-2: new full speed USB device using uhci_hcd and address 4
[  906.140558] /home/kernel-ppa/COD/linux/drivers/usb/serial/usb-serial.c:
static descriptor matches
[  906.140568] /home/kernel-ppa/COD/linux/drivers/usb/serial/usb-serial.c:
found interrupt in on endpoint 0
[  906.140575] /home/kernel-ppa/COD/linux/drivers/usb/serial/usb-serial.c:
found interrupt in on endpoint 1
[  906.140582] /home/kernel-ppa/COD/linux/drivers/usb/serial/usb-serial.c:
found bulk out on endpoint 2
[  906.140589] mct_u232 6-2:1.0: MCT U232 converter detected
[  906.140596] /home/kernel-ppa/COD/linux/drivers/usb/serial/usb-serial.c:
usb_serial_probe - setting up 2 port structures for this device
[  906.140614] /home/kernel-ppa/COD/linux/drivers/usb/serial/usb-serial.c:
get_free_serial 1
[  906.140621] /home/kernel-ppa/COD/linux/drivers/usb/serial/usb-serial.c:
get_free_serial - minor base = 0
[  906.140629] /home/kernel-ppa/COD/linux/drivers/usb/serial/usb-serial.c:
usb_serial_probe - registering ttyUSB0
[  906.140771] usb 6-2: MCT U232 converter now attached to ttyUSB0

# Run "arduino" Java-based IDE which accesses serial port

$ dmesg
[  974.831471] /home/kernel-ppa/COD/linux/drivers/usb/serial/usb-serial.c:
serial_install
[  974.831485] /home/kernel-ppa/COD/linux/drivers/usb/serial/usb-serial.c:
serial_open - port 0
[  974.836101] /home/kernel-ppa/COD/linux/drivers/usb/serial/usb-serial.c:
serial_ioctl - port 0, cmd 0x5401
[  974.836122] /home/kernel-ppa/COD/linux/drivers/usb/serial/usb-serial.c:
serial_ioctl - port 0, cmd 0x5401
[  974.836128] /home/kernel-ppa/COD/linux/drivers/usb/serial/usb-serial.c:
serial_ioctl - port 0, cmd 0x5402
[  974.836135] /home/kernel-ppa/COD/linux/drivers/usb/serial/usb-serial.c:
serial_set_termios - port 0
[  974.840156] /home/kernel-ppa/COD/linux/drivers/usb/serial/usb-serial.c:
serial_ioctl - port 0, cmd 0x5401
[  974.840181] /home/kernel-ppa/COD/linux/drivers/usb/serial/usb-serial.c:
serial_ioctl - port 0, cmd 0x5401
[  974.840190] /home/kernel-ppa/COD/linux/drivers/usb/serial/usb-serial.c:
serial_ioctl - port 0, cmd 0x5402
[  974.840199] /home/kernel-ppa/COD/linux/drivers/usb/serial/usb-serial.c:
serial_set_termios - port 0
[  974.844091] /home/kernel-ppa/COD/linux/drivers/usb/serial/usb-serial.c:
serial_ioctl - port 0, cmd 0x5401
[  974.844187] /home/kernel-ppa/COD/linux/drivers/usb/serial/usb-serial.c:
serial_close - port 0
[  974.844193] /home/kernel-ppa/COD/linux/drivers/usb/serial/usb-serial.c:
serial_chars_in_buffer - port 0
[  974.844199] /home/kernel-ppa/COD/linux/drivers/usb/serial/generic.c:
usb_serial_generic_chars_in_buffer - port 0
[  974.844204] /home/kernel-ppa/COD/linux/drivers/usb/serial/generic.c:
usb_serial_generic_chars_in_buffer - returns 0
[  974.847107] /home/kernel-ppa/COD/linux/drivers/usb/serial/usb-serial.c:
serial_cleanup - port 0
[  974.858826] /home/kernel-ppa/COD/linux/drivers/usb/serial/usb-serial.c:
serial_install
[  974.858838] /home/kernel-ppa/COD/linux/drivers/usb/serial/usb-serial.c:
serial_open - port 0
[  974.863118] /home/kernel-ppa/COD/linux/drivers/usb/serial/usb-serial.c:
serial_ioctl - port 0, cmd 0x5401
[  974.863128] /home/kernel-ppa/COD/linux/drivers/usb/serial/usb-serial.c:
serial_ioctl - port 0, cmd 0x5401
[  974.863134] /home/kernel-ppa/COD/linux/drivers/usb/serial/usb-serial.c:
serial_ioctl - port 0, cmd 0x5402
[  974.863140] /home/kernel-ppa/COD/linux/drivers/usb/serial/usb-serial.c:
serial_set_termios - port 0
[  974.867114] /home/kernel-ppa/COD/linux/drivers/usb/serial/usb-serial.c:
serial_ioctl - port 0, cmd 0x5401
[  974.867124] /home/kernel-ppa/COD/linux/drivers/usb/serial/usb-serial.c:
serial_ioctl - port 0, cmd 0x5401
[  974.867130] /home/kernel-ppa/COD/linux/drivers/usb/serial/usb-serial.c:
serial_ioctl - port 0, cmd 0x5402
[  974.867136] /home/kernel-ppa/COD/linux/drivers/usb/serial/usb-serial.c:
serial_set_termios - port 0
[  974.871122] /home/kernel-ppa/COD/linux/drivers/usb/serial/usb-serial.c:
serial_ioctl - port 0, cmd 0x5401
[  974.871210] /home/kernel-ppa/COD/linux/drivers/usb/serial/usb-serial.c:
serial_close - port 0
[  974.871219] /home/kernel-ppa/COD/linux/drivers/usb/serial/usb-serial.c:
serial_chars_in_buffer - port 0
[  974.871227] /home/kernel-ppa/COD/linux/drivers/usb/serial/generic.c:
usb_serial_generic_chars_in_buffer - port 0
[  974.871235] /home/kernel-ppa/COD/linux/drivers/usb/serial/generic.c:
usb_serial_generic_chars_in_buffer - returns 0
[  974.874136] /home/kernel-ppa/COD/linux/drivers/usb/serial/usb-serial.c:
serial_cleanup - port 0


Having trouble to find which patch introduced this issue, and what the
problem is exactly. It looks like there are so many updates to USB
from 2.6.34 into 2.6.35 that I'm beyond my reach.

 Eric
--
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