[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20231018171441.GB3595737@pengutronix.de>
Date: Wed, 18 Oct 2023 19:14:41 +0200
From: Oleksij Rempel <o.rempel@...gutronix.de>
To: "David S. Miller" <davem@...emloft.net>, Andrew Lunn <andrew@...n.ch>,
Eric Dumazet <edumazet@...gle.com>,
Florian Fainelli <f.fainelli@...il.com>,
Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
Vladimir Oltean <olteanv@...il.com>,
Woojung Huh <woojung.huh@...rochip.com>,
Arun Ramadoss <arun.ramadoss@...rochip.com>,
Conor Dooley <conor+dt@...nel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
Rob Herring <robh+dt@...nel.org>
Cc: Florian Fainelli <florian.fainelli@...adcom.com>, kernel@...gutronix.de,
linux-kernel@...r.kernel.org, netdev@...r.kernel.org,
UNGLinuxDriver@...rochip.com,
"Russell King (Oracle)" <linux@...linux.org.uk>,
devicetree@...r.kernel.org
Subject: Re: [PATCH net-next v5 8/9] net: dsa: microchip: Refactor switch
shutdown routine for WoL preparation
On Wed, Oct 18, 2023 at 01:39:12PM +0200, Oleksij Rempel wrote:
> Centralize the switch shutdown routine in a dedicated function,
> ksz_switch_shutdown(), to enhance code maintainability and reduce
> redundancy. This change abstracts the common shutdown operations
> previously duplicated in ksz9477_i2c_shutdown() and ksz_spi_shutdown().
>
> This refactoring is a preparatory step for an upcoming patch to avoid
> reset on shutdown if Wake-on-LAN (WoL) is enabled.
>
> Signed-off-by: Oleksij Rempel <o.rempel@...gutronix.de>
> Reviewed-by: Florian Fainelli <florian.fainelli@...adcom.com>
> ---
...
> EXPORT_SYMBOL(ksz_switch_alloc);
>
> +/**
> + * ksz_switch_shutdown - Shutdown routine for the switch device.
> + * @dev: The switch device structure.
> + *
> + * This function is responsible for initiating a shutdown sequence for the
> + * switch device. It invokes the reset operation defined in the device
> + * operations, if available, to reset the switch. Subsequently, it calls the
> + * DSA framework's shutdown function to ensure a proper shutdown of the DSA
> + * switch.
> + */
> +void ksz_switch_shutdown(struct ksz_device *dev)
> +{
> + if (dev->dev_ops->reset)
> + dev->dev_ops->reset(dev);
> +
> + dsa_switch_shutdown(dev->ds);
> +}
here is missing EXPORT_SYMBOL(ksz_switch_shutdown);
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
Powered by blists - more mailing lists