linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* possible bug regarding pciehp
@ 2015-09-02 14:35 Tormen
  2015-09-02 15:27 ` Greg KH
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Tormen @ 2015-09-02 14:35 UTC (permalink / raw)
  To: linux-hotplug

Hi,

I am contacting you, hoping that either you can maybe help
or you know someone who can help :)

I opened a bug related to the tg3 driver when hot-plugging via pciehp:
https://bugzilla.kernel.org/show_bug.cgi?id\x100191

I am desperate because :
	(a) there is also a brcmfmac related driver.
So both wireless and wired internet have problems:
	https://bugzilla.kernel.org/show_bug.cgi?id\x100201
	(b) there was no input by anybody so far. Maybe because I wrongly
categorized the tg3 bug ?

The bug is related to Broadcom tg3 driver and the pciehp hotplug framework.
In order to sort out where the problem(s) lies, I wanted to kindly ask
you if you could have a look at the bug :
https://bugzilla.kernel.org/show_bug.cgi?id\x100191
?
And/or if you could help me figuring out if pciehp is causing this
problem and/or if tg3 is to blame.

Please let me know if you would need any further information.

If you can't help me, I would also appreciate a lot if you could point
me to someone that you deem relevant for this bug.


Thanks a lot in advance !

Tormen

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: possible bug regarding pciehp
  2015-09-02 14:35 possible bug regarding pciehp Tormen
@ 2015-09-02 15:27 ` Greg KH
  2015-09-04  7:54 ` Tormen
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Greg KH @ 2015-09-02 15:27 UTC (permalink / raw)
  To: linux-hotplug

On Wed, Sep 02, 2015 at 04:35:49PM +0200, Tormen wrote:
> Hi,
> 
> I am contacting you, hoping that either you can maybe help
> or you know someone who can help :)
> 
> I opened a bug related to the tg3 driver when hot-plugging via pciehp:
> https://bugzilla.kernel.org/show_bug.cgi?id\x100191
> 
> I am desperate because :
> 	(a) there is also a brcmfmac related driver.
> So both wireless and wired internet have problems:
> 	https://bugzilla.kernel.org/show_bug.cgi?id\x100201
> 	(b) there was no input by anybody so far. Maybe because I wrongly
> categorized the tg3 bug ?
> 
> The bug is related to Broadcom tg3 driver and the pciehp hotplug framework.
> In order to sort out where the problem(s) lies, I wanted to kindly ask
> you if you could have a look at the bug :
> https://bugzilla.kernel.org/show_bug.cgi?id\x100191
> ?
> And/or if you could help me figuring out if pciehp is causing this
> problem and/or if tg3 is to blame.

Odds are neither are the issue, this is a thunderbolt problem.  Make
sure you have enabled thunderbolt properly in your kernel if you want
hot-add of a device to work.

I think the code has only been tested on older macbooks, changes might
be needed for newer ones given that Apple's thunderbolt controller is
"special" (i.e. doesn't follow the specification.)

good luck!

greg k-h

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: possible bug regarding pciehp
  2015-09-02 14:35 possible bug regarding pciehp Tormen
  2015-09-02 15:27 ` Greg KH
@ 2015-09-04  7:54 ` Tormen
  2015-09-05  3:38 ` Greg KH
  2015-09-18  9:19 ` Tormen
  3 siblings, 0 replies; 5+ messages in thread
From: Tormen @ 2015-09-04  7:54 UTC (permalink / raw)
  To: linux-hotplug

On 09/02/2015 05:27 PM, Greg KH wrote:
> On Wed, Sep 02, 2015 at 04:35:49PM +0200, Tormen wrote:
>> Hi,
>>
>> I am contacting you, hoping that either you can maybe help
>> or you know someone who can help :)
>>
>> I opened a bug related to the tg3 driver when hot-plugging via pciehp:
>> https://bugzilla.kernel.org/show_bug.cgi?id\x100191
>>
>> I am desperate because :
>> 	(a) there is also a brcmfmac related driver.
>> So both wireless and wired internet have problems:
>> 	https://bugzilla.kernel.org/show_bug.cgi?id\x100201
>> 	(b) there was no input by anybody so far. Maybe because I wrongly
>> categorized the tg3 bug ?
>>
>> The bug is related to Broadcom tg3 driver and the pciehp hotplug framework.
>> In order to sort out where the problem(s) lies, I wanted to kindly ask
>> you if you could have a look at the bug :
>> https://bugzilla.kernel.org/show_bug.cgi?id\x100191
>> ?
>> And/or if you could help me figuring out if pciehp is causing this
>> problem and/or if tg3 is to blame.
> 
> Odds are neither are the issue, this is a thunderbolt problem.  Make
> sure you have enabled thunderbolt properly in your kernel if you want
> hot-add of a device to work.
>
> I think the code has only been tested on older macbooks, changes might
> be needed for newer ones given that Apple's thunderbolt controller is
> "special" (i.e. doesn't follow the specification.)
>
> good luck!
>
> greg k-h
>

Thanks a lot for your feedback !

Is "the code" that you are referring to the thunderbolt kernel module ?

The kernel I am using uses:
CONFIG_THUNDERBOLT=m -- The module will be called thunderbolt.
But when I boot-up with the plugged network device, lsmod does not show
thunderbolt.

So not sure how I can check further if thunderbolt is properly in my kernel?
Or is it possible that I would need to load the thunderbolt module
manually in order to make hotplug work?

When the network driver is loaded it seems to connect as a "PCI Express"
device:
	tg3 0000:0a:00.0 eth0: Tigon3 [partno(BCM957762) rev 57766000] (PCI
Express)

When I unplug the adapter the first thing appearing in dmesg is pciehp:
[  210.992938] usb 1-2: USB disconnect, device number 4
[ 1557.453818] pciehp 0000:06:03.0:pcie24: slot(3-2): Link Down event
[ 1557.453870] pciehp 0000:06:03.0:pcie24: Cannot remove display device
0000:08:00.0
[ 1557.509812] pciehp 0000:06:03.0:pcie24: Card not present on Slot(3-2)
[ 1558.721344] tg3 0000:0a:00.0: tg3_abort_hw timed out, TX_MODE_ENABLE
will not clear MAC_TX_MODEÿffffff
[ 1558.934601] pciehp 0000:09:00.0:pcie24: unloading service driver pciehp
[ 1558.935366] pciehp 0000:09:00.0:pcie24: Timeout on hotplug command
0x1038 (issued 1557532 msec ago)
[ 1558.943460] pci_bus 0000:0a: busn_res: [bus 0a] is released
[ 1558.958426] pci_bus 0000:09: busn_res: [bus 09-0a] is released
[ 1558.958432] acpiphp: Slot [1] unregistered
[ 1558.958451] acpiphp: Slot [2-1] unregistered
[ 1558.958464] acpiphp: Slot [3-1] unregistered
[ 1558.958475] acpiphp: Slot [4-1] unregistered
[ 1558.958486] acpiphp: Slot [5-1] unregistered

But I am not a kernel, pciehp, thunderbolt specialist :(

How can I determine why the pciehp hotplug command 0x1038 timed out ?
Is the "unloading service driver pciehp" the reason why replugging
(hotplugging) the device goes completely unnoticed as far as dmesg goes ?
And if the problem is can (should?) be solved within pciehp ?


For the complete version of the dmesg outputs:
	1. bootup: dmesg___boot-with-plugged-network-adapter.txt
	2. unplug:
dmesg___boot-with-plugged-network-adapter___unplugged-adapter.txt
	3. replug:
dmesg___boot-with-plugged-network-adapter___unplugged-adapter.txt

see:
https://gist.github.com/anonymous/6221168ddcebe37f0ec4


Tormen


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: possible bug regarding pciehp
  2015-09-02 14:35 possible bug regarding pciehp Tormen
  2015-09-02 15:27 ` Greg KH
  2015-09-04  7:54 ` Tormen
@ 2015-09-05  3:38 ` Greg KH
  2015-09-18  9:19 ` Tormen
  3 siblings, 0 replies; 5+ messages in thread
From: Greg KH @ 2015-09-05  3:38 UTC (permalink / raw)
  To: linux-hotplug

On Fri, Sep 04, 2015 at 09:54:18AM +0200, Tormen wrote:
> On 09/02/2015 05:27 PM, Greg KH wrote:
> > On Wed, Sep 02, 2015 at 04:35:49PM +0200, Tormen wrote:
> >> Hi,
> >>
> >> I am contacting you, hoping that either you can maybe help
> >> or you know someone who can help :)
> >>
> >> I opened a bug related to the tg3 driver when hot-plugging via pciehp:
> >> https://bugzilla.kernel.org/show_bug.cgi?id\x100191
> >>
> >> I am desperate because :
> >> 	(a) there is also a brcmfmac related driver.
> >> So both wireless and wired internet have problems:
> >> 	https://bugzilla.kernel.org/show_bug.cgi?id\x100201
> >> 	(b) there was no input by anybody so far. Maybe because I wrongly
> >> categorized the tg3 bug ?
> >>
> >> The bug is related to Broadcom tg3 driver and the pciehp hotplug framework.
> >> In order to sort out where the problem(s) lies, I wanted to kindly ask
> >> you if you could have a look at the bug :
> >> https://bugzilla.kernel.org/show_bug.cgi?id\x100191
> >> ?
> >> And/or if you could help me figuring out if pciehp is causing this
> >> problem and/or if tg3 is to blame.
> > 
> > Odds are neither are the issue, this is a thunderbolt problem.  Make
> > sure you have enabled thunderbolt properly in your kernel if you want
> > hot-add of a device to work.
> >
> > I think the code has only been tested on older macbooks, changes might
> > be needed for newer ones given that Apple's thunderbolt controller is
> > "special" (i.e. doesn't follow the specification.)
> >
> > good luck!
> >
> > greg k-h
> >
> 
> Thanks a lot for your feedback !
> 
> Is "the code" that you are referring to the thunderbolt kernel module ?

Yes.

> The kernel I am using uses:
> CONFIG_THUNDERBOLT=m -- The module will be called thunderbolt.
> But when I boot-up with the plugged network device, lsmod does not show
> thunderbolt.

Have you loaded that module?  Please do so:
	modprobe thunderbolt

> So not sure how I can check further if thunderbolt is properly in my kernel?
> Or is it possible that I would need to load the thunderbolt module
> manually in order to make hotplug work?

Maybe.

> When the network driver is loaded it seems to connect as a "PCI Express"
> device:
> 	tg3 0000:0a:00.0 eth0: Tigon3 [partno(BCM957762) rev 57766000] (PCI
> Express)

That's separate from the thunderbolt controller.

> When I unplug the adapter the first thing appearing in dmesg is pciehp:
> [  210.992938] usb 1-2: USB disconnect, device number 4
> [ 1557.453818] pciehp 0000:06:03.0:pcie24: slot(3-2): Link Down event
> [ 1557.453870] pciehp 0000:06:03.0:pcie24: Cannot remove display device
> 0000:08:00.0
> [ 1557.509812] pciehp 0000:06:03.0:pcie24: Card not present on Slot(3-2)
> [ 1558.721344] tg3 0000:0a:00.0: tg3_abort_hw timed out, TX_MODE_ENABLE
> will not clear MAC_TX_MODEÿffffff
> [ 1558.934601] pciehp 0000:09:00.0:pcie24: unloading service driver pciehp
> [ 1558.935366] pciehp 0000:09:00.0:pcie24: Timeout on hotplug command
> 0x1038 (issued 1557532 msec ago)
> [ 1558.943460] pci_bus 0000:0a: busn_res: [bus 0a] is released
> [ 1558.958426] pci_bus 0000:09: busn_res: [bus 09-0a] is released
> [ 1558.958432] acpiphp: Slot [1] unregistered
> [ 1558.958451] acpiphp: Slot [2-1] unregistered
> [ 1558.958464] acpiphp: Slot [3-1] unregistered
> [ 1558.958475] acpiphp: Slot [4-1] unregistered
> [ 1558.958486] acpiphp: Slot [5-1] unregistered
> 
> But I am not a kernel, pciehp, thunderbolt specialist :(
> 
> How can I determine why the pciehp hotplug command 0x1038 timed out ?

No idea, sorry, this is very odd hardware that doesn't follow any spec.
Try emailing the author of the thunderbolt code, they should be able to
help you out more.

good luck,

greg k-h

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: possible bug regarding pciehp
  2015-09-02 14:35 possible bug regarding pciehp Tormen
                   ` (2 preceding siblings ...)
  2015-09-05  3:38 ` Greg KH
@ 2015-09-18  9:19 ` Tormen
  3 siblings, 0 replies; 5+ messages in thread
From: Tormen @ 2015-09-18  9:19 UTC (permalink / raw)
  To: linux-hotplug

On 09/05/2015 05:38 AM, Greg KH wrote:
> On Fri, Sep 04, 2015 at 09:54:18AM +0200, Tormen wrote:
>> On 09/02/2015 05:27 PM, Greg KH wrote:
>>> On Wed, Sep 02, 2015 at 04:35:49PM +0200, Tormen wrote:
>> When the network driver is loaded it seems to connect as a "PCI Express"
>> device:
>> 	tg3 0000:0a:00.0 eth0: Tigon3 [partno(BCM957762) rev 57766000] (PCI
>> Express)
> 
> That's separate from the thunderbolt controller.
> 
>> When I unplug the adapter the first thing appearing in dmesg is pciehp:
>> [  210.992938] usb 1-2: USB disconnect, device number 4
>> [ 1557.453818] pciehp 0000:06:03.0:pcie24: slot(3-2): Link Down event
>> [ 1557.453870] pciehp 0000:06:03.0:pcie24: Cannot remove display device
>> 0000:08:00.0
>> [ 1557.509812] pciehp 0000:06:03.0:pcie24: Card not present on Slot(3-2)
>> [ 1558.721344] tg3 0000:0a:00.0: tg3_abort_hw timed out, TX_MODE_ENABLE
>> will not clear MAC_TX_MODEÿffffff
>> [ 1558.934601] pciehp 0000:09:00.0:pcie24: unloading service driver pciehp
>> [ 1558.935366] pciehp 0000:09:00.0:pcie24: Timeout on hotplug command
>> 0x1038 (issued 1557532 msec ago)
>> [ 1558.943460] pci_bus 0000:0a: busn_res: [bus 0a] is released
>> [ 1558.958426] pci_bus 0000:09: busn_res: [bus 09-0a] is released
>> [ 1558.958432] acpiphp: Slot [1] unregistered
>> [ 1558.958451] acpiphp: Slot [2-1] unregistered
>> [ 1558.958464] acpiphp: Slot [3-1] unregistered
>> [ 1558.958475] acpiphp: Slot [4-1] unregistered
>> [ 1558.958486] acpiphp: Slot [5-1] unregistered
>>
>> But I am not a kernel, pciehp, thunderbolt specialist :(
>>
>> How can I determine why the pciehp hotplug command 0x1038 timed out ?
> 
> No idea, sorry, this is very odd hardware that doesn't follow any spec.
> Try emailing the author of the thunderbolt code, they should be able to
> help you out more.
>
> good luck,
>
> greg k-h
>

Thanks a lot! - I did and he was very kind in answering me right away -
thanks a lot Andreas - and his suggestion did lead to a working patch:

https://bugzilla.kernel.org/show_bug.cgi?id\x100191#c18

which makes the thunderbolt module load on boot and thus - like you
assumed Greg - provides the missing hotplug functionality!

Thanks again !

Tormen


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-09-18  9:19 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-09-02 14:35 possible bug regarding pciehp Tormen
2015-09-02 15:27 ` Greg KH
2015-09-04  7:54 ` Tormen
2015-09-05  3:38 ` Greg KH
2015-09-18  9:19 ` Tormen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).