2022-04-29 09:47:00

by Radhey Shyam Pandey

[permalink] [raw]
Subject: [PATCH 0/2] emaclite: improve error handling and minor cleanup

It patchset does error handling for of_address_to_resource() and also
removes "Don't advertise 1000BASE-T" and auto negotiation.

TREE: net-next

Shravya Kumbham (2):
net: emaclite: Don't advertise 1000BASE-T and do auto negotiation
net: emaclite: Add error handling for of_address_to_resource()

drivers/net/ethernet/xilinx/xilinx_emaclite.c | 30 ++++++++++---------------
1 files changed, 12 insertions(+), 18 deletions(-)


2022-04-29 17:21:14

by Radhey Shyam Pandey

[permalink] [raw]
Subject: RE: [PATCH 0/2] emaclite: improve error handling and minor cleanup

> -----Original Message-----
> From: Andrew Lunn <[email protected]>
> Sent: Friday, April 29, 2022 6:38 AM
> To: Radhey Shyam Pandey <[email protected]>
> Cc: [email protected]; [email protected]; [email protected]; Michal
> Simek <[email protected]>; [email protected]; linux-arm-
> [email protected]; [email protected]; git <[email protected]>
> Subject: Re: [PATCH 0/2] emaclite: improve error handling and minor cleanup
>
> On Thu, Apr 28, 2022 at 09:57:56PM +0530, Radhey Shyam Pandey wrote:
> > It patchset does error handling for of_address_to_resource() and also
> > removes "Don't advertise 1000BASE-T" and auto negotiation.
> >
> > TREE: net-next
>
> Please read the netdev FAQ. It tells you how to specify the tree a patchset
> should be applied to.

Thanks. As one of a patch is a bug fix will target for net. Will update it in v2.

>
> Andrew
>

2022-04-30 13:13:42

by Radhey Shyam Pandey

[permalink] [raw]
Subject: [PATCH 1/2] net: emaclite: Don't advertise 1000BASE-T and do auto negotiation

From: Shravya Kumbham <[email protected]>

In xemaclite_open() function we are setting the max speed of
emaclite to 100Mb using phy_set_max_speed() function so,
there is no need to write the advertising registers to stop
giga-bit speed and the phy_start() function starts the
auto-negotiation so, there is no need to handle it separately
using advertising registers. Remove the phy_read and phy_write
of advertising registers in xemaclite_open() function.

Signed-off-by: Shravya Kumbham <[email protected]>
Signed-off-by: Radhey Shyam Pandey <[email protected]>
---
drivers/net/ethernet/xilinx/xilinx_emaclite.c | 15 ---------------
1 files changed, 0 insertions(+), 15 deletions(-)

diff --git a/drivers/net/ethernet/xilinx/xilinx_emaclite.c b/drivers/net/ethernet/xilinx/xilinx_emaclite.c
index 7a86ae8..f9cf86e 100644
--- a/drivers/net/ethernet/xilinx/xilinx_emaclite.c
+++ b/drivers/net/ethernet/xilinx/xilinx_emaclite.c
@@ -907,8 +907,6 @@ static int xemaclite_open(struct net_device *dev)
xemaclite_disable_interrupts(lp);

if (lp->phy_node) {
- u32 bmcr;
-
lp->phy_dev = of_phy_connect(lp->ndev, lp->phy_node,
xemaclite_adjust_link, 0,
PHY_INTERFACE_MODE_MII);
@@ -919,19 +917,6 @@ static int xemaclite_open(struct net_device *dev)

/* EmacLite doesn't support giga-bit speeds */
phy_set_max_speed(lp->phy_dev, SPEED_100);
-
- /* Don't advertise 1000BASE-T Full/Half duplex speeds */
- phy_write(lp->phy_dev, MII_CTRL1000, 0);
-
- /* Advertise only 10 and 100mbps full/half duplex speeds */
- phy_write(lp->phy_dev, MII_ADVERTISE, ADVERTISE_ALL |
- ADVERTISE_CSMA);
-
- /* Restart auto negotiation */
- bmcr = phy_read(lp->phy_dev, MII_BMCR);
- bmcr |= (BMCR_ANENABLE | BMCR_ANRESTART);
- phy_write(lp->phy_dev, MII_BMCR, bmcr);
-
phy_start(lp->phy_dev);
}

--
1.7.1

2022-04-30 20:06:45

by Andrew Lunn

[permalink] [raw]
Subject: Re: [PATCH 0/2] emaclite: improve error handling and minor cleanup

On Thu, Apr 28, 2022 at 09:57:56PM +0530, Radhey Shyam Pandey wrote:
> It patchset does error handling for of_address_to_resource() and also
> removes "Don't advertise 1000BASE-T" and auto negotiation.
>
> TREE: net-next

Please read the netdev FAQ. It tells you how to specify the tree a
patchset should be applied to.

Andrew


2022-05-01 23:26:33

by Andrew Lunn

[permalink] [raw]
Subject: Re: [PATCH 1/2] net: emaclite: Don't advertise 1000BASE-T and do auto negotiation

On Thu, Apr 28, 2022 at 09:57:57PM +0530, Radhey Shyam Pandey wrote:
> From: Shravya Kumbham <[email protected]>
>
> In xemaclite_open() function we are setting the max speed of
> emaclite to 100Mb using phy_set_max_speed() function so,
> there is no need to write the advertising registers to stop
> giga-bit speed and the phy_start() function starts the
> auto-negotiation so, there is no need to handle it separately
> using advertising registers. Remove the phy_read and phy_write
> of advertising registers in xemaclite_open() function.
>
> Signed-off-by: Shravya Kumbham <[email protected]>
> Signed-off-by: Radhey Shyam Pandey <[email protected]>

Reviewed-by: Andrew Lunn <[email protected]>

Andrew