From patchwork Thu Apr 29 23:16:23 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ben Dooks X-Patchwork-Id: 51396 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id CAC07B7D2F for ; Sat, 1 May 2010 07:49:36 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932669Ab0D3Vsd (ORCPT ); Fri, 30 Apr 2010 17:48:33 -0400 Received: from aeryn.fluff.org.uk ([87.194.8.8]:27351 "EHLO kira.home.fluff.org" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S932420Ab0D3Vs1 (ORCPT ); Fri, 30 Apr 2010 17:48:27 -0400 Received: from ben by kira.home.fluff.org with local (Exim 4.71) (envelope-from ) id 1O7czD-0001vo-Mn; Fri, 30 Apr 2010 00:17:39 +0100 Message-Id: <20100429231739.628756349@fluff.org.uk> User-Agent: quilt/0.48-1 Date: Fri, 30 Apr 2010 00:16:23 +0100 From: Ben Dooks To: netdev@vger.kernel.org Cc: tristram.ha@micrel.com, support@tincantools.com, Tristram Ha Subject: [patch 02/13] KSZ8851-SNL: Fix receive interrupt problem. References: <20100429231621.015936077@fluff.org.uk> Content-Disposition: inline; filename=thirdparty/micrel/ks8851-rx-fixeml.txt Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Tristram Ha This fixes a receive problem of the ks8851 snl network driver. Under heavy TCP traffic the device will stop operating correctly. First the receive interrupt is not triggered anymore. After then the driver cannot retrieve the correct packets from the device. A workaround for this problem is to disable the transmit done interrupt. Signed-off-by: Tristram Ha [ben@simtec.co.uk: cleaned up header] Signed-off-by: Ben Dooks --- --- drivers/net/ks8851.c | 10 ++++++++++ 1 file changed, 10 insertions(+) -- 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 Index: b/drivers/net/ks8851.c =================================================================== --- a/drivers/net/ks8851.c 2010-04-28 23:24:20.737026841 +0900 +++ b/drivers/net/ks8851.c 2010-04-29 00:51:12.489525834 +0900 @@ -553,6 +553,13 @@ static void ks8851_irq_work(struct work_ mutex_lock(&ks->lock); + /* + * Turn off hardware interrupt during receive processing. This fixes + * the receive problem under heavy TCP traffic while transmit done + * is enabled. + */ + ks8851_wrreg16(ks, KS_IER, 0); + status = ks8851_rdreg16(ks, KS_ISR); if (netif_msg_intr(ks)) @@ -610,6 +617,9 @@ static void ks8851_irq_work(struct work_ ks8851_wrreg16(ks, KS_RXCR1, rxc->rxcr1); } + /* Re-enable hardware interrupt. */ + ks8851_wrreg16(ks, KS_IER, ks->rc_ier); + mutex_unlock(&ks->lock); enable_irq(ks->netdev->irq);