lkml.org 
[lkml]   [2008]   [Nov]   [4]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
DateTue, 4 Nov 2008 05:02:45 +0000
FromMatthew Garrett <>
SubjectRe: [PATCH] Add option to passively listen for PCIE hotplug events
On Tue, Nov 04, 2008 at 02:07:00AM +0000, Matthew Garrett wrote:
> On Tue, Nov 04, 2008 at 10:58:11AM +0900, Kenji Kaneshige wrote:
> > > 	t_slot->hpc_ops->get_adapter_status(t_slot, &value); /* Check if 
> > > 	slot is occupied */
> > >-	if (value && pciehp_force) {
> > >+	if (value && (pciehp_force || pciehp_passive)) {
> > > 		rc = pciehp_enable_slot(t_slot);
> > > 		if (rc)	/* -ENODEV: shouldn't happen, but deal with it */
> > > 			value = 0;
> This code no longer runs in the pciehp_passive case. However, by the 
> looks of it it still does in the resume case - that probably wants 
> fixing.

Thinking about this - you said that the problem occurs because 
pciehp_force=1 causes it to try to enable an already enabled slot, and 
then tries to power down the slot as a result? It sounds like this code 
should actually be checking whether the return value is ENODEV or 
EINVAL, and in the latter case not powering the slot down. That sounds 
like a separate bugfix that I'll send later on.

-- 
Matthew Garrett | mjg59@srcf.ucam.org

\
 
 \ /
  Last update: 2008-11-04 06:05    [from the cache]
©2003-2008