* [PATCH 0/2] stmmac: nfs reboot crash & jumbo frame handling fix @ 2012-07-09 7:14 Deepak Sikri 2012-07-09 7:14 ` [PATCH 1/2] stmmac: Fix for nfs hang on multiple reboot Deepak Sikri 2012-07-09 21:38 ` [PATCH 0/2] stmmac: nfs reboot crash & jumbo frame handling fix David Miller 0 siblings, 2 replies; 4+ messages in thread From: Deepak Sikri @ 2012-07-09 7:14 UTC (permalink / raw) To: peppe.cavallaro; +Cc: spear--sw-devel, netdev, Deepak Sikri This patch set handles in the fixes for following bugs that were observed during testing. 1. On Multiple reboot operations using nfs, system crash were observed with inconsistency in status of dma descriptors. 2. There were data losses observed whenever the jumbo frames were used for data transfers. Deepak Sikri (2): stmmac: Fix for nfs hang on multiple reboot stmmac: Fix for higher mtu size handling drivers/net/ethernet/stmicro/stmmac/ring_mode.c | 3 ++- drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 3 +++ 2 files changed, 5 insertions(+), 1 deletions(-) -- 1.7.2.2 ^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 1/2] stmmac: Fix for nfs hang on multiple reboot 2012-07-09 7:14 [PATCH 0/2] stmmac: nfs reboot crash & jumbo frame handling fix Deepak Sikri @ 2012-07-09 7:14 ` Deepak Sikri 2012-07-09 7:14 ` [PATCH 2/2] stmmac: Fix for higher mtu size handling Deepak Sikri 2012-07-09 21:38 ` [PATCH 0/2] stmmac: nfs reboot crash & jumbo frame handling fix David Miller 1 sibling, 1 reply; 4+ messages in thread From: Deepak Sikri @ 2012-07-09 7:14 UTC (permalink / raw) To: peppe.cavallaro; +Cc: spear--sw-devel, netdev, Deepak Sikri It was observed that during multiple reboots nfs hangs. The status of receive descriptors shows that all the descriptors were in control of CPU, and none were assigned to DMA. Also the DMA status register confirmed that the Rx buffer is unavailable. This patch adds the fix for the same by adding the memory barriers to ascertain that the all instructions before enabling the Rx or Tx DMA are completed which involves the proper setting of the ownership bit in DMA descriptors. Signed-off-by: Deepak Sikri <deepak.sikri@st.com> --- drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c index 51b3b68..ea3003e 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c @@ -1212,6 +1212,7 @@ static netdev_tx_t stmmac_xmit(struct sk_buff *skb, struct net_device *dev) priv->hw->desc->prepare_tx_desc(desc, 0, len, csum_insertion); wmb(); priv->hw->desc->set_tx_owner(desc); + wmb(); } /* Interrupt on completition only for the latest segment */ @@ -1227,6 +1228,7 @@ static netdev_tx_t stmmac_xmit(struct sk_buff *skb, struct net_device *dev) /* To avoid raise condition */ priv->hw->desc->set_tx_owner(first); + wmb(); priv->cur_tx++; @@ -1290,6 +1292,7 @@ static inline void stmmac_rx_refill(struct stmmac_priv *priv) } wmb(); priv->hw->desc->set_rx_owner(p + entry); + wmb(); } } -- 1.7.2.2 ^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 2/2] stmmac: Fix for higher mtu size handling 2012-07-09 7:14 ` [PATCH 1/2] stmmac: Fix for nfs hang on multiple reboot Deepak Sikri @ 2012-07-09 7:14 ` Deepak Sikri 0 siblings, 0 replies; 4+ messages in thread From: Deepak Sikri @ 2012-07-09 7:14 UTC (permalink / raw) To: peppe.cavallaro; +Cc: spear--sw-devel, netdev, Deepak Sikri For the higher mtu sizes requiring the buffer size greater than 8192, the buffers are sent or received using multiple dma descriptors/ same descriptor with option of multi buffer handling. It was observed during tests that the driver was missing on data packets during the normal ping operations if the data buffers being used catered to jumbo frame handling. The memory barrriers are added in between preparation of dma descriptors in the jumbo frame handling path to ensure all instructions before enabling the dma are complete. Signed-off-by: Deepak Sikri <deepak.sikri@st.com> --- drivers/net/ethernet/stmicro/stmmac/ring_mode.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/drivers/net/ethernet/stmicro/stmmac/ring_mode.c b/drivers/net/ethernet/stmicro/stmmac/ring_mode.c index fb8377d..4b785e1 100644 --- a/drivers/net/ethernet/stmicro/stmmac/ring_mode.c +++ b/drivers/net/ethernet/stmicro/stmmac/ring_mode.c @@ -51,7 +51,7 @@ static unsigned int stmmac_jumbo_frm(void *p, struct sk_buff *skb, int csum) desc->des3 = desc->des2 + BUF_SIZE_4KiB; priv->hw->desc->prepare_tx_desc(desc, 1, bmax, csum); - + wmb(); entry = (++priv->cur_tx) % txsize; desc = priv->dma_tx + entry; @@ -59,6 +59,7 @@ static unsigned int stmmac_jumbo_frm(void *p, struct sk_buff *skb, int csum) len, DMA_TO_DEVICE); desc->des3 = desc->des2 + BUF_SIZE_4KiB; priv->hw->desc->prepare_tx_desc(desc, 0, len, csum); + wmb(); priv->hw->desc->set_tx_owner(desc); priv->tx_skbuff[entry] = NULL; } else { -- 1.7.2.2 ^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 0/2] stmmac: nfs reboot crash & jumbo frame handling fix 2012-07-09 7:14 [PATCH 0/2] stmmac: nfs reboot crash & jumbo frame handling fix Deepak Sikri 2012-07-09 7:14 ` [PATCH 1/2] stmmac: Fix for nfs hang on multiple reboot Deepak Sikri @ 2012-07-09 21:38 ` David Miller 1 sibling, 0 replies; 4+ messages in thread From: David Miller @ 2012-07-09 21:38 UTC (permalink / raw) To: deepak.sikri; +Cc: peppe.cavallaro, spear--sw-devel, netdev From: Deepak Sikri <deepak.sikri@st.com> Date: Mon, 9 Jul 2012 12:44:44 +0530 > This patch set handles in the fixes for following bugs that were > observed during testing. > 1. On Multiple reboot operations using nfs, system crash were observed > with inconsistency in status of dma descriptors. > 2. There were data losses observed whenever the jumbo frames were used > for data transfers. > > Deepak Sikri (2): > stmmac: Fix for nfs hang on multiple reboot > stmmac: Fix for higher mtu size handling All applied, thanks. ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2012-07-09 21:38 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2012-07-09 7:14 [PATCH 0/2] stmmac: nfs reboot crash & jumbo frame handling fix Deepak Sikri 2012-07-09 7:14 ` [PATCH 1/2] stmmac: Fix for nfs hang on multiple reboot Deepak Sikri 2012-07-09 7:14 ` [PATCH 2/2] stmmac: Fix for higher mtu size handling Deepak Sikri 2012-07-09 21:38 ` [PATCH 0/2] stmmac: nfs reboot crash & jumbo frame handling fix 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).