public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "John W. Linville" <linville@tuxdriver.com>
To: Greg KH <greg@kroah.com>
Cc: "David S. Miller" <davem@davemloft.net>,
	torvalds@osdl.org, ralf@linux-mips.org,
	linux-kernel@vger.kernel.org, linville@redhat.com
Subject: Re: pci_update_resource() getting called on sparc64
Date: Mon, 8 Aug 2005 17:38:43 -0400	[thread overview]
Message-ID: <20050808213842.GA9010@tuxdriver.com> (raw)
In-Reply-To: <20050808194249.GA6729@kroah.com>

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
linville@tuxdriver.com

  parent reply	other threads:[~2005-08-08 21:39 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-08-08 14:12 pci_update_resource() getting called on sparc64 David S. Miller
2005-08-08 14:44 ` Greg KH
2005-08-08 17:33   ` David S. Miller
2005-08-08 18:32     ` Linus Torvalds
2005-08-08 16:08       ` Greg KH
2005-08-08 19:32         ` David S. Miller
2005-08-08 19:42           ` Greg KH
2005-08-08 19:54             ` David S. Miller
2005-08-08 20:02               ` Greg KH
2005-08-08 20:19                 ` [PCI PATCH]: Make sparc64 use setup-res.c David S. Miller
2005-08-08 19:56             ` pci_update_resource() getting called on sparc64 Linus Torvalds
2005-08-08 21:38             ` John W. Linville [this message]
2005-08-08 21:43               ` David S. Miller
2005-08-08 21:59                 ` John W. Linville
2005-08-09  9:54         ` Ralf Baechle

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=20050808213842.GA9010@tuxdriver.com \
    --to=linville@tuxdriver.com \
    --cc=davem@davemloft.net \
    --cc=greg@kroah.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linville@redhat.com \
    --cc=ralf@linux-mips.org \
    --cc=torvalds@osdl.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox