lkml.org 
[lkml]   [2004]   [Jun]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
SubjectRe: [PATCH] PCI fixes for 2.6.7
Date
From
ChangeSet 1.1722.103.6, 2004/06/14 11:11:45-07:00, rl@hellgate.ch

[PATCH] PCI: Fix off-by-one in pci_enable_wake

Fix off-by-one in pci_enable_wake.
Bit field location determined by mask, not value.

Signed-off-by: Roger Luethi <rl@hellgate.ch>
Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>


drivers/pci/pci.c | 2 +-
1 files changed, 1 insertion(+), 1 deletion(-)

diff -Nru a/drivers/pci/pci.c b/drivers/pci/pci.c
--- a/drivers/pci/pci.c 2004-06-24 13:50:47 -07:00
+++ b/drivers/pci/pci.c 2004-06-24 13:50:47 -07:00
@@ -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)))
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:04    [from the cache]
©2003-2011 Jasper Spaans. Advertise on this site