* [PATCH] via-rhine: Fix force media
@ 2004-05-20 17:05 Roger Luethi
0 siblings, 0 replies; only message in thread
From: Roger Luethi @ 2004-05-20 17:05 UTC (permalink / raw)
To: Jeff Garzik; +Cc: linux-kernel
[-- Attachment #1: Type: text/plain, Size: 395 bytes --]
Lucas Nussbaum and Dirk Koeppen each found independently that the code
for forcing media options in via-rhine is borked and suggested the fix
below. I've been sitting on this way too long because there is more
badness in the immediate vicinity which needs a bigger surgery.
The second hunk fixes a braino I managed to introduce myself.
The patch is for both 2.4 and 2.6. Please apply.
Roger
[-- Attachment #2: via-rhine-2.6.6-fix.diff --]
[-- Type: text/plain, Size: 904 bytes --]
--- linux-2.6.6/drivers/net/via-rhine.c 2004-05-20 16:17:38.228468522 +0200
+++ linux-2.6.6-patch/drivers/net/via-rhine.c 2004-05-20 17:46:34.466916644 +0200
@@ -860,7 +860,7 @@
if (option & 0x220)
np->mii_if.full_duplex = 1;
np->default_port = option & 0x3ff;
- if (np->default_port & 0x330) {
+ if (option & 0x330) {
/* FIXME: shouldn't someone check this variable? */
/* np->medialock = 1; */
printk(KERN_INFO " Forcing %dMbs %s-duplex operation.\n",
@@ -1683,8 +1683,9 @@
printk(KERN_INFO "%s: Tx descriptor write-back race.\n",
dev->name);
}
- if ((intr_status & IntrTxError) && ~( IntrTxAborted | IntrTxUnderrun |
- IntrTxDescRace )) {
+ if ((intr_status & IntrTxError) &&
+ (intr_status & ( IntrTxAborted |
+ IntrTxUnderrun | IntrTxDescRace )) == 0) {
if (np->tx_thresh < 0xE0) {
writeb(np->tx_thresh += 0x20, ioaddr + TxConfig);
}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2004-05-20 17:09 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-05-20 17:05 [PATCH] via-rhine: Fix force media Roger Luethi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox