From patchwork Thu Nov 12 08:48:33 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Vincent_Stehl=C3=A9?= X-Patchwork-Id: 11899745 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D046314C0 for ; Thu, 12 Nov 2020 11:35:58 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (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 38B5722228 for ; Thu, 12 Nov 2020 11:35:58 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="wN03+C1L"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=laposte.net header.i=@laposte.net header.b="qkXroFtf" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 38B5722228 Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=laposte.net Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-mediatek-bounces+patchwork-linux-mediatek=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:To:From: Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender :Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=UD/mqCabS+wtL1kn0VInJ1Io/5vM2BPTQ58VMnUvv9M=; b=wN03+C1LlL+MwQt34ZS9t0t5n5 lqFNQqPNBqK5C+4dPyCwSD7dDfgvWlTNGplYl7Dv1+rb7zqW9j5K+NWxqbxk4MQjhhnL+XjGkVBNc cUYnu8vTuRXkAgm4kNVg7AgqrFokVAozxyN2qbxtypy+pvSupiPwWwu8ZBj9XNaG2RGAGGi+Rgrnz kQB8Nq6i6pHnhsHfTUMG6Js8WSFMVI5y8drCP2hVdx9K6Gjb4zMgfSkttFIFW9DcOFFLP5OKxQJLE 79RZjd3R5mWUxb3Rip6s9GiC5JpllpbOYW7zowJ4Yw5i+KmRzcfdK2cXVCJyUOBes0YXQN6dq8Xq7 2//qUCKA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kdAtP-0004yk-Ln; Thu, 12 Nov 2020 11:35:55 +0000 Received: from smtp-outgoing.laposte.net ([160.92.124.109]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kdAtI-0004v2-FP for linux-mediatek@lists.infradead.org; Thu, 12 Nov 2020 11:35:49 +0000 X-mail-filterd: {"version":"1.1.4", "queueID":"4CX0042YDYz10MQ4", "contextId":"ebf0f8af-98db-4cff-8680-f1f8c0471f72"} Received: from outgoing-mail.laposte.net (localhost.localdomain [127.0.0.1]) by mlpnf0120.laposte.net (SMTP Server) with ESMTP id 4CX0042YDYz10MQ4; Thu, 12 Nov 2020 12:35:32 +0100 (CET) X-mail-filterd: {"version":"1.1.4", "queueID":"4CX0014104z10MQT", "contextId":"0e7ca37c-c656-48c2-9d8a-64fa72269c86"} X-lpn-mailing: LEGIT X-lpn-spamrating: 36 X-lpn-spamlevel: not-spam X-lpn-spamcause: OK, (-100)(0000)gggruggvucftvghtrhhoucdtuddrgedujedruddvfedgtdehucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecunfetrffquffvgfdpqfgfvfdpggftfghnshhusghstghrihgsvgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvufffkffogggtgfesthekredtredtjeenucfhrhhomhepgghinhgtvghnthcuufhtvghhlhoruceovhhinhgtvghnthdrshhtvghhlhgvsehlrghpohhsthgvrdhnvghtqeenucggtffrrghtthgvrhhnpeetiedvheeijedtgfelvdfghfevtdevjeehffdtueekueeiudduteejkedtueffteenucfkphepkeekrdduvddurddugeelrdegleenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhephhgvlhhopehrohhmuhgrlhgurdgsvghrghgvrhhivgdpihhnvghtpeekkedruddvuddrudegledrgeelpdhmrghilhhfrhhomhepvhhinhgtvghnthdrshhtvghhlhgvsehlrghpohhsthgvrdhnvghtpdhrtghpthhtohepsghgohhlrghsiigvfihskhhisegsrgihlhhisghrvgdrtghomhdprhgtphhtthhopegurghvvghmsegurghvvghmlhhofhhtrdhnvghtpdhrtghpthhtohepvhhinhgtvghnthdrshhtvghhlhgvsehlrghpohhsthgvrdhnvghtpdhrtghpthhtoheplhhinhhugidqrghrmhdqkhgvrhhnvghlsehlihhsthhsrdhinhhfrhgruggvrggurdhorhhgpdhrtghpt hhtoheplhhinhhugidqmhgvughirghtvghksehlihhsthhsrdhinhhfrhgruggvrggurdhorhhgpdhrtghpthhtoheplhhinhhugidqkhgvrhhnvghlsehvghgvrhdrkhgvrhhnvghlrdhorhhgpdhrtghpthhtohepnhgvthguvghvsehvghgvrhdrkhgvrhhnvghlrdhorhhg Received: from romuald.bergerie (unknown [88.121.149.49]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mlpnf0120.laposte.net (SMTP Server) with ESMTPSA id 4CX0014104z10MQT; Thu, 12 Nov 2020 12:35:29 +0100 (CET) Received: from radicelle.bergerie (radicelle.bergerie [192.168.124.12]) by romuald.bergerie (Postfix) with ESMTPS id 6D2913D20EA2; Thu, 12 Nov 2020 09:48:56 +0100 (CET) Received: from vincent by radicelle.bergerie with local (Exim 4.94) (envelope-from ) id 1kd8Ho-0005k4-55; Thu, 12 Nov 2020 09:48:56 +0100 From: =?utf-8?q?Vincent_Stehl=C3=A9?= To: netdev@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH] net: ethernet: mtk-star-emac: return ok when xmit drops Date: Thu, 12 Nov 2020 09:48:33 +0100 Message-Id: <20201112084833.21842-1-vincent.stehle@laposte.net> X-Mailer: git-send-email 2.28.0 MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=laposte.net; s=lpn-wlmd; t=1605180933; bh=ZqIXuytQtqNakK+uXCSUANljRRTY4GRLTUpiu+kdDGU=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version:Content-Type:Content-Transfer-Encoding; b=qkXroFtfeDXHVkL5JrYMJbEpOBWXwVN0v+hsgX1vFu9aPdju1lBGTp9mgKStAOWVcLZ47bgOOV3Ks4oASsQbo9nwl+K5/+Zv9i2EBbBFWfEOohJSsTdf7fpOCxwY1no/ZD5meax5Lmgju6YY5T43l2tIGzfFHGOHG95KdhP2t+Pis0iTdRr9nss4sRW+AHhnWfVfIFqpi0Ap9W/jvlZW5zczP1DmKseIfOLPCfhmnbplxUEJIQLnuIw12aWPT9S14tK3IHH0+XN9H+WAZN6Pk6tMLJJixOv7eMrJ+jFg07sD/ZNZKcXT+ApI+ujKZbNOigx/Q8uH/MLIGrfuArTmgw==; X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201112_063548_871392_07FAA2CF X-CRM114-Status: GOOD ( 12.34 ) X-Spam-Score: -0.9 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-0.9 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [160.92.124.109 listed in list.dnswl.org] 0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [160.92.124.109 listed in wl.mailspike.net] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [vincent.stehle[at]laposte.net] -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid 0.0 RCVD_IN_MSPIKE_WL Mailspike good senders X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Bartosz Golaszewski , "David S . Miller" , =?utf-8?q?Vincent_Stehl=C3=A9?= Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+patchwork-linux-mediatek=patchwork.kernel.org@lists.infradead.org The ndo_start_xmit() method must return NETDEV_TX_OK if the DMA mapping fails, after freeing the socket buffer. Fix the mtk_star_netdev_start_xmit() function accordingly. Fixes: 8c7bd5a454ff ("net: ethernet: mtk-star-emac: new driver") Signed-off-by: Vincent Stehlé Cc: David S. Miller Cc: Bartosz Golaszewski Acked-by: Bartosz Golaszewski --- drivers/net/ethernet/mediatek/mtk_star_emac.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/mediatek/mtk_star_emac.c b/drivers/net/ethernet/mediatek/mtk_star_emac.c index 13250553263b5..e56a26f797f28 100644 --- a/drivers/net/ethernet/mediatek/mtk_star_emac.c +++ b/drivers/net/ethernet/mediatek/mtk_star_emac.c @@ -1053,7 +1053,7 @@ static int mtk_star_netdev_start_xmit(struct sk_buff *skb, err_drop_packet: dev_kfree_skb(skb); ndev->stats.tx_dropped++; - return NETDEV_TX_BUSY; + return NETDEV_TX_OK; } /* Returns the number of bytes sent or a negative number on the first