Subject: patch for if_bge.c
To: None <current-users@netbsd.org>
From: SAITOH Masanobu <masanobu@iij.ad.jp>
List: current-users
Date: 09/27/2007 04:21:57
I made a patch to fix "block failed to stop" problem and/or
"RX CPU self-diagnostics failed!" problem on bge(4).
Please test and report to me especially if it got worse.
Index: if_bge.c
===================================================================
RCS file: /cvsroot/src/sys/dev/pci/if_bge.c,v
retrieving revision 1.138
diff -u -r1.138 if_bge.c
--- if_bge.c 24 Sep 2007 21:25:45 -0000 1.138
+++ if_bge.c 26 Sep 2007 19:12:30 -0000
@@ -2831,11 +2831,6 @@
val |= (1<<29);
}
}
- /*
- * Write the magic number to the firmware mailbox at 0xb50
- * so that the driver can synchronize with the firmware.
- */
- bge_writemem_ind(sc, BGE_SOFTWARE_GENCOMM, BGE_MAGIC_NUMBER);
/* Issue global reset */
bge_writereg_ind(sc, BGE_MISC_CFG, val);
@@ -2884,6 +2879,12 @@
}
/*
+ * Write the magic number to the firmware mailbox at 0xb50
+ * so that the driver can synchronize with the firmware.
+ */
+ bge_writemem_ind(sc, BGE_SOFTWARE_GENCOMM, BGE_MAGIC_NUMBER);
+
+ /*
* Poll the value location we just wrote until
* we see the 1's complement of the magic number.
* This indicates that the firmware initialization
----------------------------------------------------------
SAITOH Masanobu (masanobu@iij.ad.jp
msaitoh@netbsd.org)