Re: pci_update_resource() getting called on sparc64

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Aug 08, 2005 at 12:42:49PM -0700, Greg KH wrote:
> On Mon, Aug 08, 2005 at 12:32:09PM -0700, David S. Miller wrote:

> > And lo' and behold, we find the answer in the PCI probing code.
> > It initializes every PCI device's PCI power state to "unknown":
> >  
> > 	/* "Unknown power state" */
> > 	dev->current_state = 4;
> > 
> > and thus makes this test ">= D3hot" pass in the pci_set_power_state()
> > code.
> 
> Crap, gotta love >= checks on enumerated types...

The "dev->current_state = 4" is what prompted the ">= D3hot" in the
first place... :-)

I had seen a patch from earlier this year that changed the probing
code to actually get the power state from the device (and added a
pci_get_power_state API).  I don't know why that never got merged,
but since it didn't I had to account for the case of the power state
being unknown (i.e dev->current_state == 4).

So, w/ Dave's patch for Sparc64 to use setup-res.c, does the patch
stay?  Is there anything else I need to do?

Thanks,

John
-- 
John W. Linville
[email protected]
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]
  Powered by Linux