From: Gu Zheng <guz.fnst@cn.fujitsu.com>
To: Wei Yang <weiyang@linux.vnet.ibm.com>
Cc: Paul Bolle <pebolle@tiscali.nl>, Oliver Neukum <oneukum@suse.de>,
"Rafael J. Wysocki" <rjw@sisk.pl>,
Bjorn Helgaas <bhelgaas@google.com>,
linux-pci@vger.kernel.org
Subject: Re: pciehp: errors on resume
Date: Fri, 22 Feb 2013 16:58:49 +0800 [thread overview]
Message-ID: <51273349.3070400@cn.fujitsu.com> (raw)
In-Reply-To: <20130222074942.GA2398@richard.(null)>
On 02/22/2013 03:49 PM, Wei Yang wrote:
> On Tue, Feb 19, 2013 at 06:07:30PM +0800, Gu Zheng wrote:
>> On 02/19/2013 05:28 PM, Paul Bolle wrote:
>>
>>> Richard,
>>>
>>> On Tue, 2013-02-19 at 16:25 +0800, Wei Yang wrote:
>>>> Sorry for bothering, I am looking at this and try to understand the process,
>>>> while get some confusion.
>>>>
>>>> 1. The error log will be printed every time suspend/resume, no matter whether
>>>> the device is plug in/plug out during the suspend as discussed below?
>>>>
>>>> If the device is always there, no one touch it, the error message still be
>>>> printed?
>>>>
>>>> 2. In my mind, before the pcied_init is called, those pci_dev are
>>>> already enumerated, such as the wireless card in this case.
>>>>
>>>> During the boot stage, if the pciehp_force is set to true, the error messge
>>>> still be printed? Since I don't have those devices to create pcie_device, I
>>>> can't test this.
>>>>
>>>> 3. Do you think it would be find to remove those devices at the suspend stage?
>>>> Then they will be added again at the resume stage?
>>>
>>> Bypassing your questions, I'd like to point you at
>>> http://article.gmane.org/gmane.linux.kernel.pci/20077 , in which Rafael
>>> suggested a possible solution to this situation. (There's some extra
>>> info in other messages in this thread.)
>>
>>
>> Yes, Rafael's suggestion seems a possible solution to this situation.
>> In my mind, it's impossible to figure out a unique pci device with
>> the registers in the PCI config space, something like "vender_id + device_id"
>> can not describe a unique device.
>> The pcie device has a feature likes "series number" which could be used to figure
>> out a unique one, but this feature is optional. If it's not set, we still
>> can not detect a unique pcie device.
>> Sorry for my poor knowledge, if what I said has any mistake, please figure it out!:)
>
> Gu,
>
> After reading the code, there are several sets of hotplug code, for example
> pciehp, acpiphp.
>
> For acpiphp, I found there is notification handler _handle_hotplug_event_bridge
> and _handle_hotplug_event_func to handle the hardware events.
>
> While for pciehp, I didn't find such handler to handle a hardware event. The
> pciehp_resume is the start point?
Look into pcie_init_slot(),pcie_init_notification(), pciehp use workqueue each slot
to handle hardware event in polling/intrupt.
Pciehp_resume() has relations to power manager. In fact, it's near the end point in the
resume routine.
And further more, you can see documentation/power/pci.txt and follow pci_pm_resume().
Thanks,
Gu
>
>>
>> Thanks,
>> Gu
>>
>>
>>
>>
>>> I must confess that I'm not at all sure how to implement it and that so
>>> far I have, rather cowardly, not even drafted a solution along those
>>> lines.
>>>
>>>
>>> Paul Bolle
>>>
>>> --
>>> 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
>>>
>>
>
next prev parent reply other threads:[~2013-02-22 8:59 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-28 12:46 pciehp: errors on resume Paul Bolle
2013-01-29 2:10 ` Gu Zheng
2013-01-29 10:35 ` Paul Bolle
2013-01-29 11:35 ` Rafael J. Wysocki
2013-01-29 12:32 ` Paul Bolle
2013-01-29 14:45 ` Martin Mokrejs
2013-01-29 21:41 ` Rafael J. Wysocki
2013-01-30 3:47 ` Gu Zheng
2013-01-30 3:08 ` Gu Zheng
2013-01-30 8:31 ` Paul Bolle
2013-01-31 6:47 ` Gu Zheng
2013-01-31 10:58 ` Paul Bolle
2013-01-31 13:18 ` Rafael J. Wysocki
2013-01-31 13:16 ` Rafael J. Wysocki
[not found] ` <512336fb.42d70e0a.73ed.ffffc77eSMTPIN_ADDED_BROKEN@mx.google.com>
2013-02-19 9:28 ` Paul Bolle
2013-02-19 10:07 ` Gu Zheng
[not found] ` <20130222074942.GA2398@richard.(null)>
2013-02-22 8:58 ` Gu Zheng [this message]
[not found] ` <5124284e.09d80e0a.294a.ffff9ee6SMTPIN_ADDED_BROKEN@mx.google.com>
2013-02-20 8:08 ` Paul Bolle
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=51273349.3070400@cn.fujitsu.com \
--to=guz.fnst@cn.fujitsu.com \
--cc=bhelgaas@google.com \
--cc=linux-pci@vger.kernel.org \
--cc=oneukum@suse.de \
--cc=pebolle@tiscali.nl \
--cc=rjw@sisk.pl \
--cc=weiyang@linux.vnet.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.