From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.1 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_PASS,UNPARSEABLE_RELAY,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6E1ABC43219 for ; Tue, 30 Apr 2019 08:56:20 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 41C7A21743 for ; Tue, 30 Apr 2019 08:56:20 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="aVYZ/vN5" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 41C7A21743 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=mediatek.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Date:To:From:Subject:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=4DdZSud95Ivg+mf1lAEn9ZbMqqz6cnlZkt6pEGFWIek=; b=aVYZ/vN5ffLmZi tOGAxrr6L0mQGB68Qn8DdY4bCrlZhhF/AWppFuNzOSjno5g5GQTLa9hHN0bwx982yxrsoQ0oAv3v/ gzDV5gC6LrhTM3OwUU3ohqce0966larD39Hi5hZJ2iURhr7JUy+aj1jk5gBgyvJm+5LK0UiYALwXD S2evkJ1tUGWouy6kkUqwL/2Z5w2Ei+ZqxTGBAlcd0acUR+y1/wPfAnEvrCjCKABQB6QvRlA3Sn+S0 ySfzzdjfsE/J+28hM7s9cVpHHH73+TJLvdMvMEOCc0QlTLL3Nm1jPvctrP9f/qhZmPuBtmzUcJzR3 zH/cB4Kdua5QRsYfiwAA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hLOYl-0003cn-8u; Tue, 30 Apr 2019 08:56:19 +0000 Received: from mailgw01.mediatek.com ([216.200.240.184]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hLOYh-0003c9-F7; Tue, 30 Apr 2019 08:56:17 +0000 X-UUID: 37987c49105a4eae88fa8c40c78230bf-20190430 X-UUID: 37987c49105a4eae88fa8c40c78230bf-20190430 Received: from mtkcas68.mediatek.inc [(172.29.94.19)] by mailgw01.mediatek.com (envelope-from ) (musrelay.mediatek.com ESMTP with TLS) with ESMTP id 417864237; Tue, 30 Apr 2019 00:56:04 -0800 Received: from MTKMBS31N1.mediatek.inc (172.27.4.69) by MTKMBS62N1.mediatek.inc (172.29.193.41) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Tue, 30 Apr 2019 01:56:03 -0700 Received: from MTKCAS32.mediatek.inc (172.27.4.184) by MTKMBS31N1.mediatek.inc (172.27.4.69) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Tue, 30 Apr 2019 16:56:01 +0800 Received: from [10.17.3.153] (172.27.4.253) by MTKCAS32.mediatek.inc (172.27.4.170) with Microsoft SMTP Server id 15.0.1395.4 via Frontend Transport; Tue, 30 Apr 2019 16:56:00 +0800 Message-ID: <1556614560.24897.31.camel@mhfsdcap03> Subject: RE: [PATCH 1/4] net: stmmac: update rx tail pointer register to fix rx dma hang issue. From: biao huang To: Jose Abreu Date: Tue, 30 Apr 2019 16:56:00 +0800 In-Reply-To: <78EB27739596EE489E55E81C33FEC33A0B46DDF0@DE02WEMBXB.internal.synopsys.com> References: <1556518556-32464-1-git-send-email-biao.huang@mediatek.com> <1556518556-32464-2-git-send-email-biao.huang@mediatek.com> <78EB27739596EE489E55E81C33FEC33A0B46DDF0@DE02WEMBXB.internal.synopsys.com> X-Mailer: Evolution 3.2.3-0ubuntu6 MIME-Version: 1.0 X-MTK: N X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190430_015615_511172_168D40E8 X-CRM114-Status: GOOD ( 14.97 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "jianguo.zhang@mediatek.com" , Alexandre Torgue , "netdev@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-stm32@st-md-mailman.stormreply.com" , "yt.shen@mediatek.com" , "linux-mediatek@lists.infradead.org" , Maxime Coquelin , Matthias Brugger , Giuseppe Cavallaro , "davem@davemloft.net" , "linux-arm-kernel@lists.infradead.org" Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Mon, 2019-04-29 at 08:51 +0000, Jose Abreu wrote: > From: Biao Huang > Date: Mon, Apr 29, 2019 at 07:15:53 > > > Currently we will not update the receive descriptor tail pointer in > > stmmac_rx_refill. Rx dma will think no available descriptors and stop > > once received packets exceed DMA_RX_SIZE, so that the rx only test will fail. > > > > Update the receive tail pointer in stmmac_rx_refill to add more descriptors > > to the rx channel, so packets can be received continually > > > > Signed-off-by: Biao Huang > > --- > > drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 3 +++ > > 1 file changed, 3 insertions(+) > > > > diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c > > index 97c5e1a..818ad88 100644 > > --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c > > +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c > > @@ -3336,6 +3336,9 @@ static inline void stmmac_rx_refill(struct stmmac_priv *priv, u32 queue) > > entry = STMMAC_GET_ENTRY(entry, DMA_RX_SIZE); > > } > > rx_q->dirty_rx = entry; > > + stmmac_set_rx_tail_ptr(priv, priv->ioaddr, > > + rx_q->dma_rx_phy + (entry * sizeof(struct dma_desc)), > > I think you can just use the "rx_q->rx_tail_addr" here. It'll always > trigger a poll demand for the channel. Yes, will use rx_q->rx_tail_addr here. > > Thanks, > Jose Miguel Abreu _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel