netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH (net.git)] stmmac: prevent false carrier sense detection
@ 2014-08-27  6:20 Giuseppe Cavallaro
  2014-08-30  2:55 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Giuseppe Cavallaro @ 2014-08-27  6:20 UTC (permalink / raw)
  To: netdev; +Cc: Giuseppe Cavallaro

This patch is to w/a a problem that happens on some boxes when run at 10Mbps
Half duplex mode.

During the transmission the CSR signal is asserted for some time and the frames
aborted because of carrier sense error.
This is reported by MMC HW counter: txcarrier signal.
This actually is a false carrier so the frames are good and there is no reason
to ask for dropping them.

This patch so disables the Carrier Sense During Transmission
and this means that the MAC transmitter ignore the CRS signal
during frame transmission in Half-Duplex mode.

Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Acked-by: Vince Bridgers <vbridgers2013@gmail.com>
Acked-by: Ley Foon Tan <lftan@altera.com>
Acked-by: Chen-Yu Tsai <wens@csie.org>
---
 drivers/net/ethernet/stmicro/stmmac/dwmac1000.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac1000.h b/drivers/net/ethernet/stmicro/stmmac/dwmac1000.h
index 71b5419..64d8f56 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac1000.h
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac1000.h
@@ -153,7 +153,7 @@ enum inter_frame_gap {
 #define GMAC_CONTROL_RE		0x00000004	/* Receiver Enable */
 
 #define GMAC_CORE_INIT (GMAC_CONTROL_JD | GMAC_CONTROL_PS | GMAC_CONTROL_ACS | \
-			GMAC_CONTROL_BE)
+			GMAC_CONTROL_BE | GMAC_CONTROL_DCRS)
 
 /* GMAC Frame Filter defines */
 #define GMAC_FRAME_FILTER_PR	0x00000001	/* Promiscuous Mode */
-- 
1.7.4.4

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH (net.git)] stmmac: prevent false carrier sense detection
  2014-08-27  6:20 [PATCH (net.git)] stmmac: prevent false carrier sense detection Giuseppe Cavallaro
@ 2014-08-30  2:55 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2014-08-30  2:55 UTC (permalink / raw)
  To: peppe.cavallaro; +Cc: netdev

From: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Date: Wed, 27 Aug 2014 08:20:04 +0200

> This patch is to w/a a problem that happens on some boxes when run at 10Mbps
> Half duplex mode.
> 
> During the transmission the CSR signal is asserted for some time and the frames
> aborted because of carrier sense error.
> This is reported by MMC HW counter: txcarrier signal.
> This actually is a false carrier so the frames are good and there is no reason
> to ask for dropping them.
> 
> This patch so disables the Carrier Sense During Transmission
> and this means that the MAC transmitter ignore the CRS signal
> during frame transmission in Half-Duplex mode.
> 
> Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
> Acked-by: Vince Bridgers <vbridgers2013@gmail.com>
> Acked-by: Ley Foon Tan <lftan@altera.com>
> Acked-by: Chen-Yu Tsai <wens@csie.org>

Applied.

Although it would have made more sense to me if you only set the DCRS bit
in the case where the troubles occur, half-duplex 10Mbps, so that in other
modes real carrier loss during transmit would actually be detected.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-08-30  2:55 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-08-27  6:20 [PATCH (net.git)] stmmac: prevent false carrier sense detection Giuseppe Cavallaro
2014-08-30  2:55 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).