Message ID | 20230123131331.1425648-3-yoshihiro.shimoda.uh@renesas.com (mailing list archive) |
---|---|
State | Superseded |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | net: ravb: Fix potential issues | expand |
Hello! On 1/23/23 4:13 PM, Yoshihiro Shimoda wrote: > Since this driver enables the interrupt by RIC2_QFE1, this driver > should clear the interrupt flag if it happens. Otherwise, the interrupt > causes to hang the system. > > Fixes: c156633f1353 ("Renesas Ethernet AVB driver proper") > Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> Reviewed-by: Sergey Shtylyov <s.shtylyov@omp.ru> [...] > diff --git a/drivers/net/ethernet/renesas/ravb_main.c b/drivers/net/ethernet/renesas/ravb_main.c > index 3f61100c02f4..0f54849a3823 100644 > --- a/drivers/net/ethernet/renesas/ravb_main.c > +++ b/drivers/net/ethernet/renesas/ravb_main.c > @@ -1101,14 +1101,14 @@ static void ravb_error_interrupt(struct net_device *ndev) > ravb_write(ndev, ~(EIS_QFS | EIS_RESERVED), EIS); > if (eis & EIS_QFS) { > ris2 = ravb_read(ndev, RIS2); > - ravb_write(ndev, ~(RIS2_QFF0 | RIS2_RFFF | RIS2_RESERVED), > + ravb_write(ndev, ~(RIS2_QFF0 | RIS2_QFF1 | RIS2_RFFF | RIS2_RESERVED), > RIS2); > > /* Receive Descriptor Empty int */ > if (ris2 & RIS2_QFF0) > priv->stats[RAVB_BE].rx_over_errors++; > > - /* Receive Descriptor Empty int */ > + /* Receive Descriptor Empty int */ Well, that should've been noted in the commit log... [...] MBR, Sergey
Hello! > From: Sergey Shtylyov, Sent: Tuesday, January 24, 2023 4:41 AM > > On 1/23/23 4:13 PM, Yoshihiro Shimoda wrote: > > > Since this driver enables the interrupt by RIC2_QFE1, this driver > > should clear the interrupt flag if it happens. Otherwise, the interrupt > > causes to hang the system. > > > > Fixes: c156633f1353 ("Renesas Ethernet AVB driver proper") > > Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> > > Reviewed-by: Sergey Shtylyov <s.shtylyov@omp.ru> Thank you for your review! > [...] > > diff --git a/drivers/net/ethernet/renesas/ravb_main.c b/drivers/net/ethernet/renesas/ravb_main.c > > index 3f61100c02f4..0f54849a3823 100644 > > --- a/drivers/net/ethernet/renesas/ravb_main.c > > +++ b/drivers/net/ethernet/renesas/ravb_main.c > > @@ -1101,14 +1101,14 @@ static void ravb_error_interrupt(struct net_device *ndev) > > ravb_write(ndev, ~(EIS_QFS | EIS_RESERVED), EIS); > > if (eis & EIS_QFS) { > > ris2 = ravb_read(ndev, RIS2); > > - ravb_write(ndev, ~(RIS2_QFF0 | RIS2_RFFF | RIS2_RESERVED), > > + ravb_write(ndev, ~(RIS2_QFF0 | RIS2_QFF1 | RIS2_RFFF | RIS2_RESERVED), > > RIS2); > > > > /* Receive Descriptor Empty int */ > > if (ris2 & RIS2_QFF0) > > priv->stats[RAVB_BE].rx_over_errors++; > > > > - /* Receive Descriptor Empty int */ > > + /* Receive Descriptor Empty int */ > > Well, that should've been noted in the commit log... Oops. I think so. So, I'll send v3 patch. Best regards, Yoshihiro Shimoda
diff --git a/drivers/net/ethernet/renesas/ravb_main.c b/drivers/net/ethernet/renesas/ravb_main.c index 3f61100c02f4..0f54849a3823 100644 --- a/drivers/net/ethernet/renesas/ravb_main.c +++ b/drivers/net/ethernet/renesas/ravb_main.c @@ -1101,14 +1101,14 @@ static void ravb_error_interrupt(struct net_device *ndev) ravb_write(ndev, ~(EIS_QFS | EIS_RESERVED), EIS); if (eis & EIS_QFS) { ris2 = ravb_read(ndev, RIS2); - ravb_write(ndev, ~(RIS2_QFF0 | RIS2_RFFF | RIS2_RESERVED), + ravb_write(ndev, ~(RIS2_QFF0 | RIS2_QFF1 | RIS2_RFFF | RIS2_RESERVED), RIS2); /* Receive Descriptor Empty int */ if (ris2 & RIS2_QFF0) priv->stats[RAVB_BE].rx_over_errors++; - /* Receive Descriptor Empty int */ + /* Receive Descriptor Empty int */ if (ris2 & RIS2_QFF1) priv->stats[RAVB_NC].rx_over_errors++;
Since this driver enables the interrupt by RIC2_QFE1, this driver should clear the interrupt flag if it happens. Otherwise, the interrupt causes to hang the system. Fixes: c156633f1353 ("Renesas Ethernet AVB driver proper") Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> --- drivers/net/ethernet/renesas/ravb_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)