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: <b8c85e4e-d426-a68b-2d3d-704fc7675963@microchip.com>
Date:   Fri, 3 Feb 2023 11:23:29 +0000
From:   <Claudiu.Beznea@...rochip.com>
To:     <radhey.shyam.pandey@....com>, <Nicolas.Ferre@...rochip.com>,
        <davem@...emloft.net>, <edumazet@...gle.com>, <kuba@...nel.org>,
        <pabeni@...hat.com>, <andrew@...n.ch>
CC:     <git@....com>, <netdev@...r.kernel.org>,
        <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] net: macb: Perform zynqmp dynamic configuration only for
 SGMII interface

On 02.02.2023 14:26, Radhey Shyam Pandey wrote:
> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
> 
> In zynqmp platforms where firmware supports dynamic SGMII configuration
> but has other non-SGMII ethernet devices, it fails them with no packets
> received at the RX interface.
> 
> To fix this behaviour perform SGMII dynamic configuration only
> for the SGMII phy interface.
> 
> Fixes: 32cee7818111 ("net: macb: Add zynqmp SGMII dynamic configuration support")
> Signed-off-by: Radhey Shyam Pandey <radhey.shyam.pandey@....com>

Reviewed-by: Claudiu Beznea <claudiu.beznea@...rochip.com>


> ---
>  drivers/net/ethernet/cadence/macb_main.c | 31 ++++++++++++------------
>  1 file changed, 16 insertions(+), 15 deletions(-)
> 
> diff --git a/drivers/net/ethernet/cadence/macb_main.c b/drivers/net/ethernet/cadence/macb_main.c
> index 72e42820713d..6cda31520c42 100644
> --- a/drivers/net/ethernet/cadence/macb_main.c
> +++ b/drivers/net/ethernet/cadence/macb_main.c
> @@ -4627,25 +4627,26 @@ static int init_reset_optional(struct platform_device *pdev)
>                 if (ret)
>                         return dev_err_probe(&pdev->dev, ret,
>                                              "failed to init SGMII PHY\n");
> -       }
> 
> -       ret = zynqmp_pm_is_function_supported(PM_IOCTL, IOCTL_SET_GEM_CONFIG);
> -       if (!ret) {
> -               u32 pm_info[2];
> +               ret = zynqmp_pm_is_function_supported(PM_IOCTL, IOCTL_SET_GEM_CONFIG);
> +               if (!ret) {
> +                       u32 pm_info[2];
> +
> +                       ret = of_property_read_u32_array(pdev->dev.of_node, "power-domains",
> +                                                        pm_info, ARRAY_SIZE(pm_info));
> +                       if (ret) {
> +                               dev_err(&pdev->dev, "Failed to read power management information\n");
> +                               goto err_out_phy_exit;
> +                       }
> +                       ret = zynqmp_pm_set_gem_config(pm_info[1], GEM_CONFIG_FIXED, 0);
> +                       if (ret)
> +                               goto err_out_phy_exit;
> 
> -               ret = of_property_read_u32_array(pdev->dev.of_node, "power-domains",
> -                                                pm_info, ARRAY_SIZE(pm_info));
> -               if (ret) {
> -                       dev_err(&pdev->dev, "Failed to read power management information\n");
> -                       goto err_out_phy_exit;
> +                       ret = zynqmp_pm_set_gem_config(pm_info[1], GEM_CONFIG_SGMII_MODE, 1);
> +                       if (ret)
> +                               goto err_out_phy_exit;
>                 }
> -               ret = zynqmp_pm_set_gem_config(pm_info[1], GEM_CONFIG_FIXED, 0);
> -               if (ret)
> -                       goto err_out_phy_exit;
> 
> -               ret = zynqmp_pm_set_gem_config(pm_info[1], GEM_CONFIG_SGMII_MODE, 1);
> -               if (ret)
> -                       goto err_out_phy_exit;
>         }
> 
>         /* Fully reset controller at hardware level if mapped in device tree */
> --
> 2.25.1
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ