lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: 
 <BY3PR18MB4707BE42247B0A418EFEE35EA01A2@BY3PR18MB4707.namprd18.prod.outlook.com>
Date: Tue, 30 Apr 2024 09:21:57 +0000
From: Sai Krishna Gajula <saikrishnag@...vell.com>
To: Herve Codina <herve.codina@...tlin.com>,
        Thomas Gleixner
	<tglx@...utronix.de>, Rob Herring <robh@...nel.org>,
        Krzysztof Kozlowski
	<krzk+dt@...nel.org>,
        Conor Dooley <conor+dt@...nel.org>,
        "David S. Miller"
	<davem@...emloft.net>,
        Eric Dumazet <edumazet@...gle.com>, Jakub Kicinski
	<kuba@...nel.org>,
        Paolo Abeni <pabeni@...hat.com>, Lee Jones
	<lee@...nel.org>,
        Arnd Bergmann <arnd@...db.de>,
        Horatiu Vultur
	<horatiu.vultur@...rochip.com>,
        "UNGLinuxDriver@...rochip.com"
	<UNGLinuxDriver@...rochip.com>,
        Andrew Lunn <andrew@...n.ch>, Heiner Kallweit
	<hkallweit1@...il.com>,
        Russell King <linux@...linux.org.uk>,
        Saravana Kannan
	<saravanak@...gle.com>,
        Bjorn Helgaas <bhelgaas@...gle.com>,
        Philipp Zabel
	<p.zabel@...gutronix.de>,
        Lars Povlsen <lars.povlsen@...rochip.com>,
        Steen
 Hegelund <Steen.Hegelund@...rochip.com>,
        Daniel Machon
	<daniel.machon@...rochip.com>,
        Alexandre Belloni
	<alexandre.belloni@...tlin.com>
CC: "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        "linux-pci@...r.kernel.org" <linux-pci@...r.kernel.org>,
        "linux-arm-kernel@...ts.infradead.org"
	<linux-arm-kernel@...ts.infradead.org>,
        Allan Nielsen
	<allan.nielsen@...rochip.com>,
        Steen Hegelund <steen.hegelund@...rochip.com>,
        Luca Ceresoli <luca.ceresoli@...tlin.com>,
        Thomas Petazzoni
	<thomas.petazzoni@...tlin.com>
Subject: RE: [PATCH 07/17] net: mdio: mscc-miim: Handle the switch reset


> -----Original Message-----
> From: Herve Codina <herve.codina@...tlin.com>
> Sent: Tuesday, April 30, 2024 2:07 PM
> To: Herve Codina <herve.codina@...tlin.com>; Thomas Gleixner
> <tglx@...utronix.de>; Rob Herring <robh@...nel.org>; Krzysztof Kozlowski
> <krzk+dt@...nel.org>; Conor Dooley <conor+dt@...nel.org>; David S. Miller
> <davem@...emloft.net>; Eric Dumazet <edumazet@...gle.com>; Jakub
> Kicinski <kuba@...nel.org>; Paolo Abeni <pabeni@...hat.com>; Lee Jones
> <lee@...nel.org>; Arnd Bergmann <arnd@...db.de>; Horatiu Vultur
> <horatiu.vultur@...rochip.com>; UNGLinuxDriver@...rochip.com; Andrew
> Lunn <andrew@...n.ch>; Heiner Kallweit <hkallweit1@...il.com>; Russell
> King <linux@...linux.org.uk>; Saravana Kannan <saravanak@...gle.com>;
> Bjorn Helgaas <bhelgaas@...gle.com>; Philipp Zabel
> <p.zabel@...gutronix.de>; Lars Povlsen <lars.povlsen@...rochip.com>;
> Steen Hegelund <Steen.Hegelund@...rochip.com>; Daniel Machon
> <daniel.machon@...rochip.com>; Alexandre Belloni
> <alexandre.belloni@...tlin.com>
> Cc: linux-kernel@...r.kernel.org; devicetree@...r.kernel.org;
> netdev@...r.kernel.org; linux-pci@...r.kernel.org; linux-arm-
> kernel@...ts.infradead.org; Allan Nielsen <allan.nielsen@...rochip.com>;
> Steen Hegelund <steen.hegelund@...rochip.com>; Luca Ceresoli
> <luca.ceresoli@...tlin.com>; Thomas Petazzoni
> <thomas.petazzoni@...tlin.com>
> Subject: [PATCH 07/17] net: mdio: mscc-miim: Handle the switch
> reset
> 
> The mscc-miim device can be impacted by the switch reset, at least when this
> device is part of the LAN966x PCI device.
> 
> Handle this newly added (optional) resets property.
> 
> Signed-off-by: Herve Codina <herve.codina@...tlin.com>
> ---
>  drivers/net/mdio/mdio-mscc-miim.c | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/drivers/net/mdio/mdio-mscc-miim.c b/drivers/net/mdio/mdio-
> mscc-miim.c
> index c29377c85307..6a6c1768f533 100644
> --- a/drivers/net/mdio/mdio-mscc-miim.c
> +++ b/drivers/net/mdio/mdio-mscc-miim.c
> @@ -19,6 +19,7 @@
>  #include <linux/platform_device.h>
>  #include <linux/property.h>
>  #include <linux/regmap.h>
> +#include <linux/reset.h>
> 
>  #define MSCC_MIIM_REG_STATUS		0x0
>  #define		MSCC_MIIM_STATUS_STAT_PENDING	BIT(2)
> @@ -270,11 +271,18 @@ static int mscc_miim_probe(struct platform_device
> *pdev)  {
>  	struct device_node *np = pdev->dev.of_node;
>  	struct regmap *mii_regmap, *phy_regmap;
> +	struct reset_control *reset;

Please follow reverse x-mass tree order

>  	struct device *dev = &pdev->dev;
>  	struct mscc_miim_dev *miim;
>  	struct mii_bus *bus;
>  	int ret;
> 
> +	reset = devm_reset_control_get_optional_shared(dev, "switch");
> +	if (IS_ERR(reset))
> +		return dev_err_probe(dev, PTR_ERR(reset), "Failed to get
> reset\n");
> +
> +	reset_control_reset(reset);
> +
>  	mii_regmap = ocelot_regmap_from_resource(pdev, 0,
> 
> &mscc_miim_regmap_config);
>  	if (IS_ERR(mii_regmap))
> --
> 2.44.0
> 


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ