bge(4) one packet wedge
Gleb Smirnoff
glebius at FreeBSD.org
Thu Aug 24 08:41:55 UTC 2006
Colleagues,
pondering on the Linux driver more I have found that the only
thing that fixed this problem on 5700 (no status tag support) is
the hack in the local timer.
So, I have prepared a hack that fixes my problem. Certainly,
the performance of request-response test is awful, since chip
wedges for a fraction of a second many times per minute. But at
least, it doesn't wedge forever.
I will continue working on the patch so that it will support
the tagged controllers, but I need one to test.
P.S. Looks like 5700 is not usable for my benchmarking in the
request-response tests.
--
Totus tuus, Glebius.
GLEBIUS-RIPN GLEB-RIPE
-------------- next part --------------
Index: if_bge.c
===================================================================
RCS file: /home/ncvs/src/sys/dev/bge/if_bge.c,v
retrieving revision 1.139
diff -u -p -r1.139 if_bge.c
--- if_bge.c 23 Aug 2006 11:32:54 -0000 1.139
+++ if_bge.c 24 Aug 2006 08:32:24 -0000
@@ -2705,6 +2719,7 @@ bge_intr(void *xsc)
* Do the mandatory PCI flush as well as get the link status.
*/
statusword = CSR_READ_4(sc, BGE_MAC_STS) & BGE_MACSTAT_LINK_CHANGED;
+ sc->bge_ldata.bge_status_block->bge_status &= ~BGE_STATUS_UPDATED;
/* Ack interrupt and stop others from occuring. */
CSR_WRITE_4(sc, BGE_MBX_IRQ0_LO, 1);
@@ -2769,6 +2784,16 @@ bge_tick_locked(struct bge_softc *sc)
}
}
+ if (1) { /* Only for not-tagged IRQ status. */
+ struct bge_status_block *sblock = sc->bge_ldata.bge_status_block;
+
+ if (sblock->bge_status & BGE_STATUS_UPDATED)
+ BGE_SETBIT(sc, BGE_MISC_LOCAL_CTL, BGE_MLC_INTR_SET);
+ else
+ CSR_WRITE_4(sc, BGE_HCC_MODE, BGE_HCCMODE_ENABLE |
+ BGE_HCCMODE_COAL_NOW);
+ }
+
callout_reset(&sc->bge_stat_ch, hz, bge_tick, sc);
}
Index: if_bgereg.h
===================================================================
RCS file: /home/ncvs/src/sys/dev/bge/if_bgereg.h,v
retrieving revision 1.52
diff -u -p -r1.52 if_bgereg.h
--- if_bgereg.h 23 Aug 2006 11:32:54 -0000 1.52
+++ if_bgereg.h 24 Aug 2006 08:21:10 -0000
@@ -1932,7 +1937,10 @@ struct bge_sts_idx {
struct bge_status_block {
uint32_t bge_status;
- uint32_t bge_rsvd0;
+#define BGE_STATUS_UPDATED 0x00000001
+#define BGE_STATUS_LINKEV 0x00000002
+#define BGE_STATUS_ERROR 0x00000004
+ uint32_t bge_tag;
#if BYTE_ORDER == LITTLE_ENDIAN
uint16_t bge_rx_jumbo_cons_idx;
uint16_t bge_rx_std_cons_idx;
More information about the freebsd-net
mailing list