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] [day] [month] [year] [list]
Message-ID: <BYAPR11MB3366118DE832C411F463368F9F489@BYAPR11MB3366.namprd11.prod.outlook.com>
Date:   Fri, 16 Sep 2022 13:09:29 +0000
From:   <Raju.Lakkaraju@...rochip.com>
To:     <andrew@...n.ch>
CC:     <netdev@...r.kernel.org>, <davem@...emloft.net>, <kuba@...nel.org>,
        <linux-kernel@...r.kernel.org>, <Bryan.Whitehead@...rochip.com>,
        <lxu@...linear.com>, <richardcochran@...il.com>,
        <UNGLinuxDriver@...rochip.com>, <Ian.Saturley@...rochip.com>
Subject: RE: [PATCH net-next 2/2] net: lan743x: Add support to SGMII register
 dump for PCI11010/PCI11414 chips

Hi Andrew,

Thank you for quick review comments.
By mistake I sent the wrong file.

Already V1 patch posted with fix.
i.e
[PATCH net-next V1 2/2] net: lan743x: Add support to SGMII register dump for PCI11010/PCI11414 chips

Thanks,
Raju

-----Original Message-----
From: Andrew Lunn <andrew@...n.ch> 
Sent: 16 September 2022 05:48 PM
To: Raju Lakkaraju - I30499 <Raju.Lakkaraju@...rochip.com>
Cc: netdev@...r.kernel.org; davem@...emloft.net; kuba@...nel.org; linux-kernel@...r.kernel.org; Bryan Whitehead - C21958 <Bryan.Whitehead@...rochip.com>; lxu@...linear.com; richardcochran@...il.com; UNGLinuxDriver <UNGLinuxDriver@...rochip.com>; Ian Saturley - M21209 <Ian.Saturley@...rochip.com>
Subject: Re: [PATCH net-next 2/2] net: lan743x: Add support to SGMII register dump for PCI11010/PCI11414 chips

EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe

On Fri, Sep 16, 2022 at 01:53:27PM +0530, Raju Lakkaraju wrote:
> Add support to SGMII register dump

> +static void lan743x_get_pauseparam(struct net_device *dev,
> +                                struct ethtool_pauseparam *pause) {
> +     struct lan743x_adapter *adapter = netdev_priv(dev);
> +
> +//   pause->autoneg = adapter->pause_autoneg;
> +     pause->tx_pause = adapter->pause_tx;
> +     pause->rx_pause = adapter->pause_rx; }
> +
> +static int lan743x_set_pauseparam(struct net_device *dev,
> +                               struct ethtool_pauseparam *pause) {
> +     struct lan743x_adapter *adapter = netdev_priv(dev);
> +     struct phy_device *phydev = dev->phydev;
> +
> +     if (pause->autoneg)
> +             return -EINVAL;
> +
> +     if (!phydev)
> +             return -EINVAL;
> +
> +     if (!phy_validate_pause(phydev, pause))
> +             return -EINVAL;
> +
> +     //adapter->pause_auto = pause->autoneg;
> +     adapter->pause_rx   = pause->rx_pause;
> +     adapter->pause_tx   = pause->tx_pause;
> +
> +     phy_set_asym_pause(phydev, pause->rx_pause, pause->tx_pause);
> +
> +     return 0;
>  }

This is not part of register dumping...

> --- a/drivers/net/ethernet/microchip/lan743x_main.c
> +++ b/drivers/net/ethernet/microchip/lan743x_main.c
> @@ -25,6 +25,22 @@
>  #define PCS_POWER_STATE_DOWN 0x6
>  #define PCS_POWER_STATE_UP   0x4
>
> +static int lan743x_sgmii_read(struct lan743x_adapter *adapter,
> +                           u8 mmd, u16 addr); int 
> +lan743x_sgmii_dump_read(struct lan743x_adapter *adapter,
> +                         u8 dev, u16 adr) {
> +     int ret;
> +
> +     ret = lan743x_sgmii_read(adapter, dev, adr);
> +     if (ret < 0) {
> +             pr_warn("SGMII read fail\n");

Better to use netdev_warn(), so we know which devices has read problems.

        Andrew

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ