Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp461102pxb; Tue, 14 Sep 2021 01:13:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwHin1JThDRRkuH3Dkcf4bI16+YGTVZ024iWD5Iu/Ed415IOTudaMl190FdjI8fmwTftCZ4 X-Received: by 2002:a17:906:64dd:: with SMTP id p29mr10514044ejn.255.1631607235124; Tue, 14 Sep 2021 01:13:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631607235; cv=none; d=google.com; s=arc-20160816; b=XfOwtcEgrtCorRS4n+xCqC5b0/nwu0Iylet8WXDvc8ejTZ8gaXircEbMfMFqcNNzBk 4XjL30HrUg1uE/az56crN6OXdDlrh3EYM+bSXObWsQJNN2eoiNMjL5UEdcFtHjy/lfy8 l5Gcb7H62rWKuhuFJLpoF5MRNKHBEKeKgsOj/OkFRxpfIqEnav+cKsSmAk1LyfYnnQQM vOEX2WwDe6RHl8vXOpli2O/vmmpIzuj2la7XyNDoOAs4zcFsjdmqSgqgLqyjWQ+WjsZM dyuo/G6k4aOASzy9jBjwLIYPtbOttalFw23dc5ZkDGulFxjuPNgIkNPoQq5dFsrQPZQP a3Lw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:references :in-reply-to:subject:cc:to:dkim-signature:dkim-signature:from; bh=VPFtXk9zgPFdsFoa+TMu+4lql0yJlSvrdlqa2T6Fv+A=; b=oxzboCQW9eRnxq/1A8ZlCsOS9SasNxNyMHaGq0dV1fAumawvHGwTxewqdRywBXueks y8a1rcLRcjqMC6UkYVaqaFoyzARipPJkcwuu7muMQOrbywGbc/lIZqcWVgeR8jbb0/RW mVmaIw278M+chh0qNY4AOig9+xGt4o5TyW+txt5dIKHMjixpjht8cIpoti+l/ffxFz4a +E6WIpHbx5+hwj7jEAaEC79SdAx/MlKYciJGUiMV079ZLR/JXIUEnslt3pxcCAFe0Ie7 R0fTfUH1CZ7HPKaYuH9T4lbKFixOSESpjp6utObQBBLRCceJcOT0pywT2CK76tj1rhq5 lC7w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=rtSplDVV; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=87SfjU90; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id o11si10619663edz.293.2021.09.14.01.13.31; Tue, 14 Sep 2021 01:13:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=rtSplDVV; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=87SfjU90; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230091AbhINIKt (ORCPT + 99 others); Tue, 14 Sep 2021 04:10:49 -0400 Received: from Galois.linutronix.de ([193.142.43.55]:60066 "EHLO galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230384AbhINIJp (ORCPT ); Tue, 14 Sep 2021 04:09:45 -0400 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 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --=-=-= 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----- --=-=-=--