Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp2185571pxb; Mon, 18 Jan 2021 10:24:21 -0800 (PST) X-Google-Smtp-Source: ABdhPJz/jeUvwo/pu4O4Af3jWUMZf6J9IO8cIp5t8uktJTp5xMurPH+e/Z3jenNqlfOLACYKUcnz X-Received: by 2002:a05:6402:22e9:: with SMTP id dn9mr557036edb.61.1610994261095; Mon, 18 Jan 2021 10:24:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610994261; cv=none; d=google.com; s=arc-20160816; b=xeJfNaGWiq3pAqX8Z2f9zW8UoCZkwZ6XmbYkWLKLaM+rx0E3NIB7qHveFw6HswhEsq D+XW+28B1C0HPj+we+ZDktmGNlhj3wCLh5MYZC4ksBYbBOPMQAlDI/BxV/UTt2/mUDjy erNv/iayRBUeGVjp73nEGUoH9R7efA4v4WrQbXySB2xfyfqLeua/I1ZstZVEBcJEprzw 37Ilv4Jq9xpyzwA3At9jJZbMBoXfo9UhR0EQhAGW91TFaaRBwm9KPUXByDvymmAyoVhG vGKQtDBKi2sKmgpnfgyeWe3cB2twArOkGXVSdBWU+RRSw8d+Or0EN2JCdZUsTUgV/VIh 8+7A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=5WTWsX6w/mhpS1ZofmF/7HhwAKQMhvUJFcQz7PqoEQA=; b=bcpK9nQ74n3j5KcQFbs1mjlJuK0LJQzjvRGiVFt3b7m2e/MsbHBdYlymJGXaCc0Lqz 5EJIPXBUJ2gQjPGw1rv7yYz7o6Po1TgGd5yUpKgcJIcwxuLPsXkQ2/Jt8cw6N+s7y2G/ dCTvgvLTk/Wzxm6VjmS2TB5cTzUgexXe0GWcsElULfY1RydcnqKrZ1RT/teccRnJXWGW zjOT/ZlIoL0n4Ov7iRsVVJZLF0vr4614JVVLAbnYt2dnpXOWITlTDanU9YDvrKvX6M/n IbHsS3qDdJnPZW4kEdhKhDL5C5Xby88/e5r+cqRgGypj2gefS5U4bEc6BBfF/mKX7VdE 2/hw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u10si7823620edr.186.2021.01.18.10.23.57; Mon, 18 Jan 2021 10:24:21 -0800 (PST) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2393038AbhARSUm (ORCPT + 99 others); Mon, 18 Jan 2021 13:20:42 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34078 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2393196AbhARPIm (ORCPT ); Mon, 18 Jan 2021 10:08:42 -0500 Received: from laurent.telenet-ops.be (laurent.telenet-ops.be [IPv6:2a02:1800:110:4::f00:19]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 39008C0613D3 for ; Mon, 18 Jan 2021 07:07:03 -0800 (PST) Received: from ramsan.of.borg ([84.195.186.194]) by laurent.telenet-ops.be with bizsmtp id JF6y240084C55Sk01F6y0M; Mon, 18 Jan 2021 16:07:02 +0100 Received: from rox.of.borg ([192.168.97.57]) by ramsan.of.borg with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.93) (envelope-from ) id 1l1W7O-004cpY-1A; Mon, 18 Jan 2021 16:06:58 +0100 Received: from geert by rox.of.borg with local (Exim 4.93) (envelope-from ) id 1l1W7N-003LEv-JJ; Mon, 18 Jan 2021 16:06:57 +0100 From: Geert Uytterhoeven To: Sergei Shtylyov , "David S . Miller" , Jakub Kicinski , Andrew Lunn , Heiner Kallweit , Florian Fainelli , Russell King , Ioana Ciornei , Wolfram Sang Cc: netdev@vger.kernel.org, linux-renesas-soc@vger.kernel.org, linux-kernel@vger.kernel.org, Geert Uytterhoeven Subject: [PATCH net v2 0/2] sh_eth: Fix reboot crash Date: Mon, 18 Jan 2021 16:06:54 +0100 Message-Id: <20210118150656.796584-1-geert+renesas@glider.be> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, This patch fixes a regression v5.11-rc1, where rebooting while a sh_eth device is not opened will cause a crash. Changes compared to v1: - Export mdiobb_{read,write}(), - Call mdiobb_{read,write}() now they are exported, - Use mii_bus.parent to avoid bb_info.dev copy, - Drop RFC state. Alternatively, mdio-bitbang could provide Runtime PM-aware wrappers itself, and use them either manually (through a new parameter to alloc_mdio_bitbang(), or a new alloc_mdio_bitbang_*() function), or automatically (e.g. if pm_runtime_enabled() returns true). Note that the latter requires a "struct device *" parameter to operate on. Currently there are only two drivers that call alloc_mdio_bitbang() and use Runtime PM: the Renesas sh_eth and ravb drivers. This series fixes the former, while the latter is not affected (it keeps the device powered all the time between driver probe and driver unbind, and changing that seems to be non-trivial). Thanks for your comments! Geert Uytterhoeven (2): net: mdio-bitbang: Export mdiobb_{read,write}() sh_eth: Make PHY access aware of Runtime PM to fix reboot crash drivers/net/ethernet/renesas/sh_eth.c | 26 ++++++++++++++++++++++++++ drivers/net/mdio/mdio-bitbang.c | 6 ++++-- include/linux/mdio-bitbang.h | 3 +++ 3 files changed, 33 insertions(+), 2 deletions(-) -- 2.25.1 Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds