All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: PCI-to-USB ExpressCard Hotplugging can't work in v3.15-rc5
       [not found] <CA+eFSM2CBiWZNmpnSNGKZGjEpK6gc=T0a5r7m6sbORi==XTCjQ@mail.gmail.com>
@ 2014-05-21  4:54 ` Bjorn Helgaas
       [not found]   ` <CA+eFSM3683deo8aRiKo6Yobq6sRoWgyoVV+gCnTHaSUNjYcHaA@mail.gmail.com>
  0 siblings, 1 reply; 7+ messages in thread
From: Bjorn Helgaas @ 2014-05-21  4:54 UTC (permalink / raw)
  To: Gavin Guo
  Cc: linux-pci, Rafael J. Wysocki, Yinghai Lu, Jiang Liu, YK,
	Yung Shen, Po-Hsu Lin

On Tue, May 20, 2014 at 10:36 PM, Gavin Guo <gavin.guo@canonical.com> wrote:
> Hi all,
>
> I have a APIOTEK PCI-to-USB ExpressCard and found that when it is
> plugged at cold boot, the card can be detected. But, hotplug cannot
> work at run time. The bug may be related to the commit which I
> reported last year:
>
> commit 3f327e39b4b8f760c331bb2836735be6d83fbf53

Where is your report from last year?  How did you identify this
commit?  Did you verify that it works correctly with v3.10-rc1, but
fails when you add this commit?

> Author: Yinghai Lu <yinghai@kernel.org>
> Date:   Tue May 7 11:06:03 2013 -0600
>
>     PCI: acpiphp: Re-enumerate devices when host bridge receives Bus Check
>
>     When a PCI host bridge device receives a Bus Check notification, we
>     must re-enumerate starting with the bridge to discover changes (devices
>     that have been added or removed).
>
>     Prior to 668192b678 ("PCI: acpiphp: Move host bridge hotplug to
>     pci_root.c"), this happened in _handle_hotplug_event_bridge().  After that
>     commit, _handle_hotplug_event_bridge() is not installed for host bridges,
>     and the host bridge notify handler, _handle_hotplug_event_root() did not
>     re-enumerate.
>
>     This patch adds re-enumeration to _handle_hotplug_event_root().
>
>     This fixes cases where we don't notice the addition or removal of
>     PCI devices, e.g., the PCI-to-USB ExpressCard in the bugzilla below.
>
> Dmesg is attached. The scenario of the dmesg: The PCI-to-USB
> ExpressCard is attached at cold boot. Then, you can see that the usb
> storage can be detected in the dmesg. Finally, I've done hotplug 2
> times to see if it can detect the PCI-to-USB ExpressCard. At the end
> of Dmesg, it only has several "ACPI: \_SB_.PCI0: ACPI_NOTIFY_BUS_CHECK
> event" and can't detect the card.
>
> Thanks,
> Gavin Guo

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

* Re: PCI-to-USB ExpressCard Hotplugging can't work in v3.15-rc5
       [not found]   ` <CA+eFSM3683deo8aRiKo6Yobq6sRoWgyoVV+gCnTHaSUNjYcHaA@mail.gmail.com>
@ 2014-05-21 13:53     ` Bjorn Helgaas
  2014-05-21 23:36       ` Rafael J. Wysocki
  0 siblings, 1 reply; 7+ messages in thread
From: Bjorn Helgaas @ 2014-05-21 13:53 UTC (permalink / raw)
  To: Gavin Guo
  Cc: linux-pci, Yinghai Lu, YK, Yung Shen, Po-Hsu Lin,
	Rafael J. Wysocki, Jiang Liu

On Wed, May 21, 2014 at 3:45 AM, Gavin Guo <gavin.guo@canonical.com> wrote:
> Hi Bjorn,
>
> On Wed, May 21, 2014 at 12:54 PM, Bjorn Helgaas <bhelgaas@google.com> wrote:
>> On Tue, May 20, 2014 at 10:36 PM, Gavin Guo <gavin.guo@canonical.com> wrote:
>>> Hi all,
>>>
>>> I have a APIOTEK PCI-to-USB ExpressCard and found that when it is
>>> plugged at cold boot, the card can be detected. But, hotplug cannot
>>> work at run time. The bug may be related to the commit which I
>>> reported last year:
>>>
>>> commit 3f327e39b4b8f760c331bb2836735be6d83fbf53
>>
>> Where is your report from last year?  How did you identify this
>> commit?  Did you verify that it works correctly with v3.10-rc1, but
>> fails when you add this commit?
>
> The mail about the bug I reported last year is attached. And I'm sorry
> about not describing clearly. This commit is the one to fix the bug
> before. So, I think it will be a clue to find out what's wrong. I've
> built v3.10 and tested it on the platform. It works fine. The bug
> seems like a regression.
>
> I also attached the dmesg of v3.10 which works correctly with hotplug.

v3.10 contains 3f327e39b4b8 (it appeared in v3.10-rc3).  So since it
works correctly in v3.10, that commit is probably not the cause of the
regression.

So apparently it worked in v3.10 and broke sometime later.  Do you
know when it broke?

We're getting Bus Check events:

  ACPI: \_SB_.PCI0: ACPI_NOTIFY_BUS_CHECK event

but apparently we aren't handling them correctly.  Can you turn on the
debug in the acpi_hotplug_schedule() path and add more if necessary to
if we get to acpi_hotplug_work_fn(), acpi_device_hotplug(), etc.?  I'm
not familiar with that path, so either you'll have to narrow it down,
or we can hope that Yinghai or Rafael has some insight.

Bjorn

>>> Author: Yinghai Lu <yinghai@kernel.org>
>>> Date:   Tue May 7 11:06:03 2013 -0600
>>>
>>>     PCI: acpiphp: Re-enumerate devices when host bridge receives Bus Check
>>>
>>>     When a PCI host bridge device receives a Bus Check notification, we
>>>     must re-enumerate starting with the bridge to discover changes (devices
>>>     that have been added or removed).
>>>
>>>     Prior to 668192b678 ("PCI: acpiphp: Move host bridge hotplug to
>>>     pci_root.c"), this happened in _handle_hotplug_event_bridge().  After that
>>>     commit, _handle_hotplug_event_bridge() is not installed for host bridges,
>>>     and the host bridge notify handler, _handle_hotplug_event_root() did not
>>>     re-enumerate.
>>>
>>>     This patch adds re-enumeration to _handle_hotplug_event_root().
>>>
>>>     This fixes cases where we don't notice the addition or removal of
>>>     PCI devices, e.g., the PCI-to-USB ExpressCard in the bugzilla below.
>>>
>>> Dmesg is attached. The scenario of the dmesg: The PCI-to-USB
>>> ExpressCard is attached at cold boot. Then, you can see that the usb
>>> storage can be detected in the dmesg. Finally, I've done hotplug 2
>>> times to see if it can detect the PCI-to-USB ExpressCard. At the end
>>> of Dmesg, it only has several "ACPI: \_SB_.PCI0: ACPI_NOTIFY_BUS_CHECK
>>> event" and can't detect the card.
>>>
>>> Thanks,
>>> Gavin Guo

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

* Re: PCI-to-USB ExpressCard Hotplugging can't work in v3.15-rc5
  2014-05-21 13:53     ` Bjorn Helgaas
@ 2014-05-21 23:36       ` Rafael J. Wysocki
  2014-06-05 11:46         ` Gavin Guo
  0 siblings, 1 reply; 7+ messages in thread
From: Rafael J. Wysocki @ 2014-05-21 23:36 UTC (permalink / raw)
  To: Bjorn Helgaas, Gavin Guo
  Cc: linux-pci, Yinghai Lu, YK, Yung Shen, Po-Hsu Lin, Jiang Liu

On Wednesday, May 21, 2014 07:53:37 AM Bjorn Helgaas wrote:
> On Wed, May 21, 2014 at 3:45 AM, Gavin Guo <gavin.guo@canonical.com> wrote:
> > Hi Bjorn,
> >
> > On Wed, May 21, 2014 at 12:54 PM, Bjorn Helgaas <bhelgaas@google.com> wrote:
> >> On Tue, May 20, 2014 at 10:36 PM, Gavin Guo <gavin.guo@canonical.com> wrote:
> >>> Hi all,
> >>>
> >>> I have a APIOTEK PCI-to-USB ExpressCard and found that when it is
> >>> plugged at cold boot, the card can be detected. But, hotplug cannot
> >>> work at run time. The bug may be related to the commit which I
> >>> reported last year:
> >>>
> >>> commit 3f327e39b4b8f760c331bb2836735be6d83fbf53
> >>
> >> Where is your report from last year?  How did you identify this
> >> commit?  Did you verify that it works correctly with v3.10-rc1, but
> >> fails when you add this commit?
> >
> > The mail about the bug I reported last year is attached. And I'm sorry
> > about not describing clearly. This commit is the one to fix the bug
> > before. So, I think it will be a clue to find out what's wrong. I've
> > built v3.10 and tested it on the platform. It works fine. The bug
> > seems like a regression.
> >
> > I also attached the dmesg of v3.10 which works correctly with hotplug.
> 
> v3.10 contains 3f327e39b4b8 (it appeared in v3.10-rc3).  So since it
> works correctly in v3.10, that commit is probably not the cause of the
> regression.
> 
> So apparently it worked in v3.10 and broke sometime later.  Do you
> know when it broke?
> 
> We're getting Bus Check events:
> 
>   ACPI: \_SB_.PCI0: ACPI_NOTIFY_BUS_CHECK event
> 
> but apparently we aren't handling them correctly.  Can you turn on the
> debug in the acpi_hotplug_schedule() path and add more if necessary to
> if we get to acpi_hotplug_work_fn(), acpi_device_hotplug(), etc.?  I'm
> not familiar with that path, so either you'll have to narrow it down,
> or we can hope that Yinghai or Rafael has some insight.

Well, it would be good to create a bug entry for this at bugzilla.kernel.org
against ACPI/Config-hotplug and mark it as a regression.

Rafael


> >>> Author: Yinghai Lu <yinghai@kernel.org>
> >>> Date:   Tue May 7 11:06:03 2013 -0600
> >>>
> >>>     PCI: acpiphp: Re-enumerate devices when host bridge receives Bus Check
> >>>
> >>>     When a PCI host bridge device receives a Bus Check notification, we
> >>>     must re-enumerate starting with the bridge to discover changes (devices
> >>>     that have been added or removed).
> >>>
> >>>     Prior to 668192b678 ("PCI: acpiphp: Move host bridge hotplug to
> >>>     pci_root.c"), this happened in _handle_hotplug_event_bridge().  After that
> >>>     commit, _handle_hotplug_event_bridge() is not installed for host bridges,
> >>>     and the host bridge notify handler, _handle_hotplug_event_root() did not
> >>>     re-enumerate.
> >>>
> >>>     This patch adds re-enumeration to _handle_hotplug_event_root().
> >>>
> >>>     This fixes cases where we don't notice the addition or removal of
> >>>     PCI devices, e.g., the PCI-to-USB ExpressCard in the bugzilla below.
> >>>
> >>> Dmesg is attached. The scenario of the dmesg: The PCI-to-USB
> >>> ExpressCard is attached at cold boot. Then, you can see that the usb
> >>> storage can be detected in the dmesg. Finally, I've done hotplug 2
> >>> times to see if it can detect the PCI-to-USB ExpressCard. At the end
> >>> of Dmesg, it only has several "ACPI: \_SB_.PCI0: ACPI_NOTIFY_BUS_CHECK
> >>> event" and can't detect the card.
> >>>
> >>> Thanks,
> >>> Gavin Guo
> --
> To unsubscribe from this list: send the line "unsubscribe linux-pci" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

-- 
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.

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

* Re: PCI-to-USB ExpressCard Hotplugging can't work in v3.15-rc5
  2014-05-21 23:36       ` Rafael J. Wysocki
@ 2014-06-05 11:46         ` Gavin Guo
  2014-06-05 12:08           ` Rafael J. Wysocki
  0 siblings, 1 reply; 7+ messages in thread
From: Gavin Guo @ 2014-06-05 11:46 UTC (permalink / raw)
  To: Rafael J. Wysocki
  Cc: Bjorn Helgaas, linux-pci, Yinghai Lu, YK, Yung Shen, Po-Hsu Lin,
	Jiang Liu

[-- Attachment #1: Type: text/plain, Size: 4906 bytes --]

On Thu, May 22, 2014 at 7:36 AM, Rafael J. Wysocki <rjw@rjwysocki.net> wrote:
> On Wednesday, May 21, 2014 07:53:37 AM Bjorn Helgaas wrote:
>> On Wed, May 21, 2014 at 3:45 AM, Gavin Guo <gavin.guo@canonical.com> wrote:
>> > Hi Bjorn,
>> >
>> > On Wed, May 21, 2014 at 12:54 PM, Bjorn Helgaas <bhelgaas@google.com> wrote:
>> >> On Tue, May 20, 2014 at 10:36 PM, Gavin Guo <gavin.guo@canonical.com> wrote:
>> >>> Hi all,
>> >>>
>> >>> I have a APIOTEK PCI-to-USB ExpressCard and found that when it is
>> >>> plugged at cold boot, the card can be detected. But, hotplug cannot
>> >>> work at run time. The bug may be related to the commit which I
>> >>> reported last year:
>> >>>
>> >>> commit 3f327e39b4b8f760c331bb2836735be6d83fbf53
>> >>
>> >> Where is your report from last year?  How did you identify this
>> >> commit?  Did you verify that it works correctly with v3.10-rc1, but
>> >> fails when you add this commit?
>> >
>> > The mail about the bug I reported last year is attached. And I'm sorry
>> > about not describing clearly. This commit is the one to fix the bug
>> > before. So, I think it will be a clue to find out what's wrong. I've
>> > built v3.10 and tested it on the platform. It works fine. The bug
>> > seems like a regression.
>> >
>> > I also attached the dmesg of v3.10 which works correctly with hotplug.
>>
>> v3.10 contains 3f327e39b4b8 (it appeared in v3.10-rc3).  So since it
>> works correctly in v3.10, that commit is probably not the cause of the
>> regression.
>>
>> So apparently it worked in v3.10 and broke sometime later.  Do you
>> know when it broke?
>>
>> We're getting Bus Check events:
>>
>>   ACPI: \_SB_.PCI0: ACPI_NOTIFY_BUS_CHECK event
>>
>> but apparently we aren't handling them correctly.  Can you turn on the
>> debug in the acpi_hotplug_schedule() path and add more if necessary to
>> if we get to acpi_hotplug_work_fn(), acpi_device_hotplug(), etc.?  I'm
>> not familiar with that path, so either you'll have to narrow it down,
>> or we can hope that Yinghai or Rafael has some insight.
>
> Well, it would be good to create a bug entry for this at bugzilla.kernel.org
> against ACPI/Config-hotplug and mark it as a regression.

I've completed the bisect and found
2d8b1d566a5f4874f4d92361f5cdbb50baa396f8 is the first bad commit. The
"git bisect log" is also attached.

commit 2d8b1d566a5f4874f4d92361f5cdbb50baa396f8
Author: Mika Westerberg <mika.westerberg@linux.intel.com>
Date: Sat Jul 13 20:09:59 2013 +0300

    ACPI / hotplug / PCI: Get rid of check_sub_bridges()

    Now that acpiphp_check_bridge() always enumerates devices behind the
    bridge, there is no need to do that for each sub-bridge anymore like
    it is done in the current ACPI-based PCI hotplug (ACPIPHP) code.

    Given this we don't need check_sub_bridges() anymore, so drop that
    function completely.

    This also simplifies the ACPIPHP code a bit.

    Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
    Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>

:040000 040000 1f3f81404e06c92c01d6848ed7a6c5bffdb5f878
4e7ca3e4af42738f90555640cafbb6e6522ceedf M drivers

>
> Rafael
>
>
>> >>> Author: Yinghai Lu <yinghai@kernel.org>
>> >>> Date:   Tue May 7 11:06:03 2013 -0600
>> >>>
>> >>>     PCI: acpiphp: Re-enumerate devices when host bridge receives Bus Check
>> >>>
>> >>>     When a PCI host bridge device receives a Bus Check notification, we
>> >>>     must re-enumerate starting with the bridge to discover changes (devices
>> >>>     that have been added or removed).
>> >>>
>> >>>     Prior to 668192b678 ("PCI: acpiphp: Move host bridge hotplug to
>> >>>     pci_root.c"), this happened in _handle_hotplug_event_bridge().  After that
>> >>>     commit, _handle_hotplug_event_bridge() is not installed for host bridges,
>> >>>     and the host bridge notify handler, _handle_hotplug_event_root() did not
>> >>>     re-enumerate.
>> >>>
>> >>>     This patch adds re-enumeration to _handle_hotplug_event_root().
>> >>>
>> >>>     This fixes cases where we don't notice the addition or removal of
>> >>>     PCI devices, e.g., the PCI-to-USB ExpressCard in the bugzilla below.
>> >>>
>> >>> Dmesg is attached. The scenario of the dmesg: The PCI-to-USB
>> >>> ExpressCard is attached at cold boot. Then, you can see that the usb
>> >>> storage can be detected in the dmesg. Finally, I've done hotplug 2
>> >>> times to see if it can detect the PCI-to-USB ExpressCard. At the end
>> >>> of Dmesg, it only has several "ACPI: \_SB_.PCI0: ACPI_NOTIFY_BUS_CHECK
>> >>> event" and can't detect the card.
>> >>>
>> >>> Thanks,
>> >>> Gavin Guo
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-pci" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>
> --
> I speak only for myself.
> Rafael J. Wysocki, Intel Open Source Technology Center.

[-- Attachment #2: bisect_acpiphp.log --]
[-- Type: text/x-log, Size: 2828 bytes --]

# bad: [272b98c6455f00884f0350f775c5342358ebb73f] Linux 3.12-rc1
# good: [6e4664525b1db28f8c4e1130957f70a94c19213e] Linux 3.11
# good: [39772038ea93e85ea4f1307ec9c1f48a063d89a0] PCI: Assign resources for hot-added host bridge more aggressively
# good: [3dc48af310709b85d07c8b0d3aa8f1ead02829d3] PCI/ACPI: Fix _OSC ordering to allow PCIe hotplug use when available
git bisect start 'v3.12-rc1' 'v3.11' '39772038ea93e85ea4f1307ec9c1f48a063d89a0' '3dc48af310709b85d07c8b0d3aa8f1ead02829d3' '--'
# bad: [57d730924d5cc2c3e280af16a9306587c3a511db] Merge branch 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
git bisect bad 57d730924d5cc2c3e280af16a9306587c3a511db
# bad: [357397a14117f0c2eeafcac06a1f8412a02aa6af] Merge branch 'for-3.12' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata
git bisect bad 357397a14117f0c2eeafcac06a1f8412a02aa6af
# good: [91121c103ae93ef117e58712786864270d7f488e] staging: dwc2: make dwc2_core_params documentation more complete
git bisect good 91121c103ae93ef117e58712786864270d7f488e
# good: [1d1fdd95df681f0c065d90ffaafa215a0e8825e2] Merge tag 'char-misc-3.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc
git bisect good 1d1fdd95df681f0c065d90ffaafa215a0e8825e2
# good: [d472d9d98b463dd7a04f2bcdeafe4261686ce6ab] lockref: Relax in cmpxchg loop
git bisect good d472d9d98b463dd7a04f2bcdeafe4261686ce6ab
# bad: [7a330a5416de9240c93a6987e11cb32b581d3263] Merge branch 'pm-cpufreq'
git bisect bad 7a330a5416de9240c93a6987e11cb32b581d3263
# bad: [8462d9df9d5033da4d25e59016b1e7a9d94a1f22] Merge branch 'acpi-bind'
git bisect bad 8462d9df9d5033da4d25e59016b1e7a9d94a1f22
# bad: [abe5430e9d5314190ca571b3bfc0c42000634378] Merge branch 'acpi-pci-hotplug'
git bisect bad abe5430e9d5314190ca571b3bfc0c42000634378
# good: [c8ebcf1ff91a8f64b09c4df0ee21ae80a953c39c] ACPI / hotplug / PCI: Pass hotplug context objects to event handlers
git bisect good c8ebcf1ff91a8f64b09c4df0ee21ae80a953c39c
# good: [5c8d0e1dc475f0f35b5a774c92c68c3f7dbd3f5f] ACPI / hotplug / PCI: Do not queue up event handling work items in vain
git bisect good 5c8d0e1dc475f0f35b5a774c92c68c3f7dbd3f5f
# good: [a1d0abcea845730c4ff2f47897e28c2f11c79d4f] ACPI / hotplug / PCI: Redefine enable_device() and disable_device()
git bisect good a1d0abcea845730c4ff2f47897e28c2f11c79d4f
# bad: [1aaac07112f04068d7e2fc47bb435cfd4f9d5468] ACPI / hotplug / PCI: Fix NULL pointer dereference in cleanup_bridge()
git bisect bad 1aaac07112f04068d7e2fc47bb435cfd4f9d5468
# bad: [2d8b1d566a5f4874f4d92361f5cdbb50baa396f8] ACPI / hotplug / PCI: Get rid of check_sub_bridges()
git bisect bad 2d8b1d566a5f4874f4d92361f5cdbb50baa396f8
# good: [ff181e5a4f6b536e5f3f1601cd5c54e792cd9abc] ACPI / hotplug / PCI: Clean up bridge_mutex usage
git bisect good ff181e5a4f6b536e5f3f1601cd5c54e792cd9abc

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

* Re: PCI-to-USB ExpressCard Hotplugging can't work in v3.15-rc5
  2014-06-05 11:46         ` Gavin Guo
@ 2014-06-05 12:08           ` Rafael J. Wysocki
  2014-06-05 12:58             ` Mika Westerberg
  0 siblings, 1 reply; 7+ messages in thread
From: Rafael J. Wysocki @ 2014-06-05 12:08 UTC (permalink / raw)
  To: Gavin Guo
  Cc: Bjorn Helgaas, linux-pci, Yinghai Lu, YK, Yung Shen, Po-Hsu Lin,
	Jiang Liu, Mika Westerberg

CC: Mika

On Thursday, June 05, 2014 07:46:06 PM Gavin Guo wrote:
> On Thu, May 22, 2014 at 7:36 AM, Rafael J. Wysocki <rjw@rjwysocki.net> wrote:
> > On Wednesday, May 21, 2014 07:53:37 AM Bjorn Helgaas wrote:
> >> On Wed, May 21, 2014 at 3:45 AM, Gavin Guo <gavin.guo@canonical.com> wrote:
> >> > Hi Bjorn,
> >> >
> >> > On Wed, May 21, 2014 at 12:54 PM, Bjorn Helgaas <bhelgaas@google.com> wrote:
> >> >> On Tue, May 20, 2014 at 10:36 PM, Gavin Guo <gavin.guo@canonical.com> wrote:
> >> >>> Hi all,
> >> >>>
> >> >>> I have a APIOTEK PCI-to-USB ExpressCard and found that when it is
> >> >>> plugged at cold boot, the card can be detected. But, hotplug cannot
> >> >>> work at run time. The bug may be related to the commit which I
> >> >>> reported last year:
> >> >>>
> >> >>> commit 3f327e39b4b8f760c331bb2836735be6d83fbf53
> >> >>
> >> >> Where is your report from last year?  How did you identify this
> >> >> commit?  Did you verify that it works correctly with v3.10-rc1, but
> >> >> fails when you add this commit?
> >> >
> >> > The mail about the bug I reported last year is attached. And I'm sorry
> >> > about not describing clearly. This commit is the one to fix the bug
> >> > before. So, I think it will be a clue to find out what's wrong. I've
> >> > built v3.10 and tested it on the platform. It works fine. The bug
> >> > seems like a regression.
> >> >
> >> > I also attached the dmesg of v3.10 which works correctly with hotplug.
> >>
> >> v3.10 contains 3f327e39b4b8 (it appeared in v3.10-rc3).  So since it
> >> works correctly in v3.10, that commit is probably not the cause of the
> >> regression.
> >>
> >> So apparently it worked in v3.10 and broke sometime later.  Do you
> >> know when it broke?
> >>
> >> We're getting Bus Check events:
> >>
> >>   ACPI: \_SB_.PCI0: ACPI_NOTIFY_BUS_CHECK event
> >>
> >> but apparently we aren't handling them correctly.  Can you turn on the
> >> debug in the acpi_hotplug_schedule() path and add more if necessary to
> >> if we get to acpi_hotplug_work_fn(), acpi_device_hotplug(), etc.?  I'm
> >> not familiar with that path, so either you'll have to narrow it down,
> >> or we can hope that Yinghai or Rafael has some insight.
> >
> > Well, it would be good to create a bug entry for this at bugzilla.kernel.org
> > against ACPI/Config-hotplug and mark it as a regression.
> 
> I've completed the bisect and found
> 2d8b1d566a5f4874f4d92361f5cdbb50baa396f8 is the first bad commit. The
> "git bisect log" is also attached.
> 
> commit 2d8b1d566a5f4874f4d92361f5cdbb50baa396f8
> Author: Mika Westerberg <mika.westerberg@linux.intel.com>
> Date: Sat Jul 13 20:09:59 2013 +0300
> 
>     ACPI / hotplug / PCI: Get rid of check_sub_bridges()
> 
>     Now that acpiphp_check_bridge() always enumerates devices behind the
>     bridge, there is no need to do that for each sub-bridge anymore like
>     it is done in the current ACPI-based PCI hotplug (ACPIPHP) code.
> 
>     Given this we don't need check_sub_bridges() anymore, so drop that
>     function completely.
> 
>     This also simplifies the ACPIPHP code a bit.
> 
>     Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
>     Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> 
> :040000 040000 1f3f81404e06c92c01d6848ed7a6c5bffdb5f878
> 4e7ca3e4af42738f90555640cafbb6e6522ceedf M drivers
> 
> >
> > Rafael
> >
> >
> >> >>> Author: Yinghai Lu <yinghai@kernel.org>
> >> >>> Date:   Tue May 7 11:06:03 2013 -0600
> >> >>>
> >> >>>     PCI: acpiphp: Re-enumerate devices when host bridge receives Bus Check
> >> >>>
> >> >>>     When a PCI host bridge device receives a Bus Check notification, we
> >> >>>     must re-enumerate starting with the bridge to discover changes (devices
> >> >>>     that have been added or removed).
> >> >>>
> >> >>>     Prior to 668192b678 ("PCI: acpiphp: Move host bridge hotplug to
> >> >>>     pci_root.c"), this happened in _handle_hotplug_event_bridge().  After that
> >> >>>     commit, _handle_hotplug_event_bridge() is not installed for host bridges,
> >> >>>     and the host bridge notify handler, _handle_hotplug_event_root() did not
> >> >>>     re-enumerate.
> >> >>>
> >> >>>     This patch adds re-enumeration to _handle_hotplug_event_root().
> >> >>>
> >> >>>     This fixes cases where we don't notice the addition or removal of
> >> >>>     PCI devices, e.g., the PCI-to-USB ExpressCard in the bugzilla below.
> >> >>>
> >> >>> Dmesg is attached. The scenario of the dmesg: The PCI-to-USB
> >> >>> ExpressCard is attached at cold boot. Then, you can see that the usb
> >> >>> storage can be detected in the dmesg. Finally, I've done hotplug 2
> >> >>> times to see if it can detect the PCI-to-USB ExpressCard. At the end
> >> >>> of Dmesg, it only has several "ACPI: \_SB_.PCI0: ACPI_NOTIFY_BUS_CHECK
> >> >>> event" and can't detect the card.
> >> >>>
> >> >>> Thanks,
> >> >>> Gavin Guo
> >> --
> >> To unsubscribe from this list: send the line "unsubscribe linux-pci" in
> >> the body of a message to majordomo@vger.kernel.org
> >> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> >
> > --
> > I speak only for myself.
> > Rafael J. Wysocki, Intel Open Source Technology Center.

-- 
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.

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

* Re: PCI-to-USB ExpressCard Hotplugging can't work in v3.15-rc5
  2014-06-05 12:08           ` Rafael J. Wysocki
@ 2014-06-05 12:58             ` Mika Westerberg
  2014-06-13  8:05               ` Gavin Guo
  0 siblings, 1 reply; 7+ messages in thread
From: Mika Westerberg @ 2014-06-05 12:58 UTC (permalink / raw)
  To: Gavin Guo
  Cc: Rafael J. Wysocki, Bjorn Helgaas, linux-pci, Yinghai Lu, YK,
	Yung Shen, Po-Hsu Lin, Jiang Liu

On Thu, Jun 05, 2014 at 02:08:57PM +0200, Rafael J. Wysocki wrote:
> CC: Mika
> 
> On Thursday, June 05, 2014 07:46:06 PM Gavin Guo wrote:
> > On Thu, May 22, 2014 at 7:36 AM, Rafael J. Wysocki <rjw@rjwysocki.net> wrote:
> > > On Wednesday, May 21, 2014 07:53:37 AM Bjorn Helgaas wrote:
> > >> On Wed, May 21, 2014 at 3:45 AM, Gavin Guo <gavin.guo@canonical.com> wrote:
> > >> > Hi Bjorn,
> > >> >
> > >> > On Wed, May 21, 2014 at 12:54 PM, Bjorn Helgaas <bhelgaas@google.com> wrote:
> > >> >> On Tue, May 20, 2014 at 10:36 PM, Gavin Guo <gavin.guo@canonical.com> wrote:
> > >> >>> Hi all,
> > >> >>>
> > >> >>> I have a APIOTEK PCI-to-USB ExpressCard and found that when it is
> > >> >>> plugged at cold boot, the card can be detected. But, hotplug cannot
> > >> >>> work at run time. The bug may be related to the commit which I
> > >> >>> reported last year:
> > >> >>>
> > >> >>> commit 3f327e39b4b8f760c331bb2836735be6d83fbf53
> > >> >>
> > >> >> Where is your report from last year?  How did you identify this
> > >> >> commit?  Did you verify that it works correctly with v3.10-rc1, but
> > >> >> fails when you add this commit?
> > >> >
> > >> > The mail about the bug I reported last year is attached. And I'm sorry
> > >> > about not describing clearly. This commit is the one to fix the bug
> > >> > before. So, I think it will be a clue to find out what's wrong. I've
> > >> > built v3.10 and tested it on the platform. It works fine. The bug
> > >> > seems like a regression.
> > >> >
> > >> > I also attached the dmesg of v3.10 which works correctly with hotplug.
> > >>
> > >> v3.10 contains 3f327e39b4b8 (it appeared in v3.10-rc3).  So since it
> > >> works correctly in v3.10, that commit is probably not the cause of the
> > >> regression.
> > >>
> > >> So apparently it worked in v3.10 and broke sometime later.  Do you
> > >> know when it broke?
> > >>
> > >> We're getting Bus Check events:
> > >>
> > >>   ACPI: \_SB_.PCI0: ACPI_NOTIFY_BUS_CHECK event
> > >>
> > >> but apparently we aren't handling them correctly.  Can you turn on the
> > >> debug in the acpi_hotplug_schedule() path and add more if necessary to
> > >> if we get to acpi_hotplug_work_fn(), acpi_device_hotplug(), etc.?  I'm
> > >> not familiar with that path, so either you'll have to narrow it down,
> > >> or we can hope that Yinghai or Rafael has some insight.
> > >
> > > Well, it would be good to create a bug entry for this at bugzilla.kernel.org
> > > against ACPI/Config-hotplug and mark it as a regression.
> > 
> > I've completed the bisect and found
> > 2d8b1d566a5f4874f4d92361f5cdbb50baa396f8 is the first bad commit. The
> > "git bisect log" is also attached.
> > 
> > commit 2d8b1d566a5f4874f4d92361f5cdbb50baa396f8
> > Author: Mika Westerberg <mika.westerberg@linux.intel.com>
> > Date: Sat Jul 13 20:09:59 2013 +0300
> > 
> >     ACPI / hotplug / PCI: Get rid of check_sub_bridges()
> > 
> >     Now that acpiphp_check_bridge() always enumerates devices behind the
> >     bridge, there is no need to do that for each sub-bridge anymore like
> >     it is done in the current ACPI-based PCI hotplug (ACPIPHP) code.
> > 
> >     Given this we don't need check_sub_bridges() anymore, so drop that
> >     function completely.
> > 
> >     This also simplifies the ACPIPHP code a bit.
> > 
> >     Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
> >     Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> > 
> > :040000 040000 1f3f81404e06c92c01d6848ed7a6c5bffdb5f878
> > 4e7ca3e4af42738f90555640cafbb6e6522ceedf M drivers

Gavin,

Can you send dmesg and your ACPI DSDT table to me (or attach them
to a bug if you are filing one)? I wasn't able to dig up the original
dmesg from the linux-pci archives.

Please also make sure that you have CONFIG_DYNAMIC_DEBUG=y and
"acpiphp.dyndbg=+p" in the kernel command line.

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

* Re: PCI-to-USB ExpressCard Hotplugging can't work in v3.15-rc5
  2014-06-05 12:58             ` Mika Westerberg
@ 2014-06-13  8:05               ` Gavin Guo
  0 siblings, 0 replies; 7+ messages in thread
From: Gavin Guo @ 2014-06-13  8:05 UTC (permalink / raw)
  To: Mika Westerberg
  Cc: Rafael J. Wysocki, Bjorn Helgaas, linux-pci, Yinghai Lu, YK,
	Yung Shen, Po-Hsu Lin, Jiang Liu

On Thu, Jun 5, 2014 at 8:58 PM, Mika Westerberg
<mika.westerberg@linux.intel.com> wrote:
> On Thu, Jun 05, 2014 at 02:08:57PM +0200, Rafael J. Wysocki wrote:
>> CC: Mika
>>
>> On Thursday, June 05, 2014 07:46:06 PM Gavin Guo wrote:
>> > On Thu, May 22, 2014 at 7:36 AM, Rafael J. Wysocki <rjw@rjwysocki.net> wrote:
>> > > On Wednesday, May 21, 2014 07:53:37 AM Bjorn Helgaas wrote:
>> > >> On Wed, May 21, 2014 at 3:45 AM, Gavin Guo <gavin.guo@canonical.com> wrote:
>> > >> > Hi Bjorn,
>> > >> >
>> > >> > On Wed, May 21, 2014 at 12:54 PM, Bjorn Helgaas <bhelgaas@google.com> wrote:
>> > >> >> On Tue, May 20, 2014 at 10:36 PM, Gavin Guo <gavin.guo@canonical.com> wrote:
>> > >> >>> Hi all,
>> > >> >>>
>> > >> >>> I have a APIOTEK PCI-to-USB ExpressCard and found that when it is
>> > >> >>> plugged at cold boot, the card can be detected. But, hotplug cannot
>> > >> >>> work at run time. The bug may be related to the commit which I
>> > >> >>> reported last year:
>> > >> >>>
>> > >> >>> commit 3f327e39b4b8f760c331bb2836735be6d83fbf53
>> > >> >>
>> > >> >> Where is your report from last year?  How did you identify this
>> > >> >> commit?  Did you verify that it works correctly with v3.10-rc1, but
>> > >> >> fails when you add this commit?
>> > >> >
>> > >> > The mail about the bug I reported last year is attached. And I'm sorry
>> > >> > about not describing clearly. This commit is the one to fix the bug
>> > >> > before. So, I think it will be a clue to find out what's wrong. I've
>> > >> > built v3.10 and tested it on the platform. It works fine. The bug
>> > >> > seems like a regression.
>> > >> >
>> > >> > I also attached the dmesg of v3.10 which works correctly with hotplug.
>> > >>
>> > >> v3.10 contains 3f327e39b4b8 (it appeared in v3.10-rc3).  So since it
>> > >> works correctly in v3.10, that commit is probably not the cause of the
>> > >> regression.
>> > >>
>> > >> So apparently it worked in v3.10 and broke sometime later.  Do you
>> > >> know when it broke?
>> > >>
>> > >> We're getting Bus Check events:
>> > >>
>> > >>   ACPI: \_SB_.PCI0: ACPI_NOTIFY_BUS_CHECK event
>> > >>
>> > >> but apparently we aren't handling them correctly.  Can you turn on the
>> > >> debug in the acpi_hotplug_schedule() path and add more if necessary to
>> > >> if we get to acpi_hotplug_work_fn(), acpi_device_hotplug(), etc.?  I'm
>> > >> not familiar with that path, so either you'll have to narrow it down,
>> > >> or we can hope that Yinghai or Rafael has some insight.
>> > >
>> > > Well, it would be good to create a bug entry for this at bugzilla.kernel.org
>> > > against ACPI/Config-hotplug and mark it as a regression.
>> >
>> > I've completed the bisect and found
>> > 2d8b1d566a5f4874f4d92361f5cdbb50baa396f8 is the first bad commit. The
>> > "git bisect log" is also attached.
>> >
>> > commit 2d8b1d566a5f4874f4d92361f5cdbb50baa396f8
>> > Author: Mika Westerberg <mika.westerberg@linux.intel.com>
>> > Date: Sat Jul 13 20:09:59 2013 +0300
>> >
>> >     ACPI / hotplug / PCI: Get rid of check_sub_bridges()
>> >
>> >     Now that acpiphp_check_bridge() always enumerates devices behind the
>> >     bridge, there is no need to do that for each sub-bridge anymore like
>> >     it is done in the current ACPI-based PCI hotplug (ACPIPHP) code.
>> >
>> >     Given this we don't need check_sub_bridges() anymore, so drop that
>> >     function completely.
>> >
>> >     This also simplifies the ACPIPHP code a bit.
>> >
>> >     Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
>> >     Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
>> >
>> > :040000 040000 1f3f81404e06c92c01d6848ed7a6c5bffdb5f878
>> > 4e7ca3e4af42738f90555640cafbb6e6522ceedf M drivers
>
> Gavin,
>
> Can you send dmesg and your ACPI DSDT table to me (or attach them
> to a bug if you are filing one)? I wasn't able to dig up the original
> dmesg from the linux-pci archives.
>
> Please also make sure that you have CONFIG_DYNAMIC_DEBUG=y and
> "acpiphp.dyndbg=+p" in the kernel command line.

The bug was fixed already and can be found on the
https://bugzilla.kernel.org/show_bug.cgi?id=76901.

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

end of thread, other threads:[~2014-06-13  8:05 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <CA+eFSM2CBiWZNmpnSNGKZGjEpK6gc=T0a5r7m6sbORi==XTCjQ@mail.gmail.com>
2014-05-21  4:54 ` PCI-to-USB ExpressCard Hotplugging can't work in v3.15-rc5 Bjorn Helgaas
     [not found]   ` <CA+eFSM3683deo8aRiKo6Yobq6sRoWgyoVV+gCnTHaSUNjYcHaA@mail.gmail.com>
2014-05-21 13:53     ` Bjorn Helgaas
2014-05-21 23:36       ` Rafael J. Wysocki
2014-06-05 11:46         ` Gavin Guo
2014-06-05 12:08           ` Rafael J. Wysocki
2014-06-05 12:58             ` Mika Westerberg
2014-06-13  8:05               ` Gavin Guo

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.