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=-9.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS 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 0D3CBC433F5 for ; Tue, 14 Sep 2021 08:09:56 +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 C62BC60EB6 for ; Tue, 14 Sep 2021 08:09:55 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org C62BC60EB6 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linutronix.de Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Content-Type: List-Subscribe:List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: MIME-Version:Message-ID:Date:References:In-Reply-To:Subject:Cc:To:From: Reply-To:Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date :Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=i91sknavcoJ8zOkMBjETOBgiR7vkJueB/EezjH8OJG0=; b=rU9SnFQuPwnjx7zT3PaO//b1ly 5/qSewaQEfT2Q++f6DBIFMkQj4XiePTeFBiT/BZU1UG9DeuV9wx+8xwDGTk0/iVKFSKzNwW9wiAJx rIAAqlhbmyq6ncZE2nR9MGkZlCgYia3HMd/O21DNUI2cTxgiKweIxSUjcgkRJ8Evj91huaFUBu6Kf usEX8BvtPweqvMkSmBXngWNHKbiQvx9BWMQxs64VgjNRT76tsafm87Qrae4NKXCozg24pJKQIn8Wn eK6JuXgF9+iYapBR8NET7uo72/FVytObiuS0GpdXgkDUj7fxoXmkPBQC+RQ0xjJme7kn01VwrORKD SfXzzI3A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mQ3Ub-004d4K-Ft; Tue, 14 Sep 2021 08:08:37 +0000 Received: from galois.linutronix.de ([193.142.43.55]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mQ3UW-004d23-Iw; Tue, 14 Sep 2021 08:08:34 +0000 From: Kurt Kanzenbach DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1631606907; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=VPFtXk9zgPFdsFoa+TMu+4lql0yJlSvrdlqa2T6Fv+A=; b=rtSplDVVH0CTKQqMpgbAvWqYNnVgXqayf734MfeHIWty2B4/RysvD72nKh1Y9Odhfp0xsp 5G66IA+5Ai9MfDuDRDH3CMHufBTd7OPUaz6fKIt2l7JQfebSManAaRc/W8JY4wLQSatzNG OlmqRnFOzvfS3ZpvLYW6SANEiwGNEnmRz8+RMRQv+CqifvIxB2k4JNITK0CgxbpGBOBfMc O7lqiAcEwyLMHOCCRyPjYQ0wk/2O6kb/5WWqGXBK9w/Q6ojABRBpONbhxRdMiCutwrBikG UAlxO6VPeYCao34K9iEIEzVkl8gUK5ebYBJgQMwrHIuB6PxgkSmaHfanjFmijQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1631606907; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=VPFtXk9zgPFdsFoa+TMu+4lql0yJlSvrdlqa2T6Fv+A=; b=87SfjU90ZJ7Wv1Z2ho9VEWI+5ci+JnNsyFCisenIsJ3nU3urMes9yOo3eKDJSWI54wftGl WLYvOVTdpNMUzIBg== To: Vladimir Oltean , netdev@vger.kernel.org Cc: Florian Fainelli , Andrew Lunn , Vivien Didelot , Vladimir Oltean , "David S. Miller" , Jakub Kicinski , Hauke Mehrtens , Woojung Huh , UNGLinuxDriver@microchip.com, Sean Wang , Landen Chao , DENG Qingfang , Matthias Brugger , Claudiu Manoil , Alexandre Belloni , Linus Walleij , George McCollister , Heiner Kallweit , Russell King , Oleksij Rempel , Michael Grzeschik , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, Lino Sanfilippo Subject: Re: [RFC PATCH net 3/5] net: dsa: hellcreek: be compatible with masters which unregister on shutdown In-Reply-To: <20210912120932.993440-4-vladimir.oltean@nxp.com> References: <20210912120932.993440-1-vladimir.oltean@nxp.com> <20210912120932.993440-4-vladimir.oltean@nxp.com> Date: Tue, 14 Sep 2021 10:08:26 +0200 Message-ID: <874kan1sw5.fsf@kurt> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210914_010832_842992_9824BDAE X-CRM114-Status: GOOD ( 16.55 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: multipart/mixed; boundary="===============4374132573892803732==" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org --===============4374132573892803732== Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" --=-=-= Content-Type: text/plain On Sun Sep 12 2021, Vladimir Oltean wrote: > Since commit 2f1e8ea726e9 ("net: dsa: link interfaces with the DSA > master to get rid of lockdep warnings"), DSA gained a requirement which > it did not fulfill, which is to unlink itself from the DSA master at > shutdown time. > > Since the hellcreek driver was introduced after the bad commit, it has > never worked with DSA masters which decide to unregister their > net_device on shutdown, effectively hanging the reboot process. > > Hellcreek is a platform device driver, so we probably cannot have the > oddities of ->shutdown and ->remove getting both called for the exact > same struct device. But to be in line with the pattern from the other > device drivers which are on slow buses, implement the same "if this then > not that" pattern of either running the ->shutdown or the ->remove hook. > The driver's current ->remove implementation makes that very easy > because it already zeroes out its device_drvdata on ->remove. > > Fixes: e4b27ebc780f ("net: dsa: Add DSA driver for Hirschmann Hellcreek switches") > Link: https://lore.kernel.org/netdev/20210909095324.12978-1-LinoSanfilippo@gmx.de/ > Reported-by: Lino Sanfilippo > Signed-off-by: Vladimir Oltean Acked-by: Kurt Kanzenbach --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQJHBAEBCgAxFiEEooWgvezyxHPhdEojeSpbgcuY8KYFAmFAWHoTHGt1cnRAbGlu dXRyb25peC5kZQAKCRB5KluBy5jwpsxRD/9ANtJRKndzoSp2shelf4V/aCarmfLF GWf7nqLf5GsK0dl7bKUD8EM2OH647C7F1Qan0Ch4EVjw3OKxz7+J84x2QzZQ6u0C lEGrHDrrkCXp4oCqV8aZoX5wLhXXjoto4LBJK/oobKzdAqPRBu171acXH357bd94 x7YjHTlnohSv6Q8RsjGQ4ba4qPjJ69cEhYKBKydsoTBSUnRzyzzgVtxz9GqpEKXa lO8uyPzgqfB/ivLKWOJ8/Ugt8xaNBiH0+K1Me516e3Ui+3XBiKFr8uSYpdK2HSKl sAugTY64Dd1mgYfVZ2FWhphcGU5YpbUmdYNpyny8swWkSjd9oUvW8ZDBva/TBRN8 KQzfrAqrCGGuYeYrNfFVoOkcQdNAWI2CuUhaLr+6tbnVo8KO8f5PhvoQWcIh2IqP eeR3w/5m4sSYBsZlOG/VbEscT525R9y8oZvNjcVtbWeMf9J3jFZI9hgXcMvQXP93 NR9WihCzM8dHF8tSZTfUttZLXuYmzBBm0jxgvhUfu4gMp9bGUXtWZcS8vYTO7XED CC7ipYT3aU2/qNyqodWYMfs1cZynJEeZl2QID2QAj5xtnRH527KhwMVQAkZVxDkb PR7T4Iu4/XPkPztHLS2U59Dxa/uPikXpxdabfPo5ScshHyPDp5gTEiFGMIeIhb+O GbkqtdvJEuFa2g== =A1oq -----END PGP SIGNATURE----- --=-=-=-- --===============4374132573892803732== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel --===============4374132573892803732==--