* [PATCH 2.6] Fix off-by-one in pci_enable_wake
@ 2004-06-14 17:22 Roger Luethi
2004-06-14 17:57 ` Greg KH
0 siblings, 1 reply; 2+ messages in thread
From: Roger Luethi @ 2004-06-14 17:22 UTC (permalink / raw)
To: Andrew Morton; +Cc: Greg Kroah-Hartman, linux-kernel
Fix off-by-one in pci_enable_wake.
Bit field location determined by mask, not value.
Signed-off-by: Roger Luethi <rl@hellgate.ch>
--- linux-2.6.7-rc3-bk6/drivers/pci/pci.c.orig 2004-06-14 18:42:09.561442345 +0200
+++ linux-2.6.7-rc3-bk6/drivers/pci/pci.c 2004-06-14 18:43:15.083670484 +0200
@@ -442,7 +442,7 @@
pci_read_config_word(dev,pm+PCI_PM_PMC,&value);
value &= PCI_PM_CAP_PME_MASK;
- value >>= ffs(value); /* First bit of mask */
+ value >>= ffs(PCI_PM_CAP_PME_MASK) - 1; /* First bit of mask */
/* Check if it can generate PME# from requested state. */
if (!value || !(value & (1 << state)))
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2004-06-14 17:58 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-06-14 17:22 [PATCH 2.6] Fix off-by-one in pci_enable_wake Roger Luethi
2004-06-14 17:57 ` Greg KH
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox