* [PATCH] Fix stupid wol variable overflow bug
@ 2007-06-17 11:40 Michael Buesch
0 siblings, 0 replies; only message in thread
From: Michael Buesch @ 2007-06-17 11:40 UTC (permalink / raw)
To: John Linville, Andrew Morton; +Cc: netdev, Maximilian Engelhardt, Gary Zambrano
This bug was introduced by me.
val is 16bit, but the read value is 32bit.
Seems like I was smoking crack when porting that part of the driver.
I guess that's the last stupid bug in these 4 lines of code.
Signed-off-by: Michael Buesch <mb@bu3sch.de>
Index: bu3sch-wireless-dev/drivers/net/b44.c
===================================================================
--- bu3sch-wireless-dev.orig/drivers/net/b44.c 2007-06-16 19:56:41.000000000 +0200
+++ bu3sch-wireless-dev/drivers/net/b44.c 2007-06-17 13:35:23.000000000 +0200
@@ -1574,8 +1574,7 @@ static void b44_setup_wol_pci(struct b44
u16 val;
if (bp->sdev->bus->bustype != SSB_BUSTYPE_SSB) {
- val = br32(bp, SSB_TMSLOW);
- bw32(bp, SSB_TMSLOW, val | SSB_TMSLOW_PE);
+ bw32(bp, SSB_TMSLOW, br32(bp, SSB_TMSLOW) | SSB_TMSLOW_PE);
pci_read_config_word(bp->sdev->bus->host_pci, SSB_PMCSR, &val);
pci_write_config_word(bp->sdev->bus->host_pci, SSB_PMCSR, val | SSB_PE);
}
Please apply this to wireless-dev.
--
Greetings Michael.
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2007-06-17 11:41 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-06-17 11:40 [PATCH] Fix stupid wol variable overflow bug Michael Buesch
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).