Message ID | 20100108194222.GA8386@xw6200.broadcom.net |
---|---|
State | Awaiting Upstream, archived |
Delegated to: | David Miller |
Headers | show |
On Fri, Jan 08, 2010 at 11:42:22AM -0800, Matt Carlson wrote: > > Ah. I may have found the problem. Can you apply the below patch on top > of the patch you already applied and see if this fixes the problem? > Looks very promising...2+ hours and I haven't seen a single lockup.
Hi Matt, On Fri, Jan 08, 2010 at 02:50:25PM -0800, Dmitry Torokhov wrote: > On Fri, Jan 08, 2010 at 11:42:22AM -0800, Matt Carlson wrote: > > > > Ah. I may have found the problem. Can you apply the below patch on top > > of the patch you already applied and see if this fixes the problem? > > > > Looks very promising...2+ hours and I haven't seen a single lockup. > So I haven't had a single lockup since applying this patch so that is it. Thank you very much for the quick fix and please make sure it gets upstream.
From: "Matt Carlson" <mcarlson@broadcom.com> Date: Fri, 8 Jan 2010 11:42:22 -0800 > [PATCH] tg3: Fix std rx prod ring handling > > There are some tg3 devices that require the driver to post new rx > buffers in smaller increments. Commit > 4361935afe3abc3e5a93006b99197fac1fabbd50, "tg3: Consider > rx_std_prod_idx a hw mailbox" changed how the driver tracks the rx > producer ring updates, but it does not make any special considerations > for the above-mentioned devices. For those devices, it is possible for > the driver to hit the special case path, which updates the hardware > mailbox register but skips updating the shadow software mailbox member. > If the special case path represents the final mailbox update for this > ISR iteration, the hardware and software mailbox values will be out of > sync. Ultimately, this will cause the driver to use a stale mailbox > value on the next iteration, which will appear to the hardware as a > large rx buffer update. Bad things ensue. > > The fix is to update the software shadow mailbox member when the special > case path is taken. > > Signed-off-by: Matt Carlson <mcarlson@broadcom.com> Matt, since we have positive testing, want me to apply this? Thanks. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Sun, Jan 10, 2010 at 01:52:42PM -0800, David Miller wrote: > From: "Matt Carlson" <mcarlson@broadcom.com> > Date: Fri, 8 Jan 2010 11:42:22 -0800 > > > [PATCH] tg3: Fix std rx prod ring handling > > > > There are some tg3 devices that require the driver to post new rx > > buffers in smaller increments. Commit > > 4361935afe3abc3e5a93006b99197fac1fabbd50, "tg3: Consider > > rx_std_prod_idx a hw mailbox" changed how the driver tracks the rx > > producer ring updates, but it does not make any special considerations > > for the above-mentioned devices. For those devices, it is possible for > > the driver to hit the special case path, which updates the hardware > > mailbox register but skips updating the shadow software mailbox member. > > If the special case path represents the final mailbox update for this > > ISR iteration, the hardware and software mailbox values will be out of > > sync. Ultimately, this will cause the driver to use a stale mailbox > > value on the next iteration, which will appear to the hardware as a > > large rx buffer update. Bad things ensue. > > > > The fix is to update the software shadow mailbox member when the special > > case path is taken. > > > > Signed-off-by: Matt Carlson <mcarlson@broadcom.com> > > Matt, since we have positive testing, want me to apply this? I have a small patchset queued up for net-2.6. Let me just include this one into the mix and submit it all at once. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
From: "Matt Carlson" <mcarlson@broadcom.com> Date: Mon, 11 Jan 2010 09:59:11 -0800 > On Sun, Jan 10, 2010 at 01:52:42PM -0800, David Miller wrote: >> From: "Matt Carlson" <mcarlson@broadcom.com> >> Date: Fri, 8 Jan 2010 11:42:22 -0800 >> >> Matt, since we have positive testing, want me to apply this? > > I have a small patchset queued up for net-2.6. Let me just include this > one into the mix and submit it all at once. Ok. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c index 5c77e6a..4e8b87d 100644 --- a/drivers/net/tg3.c +++ b/drivers/net/tg3.c @@ -4693,8 +4693,9 @@ next_pkt: (*post_ptr)++; if (unlikely(rx_std_posted >= tp->rx_std_max_post)) { - u32 idx = *post_ptr % TG3_RX_RING_SIZE; - tw32_rx_mbox(TG3_RX_STD_PROD_IDX_REG, idx); + tpr->rx_std_prod_idx = std_prod_idx % TG3_RX_RING_SIZE; + tw32_rx_mbox(TG3_RX_STD_PROD_IDX_REG, + tpr->rx_std_prod_idx); work_mask &= ~RXD_OPAQUE_RING_STD; rx_std_posted = 0; }