https://bugzilla.kernel.org/show_bug.cgi?id=20382
Summary: PCMCIA D-Link (O2-Micro) USB 2.0 adapter - drives not mounting - mount freezes Product: Drivers Version: 2.5 Kernel Version: 2.6.32 and higher Platform: All OS/Version: Linux Tree: Mainline Status: NEW Severity: high Priority: P1 Component: PCMCIA AssignedTo: linux-pcmcia@lists.infradead.org ReportedBy: david.bluec...@gmail.com Regression: No Created an attachment (id=33662) --> (https://bugzilla.kernel.org/attachment.cgi?id=33662) HardInfo HTML report I have a laptop with USB1 only ports, so I installed a D-link PCMCIA adapter with 2xUSB2.0 ports. Everything went well until kernel 2.6.31 inclusive. When I upgraded to 2.6.32, after the upgrade I could not mount any USB2.0 drive via the PCMCIA adapter. Mount operation froze and I could not even kill the mount process. The problem happens with any USB2.0 drive, from 1.5TB external hard drive to simple USB2.0 flash drives. Upgrading to newer versions has not helped. I tried from 2.6.32.24 to 2.6.35.7 with no success, so I tried to discover what happened. After a lot of investigation, I found the problem in the drivers/pcmcia/o2micro.h file. That file was modified from version 2.6.31 to 2.6.32, adding the device number 6933 to the list of "old bridges" which should have read prefetch and write bursting disabled: (from o2micro.h) /* * older bridges have problems with both read prefetch and write * bursting depending on the combination of the chipset, bridge * and the cardbus card. so disable them to be on the safe side. */ case PCI_DEVICE_ID_O2_6729: case PCI_DEVICE_ID_O2_6730: case PCI_DEVICE_ID_O2_6812: case PCI_DEVICE_ID_O2_6832: case PCI_DEVICE_ID_O2_6836: This caused the problem ---> case PCI_DEVICE_ID_O2_6933: Precisely, my device is the 6933 and it began to give me trouble when that line was added. If I remove that line and recompile the kernel, everything goes well in kernels 2.6.32.24 and 2.6.35.7, for example. >From my lspci, you can see that my device is OZ6933 (6933 in the previous list): 00:13.1 CardBus bridge: O2 Micro, Inc. OZ6933/711E1 CardBus/SmartCardBus Controller (rev 01) Subsystem: Acer Incorporated [ALI] Device 1010 Flags: bus master, stepping, slow devsel, latency 168, IRQ 11 Memory at 20001000 (32-bit, non-prefetchable) [size=4K] Bus: primary=00, secondary=06, subordinate=09, sec-latency=176 Memory window 0: 18000000-1bfff000 (prefetchable) Memory window 1: 1c000000-1ffff000 I/O window 0: 00001c00-00001cff I/O window 1: 00002000-000020ff 16-bit legacy interface ports at 0001 Kernel driver in use: yenta_cardbus Kernel modules: yenta_socket I have compiled a very minimal 2.6.32.24 kernel to perform the tests with a minumin of interference from other modules. (extract from dmesg booting 2.6.32.24, at the beginning you can see how the Yenta O2 has disabled read prefetch and write burst, that's what causes the problem) yenta_cardbus 0000:00:13.0: CardBus bridge found [1025:1010] yenta_cardbus 0000:00:13.0: O2: res at 0x94/0xD4: ea/00 yenta_cardbus 0000:00:13.0: Yenta O2: old bridge, disabling read prefetch/write burst yenta_cardbus 0000:00:13.0: ISA IRQ mask 0x06b8, PCI irq 11 yenta_cardbus 0000:00:13.0: Socket status: 30000820 yenta_cardbus 0000:00:13.1: CardBus bridge found [1025:1010] yenta_cardbus 0000:00:13.1: ISA IRQ mask 0x06b8, PCI irq 11 yenta_cardbus 0000:00:13.1: Socket status: 30000006 pcmcia_socket pcmcia_socket0: pccard: CardBus card inserted into slot 0 pci 0000:02:00.0: reg 10 32bit mmio: [0x000000-0x000fff] pci 0000:02:00.0: supports D1 D2 pci 0000:02:00.0: PME# supported from D0 D1 D2 D3hot pci 0000:02:00.0: PME# disabled pci 0000:02:00.1: reg 10 32bit mmio: [0x000000-0x000fff] pci 0000:02:00.1: supports D1 D2 pci 0000:02:00.1: PME# supported from D0 D1 D2 D3hot pci 0000:02:00.1: PME# disabled pci 0000:02:00.2: reg 10 32bit mmio: [0x000000-0x0000ff] pci 0000:02:00.2: supports D1 D2 pci 0000:02:00.2: PME# supported from D0 D1 D2 D3hot pci 0000:02:00.2: PME# disabled SCSI subsystem initialized usbcore: registered new interface driver usbfs usbcore: registered new interface driver hub usbcore: registered new device driver usb Initializing USB Mass Storage driver... usbcore: registered new interface driver usb-storage USB Mass Storage support registered. ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver ehci_hcd: block sizes: qh 60 qtd 96 itd 160 sitd 96 ehci_hcd 0000:02:00.2: enabling device (0000 -> 0002) ehci_hcd 0000:02:00.2: EHCI Host Controller drivers/usb/core/inode.c: creating file 'devices' drivers/usb/core/inode.c: creating file '001' ehci_hcd 0000:02:00.2: new USB bus registered, assigned bus number 1 ehci_hcd 0000:02:00.2: reset hcs_params 0x2395 dbg=0 cc=2 pcc=3 ports=5 ehci_hcd 0000:02:00.2: reset portroute 1 0 1 0 0 ehci_hcd 0000:02:00.2: reset hcc_params e806 thresh 0 uframes 256/512/1024 park ehci_hcd 0000:02:00.2: park 0 ehci_hcd 0000:02:00.2: reset command 080b02 park=3 ithresh=8 period=1024 Reset HALT ehci_hcd 0000:02:00.2: Enabling legacy PCI PM ehci_hcd 0000:02:00.2: ...powerup ports... ehci_hcd 0000:02:00.2: MWI active ehci_hcd 0000:02:00.2: irq 11, io mem 0x14002000 ehci_hcd 0000:02:00.2: reset command 080b02 park=3 ithresh=8 period=1024 Reset HALT ehci_hcd 0000:02:00.2: init command 010009 (park)=0 ithresh=1 period=256 RUN ehci_hcd 0000:02:00.2: USB 2.0 started, EHCI 1.00 usb usb1: default language 0x0409 usb usb1: udev 1, busnum 1, minor = 0 usb usb1: New USB device found, idVendor=1d6b, idProduct=0002 usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1 usb usb1: Product: EHCI Host Controller usb usb1: Manufacturer: Linux 2.6.32.24-PRUEBAS ehci_hcd usb usb1: SerialNumber: 0000:02:00.2 usb usb1: usb_probe_device usb usb1: configuration #1 chosen from 1 choice usb usb1: adding 1-0:1.0 (config #1, interface 0) hub 1-0:1.0: usb_probe_interface hub 1-0:1.0: usb_probe_interface - got id hub 1-0:1.0: USB hub found hub 1-0:1.0: 5 ports detected hub 1-0:1.0: standalone hub hub 1-0:1.0: individual port power switching hub 1-0:1.0: individual port over-current protection hub 1-0:1.0: power on to power good time: 20ms hub 1-0:1.0: local power source is good hub 1-0:1.0: enabling power on all ports drivers/usb/core/inode.c: creating file '001' ehci_hcd 0000:02:00.2: GetStatus port 2 status 001803 POWER sig=j CSC CONNECT hub 1-0:1.0: port 2: status 0501 change 0001 hub 1-0:1.0: state 7 ports 5 chg 0004 evt 0000 hub 1-0:1.0: port 2, status 0501, change 0000, 480 Mb/s ehci_hcd 0000:02:00.2: port 2 high speed ehci_hcd 0000:02:00.2: GetStatus port 2 status 001005 POWER sig=se0 PE CONNECT usb 1-2: new high speed USB device using ehci_hcd and address 2 ehci_hcd 0000:02:00.2: port 2 high speed ehci_hcd 0000:02:00.2: GetStatus port 2 status 001005 POWER sig=se0 PE CONNECT usb 1-2: default language 0x0409 usb 1-2: udev 2, busnum 1, minor = 1 usb 1-2: New USB device found, idVendor=058f, idProduct=6332 usb 1-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3 usb 1-2: Product: USB Reader usb 1-2: Manufacturer: usb 1-2: SerialNumber: 058F118111B usb 1-2: usb_probe_device usb 1-2: configuration #1 chosen from 1 choice usb 1-2: adding 1-2:1.0 (config #1, interface 0) usb-storage 1-2:1.0: usb_probe_interface usb-storage 1-2:1.0: usb_probe_interface - got id scsi0 : SCSI emulation for USB Mass Storage devices usb-storage: device found at 2 usb-storage: waiting for device to settle before scanning drivers/usb/core/inode.c: creating file '002' scsi 0:0:0:0: Direct-Access Generic USB SD Reader 1.00 PQ: 0 ANSI: 0 scsi 0:0:0:1: Direct-Access Generic USB MS Reader 1.03 PQ: 0 ANSI: 0 sd 0:0:0:1: [sdb] Attached SCSI removable disk sd 0:0:0:0: [sda] 1012480 512-byte logical blocks: (518 MB/494 MiB) sd 0:0:0:0: [sda] Write Protect is off sd 0:0:0:0: [sda] Mode Sense: 03 00 00 00 sd 0:0:0:0: [sda] Assuming drive cache: write through usb-storage: device scan complete sd 0:0:0:0: [sda] Assuming drive cache: write through sda: sda1 sd 0:0:0:0: [sda] Assuming drive cache: write through sd 0:0:0:0: [sda] Attached SCSI removable disk kjournald starting. Commit interval 5 seconds ehci_hcd 0000:02:00.2: IAA with nothing to reclaim? ehci_hcd 0000:02:00.2: port 2 high speed ehci_hcd 0000:02:00.2: GetStatus port 2 status 001005 POWER sig=se0 PE CONNECT usb 1-2: reset high speed USB device using ehci_hcd and address 2 ehci_hcd 0000:02:00.2: port 2 high speed ehci_hcd 0000:02:00.2: GetStatus port 2 status 001005 POWER sig=se0 PE CONNECT ehci_hcd 0000:02:00.2: port 2 high speed ehci_hcd 0000:02:00.2: GetStatus port 2 status 001005 POWER sig=se0 PE CONNECT usb 1-2: reset high speed USB device using ehci_hcd and address 2 ehci_hcd 0000:02:00.2: port 2 high speed ehci_hcd 0000:02:00.2: GetStatus port 2 status 001005 POWER sig=se0 PE CONNECT Here it keeps trying, to no avail. The only workarounds that I found initially were mounting only in read only mode or mounting in read/write but only in USB1.0 mode (using ohci_hcd instead of ehci_hcd module). Neither of these workarounds were satisfactory for me. The solution for me was I removing that "offending" line from o2micro.h, then the USB2.0 drives are correctly mounted as in 2.6.31 and below, and the dmesg file is like the following: (extract from dmesg booting 2.6.32.24 with the corrected o2micro.h file, at the beginning you can see that now the Yenta O2 has ENABLED read prefetch and write burst, and now drives mount correctly) yenta_cardbus 0000:00:13.0: CardBus bridge found [1025:1010] yenta_cardbus 0000:00:13.0: O2: res at 0x94/0xD4: ea/00 yenta_cardbus 0000:00:13.0: O2: enabling read prefetch/write burst yenta_cardbus 0000:00:13.0: ISA IRQ mask 0x06b8, PCI irq 11 yenta_cardbus 0000:00:13.0: Socket status: 30000820 yenta_cardbus 0000:00:13.1: CardBus bridge found [1025:1010] yenta_cardbus 0000:00:13.1: ISA IRQ mask 0x06b8, PCI irq 11 yenta_cardbus 0000:00:13.1: Socket status: 30000006 pcmcia_socket pcmcia_socket0: pccard: CardBus card inserted into slot 0 pci 0000:02:00.0: reg 10 32bit mmio: [0x000000-0x000fff] pci 0000:02:00.0: supports D1 D2 pci 0000:02:00.0: PME# supported from D0 D1 D2 D3hot pci 0000:02:00.0: PME# disabled pci 0000:02:00.1: reg 10 32bit mmio: [0x000000-0x000fff] pci 0000:02:00.1: supports D1 D2 pci 0000:02:00.1: PME# supported from D0 D1 D2 D3hot pci 0000:02:00.1: PME# disabled pci 0000:02:00.2: reg 10 32bit mmio: [0x000000-0x0000ff] pci 0000:02:00.2: supports D1 D2 pci 0000:02:00.2: PME# supported from D0 D1 D2 D3hot pci 0000:02:00.2: PME# disabled SCSI subsystem initialized usbcore: registered new interface driver usbfs usbcore: registered new interface driver hub usbcore: registered new device driver usb Initializing USB Mass Storage driver... usbcore: registered new interface driver usb-storage USB Mass Storage support registered. ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver ehci_hcd: block sizes: qh 60 qtd 96 itd 160 sitd 96 ehci_hcd 0000:02:00.2: enabling device (0000 -> 0002) ehci_hcd 0000:02:00.2: EHCI Host Controller drivers/usb/core/inode.c: creating file 'devices' drivers/usb/core/inode.c: creating file '001' ehci_hcd 0000:02:00.2: new USB bus registered, assigned bus number 1 ehci_hcd 0000:02:00.2: reset hcs_params 0x2395 dbg=0 cc=2 pcc=3 ports=5 ehci_hcd 0000:02:00.2: reset portroute 1 0 1 0 0 ehci_hcd 0000:02:00.2: reset hcc_params e806 thresh 0 uframes 256/512/1024 park ehci_hcd 0000:02:00.2: park 0 ehci_hcd 0000:02:00.2: reset command 080b02 park=3 ithresh=8 period=1024 Reset HALT ehci_hcd 0000:02:00.2: Enabling legacy PCI PM ehci_hcd 0000:02:00.2: ...powerup ports... ehci_hcd 0000:02:00.2: MWI active ehci_hcd 0000:02:00.2: irq 11, io mem 0x14002000 ehci_hcd 0000:02:00.2: reset command 080b02 park=3 ithresh=8 period=1024 Reset HALT ehci_hcd 0000:02:00.2: init command 010009 (park)=0 ithresh=1 period=256 RUN ehci_hcd 0000:02:00.2: USB 2.0 started, EHCI 1.00 usb usb1: default language 0x0409 usb usb1: udev 1, busnum 1, minor = 0 usb usb1: New USB device found, idVendor=1d6b, idProduct=0002 usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1 usb usb1: Product: EHCI Host Controller usb usb1: Manufacturer: Linux 2.6.32.24-PRUEBAS ehci_hcd usb usb1: SerialNumber: 0000:02:00.2 usb usb1: usb_probe_device usb usb1: configuration #1 chosen from 1 choice usb usb1: adding 1-0:1.0 (config #1, interface 0) hub 1-0:1.0: usb_probe_interface hub 1-0:1.0: usb_probe_interface - got id hub 1-0:1.0: USB hub found hub 1-0:1.0: 5 ports detected hub 1-0:1.0: standalone hub hub 1-0:1.0: individual port power switching hub 1-0:1.0: individual port over-current protection hub 1-0:1.0: power on to power good time: 20ms hub 1-0:1.0: local power source is good hub 1-0:1.0: enabling power on all ports drivers/usb/core/inode.c: creating file '001' ehci_hcd 0000:02:00.2: GetStatus port 2 status 001803 POWER sig=j CSC CONNECT hub 1-0:1.0: port 2: status 0501 change 0001 hub 1-0:1.0: state 7 ports 5 chg 0004 evt 0000 hub 1-0:1.0: port 2, status 0501, change 0000, 480 Mb/s ehci_hcd 0000:02:00.2: port 2 high speed ehci_hcd 0000:02:00.2: GetStatus port 2 status 001005 POWER sig=se0 PE CONNECT usb 1-2: new high speed USB device using ehci_hcd and address 2 ehci_hcd 0000:02:00.2: port 2 high speed ehci_hcd 0000:02:00.2: GetStatus port 2 status 001005 POWER sig=se0 PE CONNECT usb 1-2: default language 0x0409 usb 1-2: udev 2, busnum 1, minor = 1 usb 1-2: New USB device found, idVendor=058f, idProduct=6332 usb 1-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3 usb 1-2: Product: USB Reader usb 1-2: Manufacturer: usb 1-2: SerialNumber: 058F118111B usb 1-2: usb_probe_device usb 1-2: configuration #1 chosen from 1 choice usb 1-2: adding 1-2:1.0 (config #1, interface 0) usb-storage 1-2:1.0: usb_probe_interface usb-storage 1-2:1.0: usb_probe_interface - got id scsi0 : SCSI emulation for USB Mass Storage devices usb-storage: device found at 2 usb-storage: waiting for device to settle before scanning drivers/usb/core/inode.c: creating file '002' scsi 0:0:0:0: Direct-Access Generic USB SD Reader 1.00 PQ: 0 ANSI: 0 scsi 0:0:0:1: Direct-Access Generic USB MS Reader 1.03 PQ: 0 ANSI: 0 sd 0:0:0:0: [sda] 1012480 512-byte logical blocks: (518 MB/494 MiB) sd 0:0:0:1: [sdb] Attached SCSI removable disk sd 0:0:0:0: [sda] Write Protect is off sd 0:0:0:0: [sda] Mode Sense: 03 00 00 00 sd 0:0:0:0: [sda] Assuming drive cache: write through usb-storage: device scan complete sd 0:0:0:0: [sda] Assuming drive cache: write through sda: sda1 sd 0:0:0:0: [sda] Assuming drive cache: write through sd 0:0:0:0: [sda] Attached SCSI removable disk kjournald starting. Commit interval 5 seconds EXT3 FS on sda1, internal journal EXT3-fs: recovery complete. EXT3-fs: mounted filesystem with writeback data mode. I have attached my hardinfo HTML report, got from my currently working 2.6.31 kernel, so you can have more information about the hardware in my laptop. It's an Acer Travelmate 524TE. I hope that all this information can help the developers to find a proper and permanent fix in future kernel versions. Thank you in advance and best regards. David Bluecame. -- Configure bugmail: https://bugzilla.kernel.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug. _______________________________________________ Linux PCMCIA reimplementation list http://lists.infradead.org/mailman/listinfo/linux-pcmcia