2017-12-19 17:00:17

by Gregory CLEMENT

[permalink] [raw]
Subject: [PATCH net 0/3] Few mvneta fixes

Hello,

here it is a small series of fixes found on the mvneta driver. They
had been already used in the vendor kernel and are now ported to
mainline.

Thanks,

Gregory

Yelena Krivosheev (3):
net: mvneta: clear interface link status on port disable
net: mvneta: use proper rxq_number in loop on rx queues
net: mvneta: eliminate wrong call to handle rx descriptor error

drivers/net/ethernet/marvell/mvneta.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)

--
2.15.1


2017-12-19 17:00:22

by Gregory CLEMENT

[permalink] [raw]
Subject: [PATCH net 2/3] net: mvneta: use proper rxq_number in loop on rx queues

From: Yelena Krivosheev <[email protected]>

When adding the RX queue association with each CPU, a typo was made in
the mvneta_cleanup_rxqs() function. This patch fixes it.

[[email protected]: add commit log and fixes tag]
Cc: [email protected]
Fixes: 2dcf75e2793c ("net: mvneta: Associate RX queues with each CPU")
Signed-off-by: Yelena Krivosheev <[email protected]>
Tested-by: Dmitri Epshtein <[email protected]>
Signed-off-by: Gregory CLEMENT <[email protected]>
---
drivers/net/ethernet/marvell/mvneta.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/marvell/mvneta.c b/drivers/net/ethernet/marvell/mvneta.c
index 16b2bfb2cf51..1e0835655c93 100644
--- a/drivers/net/ethernet/marvell/mvneta.c
+++ b/drivers/net/ethernet/marvell/mvneta.c
@@ -3015,7 +3015,7 @@ static void mvneta_cleanup_rxqs(struct mvneta_port *pp)
{
int queue;

- for (queue = 0; queue < txq_number; queue++)
+ for (queue = 0; queue < rxq_number; queue++)
mvneta_rxq_deinit(pp, &pp->rxqs[queue]);
}

--
2.15.1

2017-12-19 17:00:24

by Gregory CLEMENT

[permalink] [raw]
Subject: [PATCH net 3/3] net: mvneta: eliminate wrong call to handle rx descriptor error

From: Yelena Krivosheev <[email protected]>

There are few reasons in mvneta_rx_swbm() function when received packet
is dropped. mvneta_rx_error() should be called only if error bit [16]
is set in rx descriptor.

[[email protected]: add fixes tag]
Cc: [email protected]
Fixes: dc35a10f68d3 ("net: mvneta: bm: add support for hardware buffer management")
Signed-off-by: Yelena Krivosheev <[email protected]>
Tested-by: Dmitri Epshtein <[email protected]>
Signed-off-by: Gregory CLEMENT <[email protected]>
---
drivers/net/ethernet/marvell/mvneta.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/marvell/mvneta.c b/drivers/net/ethernet/marvell/mvneta.c
index 1e0835655c93..a539263cd79c 100644
--- a/drivers/net/ethernet/marvell/mvneta.c
+++ b/drivers/net/ethernet/marvell/mvneta.c
@@ -1962,9 +1962,9 @@ static int mvneta_rx_swbm(struct mvneta_port *pp, int rx_todo,

if (!mvneta_rxq_desc_is_first_last(rx_status) ||
(rx_status & MVNETA_RXD_ERR_SUMMARY)) {
+ mvneta_rx_error(pp, rx_desc);
err_drop_frame:
dev->stats.rx_errors++;
- mvneta_rx_error(pp, rx_desc);
/* leave the descriptor untouched */
continue;
}
--
2.15.1

2017-12-19 17:00:19

by Gregory CLEMENT

[permalink] [raw]
Subject: [PATCH net 1/3] net: mvneta: clear interface link status on port disable

From: Yelena Krivosheev <[email protected]>

When port connect to PHY in polling mode (with poll interval 1 sec),
port and phy link status must be synchronize in order don't loss link
change event.

[[email protected]: add fixes tag]
Cc: <[email protected]>
Fixes: c5aff18204da ("net: mvneta: driver for Marvell Armada 370/XP network unit")
Signed-off-by: Yelena Krivosheev <[email protected]>
Tested-by: Dmitri Epshtein <[email protected]>
Signed-off-by: Gregory CLEMENT <[email protected]>
---
drivers/net/ethernet/marvell/mvneta.c | 4 ++++
1 file changed, 4 insertions(+)

diff --git a/drivers/net/ethernet/marvell/mvneta.c b/drivers/net/ethernet/marvell/mvneta.c
index bc93b69cfd1e..16b2bfb2cf51 100644
--- a/drivers/net/ethernet/marvell/mvneta.c
+++ b/drivers/net/ethernet/marvell/mvneta.c
@@ -1214,6 +1214,10 @@ static void mvneta_port_disable(struct mvneta_port *pp)
val &= ~MVNETA_GMAC0_PORT_ENABLE;
mvreg_write(pp, MVNETA_GMAC_CTRL_0, val);

+ pp->link = 0;
+ pp->duplex = -1;
+ pp->speed = 0;
+
udelay(200);
}

--
2.15.1

2017-12-19 20:18:40

by Arnd Bergmann

[permalink] [raw]
Subject: Re: [PATCH net 0/3] Few mvneta fixes

On Tue, Dec 19, 2017 at 5:59 PM, Gregory CLEMENT
<[email protected]> wrote:
> Hello,
>
> here it is a small series of fixes found on the mvneta driver. They
> had been already used in the vendor kernel and are now ported to
> mainline.

Does one of the patches look like it addresses the rare Oops we discussed on
#kernelci this morning?

https://storage.kernelci.org/stable/linux-4.9.y/v4.9.70/arm/mvebu_v7_defconfig/lab-free-electrons/boot-armada-375-db.html

Arnd

2017-12-20 05:20:33

by Willy Tarreau

[permalink] [raw]
Subject: Re: [PATCH net 0/3] Few mvneta fixes

Hi Arnd,

On Tue, Dec 19, 2017 at 09:18:35PM +0100, Arnd Bergmann wrote:
> On Tue, Dec 19, 2017 at 5:59 PM, Gregory CLEMENT
> <[email protected]> wrote:
> > Hello,
> >
> > here it is a small series of fixes found on the mvneta driver. They
> > had been already used in the vendor kernel and are now ported to
> > mainline.
>
> Does one of the patches look like it addresses the rare Oops we discussed on
> #kernelci this morning?
>
> https://storage.kernelci.org/stable/linux-4.9.y/v4.9.70/arm/mvebu_v7_defconfig/lab-free-electrons/boot-armada-375-db.html

I could be wrong but for me the 375 uses mvpp2, not mvneta, so this
should have no effect there.

Willy

2017-12-20 17:26:37

by David Miller

[permalink] [raw]
Subject: Re: [PATCH net 0/3] Few mvneta fixes

From: Gregory CLEMENT <[email protected]>
Date: Tue, 19 Dec 2017 17:59:44 +0100

> here it is a small series of fixes found on the mvneta driver. They
> had been already used in the vendor kernel and are now ported to
> mainline.

Series applied, thanks Gregory.