From: Thomas Lange <thomas@corelatus•com>
To: linuxppc-embedded@lists•linuxppc.org
Subject: patch for arch/ppc/8xx_io/fec.c
Date: Thu, 24 Oct 2002 21:29:48 +0200 [thread overview]
Message-ID: <3DB84A2C.89BC0C38@corelatus.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 642 bytes --]
Against bk:linuxppc_2_4
Use retry counter (RC) to detect collisions instead of
Defer (DEF).
>From Table 6-29: (MPC860T (Rev. D) Fast Ethernet Controller 0.8)
6 DEF Defer indication, written by FEC (valid if L = 1). Set when the
FEC had to defer while trying to
transmit a frame. This bit is not set if a collision occurs during
transmission.
10-13 RC Retry count, written by FEC (valid if L = 1). Counts retries
needed
to successfully send this frame. If RC = 0, the frame was sent correctly
the first time. If RC = 15, the frame was sent successfully while the
retry
count was at its maximum value. If RL = 1, RC has no meaning.
/Thomas
[-- Attachment #2: fec_collision_patch --]
[-- Type: text/plain, Size: 749 bytes --]
--- fec.c 2002-10-15 14:58:00.000000000 +0200
+++ fec_cfix.c 2002-10-24 20:59:20.000000000 +0200
@@ -502,11 +502,12 @@
if (bdp->cbd_sc & BD_ENET_TX_READY)
printk("HEY! Enet xmit interrupt and TX_READY.\n");
#endif
- /* Deferred means some collisions occurred during transmit,
- * but we eventually sent the packet OK.
- */
- if (bdp->cbd_sc & BD_ENET_TX_DEF)
- fep->stats.collisions++;
+ /* Check retry counter, i.e. collision counter */
+ /* Only valid if LAST is set, but it should always be. */
+ if (bdp->cbd_sc & BD_ENET_TX_RCMASK){
+ /* Note that counter cannot go higher than 15 */
+ fep->stats.collisions+=(bdp->cbd_sc & BD_ENET_TX_RCMASK)>>2;
+ }
/* Free the sk buffer associated with this last transmit.
*/
reply other threads:[~2002-10-24 19:29 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3DB84A2C.89BC0C38@corelatus.com \
--to=thomas@corelatus$(echo .)com \
--cc=linuxppc-embedded@lists$(echo .)linuxppc.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox