From patchwork Thu Oct 29 06:50:16 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 11865271 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=-12.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT 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 ADD6CC4363A for ; Thu, 29 Oct 2020 06:52:32 +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 28231206F7 for ; Thu, 29 Oct 2020 06:52:32 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="uaba5IQH"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=samsung.com header.i=@samsung.com header.b="r/lCmMLM" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 28231206F7 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=samsung.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+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=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:MIME-Version:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:References: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:List-Owner; bh=0xQ6dpFiqCaY7Vl5SOxlZNm3YW2g9AjLF1MsdIl8RgE=; b=uaba5IQHL8/2/6aL9I12XsDOIJ 2l8ePNug5g4hdBAaSZSxiqU4jET8AOZuo0tJS99eIMoLoWiEg0PjjfLcAA67L1IjzrvJ0imhXInWb Dcwrj0wUFFAEd2dOT6yKwGugV1RvGjL2tqU6VJezJ51SAkQYUxJAtjfIZjej3tH+Urb6mXN/JNVAb J6J5BSNUDhUPdraQWy4KP2akRVnyU+gKXnmM8qlqIdpEDGoTWgq7Dsn4M9NQxcHB5qvj4VKD+eLzP U66F7t8K2BgYfDYKgv/YLYNj2oTb16qnE8Plm2+JmgAA7WRcclpfBe/+c31ylIwtNMGLszU9JwC40 TA3V/43g==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kY1m0-0002H6-Es; Thu, 29 Oct 2020 06:51:00 +0000 Received: from mailout2.w1.samsung.com ([210.118.77.12]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kY1lw-0002GS-ID for linux-arm-kernel@lists.infradead.org; Thu, 29 Oct 2020 06:50:57 +0000 Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20201029065039euoutp02d4af46a3e4b456ec2d06286e1b317a60~CY_HgW0ml2726727267euoutp02W for ; Thu, 29 Oct 2020 06:50:39 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20201029065039euoutp02d4af46a3e4b456ec2d06286e1b317a60~CY_HgW0ml2726727267euoutp02W DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1603954239; bh=rjGb/q462jUGsbZXYDSlLsq4C4w7bm1hZhL3PvZ+/BM=; h=From:To:Cc:Subject:Date:References:From; b=r/lCmMLMuGcI83b9fdXB6ovIz8k9UpakiNdqgUTvpQWNxI0LQrmqZgDRZ1gd5hfPp qHoB6GWi9e3GGoYDLW4Jt7O54ToMMMCSasaDzGqAOHJ2/fpR3JimBG7P+W5tJNosLN F3V7F1j64SXvCxixOU1fWyOcqJvk/W/UkWxsYUkA= Received: from eusmges2new.samsung.com (unknown [203.254.199.244]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20201029065029eucas1p29b582baa057f56bdb985b2abfbe82279~CY9_-FYLi1895718957eucas1p2J; Thu, 29 Oct 2020 06:50:29 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges2new.samsung.com (EUCPMTA) with SMTP id C8.F4.05997.5366A9F5; Thu, 29 Oct 2020 06:50:29 +0000 (GMT) Received: from eusmtrp2.samsung.com (unknown [182.198.249.139]) by eucas1p2.samsung.com (KnoxPortal) with ESMTPA id 20201029065029eucas1p225422e700c29e2e84e227cb14ea6de52~CY9_VDseT1895718957eucas1p2I; Thu, 29 Oct 2020 06:50:29 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eusmtrp2.samsung.com (KnoxPortal) with ESMTP id 20201029065029eusmtrp22ce663c51f905affd41e4ea57631a3f5~CY9_UbynI1500715007eusmtrp2R; Thu, 29 Oct 2020 06:50:29 +0000 (GMT) X-AuditID: cbfec7f4-65dff7000000176d-06-5f9a66350d91 Received: from eusmtip1.samsung.com ( [203.254.199.221]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id 40.12.06017.5366A9F5; Thu, 29 Oct 2020 06:50:29 +0000 (GMT) Received: from AMDC2765.digital.local (unknown [106.120.51.73]) by eusmtip1.samsung.com (KnoxPortal) with ESMTPA id 20201029065028eusmtip132fe6b1f2a2cab9fcf9a0c9a6dfaee5f~CY991AjZj1932419324eusmtip1w; Thu, 29 Oct 2020 06:50:28 +0000 (GMT) From: Marek Szyprowski To: linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, Giuseppe Cavallaro , Alexandre Torgue Subject: [PATCH] net: stmmac: Fix channel lock initialization Date: Thu, 29 Oct 2020 07:50:16 +0100 Message-Id: <20201029065016.4781-1-m.szyprowski@samsung.com> X-Mailer: git-send-email 2.17.1 X-Brightmail-Tracker: H4sIAAAAAAAAA0VSWUwTURTN68y004bqOJDwgihJiRpNBAFJBsEF9WPcEo1/RigFhiWypUNb ISYShKrVYGURJW4pCgipIJQqBIVWgY9K2QLiAgmhIFUhGCqbYG0Z0L9zz7nnnpubiyNkIeaD J6dlMvI0WYqEL0KNHYvdu0MTyqR77F9DqBc2C6BstTo+db87D6VGdNMY1WMswKj6sUGM0gza MEr/blhAPVzRY5TzeyM4JKINzz7y6KayYQFd3mLn0fXV1/l0w5PLdIGhGtCmN0H0+MJrhDa0 zoLTwnOiiHgmJVnJyAMPxIiSrDW+GfnkxaJP77EcMLpRA4Q4JPbCp7YGVANEOElUAVg+cgtz CyThALBCw3DCLICNlk5k3VG4XIlxQiWAoyVLAq5wOcb0bQJ3F58IgpopDd8teBG1AN7WTa+G IMQygH2WldVZnsR++LZ9HnVjlNgGK3N6eW4sJiLgh5ctfC7PD9bUtSFuMySuCqDaMQ044Sis mNDyOOwJv3UaBBz2hc6mRzzOcMW1oFUv4IqbAPbn3l1zh8Mv1iVXBO7aaSesbQ7k6EjYe2MB uGlIbIBDU5vcNOKChcZShKPF8Jqa5Lq3w7LO5/9iTT19azeiobXdwucOGQWrbPmoFmwt+5/1 GIBq4M0o2NREhg1OY1QBrCyVVaQlBsSlp9YD16dY/nQ6XoHm5VgzIHAg8RD3fL4nJTGZks1K NQOIIxIv8eEuSzQpjpdlZTPydKlckcKwZrAZRyXe4hCdPYokEmWZzAWGyWDk6yoPF/rkALZl oiTvxGzTFnP22TP+C4tduTzkUmFfbM9UKc834XeRw2uueFLYNdF/cofqjspYRMYLPIpDi7pj 4oLVqg5tmDN2SRc6Mzc4Lw3XqxWn7IsPfmTO+A0MKaOXx21D1uORx8LOa02PtD8H8hV1piP7 svwHrL8wpbN1svbgvMGGSlA2SRa0C5Gzsr8YqrsmJQMAAA== X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrBLMWRmVeSWpSXmKPExsVy+t/xu7qmabPiDTYs5LDY+OQ0o8WT9YvY LOacb2GxuLfoHavFhW19rBabHl9jtei69oTVYu2Ru+wW8/6uZbX4/3orowOXx5aVN5k8ds66 y+6xeM9LJo9NqzrZPDYvqffo27KK0ePgPkOPpz/2Mnts2f+ZMYAzSs+mKL+0JFUhI7+4xFYp 2tDCSM/Q0kLPyMRSz9DYPNbKyFRJ384mJTUnsyy1SN8uQS/j3GqZglahism3zrA2MD7k72Lk 5JAQMJGY9Gc5axcjF4eQwFJGiZbdbewQCRmJk9MaWCFsYYk/17rYIIo+MUps+PuCESTBJmAo 0fUWIiEisJFRYvriTywgDrNAA5PElGWzmEGqhAVsJQ4f/c4CYrMIqEosb7jIBGLzCthIXN++ hw1ihbzE6g0HmCcw8ixgZFjFKJJaWpybnltspFecmFtcmpeul5yfu4kRGMrbjv3csoOx613w IUYBDkYlHt4Lt2fGC7EmlhVX5h5ilOBgVhLhdTp7Ok6INyWxsiq1KD++qDQntfgQoynQ8onM UqLJ+cA4yyuJNzQ1NLewNDQ3Njc2s1AS5+0QOBgjJJCeWJKanZpakFoE08fEwSnVwJg2S277 1dt1/VOkstc1mZ1clPj/Wce58CgR5chjn5k4uo1auWfYcLVX359u+el7HJP1JMfDyxTmxVSd 1r2dL8Ou3SE94+KWrVOfS9zM3P337TT9PBGZs2IdjC6MrOLmu6Y+kBFWF7sxq7UhM3JF3Dnx Nvvea0ZfW8tqkoMdF3b5TYzmvn1uphJLcUaioRZzUXEiAPs3eml7AgAA X-CMS-MailID: 20201029065029eucas1p225422e700c29e2e84e227cb14ea6de52 X-Msg-Generator: CA X-RootMTR: 20201029065029eucas1p225422e700c29e2e84e227cb14ea6de52 X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20201029065029eucas1p225422e700c29e2e84e227cb14ea6de52 References: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201029_025056_841976_BC296B9C X-CRM114-Status: GOOD ( 14.93 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Jose Abreu , Maxime Coquelin , Ong Boon Leong , Jakub Kicinski , "David S . Miller" , Marek Szyprowski MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Commit 0366f7e06a6b ("net: stmmac: add ethtool support for get/set channels") refactored channel initialization, but during that operation, the spinlock initialization got lost. Fix this. This fixes the following lockdep warning: meson8b-dwmac ff3f0000.ethernet eth0: Link is Up - 1Gbps/Full - flow control off INFO: trying to register non-static key. the code is fine but needs lockdep annotation. turning off the locking correctness validator. CPU: 1 PID: 331 Comm: kworker/1:2H Not tainted 5.9.0-rc3+ #1858 Hardware name: Hardkernel ODROID-N2 (DT) Workqueue: kblockd blk_mq_run_work_fn Call trace: dump_backtrace+0x0/0x1d0 show_stack+0x14/0x20 dump_stack+0xe8/0x154 register_lock_class+0x58c/0x590 __lock_acquire+0x7c/0x1790 lock_acquire+0xf4/0x440 _raw_spin_lock_irqsave+0x80/0xb0 stmmac_tx_timer+0x4c/0xb0 [stmmac] call_timer_fn+0xc4/0x3e8 run_timer_softirq+0x2b8/0x6c0 efi_header_end+0x114/0x5f8 irq_exit+0x104/0x110 __handle_domain_irq+0x60/0xb8 gic_handle_irq+0x58/0xb0 el1_irq+0xbc/0x180 _raw_spin_unlock_irqrestore+0x48/0x90 mmc_blk_rw_wait+0x70/0x160 mmc_blk_mq_issue_rq+0x510/0x830 mmc_mq_queue_rq+0x13c/0x278 blk_mq_dispatch_rq_list+0x2a0/0x698 __blk_mq_do_dispatch_sched+0x254/0x288 __blk_mq_sched_dispatch_requests+0x190/0x1d8 blk_mq_sched_dispatch_requests+0x34/0x70 __blk_mq_run_hw_queue+0xcc/0x148 blk_mq_run_work_fn+0x20/0x28 process_one_work+0x2a8/0x718 worker_thread+0x48/0x460 kthread+0x134/0x160 ret_from_fork+0x10/0x1c Fixes: 0366f7e06a6b ("net: stmmac: add ethtool support for get/set channels") Signed-off-by: Marek Szyprowski --- drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c index 220626a8d499..d833908b660a 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c @@ -4757,6 +4757,7 @@ static void stmmac_napi_add(struct net_device *dev) ch->priv_data = priv; ch->index = queue; + spin_lock_init(&ch->lock); if (queue < priv->plat->rx_queues_to_use) { netif_napi_add(dev, &ch->rx_napi, stmmac_napi_poll_rx,