Bug 43192 - USB3.0 ExpressCards do not recognize USB-plug events through PCMCIA adapter
Summary: USB3.0 ExpressCards do not recognize USB-plug events through PCMCIA adapter
Status: NEEDINFO
Alias: None
Product: Drivers
Classification: Unclassified
Component: PCI (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: drivers_pci@kernel-bugs.osdl.org
URL: https://bugzilla.novell.com/show_bug....
Keywords:
Depends on:
Blocks:
 
Reported: 2012-05-02 12:15 UTC by Elmar Stellnberger
Modified: 2017-05-16 16:55 UTC (History)
4 users (show)

See Also:
Kernel Version: 4.8.0-rc1-ARCH-26316-g65ea11e
Subsystem:
Regression: No
Bisected commit-id:


Attachments
booting coldplugged (42.81 KB, text/plain)
2012-10-07 08:39 UTC, Elmar Stellnberger
Details
unplugged after boot (40.19 KB, application/octet-stream)
2012-10-07 08:39 UTC, Elmar Stellnberger
Details
(re-)hotplugging (after coldboot) (42.78 KB, text/plain)
2012-10-07 08:42 UTC, Elmar Stellnberger
Details
messages extract from plugging in UBS3.0 ExpressCard via PCMCIA adapter (4.18 KB, text/plain)
2014-01-01 20:12 UTC, Elmar Stellnberger
Details
lspci -vvv from plugging in UBS3.0 ExpressCard via PCMCIA adapter (3.13.0-rc6-4-default, i686) (11.34 KB, text/plain)
2014-01-01 20:17 UTC, Elmar Stellnberger
Details
lspci -vvv, everything unplugged (3.13.0-rc6-4-default, i686) (9.86 KB, text/plain)
2014-01-01 20:19 UTC, Elmar Stellnberger
Details
/proc/interrupts before plugging in an USB stick (1.25 KB, text/plain)
2014-01-01 21:53 UTC, Elmar Stellnberger
Details
/proc/interrupts after plugging in an USB stick (1.25 KB, text/plain)
2014-01-01 21:53 UTC, Elmar Stellnberger
Details
/var/log/messages excerpt with vmlinuz-3.11.6-4-debug (19.67 KB, text/plain)
2014-01-01 21:55 UTC, Elmar Stellnberger
Details
dmesg with irqpoll in /proc/cmdline; kernel 3.13.0-rc6-4-default (4.72 KB, text/plain)
2014-01-09 11:11 UTC, Elmar Stellnberger
Details
dmesg with irqpoll in /proc/cmdline; kernel 3.13.0-rc6-4-default insert-remove (new) (52.66 KB, text/plain)
2014-06-29 16:39 UTC, Elmar Stellnberger
Details
lspci -tv (3.18-rc3) (1.01 KB, text/plain)
2014-11-09 19:07 UTC, Elmar Stellnberger
Details
lspci -vvxxx (3.18-rc3) (21.42 KB, text/plain)
2014-11-09 19:09 UTC, Elmar Stellnberger
Details
dmesg (3.18-rc3 + part of 3.12.21 dmesg: Mageia) (248.57 KB, text/plain)
2014-11-09 19:28 UTC, Elmar Stellnberger
Details
dmesg.tail - of inserting merely the expresscard adapter without usb card (2.31 KB, text/plain)
2016-01-08 21:30 UTC, Elmar Stellnberger
Details
journalctl -xb: EcoAthlon (158.02 KB, text/plain)
2016-02-29 17:26 UTC, Elmar Stellnberger
Details
dmesg with 4.8.0-rc1-ARCH-26316-g65ea11e (83.82 KB, text/plain)
2016-08-21 06:21 UTC, Elmar Stellnberger
Details

Description Elmar Stellnberger 2012-05-02 12:15:12 UTC
Whether I try to use ExpressCards on a system with native ExpressCard interface (Amilo Xi2550, AdapterNo: 07473DD) or with a PCMCIA to ExpressCard adapter (DeLock Card Adapter CardBus for E-Card) lspci does not recognize my ExpressCards (tried with DeLock and Transcend USB 3.0 adapter). The only thing which is recognized is the PCMCIA to ExpressCard adapter, not the ExpressCards themselves.

# lspci | grep -i cardbus
00:0b.0 CardBus bridge: Texas Instruments PCIxx12 Cardbus Controller

# diff lspci-n_adapter-only/transcend/delock.msg lspci-n_none.msg
17,18d16
< 03:00.0 0c03: 1033:0035 (rev 44)
< 03:00.1 0c03: 1033:00e0 (rev 05)
Comment 1 Elmar Stellnberger 2012-10-07 08:38:23 UTC
 The ExpressCard interface (Amilo Xi2550, AdapterNo: 07473DD) works well if you boot coldplugged. See the lspci -vv listings for kernel 3.4.6-1.1:
Comment 2 Elmar Stellnberger 2012-10-07 08:39:18 UTC
Created attachment 82571 [details]
booting coldplugged
Comment 3 Elmar Stellnberger 2012-10-07 08:39:45 UTC
Created attachment 82581 [details]
unplugged after boot
Comment 4 Elmar Stellnberger 2012-10-07 08:42:23 UTC
Created attachment 82591 [details]
(re-)hotplugging (after coldboot)

  If I re-plug the expresscard (hotplug) the flags recognized by lspci -vv are different and the card does not work.
Comment 5 Bjorn Helgaas 2013-09-20 21:01:37 UTC
v3.12-rc1 contains many acpiphp updates, as well as fixes to the
code that decides whether to use acpiphp or pciehp.  Can you please
retest with v3.12-rc1 or later, attach the complete dmesg log,
and note whether this issue is resolved?
Comment 6 Elmar Stellnberger 2014-01-01 20:12:02 UTC
Created attachment 120501 [details]
messages extract from plugging in UBS3.0 ExpressCard via PCMCIA adapter

The card is recognized at least via the PCMCIA-Express card adapter now; however it does not recognize any plug-in and plug-out events of individual USB devices (tested with mouse and an USB-stick); tested with 3.13.0-rc6-4-default, i686.
Comment 7 Elmar Stellnberger 2014-01-01 20:17:46 UTC
Created attachment 120511 [details]
lspci -vvv from plugging in UBS3.0 ExpressCard via PCMCIA adapter (3.13.0-rc6-4-default, i686)
Comment 8 Elmar Stellnberger 2014-01-01 20:19:35 UTC
Created attachment 120521 [details]
lspci -vvv, everything unplugged (3.13.0-rc6-4-default, i686)
Comment 9 Elmar Stellnberger 2014-01-01 21:53:17 UTC
Created attachment 120531 [details]
/proc/interrupts before plugging in an USB stick
Comment 10 Elmar Stellnberger 2014-01-01 21:53:35 UTC
Created attachment 120541 [details]
/proc/interrupts after plugging in an USB stick
Comment 11 Elmar Stellnberger 2014-01-01 21:55:44 UTC
Created attachment 120551 [details]
/var/log/messages excerpt with vmlinuz-3.11.6-4-debug

perhaps also a kernel configured for debugging would help (here we have an elder version of such a kernel).
Comment 12 Bjorn Helgaas 2014-01-09 00:58:46 UTC
Thanks, Elmar.  Seems like we might be making progress -- at least we recognize the USB controllers, and the ohci and ehci drivers claimed them.  I expect those drivers work fine, but it looks like they aren't getting interrupts.  I could easily believe we have a problem with routing interrupts through the CardBus bridge at 00:08.0.

Can you boot with "irqpoll" and see if that makes a difference?  Please attach the *complete* dmesg log, e.g., output of the "dmesg" command.
Comment 13 Elmar Stellnberger 2014-01-09 11:11:39 UTC
Created attachment 121361 [details]
dmesg with irqpoll in /proc/cmdline; kernel 3.13.0-rc6-4-default

I fear that there is no difference with and without the irqpoll kernel parameter
Comment 14 Bjorn Helgaas 2014-06-05 22:25:14 UTC
To summarize: the system has a CardBus bridge at 00:08.0.  If you boot with the CardBus slot empty, then insert a UBS3.0 ExpressCard via PCMCIA adapter, we detect the insertion and enumerate the new PCI devices (attachment 120551 [details]) at 02:00.0 and 02:00.1:

  00:08.0 CardBus bridge: O2 Micro, Inc. OZ601/6912/711E0 CardBus/SmartCardBus Controller
    Bus: primary=00, secondary=02, subordinate=05, sec-latency=176
  02:00.0 USB controller: NEC Corporation OHCI USB Controller
  02:00.1 USB controller: NEC Corporation uPD72010x USB 2.0 Controller

  pcmcia_socket pcmcia_socket0: pccard: CardBus card inserted into slot 0
  pci 0000:02:00.0: [1033:0035] type 00 class 0x0c0310
  pci 0000:02:00.1: [1033:00e0] type 00 class 0x0c0320
  ohci-pci 0000:02:00.0: new USB bus registered, assigned bus number 3
  ehci-pci 0000:02:00.1: new USB bus registered, assigned bus number 4

If you plug a USB stick into the USB3.0 ExpressCard, it doesn't work, and the USB devices receive no interrupts (ohci_hcd:usb3 and ehci_hcd:usb4 are both on IRQ5, and no IRQ5 was received between attachment 120531 [details] and attachment 120541 [details]).

Just to double-check, you did supply "irqpoll" to the bootloader (as opposed to "echo irqpoll > /proc/cmdline" or something?  Could you attach a complete dmesg, not just the excerpts we have so far?  The kernel prints the command-line arguments at boot-time, and that's the only way to know for sure that it's doing what we expect.

I can think of two possibilities:
  1) Interrupts aren't getting from the USB device through the CardBus bridge.  With "irqpoll", we should call every ISR on every timer interrupt, so this should work around the problem (with poor performance).
  2) MMIO accesses from the driver aren't getting through the CardBus bridge to the USB device.  This seems unlikely because the driver init seems to work fine.  But seeing the entire dmesg log would let us verify that the BARs are assigned from valid regions.
Comment 15 Elmar Stellnberger 2014-06-29 16:39:51 UTC
Created attachment 141361 [details]
dmesg with irqpoll in /proc/cmdline; kernel 3.13.0-rc6-4-default insert-remove (new)
Comment 16 Elmar Stellnberger 2014-11-02 13:59:55 UTC
No advance on this bug? various Express Cards (USB3.0, eSATA, etc.) are affected (generic ExpressCard, ExpressCard over PCMCIA).- Bug 87531 may be different but I guess that some kind of low level feature does miss here and there.
Comment 17 Yinghai Lu 2014-11-04 00:08:04 UTC
Looks like this bug is with "ExpressCard via cardbus/ExpressCard adapter", right?

If so, please update title accordingly.

Does ExpressCard work on native ExpressCard slot?
Comment 18 Elmar Stellnberger 2014-11-04 10:19:22 UTC
  The bug can be observed with both the native ExpressCard slot and the ExpressCard via cardbus/ExpressCard adapter. The only difference is that with the cardbus/ExpressCard adapter at least some logging messages at card insertion/removal end up in the logs while with the native ExpressCard slot it does not react at all on card insertion/removal and USB insertion/removal (native slot last tested today with kernel 3.2.0-4-amd64).
  Consequently I wanna suggest that we start with testing the PCMCIA adapter since the PCMCIA interface is already more progressed (though we have wondered that there is simply nothing in the logs on USB plug/unplug into/from the ExpressCard even with irqpoll or a debug kernel: see the attachements).
  If you should really need some test with the native slot let us do that now with the old 3.2.0-4 kernel or in one or two weeks when my only computer with native Express Card slot will be repaired (sorry for the inconvenience; its power supply for recharging the batteries needs to be fixed).
Comment 19 Yinghai Lu 2014-11-05 03:46:31 UTC
I would like to make ExpressCard slot working at first.
Comment 20 Elmar Stellnberger 2014-11-05 13:58:18 UTC
Hi Yinghai! Further testing has shown that the USB3.0 ExpressCard is in deed recognized via the native slot; however only on cold-boot: I have opened Bug 87781 for this purpose.
Comment 21 Yinghai Lu 2014-11-08 20:32:57 UTC
Can you try latest kernel? like 3.17 or 3.18-rc2?

Please post boot log with "debug ignore_loglevel initcall_debug"
and output from
lspci -tv
lspci -vvxxx
Comment 22 Elmar Stellnberger 2014-11-09 19:07:09 UTC
Created attachment 157071 [details]
lspci -tv (3.18-rc3)
Comment 23 Elmar Stellnberger 2014-11-09 19:09:32 UTC
Created attachment 157081 [details]
lspci -vvxxx (3.18-rc3)

  Booting with 3.18-rc3 and 'debug ignore_loglevel initcall_debug' there is simply nothing in the logs when I plug or unplug the adapter+ExpressCard+USBstick.
Comment 24 Elmar Stellnberger 2014-11-09 19:28:19 UTC
Created attachment 157091 [details]
dmesg (3.18-rc3 + part of 3.12.21 dmesg: Mageia)

Hmm, Mageia seems to strip the beginning of the dmesg (no early logging). Here is a concatenated dmesg.old + dmesg with 3.18-rc3 + a previous kernel. Hope that will help.
Comment 25 Elmar Stellnberger 2014-11-23 18:38:07 UTC
Bug 88801 may be related (about SCM PCMCIA CF adapter).
Comment 26 Elmar Stellnberger 2015-05-20 16:49:59 UTC
It seems to be the same with Linux 4.0.1-1: events on plugging the USB3.0 adapter itself but no more events in dmesg when plugging new USB devices into the adapter.
Comment 27 Elmar Stellnberger 2016-01-08 21:30:26 UTC
Created attachment 199061 [details]
dmesg.tail - of inserting merely the expresscard adapter without usb card

Could it be that the ExpressCard adapter is mis-recognized as USB adapter here? I have now retried to insert the adpater with 4.1.13-desktop-2.mga5 without any USB ExpressCard inside the adpater and it was apparently recognized as usb hub instead of an ExpressCard adapter. If this is the wrong driver which one would be the right one?
# lspcmcia
Socket 0 Bridge:        [yenta_cardbus]         (bus ID: 0000:00:08.0)
  CardBus card -- see "lspci" for more information
# lspci | grep -i cardbus
00:08.0 CardBus bridge: O2 Micro, Inc. OZ601/6912/711E0 CardBus/SmartCardBus Controller
# dmesg | tail -n 2
[ 5007.133207] hub 3-0:1.0: USB hub found
[ 5007.133230] hub 3-0:1.0: 3 ports detected
Comment 28 Elmar Stellnberger 2016-02-29 17:23:23 UTC
confirmed for kernel 4.5.0-rc4 on an Athlon XP 3000 system. Note that the USB hub appears on insertion of the adapter not on insertion of the USB ExpressCard into the adapter. Could it be that the adapter is wrongly recognized as USB hub and can thus not serve its purpose? (i.e. there are no more plug events for the ExpressCard itself and the USB3 devices themselves, just for the adapter). Journal-Log follows in the next comment.
Comment 29 Elmar Stellnberger 2016-02-29 17:26:34 UTC
Created attachment 206461 [details]
journalctl -xb: EcoAthlon
Comment 30 Elmar Stellnberger 2016-02-29 17:28:38 UTC
somehow similar: Bug 113441 - kernel does not receive any USB3.0 plug/unplug events in certain system configurations
Comment 31 Elmar Stellnberger 2016-08-21 06:21:59 UTC
Created attachment 229541 [details]
dmesg with 4.8.0-rc1-ARCH-26316-g65ea11e

This one does not seem to have improved much with 4.8.0-rc1-ARCH-26316-g65ea11e. Nonetheless if anyone would be ready to do something about it just tell me what you would neeed ¿irqpoll-dmesg or the like?.
Comment 32 Elmar Stellnberger 2016-08-21 06:22:48 UTC
switched from 3.18 -> 4.8.0-rc1-ARCH-26316-g65ea11e

Note You need to log in before you can comment on or make changes to this bug.