Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751253AbZLVAuL (ORCPT ); Mon, 21 Dec 2009 19:50:11 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1750934AbZLVAuJ (ORCPT ); Mon, 21 Dec 2009 19:50:09 -0500 Received: from mail.vyatta.com ([76.74.103.46]:36355 "EHLO mail.vyatta.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750906AbZLVAuI (ORCPT ); Mon, 21 Dec 2009 19:50:08 -0500 Date: Mon, 21 Dec 2009 16:49:47 -0800 From: Stephen Hemminger To: "Ha, Tristram" Cc: "Ben Dooks" , , Subject: Re: [PATCH 2.6.33] net: Fix ks8851 snl receive problem Message-ID: <20091221164947.376faa44@nehalam> In-Reply-To: <14385191E87B904DBD836449AA30269D021A44@MORGANITE.micrel.com> References: <14385191E87B904DBD836449AA30269D021A44@MORGANITE.micrel.com> Organization: Vyatta X-Mailer: Claws Mail 3.7.2 (GTK+ 2.18.3; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1969 Lines: 45 On Mon, 21 Dec 2009 13:29:42 -0800 "Ha, Tristram" wrote: > 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 > --- > This patch has some relations to two previous patches I submitted: "[PATH 2.6.32 2/3] net: Fix ks8851 snl transmit problem" and "[PATCH 2.6.32 3/3] net: Make ks8851 snl work under Beagle Zippy combo board." Please see my replies regarding those patches. > > --- linux-2.6.33-rc1.old/drivers/net/ks8851.c 2009-12-08 17:46:20.000000000 -0800 > +++ linux-2.6.33-rc1.new/drivers/net/ks8851.c 2009-12-21 10:43:43.000000000 -0800 > @@ -551,6 +551,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)) > @@ -621,6 +628,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); > > if (status & IRQ_TXI) If you can turn off the receive interupt you can probably implement NAPI, to do proper receive scheduling. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/