Re: [PATCH net-next] net: phy: lan87xx: fix access to wrong register of LAN87xx

2021-03-29 Thread Andre.Edich
On Mon, 2021-03-29 at 12:19 +0100, Måns Rullgård wrote: > EXTERNAL EMAIL: Do not click links or open attachments unless you know > the content is safe > > Andre Edich writes: > > > The function lan87xx_config_aneg_ext was introduced to configure > > LAN95xxA but as well writes to undocumented re

Re: [PATCH net-next v2 3/6] smsc95xx: add PAL support to use external PHY drivers

2020-07-24 Thread Andre.Edich
On Fri, 2020-07-24 at 00:39 +0200, Andrew Lunn wrote: > EXTERNAL EMAIL: Do not click links or open attachments unless you > know the content is safe > > On Thu, Jul 23, 2020 at 01:55:04PM +0200, Andre Edich wrote: > > Generally, each PHY has their own configuration and it can be done > > through a

[PATCH net-next 2/8] smsc95xx: avoid memory leak in smsc95xx_bind

2020-06-29 Thread Andre.Edich
In a case where the ID_REV register read is failed, the memory for a private data structure has to be freed before returning error from the function smsc95xx_unbind. Signed-off-by: Andre Edich Signed-off-by: Parthiban Veerasooran < parthiban.veerasoo...@microchip.com> --- drivers/net/usb/smsc95x

[PATCH net-next 1/8] smsc95xx: check return value of smsc95xx_reset

2020-06-29 Thread Andre.Edich
The return value of the function smsc95xx_reset() must be checked to avoid returning false success from the function smsc95xx_bind(). Signed-off-by: Andre Edich Signed-off-by: Parthiban Veerasooran < parthiban.veerasoo...@microchip.com> --- drivers/net/usb/smsc95xx.c | 6 ++ 1 file changed,

[PATCH net-next 8/8] smsc95xx: use usbnet->driver_priv

2020-06-29 Thread Andre.Edich
Using `void *driver_priv` instead of `unsigned long data[]` is more straightforward way to recover the `struct smsc95xx_priv *` from the `struct net_device *`. Signed-off-by: Andre Edich --- drivers/net/usb/smsc95xx.c | 61 +- 1 file changed, 28 insertions(+),

[PATCH net-next 5/8] smsc95xx: use PAL framework read/write functions

2020-06-29 Thread Andre.Edich
Use functions phy_read and phy_write instead of smsc95xx_mdio_read and smsc95xx_mdio_write respectively. Signed-off-by: Andre Edich --- drivers/net/usb/smsc95xx.c | 33 + 1 file changed, 13 insertions(+), 20 deletions(-) diff --git a/drivers/net/usb/smsc95xx.c b/

[PATCH net-next 6/8] smsc95xx: remove redundant function arguments

2020-06-29 Thread Andre.Edich
This patch removes arguments netdev and phy_id from the functions smsc95xx_mdio_read_nopm and smsc95xx_mdio_write_nopm. Both removed arguments are recovered from a new argument `struct usbnet *dev`. Signed-off-by: Andre Edich --- drivers/net/usb/smsc95xx.c | 35 +

[PATCH net-next 7/8] smsc95xx: use PHY framework instead of MII library

2020-06-29 Thread Andre.Edich
Since the PHY framework is used anyway, replace the rest of the calls to the MII library, including those from the USB Network driver infrastructure, by the calls to the PHY framework. Signed-off-by: Andre Edich --- drivers/net/usb/smsc95xx.c | 92 +++--- 1 file c

[PATCH net-next 4/8] smsc95xx: remove redundant link status checking

2020-06-29 Thread Andre.Edich
Current driver supports PAL that does link status checking anyway. Signed-off-by: Andre Edich --- drivers/net/usb/smsc95xx.c | 55 -- 1 file changed, 55 deletions(-) diff --git a/drivers/net/usb/smsc95xx.c b/drivers/net/usb/smsc95xx.c index fbb80a7aef32..3b8f

[PATCH net-next 3/8] smsc95xx: add PAL support to use external PHY drivers

2020-06-29 Thread Andre.Edich
Generally, each PHY has their own configuration and it can be done through an external PHY driver. The smsc95xx driver uses only the hard-coded internal PHY configuration. This patch adds PAL (PHY Abstraction Layer) support to probe external PHY drivers for configuring external PHYs. Signed-off-

[PATCH net-next 0/8] Add PAL support to smsc95xx

2020-06-29 Thread Andre.Edich
To allow to probe external phy drivers, this patchset adds use of Phy Abstraction Layer to smsc95xx driver. Andre Edich (8): smsc95xx: check return value of smsc95xx_reset smsc95xx: avoid memory leak in smsc95xx_bind smsc95xx: add PAL support to use external PHY drivers smsc95xx: remove re

[PATCH net-next 4/8] smsc95xx: remove redundant link status checking

2020-06-29 Thread Andre.Edich
Current driver supports PAL that does link status checking anyway. Signed-off-by: Andre Edich --- drivers/net/usb/smsc95xx.c | 55 -- 1 file changed, 55 deletions(-) diff --git a/drivers/net/usb/smsc95xx.c b/drivers/net/usb/smsc95xx.c index fbb80a7aef32..3b8f

[PATCH net-next 1/8] smsc95xx: check return value of smsc95xx_reset

2020-06-29 Thread Andre.Edich
The return value of the function smsc95xx_reset() must be checked to avoid returning false success from the function smsc95xx_bind(). Signed-off-by: Andre Edich Signed-off-by: Parthiban Veerasooran < parthiban.veerasoo...@microchip.com> --- drivers/net/usb/smsc95xx.c | 6 ++ 1 file changed,

[PATCH net-next 3/8] smsc95xx: add PAL support to use external PHY drivers

2020-06-29 Thread Andre.Edich
Generally, each PHY has their own configuration and it can be done through an external PHY driver. The smsc95xx driver uses only the hard-coded internal PHY configuration. This patch adds PAL (PHY Abstraction Layer) support to probe external PHY drivers for configuring external PHYs. Signed-off-

[PATCH net-next 0/8] Add PAL support to smsc95xx

2020-06-29 Thread Andre.Edich
To allow to probe external phy drivers, this patchset adds use of Phy Abstraction Layer to smsc95xx driver. Andre Edich (8): smsc95xx: check return value of smsc95xx_reset smsc95xx: avoid memory leak in smsc95xx_bind smsc95xx: add PAL support to use external PHY drivers smsc95xx: remove re

[PATCH net-next 8/8] smsc95xx: use usbnet->driver_priv

2020-06-29 Thread Andre.Edich
Using `void *driver_priv` instead of `unsigned long data[]` is more straightforward way to recover the `struct smsc95xx_priv *` from the `struct net_device *`. Signed-off-by: Andre Edich --- drivers/net/usb/smsc95xx.c | 61 +- 1 file changed, 28 insertions(+),

[PATCH net-next 2/8] smsc95xx: avoid memory leak in smsc95xx_bind

2020-06-29 Thread Andre.Edich
In a case where the ID_REV register read is failed, the memory for a private data structure has to be freed before returning error from the function smsc95xx_unbind. Signed-off-by: Andre Edich Signed-off-by: Parthiban Veerasooran < parthiban.veerasoo...@microchip.com> --- drivers/net/usb/smsc95x

[PATCH net-next 7/8] smsc95xx: use PHY framework instead of MII library

2020-06-29 Thread Andre.Edich
Since the PHY framework is used anyway, replace the rest of the calls to the MII library, including those from the USB Network driver infrastructure, by the calls to the PHY framework. Signed-off-by: Andre Edich --- drivers/net/usb/smsc95xx.c | 92 +++--- 1 file c

[PATCH net-next 5/8] smsc95xx: use PAL framework read/write functions

2020-06-29 Thread Andre.Edich
Use functions phy_read and phy_write instead of smsc95xx_mdio_read and smsc95xx_mdio_write respectively. Signed-off-by: Andre Edich --- drivers/net/usb/smsc95xx.c | 33 + 1 file changed, 13 insertions(+), 20 deletions(-) diff --git a/drivers/net/usb/smsc95xx.c b/

[PATCH net-next 6/8] smsc95xx: remove redundant function arguments

2020-06-29 Thread Andre.Edich
This patch removes arguments netdev and phy_id from the functions smsc95xx_mdio_read_nopm and smsc95xx_mdio_write_nopm. Both removed arguments are recovered from a new argument `struct usbnet *dev`. Signed-off-by: Andre Edich --- drivers/net/usb/smsc95xx.c | 35 +