On Sun, 24 May 2009, Alan Stern wrote: > I recently got a pl2303 serial device at work, so I'll try to reproduce > this and let you know how it works out in a couple of days. I tried the experiment, using 2.6.30-rc6 + gregkh-all-2.6.30-rc6.patch, and everything worked perfectly. Here's the kernel log (with USB debugging enabled): First plug-in: [ 97.041055] usb usb2: usb resume [ 97.041150] usb usb2: wakeup_rh [ 97.080059] hub 2-0:1.0: hub_resume [ 97.080197] uhci_hcd 0000:00:1d.1: port 2 portsc 0093,00 [ 97.080300] hub 2-0:1.0: port 2: status 0101 change 0001 [ 97.184080] hub 2-0:1.0: state 7 ports 2 chg 0004 evt 0000 [ 97.184202] hub 2-0:1.0: port 2, status 0101, change 0000, 12 Mb/s [ 97.296073] usb 2-2: new full speed USB device using uhci_hcd and address 4 [ 97.449049] usb 2-2: default language 0x0409 [ 97.459048] usb 2-2: udev 4, busnum 2, minor = 131 [ 97.459140] usb 2-2: New USB device found, idVendor=067b, idProduct=2303 [ 97.459235] usb 2-2: New USB device strings: Mfr=1, Product=2, SerialNumber=0 [ 97.459330] usb 2-2: Product: USB-Serial Controller [ 97.459419] usb 2-2: Manufacturer: Prolific Technology Inc. [ 97.459817] usb 2-2: uevent [ 97.459981] usb 2-2: usb_probe_device [ 97.462144] usb 2-2: configuration #1 chosen from 1 choice [ 97.465081] usb 2-2: adding 2-2:1.0 (config #1, interface 0) [ 97.465330] usb 2-2:1.0: uevent [ 97.465501] pl2303 2-2:1.0: usb_probe_interface [ 97.465593] pl2303 2-2:1.0: usb_probe_interface - got id [ 97.465693] pl2303 2-2:1.0: pl2303 converter detected [ 97.480502] usb 2-2: pl2303 converter now attached to ttyUSB0 First unplug: [ 100.592076] hub 2-0:1.0: state 7 ports 2 chg 0000 evt 0004 [ 100.592199] uhci_hcd 0000:00:1d.1: port 2 portsc 008a,00 [ 100.592331] hub 2-0:1.0: port 2, status 0100, change 0003, 12 Mb/s [ 100.592427] usb 2-2: USB disconnect, address 4 [ 100.592515] usb 2-2: unregistering device [ 100.592601] usb 2-2: usb_disable_device nuking all URBs [ 100.592710] usb 2-2: unregistering interface 2-2:1.0 [ 100.594310] pl2303 ttyUSB0: pl2303 converter now disconnected from ttyUSB0 [ 100.594532] pl2303 2-2:1.0: device disconnected [ 100.594659] usb 2-2:1.0: uevent [ 100.595674] usb 2-2: uevent [ 100.720077] hub 2-0:1.0: debounce: port 2: total 100ms stable 100ms status 0x100 [ 102.080054] usb usb2: suspend_rh (auto-stop) [ 102.816348] hub 2-0:1.0: hub_suspend [ 102.816467] usb usb2: bus auto-suspend [ 102.816561] usb usb2: suspend_rh Second plug-in: [ 104.041092] usb usb2: usb resume [ 104.041187] usb usb2: wakeup_rh [ 104.080058] hub 2-0:1.0: hub_resume [ 104.080195] uhci_hcd 0000:00:1d.1: port 2 portsc 0093,00 [ 104.080299] hub 2-0:1.0: port 2: status 0101 change 0001 [ 104.184080] hub 2-0:1.0: state 7 ports 2 chg 0004 evt 0000 [ 104.184201] hub 2-0:1.0: port 2, status 0101, change 0000, 12 Mb/s [ 104.296073] usb 2-2: new full speed USB device using uhci_hcd and address 5 [ 104.448049] usb 2-2: default language 0x0409 [ 104.458050] usb 2-2: udev 5, busnum 2, minor = 132 [ 104.458141] usb 2-2: New USB device found, idVendor=067b, idProduct=2303 [ 104.458234] usb 2-2: New USB device strings: Mfr=1, Product=2, SerialNumber=0 [ 104.458327] usb 2-2: Product: USB-Serial Controller [ 104.458415] usb 2-2: Manufacturer: Prolific Technology Inc. [ 104.458799] usb 2-2: uevent [ 104.458973] usb 2-2: usb_probe_device [ 104.459062] usb 2-2: configuration #1 chosen from 1 choice [ 104.462060] usb 2-2: adding 2-2:1.0 (config #1, interface 0) [ 104.462299] usb 2-2:1.0: uevent [ 104.462466] pl2303 2-2:1.0: usb_probe_interface [ 104.462557] pl2303 2-2:1.0: usb_probe_interface - got id [ 104.462656] pl2303 2-2:1.0: pl2303 converter detected [ 104.478419] usb 2-2: pl2303 converter now attached to ttyUSB0 [ 104.479315] hub 2-0:1.0: state 7 ports 2 chg 0000 evt 0004 Second unplug: [ 107.536081] hub 2-0:1.0: state 7 ports 2 chg 0000 evt 0004 [ 107.536206] uhci_hcd 0000:00:1d.1: port 2 portsc 008a,00 [ 107.536341] hub 2-0:1.0: port 2, status 0100, change 0003, 12 Mb/s [ 107.536438] usb 2-2: USB disconnect, address 5 [ 107.536527] usb 2-2: unregistering device [ 107.536614] usb 2-2: usb_disable_device nuking all URBs [ 107.536724] usb 2-2: unregistering interface 2-2:1.0 [ 107.538349] pl2303 ttyUSB0: pl2303 converter now disconnected from ttyUSB0 [ 107.538571] pl2303 2-2:1.0: device disconnected [ 107.538699] usb 2-2:1.0: uevent [ 107.539700] usb 2-2: uevent [ 107.664079] hub 2-0:1.0: debounce: port 2: total 100ms stable 100ms status 0x100 [ 109.024038] usb usb2: suspend_rh (auto-stop) [ 109.816547] hub 2-0:1.0: hub_suspend [ 109.816662] usb usb2: bus auto-suspend [ 109.816756] usb usb2: suspend_rh Third plug-in: [ 111.178001] usb usb2: usb resume [ 111.178098] usb usb2: wakeup_rh [ 111.216059] hub 2-0:1.0: hub_resume [ 111.216199] uhci_hcd 0000:00:1d.1: port 2 portsc 0093,00 [ 111.216303] hub 2-0:1.0: port 2: status 0101 change 0001 [ 111.320084] hub 2-0:1.0: state 7 ports 2 chg 0004 evt 0000 [ 111.320207] hub 2-0:1.0: port 2, status 0101, change 0000, 12 Mb/s [ 111.432072] usb 2-2: new full speed USB device using uhci_hcd and address 6 [ 111.585048] usb 2-2: default language 0x0409 [ 111.595048] usb 2-2: udev 6, busnum 2, minor = 133 [ 111.595140] usb 2-2: New USB device found, idVendor=067b, idProduct=2303 [ 111.595236] usb 2-2: New USB device strings: Mfr=1, Product=2, SerialNumber=0 [ 111.595332] usb 2-2: Product: USB-Serial Controller [ 111.595423] usb 2-2: Manufacturer: Prolific Technology Inc. [ 111.595823] usb 2-2: uevent [ 111.595986] usb 2-2: usb_probe_device [ 111.596111] usb 2-2: configuration #1 chosen from 1 choice [ 111.599071] usb 2-2: adding 2-2:1.0 (config #1, interface 0) [ 111.599302] usb 2-2:1.0: uevent [ 111.599468] pl2303 2-2:1.0: usb_probe_interface [ 111.599559] pl2303 2-2:1.0: usb_probe_interface - got id [ 111.599658] pl2303 2-2:1.0: pl2303 converter detected [ 111.615433] usb 2-2: pl2303 converter now attached to ttyUSB0 Third unplug: [ 113.984081] hub 2-0:1.0: state 7 ports 2 chg 0000 evt 0004 [ 113.984205] uhci_hcd 0000:00:1d.1: port 2 portsc 008a,00 [ 113.984339] hub 2-0:1.0: port 2, status 0100, change 0003, 12 Mb/s [ 113.984436] usb 2-2: USB disconnect, address 6 [ 113.984525] usb 2-2: unregistering device [ 113.984613] usb 2-2: usb_disable_device nuking all URBs [ 113.984725] usb 2-2: unregistering interface 2-2:1.0 [ 113.986333] pl2303 ttyUSB0: pl2303 converter now disconnected from ttyUSB0 [ 113.986555] pl2303 2-2:1.0: device disconnected [ 113.986682] usb 2-2:1.0: uevent [ 113.987677] usb 2-2: uevent [ 114.112077] hub 2-0:1.0: debounce: port 2: total 100ms stable 100ms status 0x100 [ 115.472039] usb usb2: suspend_rh (auto-stop) [ 116.816390] hub 2-0:1.0: hub_suspend [ 116.816510] usb usb2: bus auto-suspend [ 116.816605] usb usb2: suspend_rh Each time the pl2303 was plugged in, it was assigned to ttyUSB0. Now, I don't have any programs that try to use the serial device while it is plugged in. Maybe that is the reason you see the device number incrementing. Have you checked to see if the device file is still in use after you unplug the pl2303? Or maybe 2.6.29.4 behaves differently from 2.6.30-rc6. Have you tried using a 2.6.30-rc kernel? 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