Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1469693 > unrolled thread

Re: Hotplug not working for USB 3.1 docking station on Dell XPS 13

Started byBjorn Helgaas <helgaas@kernel.org>
First post2016-08-24 22:30 +0200
Last post2016-08-25 15:20 +0200
Articles 3 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: Hotplug not working for USB 3.1 docking station on Dell XPS 13 Bjorn Helgaas <helgaas@kernel.org> - 2016-08-24 22:30 +0200
    Re: Hotplug not working for USB 3.1 docking station on Dell XPS 13 Richard van der Hoff <linux@rvanderhoff.org.uk> - 2016-08-25 15:10 +0200
      Re: Hotplug not working for USB 3.1 docking station on Dell XPS 13 Bjorn Helgaas <helgaas@kernel.org> - 2016-08-25 15:20 +0200

#1469693 — Re: Hotplug not working for USB 3.1 docking station on Dell XPS 13

FromBjorn Helgaas <helgaas@kernel.org>
Date2016-08-24 22:30 +0200
SubjectRe: Hotplug not working for USB 3.1 docking station on Dell XPS 13
Message-ID<s9MY9-7ov-9@gated-at.bofh.it>
[+cc Andreas, linux-kernel]

On Wed, Aug 24, 2016 at 05:40:53PM +0100, Richard van der Hoff wrote:
> I'm having problems with a Plugable USB-C docking station, with my
> laptop, a Dell XPS 13 (9350). If the docking station is plugged in
> at boot, it works correctly; however, when I hotplug it after boot,
> the USB devices are not detected until I force a rescan of the PCI
> bus.
> 
> I have also raised this as a bug at
> https://bugzilla.kernel.org/show_bug.cgi?id=151261. There are some
> dmesg traces and lspci logs attached to that bug.
> 
> The lspci output suggests a chain of three PCI bridges (00:1c.0,
> 01:00.0, 02:02.0) before a PCI->USB bridge (05:00.0 or 39:00.0). If
> I boot without the docking station plugged in, 01:00.0 and beyond do
> not appear, and nor do they appear on hotplug. However, if I hotplug
> the docking station and then force a rescan with "echo 1 >
> /sys/bus/pci/devices/0000:00:1c.0/rescan", the PCI bridges and USB
> devices appear and spring into life.
> 
> My impression, and feedback from the linux-usb mailing list, is
> therefore that this is a PCI hotplug problem.

Please include a pointer to the linux-usb analysis.

> There are some ACPI errors in the dmesg at hotplug but they don't
> really mean much to me.

From https://bugzilla.kernel.org/attachment.cgi?id=227331 (dock
present at boot):

  00:1c.0 PCI bridge: Intel Device 9d10 (PCIe Root Port)
    Bus: primary=00, secondary=01, subordinate=39
  01:00.0 PCI bridge: Intel Device 1576 (Alpine Ridge Thunderbolt)
    Bus: primary=01, secondary=02, subordinate=05
  02:02.0 PCI bridge: Intel Device 1576 (Alpine Ridge Thunderbolt)
    Bus: primary=02, secondary=05, subordinate=05
  05:00.0 USB controller: Intel Device 15b5 (Alpine Ridge USB 3.1)

01:00.0 and 02:02.0 are ports of a Thunderbolt switch.  Since they
don't appear when you boot without the docking station, the dock
connection must be between 00:1c.0 and 01:00.0.

From the kernel's point of view, plugging in the dock would be a PCIe
hotplug event on 00:1c.0 that should be handled by pciehp.  Do you
have pciehp included in your kernel?  

Bjorn

[toc] | [next] | [standalone]


#1470130

FromRichard van der Hoff <linux@rvanderhoff.org.uk>
Date2016-08-25 15:10 +0200
Message-ID<sa2zT-1n5-11@gated-at.bofh.it>
In reply to#1469693
On 24/08/16 21:15, Bjorn Helgaas wrote:
> [+cc Andreas, linux-kernel]
>
> On Wed, Aug 24, 2016 at 05:40:53PM +0100, Richard van der Hoff wrote:
>> I'm having problems with a Plugable USB-C docking station, with my
>> laptop, a Dell XPS 13 (9350).  ...
>> My impression, and feedback from the linux-usb mailing list, is
>> therefore that this is a PCI hotplug problem.
>
> Please include a pointer to the linux-usb analysis.

For the record, here: 
http://marc.info/?l=linux-usb&m=147204147226274&w=2, however:

>  From the kernel's point of view, plugging in the dock would be a PCIe
> hotplug event on 00:1c.0 that should be handled by pciehp.  Do you
> have pciehp included in your kernel?

I did not; now I do, and it works perfectly. Thank you! A case of it 
being incredibly obvious once you know what you are looking for.

> 01:00.0 and 02:02.0 are ports of a Thunderbolt switch. Since they
> don't appear when you boot without the docking station, the dock
> connection must be between 00:1c.0 and 01:00.0.

This would strike me as surprising - the dock bills itself as a USB-C 
device, and the Thunderbolt devices look like they are part of the 
laptop chipset to me. To me it seems more likely that those PCI devices 
are part of the laptop, but are powered down until something is plugged 
into the USB-C port.

Still, this is splitting hairs; the point is that they are hotplugged 
PCI devices which need pciehp.

Thanks again for the pointer.

Best regards

Richard

[toc] | [prev] | [next] | [standalone]


#1470132

FromBjorn Helgaas <helgaas@kernel.org>
Date2016-08-25 15:20 +0200
Message-ID<sa2Jz-1qu-7@gated-at.bofh.it>
In reply to#1470130
On Thu, Aug 25, 2016 at 01:13:27PM +0100, Richard van der Hoff wrote:
> On 24/08/16 21:15, Bjorn Helgaas wrote:
> >[+cc Andreas, linux-kernel]
> >
> >On Wed, Aug 24, 2016 at 05:40:53PM +0100, Richard van der Hoff wrote:
> >>I'm having problems with a Plugable USB-C docking station, with my
> >>laptop, a Dell XPS 13 (9350).  ...
> >>My impression, and feedback from the linux-usb mailing list, is
> >>therefore that this is a PCI hotplug problem.
> >
> >Please include a pointer to the linux-usb analysis.
> 
> For the record, here:
> http://marc.info/?l=linux-usb&m=147204147226274&w=2, however:

Huh, turns out you and Oliver were right about it being a PCI problem.
But it would have saved some time to know how Oliver decided that.
Otherwise it's just "he said, she said."

> > From the kernel's point of view, plugging in the dock would be a PCIe
> >hotplug event on 00:1c.0 that should be handled by pciehp.  Do you
> >have pciehp included in your kernel?
> 
> I did not; now I do, and it works perfectly. Thank you! A case of it
> being incredibly obvious once you know what you are looking for.
> 
> >01:00.0 and 02:02.0 are ports of a Thunderbolt switch. Since they
> >don't appear when you boot without the docking station, the dock
> >connection must be between 00:1c.0 and 01:00.0.
> 
> This would strike me as surprising - the dock bills itself as a
> USB-C device, and the Thunderbolt devices look like they are part of
> the laptop chipset to me. To me it seems more likely that those PCI
> devices are part of the laptop, but are powered down until something
> is plugged into the USB-C port.

Yep, I agree, that sounds like a better theory.  Glad it's working
now.

Bjorn

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web