Re: [3.11.4] Thunderbolt/PCI unplug oops in pci_pme_list_scan

2013-11-19 Thread Yijing Wang
On 2013/11/20 9:20, Bjorn Helgaas wrote: > On Tue, Nov 19, 2013 at 6:14 PM, Yijing Wang wrote: > [bhelgaas: changelog, tag for stable] > Reported-by: David Bulkow > Reported-by: Mika Westerberg > Signed-off-by: Yinghai Lu > Signed-off-by: Bjorn Helgaas > CC:

Re: [3.11.4] Thunderbolt/PCI unplug oops in pci_pme_list_scan

2013-11-19 Thread Bjorn Helgaas
On Tue, Nov 19, 2013 at 6:14 PM, Yijing Wang wrote: [bhelgaas: changelog, tag for stable] Reported-by: David Bulkow Reported-by: Mika Westerberg Signed-off-by: Yinghai Lu Signed-off-by: Bjorn Helgaas CC: sta...@vger.kernel.org # v2.6.32+ >>> >>> Hi Bjorn, >>>

Re: [3.11.4] Thunderbolt/PCI unplug oops in pci_pme_list_scan

2013-11-19 Thread Yijing Wang
>>> [bhelgaas: changelog, tag for stable] >>> Reported-by: David Bulkow >>> Reported-by: Mika Westerberg >>> Signed-off-by: Yinghai Lu >>> Signed-off-by: Bjorn Helgaas >>> CC: sta...@vger.kernel.org # v2.6.32+ >> >> Hi Bjorn, >>This issue in X86 seems to be introduced after commit 928bea9

Re: [3.11.4] Thunderbolt/PCI unplug oops in pci_pme_list_scan

2013-11-19 Thread Bjorn Helgaas
On Tue, Nov 19, 2013 at 09:54:58AM +0800, Yijing Wang wrote: > > The pcie_portdrv .probe() method calls pci_enable_device() once, in > > pcie_port_device_register(), but the .remove() method calls > > pci_disable_device() twice, in pcie_port_device_remove() and in > > pcie_portdrv_remove(). > > >

Re: [3.11.4] Thunderbolt/PCI unplug oops in pci_pme_list_scan

2013-11-19 Thread Mika Westerberg
On Mon, Nov 18, 2013 at 06:33:43PM -0700, Bjorn Helgaas wrote: > I fixed the changelog (the extra disable was actually added by d899871936, > not by dc5351784e) and put the patch below in my for-linus branch. I'll > ask Linus to pull it later this week. > > Sorry for the delay, and thanks for

Re: [3.11.4] Thunderbolt/PCI unplug oops in pci_pme_list_scan

2013-11-19 Thread Mika Westerberg
On Mon, Nov 18, 2013 at 06:33:43PM -0700, Bjorn Helgaas wrote: I fixed the changelog (the extra disable was actually added by d899871936, not by dc5351784e) and put the patch below in my for-linus branch. I'll ask Linus to pull it later this week. Sorry for the delay, and thanks for the

Re: [3.11.4] Thunderbolt/PCI unplug oops in pci_pme_list_scan

2013-11-19 Thread Bjorn Helgaas
On Tue, Nov 19, 2013 at 09:54:58AM +0800, Yijing Wang wrote: The pcie_portdrv .probe() method calls pci_enable_device() once, in pcie_port_device_register(), but the .remove() method calls pci_disable_device() twice, in pcie_port_device_remove() and in pcie_portdrv_remove(). That

Re: [3.11.4] Thunderbolt/PCI unplug oops in pci_pme_list_scan

2013-11-19 Thread Yijing Wang
[bhelgaas: changelog, tag for stable] Reported-by: David Bulkow david.bul...@stratus.com Reported-by: Mika Westerberg mika.westerb...@linux.intel.com Signed-off-by: Yinghai Lu ying...@kernel.org Signed-off-by: Bjorn Helgaas bhelg...@google.com CC: sta...@vger.kernel.org # v2.6.32+ Hi

Re: [3.11.4] Thunderbolt/PCI unplug oops in pci_pme_list_scan

2013-11-19 Thread Bjorn Helgaas
On Tue, Nov 19, 2013 at 6:14 PM, Yijing Wang wangyij...@huawei.com wrote: [bhelgaas: changelog, tag for stable] Reported-by: David Bulkow david.bul...@stratus.com Reported-by: Mika Westerberg mika.westerb...@linux.intel.com Signed-off-by: Yinghai Lu ying...@kernel.org Signed-off-by: Bjorn

Re: [3.11.4] Thunderbolt/PCI unplug oops in pci_pme_list_scan

2013-11-19 Thread Yijing Wang
On 2013/11/20 9:20, Bjorn Helgaas wrote: On Tue, Nov 19, 2013 at 6:14 PM, Yijing Wang wangyij...@huawei.com wrote: [bhelgaas: changelog, tag for stable] Reported-by: David Bulkow david.bul...@stratus.com Reported-by: Mika Westerberg mika.westerb...@linux.intel.com Signed-off-by: Yinghai Lu

Re: [3.11.4] Thunderbolt/PCI unplug oops in pci_pme_list_scan

2013-11-18 Thread Yijing Wang
> The pcie_portdrv .probe() method calls pci_enable_device() once, in > pcie_port_device_register(), but the .remove() method calls > pci_disable_device() twice, in pcie_port_device_remove() and in > pcie_portdrv_remove(). > > That causes a "disabling already-disabled device" warning when

Re: [3.11.4] Thunderbolt/PCI unplug oops in pci_pme_list_scan

2013-11-18 Thread Bjorn Helgaas
On Fri, Nov 15, 2013 at 01:52:35PM +0200, Mika Westerberg wrote: > On Thu, Oct 24, 2013 at 09:33:50PM -0600, Bjorn Helgaas wrote: > > On Wed, Oct 23, 2013 at 11:53 PM, Yinghai Lu wrote: > > > On Tue, Oct 22, 2013 at 8:32 PM, Bjorn Helgaas > > > wrote: > > >> On Thu, Oct 17, 2013 at 7:59 AM,

Re: [3.11.4] Thunderbolt/PCI unplug oops in pci_pme_list_scan

2013-11-18 Thread Bjorn Helgaas
On Fri, Nov 15, 2013 at 01:52:35PM +0200, Mika Westerberg wrote: On Thu, Oct 24, 2013 at 09:33:50PM -0600, Bjorn Helgaas wrote: On Wed, Oct 23, 2013 at 11:53 PM, Yinghai Lu ying...@kernel.org wrote: On Tue, Oct 22, 2013 at 8:32 PM, Bjorn Helgaas bhelg...@google.com wrote: On Thu, Oct

Re: [3.11.4] Thunderbolt/PCI unplug oops in pci_pme_list_scan

2013-11-18 Thread Yijing Wang
The pcie_portdrv .probe() method calls pci_enable_device() once, in pcie_port_device_register(), but the .remove() method calls pci_disable_device() twice, in pcie_port_device_remove() and in pcie_portdrv_remove(). That causes a disabling already-disabled device warning when removing a

Re: [3.11.4] Thunderbolt/PCI unplug oops in pci_pme_list_scan

2013-11-15 Thread Mika Westerberg
On Thu, Oct 24, 2013 at 09:33:50PM -0600, Bjorn Helgaas wrote: > On Wed, Oct 23, 2013 at 11:53 PM, Yinghai Lu wrote: > > On Tue, Oct 22, 2013 at 8:32 PM, Bjorn Helgaas wrote: > >> On Thu, Oct 17, 2013 at 7:59 AM, Andreas Noever > >> wrote: > >>> On Wed, Oct 16, 2013 at 10:21 PM, Bjorn Helgaas

Re: [3.11.4] Thunderbolt/PCI unplug oops in pci_pme_list_scan

2013-11-15 Thread Mika Westerberg
On Thu, Oct 24, 2013 at 09:33:50PM -0600, Bjorn Helgaas wrote: On Wed, Oct 23, 2013 at 11:53 PM, Yinghai Lu ying...@kernel.org wrote: On Tue, Oct 22, 2013 at 8:32 PM, Bjorn Helgaas bhelg...@google.com wrote: On Thu, Oct 17, 2013 at 7:59 AM, Andreas Noever andreas.noe...@gmail.com wrote:

Re: [3.11.4] Thunderbolt/PCI unplug oops in pci_pme_list_scan

2013-10-31 Thread Yinghai Lu
On Wed, Oct 30, 2013 at 12:57 AM, Yijing Wang wrote: Bisection points to 928bea964827d7824b548c1f8e06eccbbc4d0d7d . >>> >>> This is "PCI: Delay enabling bridges until they're needed" by Yinghai. >> >> that double disabling should be addressed by: >> >> https://lkml.org/lkml/2013/4/25/608 >>

Re: [3.11.4] Thunderbolt/PCI unplug oops in pci_pme_list_scan

2013-10-31 Thread Yinghai Lu
On Wed, Oct 30, 2013 at 12:57 AM, Yijing Wang wangyij...@huawei.com wrote: Bisection points to 928bea964827d7824b548c1f8e06eccbbc4d0d7d . This is PCI: Delay enabling bridges until they're needed by Yinghai. that double disabling should be addressed by: https://lkml.org/lkml/2013/4/25/608

Re: [3.11.4] Thunderbolt/PCI unplug oops in pci_pme_list_scan

2013-10-30 Thread Yijing Wang
>>> Bisection points to 928bea964827d7824b548c1f8e06eccbbc4d0d7d . >> >> This is "PCI: Delay enabling bridges until they're needed" by Yinghai. > > that double disabling should be addressed by: > > https://lkml.org/lkml/2013/4/25/608 > > [PATCH] PCI: Remove duplicate pci_disable_device for pcie

Re: [3.11.4] Thunderbolt/PCI unplug oops in pci_pme_list_scan

2013-10-30 Thread Yijing Wang
Bisection points to 928bea964827d7824b548c1f8e06eccbbc4d0d7d . This is PCI: Delay enabling bridges until they're needed by Yinghai. that double disabling should be addressed by: https://lkml.org/lkml/2013/4/25/608 [PATCH] PCI: Remove duplicate pci_disable_device for pcie port Hi

Re: [3.11.4] Thunderbolt/PCI unplug oops in pci_pme_list_scan

2013-10-28 Thread Bjorn Helgaas
On Wed, Oct 16, 2013 at 2:21 PM, Bjorn Helgaas wrote: > On Tue, Oct 15, 2013 at 03:44:52AM +0100, Matthew Garrett wrote: >> On Mon, Oct 14, 2013 at 05:50:38PM -0600, Bjorn Helgaas wrote: >> > [+cc Rafael, Mika, Kirill, linux-pci] >> > >> > On Mon, Oct 14, 2013 at 4:47 PM, Andreas Noever >> >

Re: [3.11.4] Thunderbolt/PCI unplug oops in pci_pme_list_scan

2013-10-28 Thread Bjorn Helgaas
On Wed, Oct 16, 2013 at 2:21 PM, Bjorn Helgaas bhelg...@google.com wrote: On Tue, Oct 15, 2013 at 03:44:52AM +0100, Matthew Garrett wrote: On Mon, Oct 14, 2013 at 05:50:38PM -0600, Bjorn Helgaas wrote: [+cc Rafael, Mika, Kirill, linux-pci] On Mon, Oct 14, 2013 at 4:47 PM, Andreas Noever

Re: [3.11.4] Thunderbolt/PCI unplug oops in pci_pme_list_scan

2013-10-26 Thread Andreas Noever
> Sorry, I didn't understand this. Is this supposed to be an > explanation of how 928bea fixes the oops that Andreas saw? If so, can > you be a little more explicit about when the pci_dev got freed and > when pci_pme_list_scan() walked the list and accessed the freed area? I did some more

Re: [3.11.4] Thunderbolt/PCI unplug oops in pci_pme_list_scan

2013-10-26 Thread Andreas Noever
Sorry, I didn't understand this. Is this supposed to be an explanation of how 928bea fixes the oops that Andreas saw? If so, can you be a little more explicit about when the pci_dev got freed and when pci_pme_list_scan() walked the list and accessed the freed area? I did some more debugging

Re: [3.11.4] Thunderbolt/PCI unplug oops in pci_pme_list_scan

2013-10-25 Thread Bjorn Helgaas
On Thu, Oct 24, 2013 at 11:13 PM, Yinghai Lu wrote: > On Thu, Oct 24, 2013 at 8:33 PM, Bjorn Helgaas wrote: >> > Bisection points to 928bea964827d7824b548c1f8e06eccbbc4d0d7d . This is "PCI: Delay enabling bridges until they're needed" by Yinghai. >>> >>> that double disabling

Re: [3.11.4] Thunderbolt/PCI unplug oops in pci_pme_list_scan

2013-10-25 Thread Bjorn Helgaas
On Thu, Oct 24, 2013 at 11:13 PM, Yinghai Lu ying...@kernel.org wrote: On Thu, Oct 24, 2013 at 8:33 PM, Bjorn Helgaas bhelg...@google.com wrote: Bisection points to 928bea964827d7824b548c1f8e06eccbbc4d0d7d . This is PCI: Delay enabling bridges until they're needed by Yinghai. that double

Re: [3.11.4] Thunderbolt/PCI unplug oops in pci_pme_list_scan

2013-10-24 Thread Yinghai Lu
On Thu, Oct 24, 2013 at 10:13 PM, Yinghai Lu wrote: > On Thu, Oct 24, 2013 at 8:33 PM, Bjorn Helgaas wrote: >> > Bisection points to 928bea964827d7824b548c1f8e06eccbbc4d0d7d . This is "PCI: Delay enabling bridges until they're needed" by Yinghai. >>> >>> that double disabling

Re: [3.11.4] Thunderbolt/PCI unplug oops in pci_pme_list_scan

2013-10-24 Thread Yinghai Lu
On Thu, Oct 24, 2013 at 8:33 PM, Bjorn Helgaas wrote: > Bisection points to 928bea964827d7824b548c1f8e06eccbbc4d0d7d . >>> >>> This is "PCI: Delay enabling bridges until they're needed" by Yinghai. >> >> that double disabling should be addressed by: >> >> https://lkml.org/lkml/2013/4/25/608

Re: [3.11.4] Thunderbolt/PCI unplug oops in pci_pme_list_scan

2013-10-24 Thread Bjorn Helgaas
On Wed, Oct 23, 2013 at 11:53 PM, Yinghai Lu wrote: > On Tue, Oct 22, 2013 at 8:32 PM, Bjorn Helgaas wrote: >> On Thu, Oct 17, 2013 at 7:59 AM, Andreas Noever >> wrote: >>> On Wed, Oct 16, 2013 at 10:21 PM, Bjorn Helgaas wrote: On Tue, Oct 15, 2013 at 03:44:52AM +0100, Matthew Garrett

Re: [3.11.4] Thunderbolt/PCI unplug oops in pci_pme_list_scan

2013-10-24 Thread Bjorn Helgaas
On Wed, Oct 23, 2013 at 11:53 PM, Yinghai Lu ying...@kernel.org wrote: On Tue, Oct 22, 2013 at 8:32 PM, Bjorn Helgaas bhelg...@google.com wrote: On Thu, Oct 17, 2013 at 7:59 AM, Andreas Noever andreas.noe...@gmail.com wrote: On Wed, Oct 16, 2013 at 10:21 PM, Bjorn Helgaas bhelg...@google.com

Re: [3.11.4] Thunderbolt/PCI unplug oops in pci_pme_list_scan

2013-10-24 Thread Yinghai Lu
On Thu, Oct 24, 2013 at 8:33 PM, Bjorn Helgaas bhelg...@google.com wrote: Bisection points to 928bea964827d7824b548c1f8e06eccbbc4d0d7d . This is PCI: Delay enabling bridges until they're needed by Yinghai. that double disabling should be addressed by: https://lkml.org/lkml/2013/4/25/608

Re: [3.11.4] Thunderbolt/PCI unplug oops in pci_pme_list_scan

2013-10-24 Thread Yinghai Lu
On Thu, Oct 24, 2013 at 10:13 PM, Yinghai Lu ying...@kernel.org wrote: On Thu, Oct 24, 2013 at 8:33 PM, Bjorn Helgaas bhelg...@google.com wrote: Bisection points to 928bea964827d7824b548c1f8e06eccbbc4d0d7d . This is PCI: Delay enabling bridges until they're needed by Yinghai. that double

Re: [3.11.4] Thunderbolt/PCI unplug oops in pci_pme_list_scan

2013-10-23 Thread Yinghai Lu
On Tue, Oct 22, 2013 at 8:32 PM, Bjorn Helgaas wrote: > [+cc Yinghai] > > On Thu, Oct 17, 2013 at 7:59 AM, Andreas Noever > wrote: >> On Wed, Oct 16, 2013 at 10:21 PM, Bjorn Helgaas wrote: >>> On Tue, Oct 15, 2013 at 03:44:52AM +0100, Matthew Garrett wrote: On Mon, Oct 14, 2013 at

Re: [3.11.4] Thunderbolt/PCI unplug oops in pci_pme_list_scan

2013-10-23 Thread Bjorn Helgaas
On Thu, Oct 17, 2013 at 7:59 AM, Andreas Noever wrote: > On Wed, Oct 16, 2013 at 10:21 PM, Bjorn Helgaas wrote: >> On Tue, Oct 15, 2013 at 03:44:52AM +0100, Matthew Garrett wrote: >>> On Mon, Oct 14, 2013 at 05:50:38PM -0600, Bjorn Helgaas wrote: >>> > [+cc Rafael, Mika, Kirill, linux-pci] >>> >

Re: [3.11.4] Thunderbolt/PCI unplug oops in pci_pme_list_scan

2013-10-23 Thread Bjorn Helgaas
On Thu, Oct 17, 2013 at 7:59 AM, Andreas Noever andreas.noe...@gmail.com wrote: On Wed, Oct 16, 2013 at 10:21 PM, Bjorn Helgaas bhelg...@google.com wrote: On Tue, Oct 15, 2013 at 03:44:52AM +0100, Matthew Garrett wrote: On Mon, Oct 14, 2013 at 05:50:38PM -0600, Bjorn Helgaas wrote: [+cc

Re: [3.11.4] Thunderbolt/PCI unplug oops in pci_pme_list_scan

2013-10-23 Thread Yinghai Lu
On Tue, Oct 22, 2013 at 8:32 PM, Bjorn Helgaas bhelg...@google.com wrote: [+cc Yinghai] On Thu, Oct 17, 2013 at 7:59 AM, Andreas Noever andreas.noe...@gmail.com wrote: On Wed, Oct 16, 2013 at 10:21 PM, Bjorn Helgaas bhelg...@google.com wrote: On Tue, Oct 15, 2013 at 03:44:52AM +0100, Matthew

Re: [3.11.4] Thunderbolt/PCI unplug oops in pci_pme_list_scan

2013-10-22 Thread Bjorn Helgaas
[+cc Yinghai] On Thu, Oct 17, 2013 at 7:59 AM, Andreas Noever wrote: > On Wed, Oct 16, 2013 at 10:21 PM, Bjorn Helgaas wrote: >> On Tue, Oct 15, 2013 at 03:44:52AM +0100, Matthew Garrett wrote: >>> On Mon, Oct 14, 2013 at 05:50:38PM -0600, Bjorn Helgaas wrote: >>> > [+cc Rafael, Mika, Kirill,

Re: [3.11.4] Thunderbolt/PCI unplug oops in pci_pme_list_scan

2013-10-22 Thread Bjorn Helgaas
[+cc Yinghai] On Thu, Oct 17, 2013 at 7:59 AM, Andreas Noever andreas.noe...@gmail.com wrote: On Wed, Oct 16, 2013 at 10:21 PM, Bjorn Helgaas bhelg...@google.com wrote: On Tue, Oct 15, 2013 at 03:44:52AM +0100, Matthew Garrett wrote: On Mon, Oct 14, 2013 at 05:50:38PM -0600, Bjorn Helgaas

Re: [3.11.4] Thunderbolt/PCI unplug oops in pci_pme_list_scan

2013-10-16 Thread Bjorn Helgaas
On Tue, Oct 15, 2013 at 03:44:52AM +0100, Matthew Garrett wrote: > On Mon, Oct 14, 2013 at 05:50:38PM -0600, Bjorn Helgaas wrote: > > [+cc Rafael, Mika, Kirill, linux-pci] > > > > On Mon, Oct 14, 2013 at 4:47 PM, Andreas Noever > > wrote: > > > When I unplug the Thunderbolt ethernet adapter on

Re: [3.11.4] Thunderbolt/PCI unplug oops in pci_pme_list_scan

2013-10-16 Thread Bjorn Helgaas
On Tue, Oct 15, 2013 at 03:44:52AM +0100, Matthew Garrett wrote: On Mon, Oct 14, 2013 at 05:50:38PM -0600, Bjorn Helgaas wrote: [+cc Rafael, Mika, Kirill, linux-pci] On Mon, Oct 14, 2013 at 4:47 PM, Andreas Noever andreas.noe...@gmail.com wrote: When I unplug the Thunderbolt ethernet

Re: [3.11.4] Thunderbolt/PCI unplug oops in pci_pme_list_scan

2013-10-14 Thread Matthew Garrett
On Mon, Oct 14, 2013 at 05:50:38PM -0600, Bjorn Helgaas wrote: > [+cc Rafael, Mika, Kirill, linux-pci] > > On Mon, Oct 14, 2013 at 4:47 PM, Andreas Noever > wrote: > > When I unplug the Thunderbolt ethernet adapter on my MacBookPro Linux > > crashes a few seconds later. Using > > echo 1 >

Re: [3.11.4] Thunderbolt/PCI unplug oops in pci_pme_list_scan

2013-10-14 Thread Bjorn Helgaas
[+cc Rafael, Mika, Kirill, linux-pci] On Mon, Oct 14, 2013 at 4:47 PM, Andreas Noever wrote: > When I unplug the Thunderbolt ethernet adapter on my MacBookPro Linux > crashes a few seconds later. Using > echo 1 > /sys/bus/pci/devices/:08:00.0/remove > to remove a bridge two levels above the

[3.11.4] Thunderbolt/PCI unplug oops in pci_pme_list_scan

2013-10-14 Thread Andreas Noever
When I unplug the Thunderbolt ethernet adapter on my MacBookPro Linux crashes a few seconds later. Using echo 1 > /sys/bus/pci/devices/:08:00.0/remove to remove a bridge two levels above the device triggers the fault immediately: pciehp :09:00.0:pcie24: unloading service driver pciehp

[3.11.4] Thunderbolt/PCI unplug oops in pci_pme_list_scan

2013-10-14 Thread Andreas Noever
When I unplug the Thunderbolt ethernet adapter on my MacBookPro Linux crashes a few seconds later. Using echo 1 /sys/bus/pci/devices/:08:00.0/remove to remove a bridge two levels above the device triggers the fault immediately: pciehp :09:00.0:pcie24: unloading service driver pciehp

Re: [3.11.4] Thunderbolt/PCI unplug oops in pci_pme_list_scan

2013-10-14 Thread Bjorn Helgaas
[+cc Rafael, Mika, Kirill, linux-pci] On Mon, Oct 14, 2013 at 4:47 PM, Andreas Noever andreas.noe...@gmail.com wrote: When I unplug the Thunderbolt ethernet adapter on my MacBookPro Linux crashes a few seconds later. Using echo 1 /sys/bus/pci/devices/:08:00.0/remove to remove a bridge

Re: [3.11.4] Thunderbolt/PCI unplug oops in pci_pme_list_scan

2013-10-14 Thread Matthew Garrett
On Mon, Oct 14, 2013 at 05:50:38PM -0600, Bjorn Helgaas wrote: [+cc Rafael, Mika, Kirill, linux-pci] On Mon, Oct 14, 2013 at 4:47 PM, Andreas Noever andreas.noe...@gmail.com wrote: When I unplug the Thunderbolt ethernet adapter on my MacBookPro Linux crashes a few seconds later. Using