[ECOS] Fix in quicc2/fcc eth drivers
Christoph Csebits
christoph.csebits@frequentis.com
Tue Feb 3 14:10:00 GMT 2004
hi
here is a patch for the quicc2 and for the fcc
eth drivers (powerpc architecture).
Under heavy load (tx path) the ip stack didn't recover
from "out of mbufs". To verify this, just do a
udpblast -p 4444 10.14.0.2 9999
(where port 4444 is not open).
*_eth_can_send() in principle checks if there
is a free hardware buffer. But it checked
only if the buffer was sent by the
hardware. But not if the buffer was
also freed up by the upper layer (with txdone).
BTW: this patch is also recommended for the FCC:
http://sources.redhat.com/ml/ecos-patches/2003-04/txt00002.txt
(discard packets with errors (e.g. CRC ))
regards, Christoph
--
-------------- next part --------------
diff -r -U5 powerpc/fcc/current/ChangeLog powerpc.fixed/fcc/current/ChangeLog
--- powerpc/fcc/current/ChangeLog Fri Nov 7 19:01:17 2003
+++ powerpc.fixed/fcc/current/ChangeLog Tue Feb 3 14:43:57 2004
@@ -1,5 +1,10 @@
+2004-02-03 Christoph Csebits <christoph.csebits@frequentis.com>
+
+ * src/if_fcc.c (fcc_eth_can_send): Fix: check also if
+ buffer was freed by the upper layer (txdone was called).
+
2003-11-07 Gary Thomas <gary@mlbassoc.com>
* src/if_fcc.c (fcc_eth_init): Improve messages, add device name.
2003-10-02 Gary Thomas <gary@mlbassoc.com>
diff -r -U5 powerpc/fcc/current/src/if_fcc.c powerpc.fixed/fcc/current/src/if_fcc.c
--- powerpc/fcc/current/src/if_fcc.c Fri Nov 7 19:01:17 2003
+++ powerpc.fixed/fcc/current/src/if_fcc.c Tue Feb 3 14:33:44 2004
@@ -411,11 +411,11 @@
HAL_DCACHE_INVALIDATE(fcc_eth_txring,
8*CYGNUM_DEVS_ETH_POWERPC_FCC_TxNUM);
}
#endif
- return ((txbd->ctrl & FCC_BD_Tx_Ready) == 0);
+ return ((txbd->ctrl & (FCC_BD_Tx_TC | FCC_BD_Tx_Ready)) == 0);
}
//
// This routine is called to send data to the hardware.
static void
diff -r -U5 powerpc/quicc2/current/ChangeLog powerpc.fixed/quicc2/current/ChangeLog
--- powerpc/quicc2/current/ChangeLog Wed Mar 5 00:25:03 2003
+++ powerpc.fixed/quicc2/current/ChangeLog Tue Feb 3 14:44:16 2004
@@ -1,5 +1,10 @@
+2004-02-03 Christoph Csebits <christoph.csebits@frequentis.com>
+
+ * src/if_fcc.c (fcc_eth_can_send): Fix: check also if
+ buffer was freed by the upper layer (txdone was called).
+
2003-03-04 Paul Fine <pfine@delcomsys.com>
* src/EnetPHY.c : Added PHY reset function for the ts6 platform.
Changed delay to use HAL_DELAY_US instead of a nop for loop.
* src/if_fec.c : Invoke PHY reset function for ts6 platform, as
diff -r -U5 powerpc/quicc2/current/src/if_fec.c powerpc.fixed/quicc2/current/src/if_fec.c
--- powerpc/quicc2/current/src/if_fec.c Wed Mar 5 00:25:03 2003
+++ powerpc.fixed/quicc2/current/src/if_fec.c Tue Feb 3 14:34:43 2004
@@ -474,11 +474,11 @@
HAL_DCACHE_INVALIDATE(fec_eth_txring,
8*CYGNUM_DEVS_ETH_POWERPC_QUICC2_TxNUM);
}
#endif
- return ((txbd->ctrl & FEC_BD_Tx_Ready) == 0);
+ return ((txbd->ctrl & (FCC_BD_Tx_TC | FCC_BD_Tx_Ready)) == 0);
}
//
// This routine is called to send data to the hardware.
static void
-------------- next part --------------
--
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss
More information about the Ecos-discuss
mailing list