Message ID | 20230119043920.875280-3-yoshihiro.shimoda.uh@renesas.com (mailing list archive) |
---|---|
State | Superseded |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | net: ravb: Fix potential issues | expand |
On 1/19/23 7:39 AM, 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: a0d2f20650e8 ("Renesas Ethernet AVB PTP clock driver") No, it's actually c156633f1353 ("Renesas Ethernet AVB driver proper|)! > Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> [...] > diff --git a/drivers/net/ethernet/renesas/ravb_main.c b/drivers/net/ethernet/renesas/ravb_main.c > index 3f61100c02f4..bcbb62f90fb7 100644 > --- a/drivers/net/ethernet/renesas/ravb_main.c > +++ b/drivers/net/ethernet/renesas/ravb_main.c > @@ -1101,7 +1101,7 @@ 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), Might as well fix the QFF1 comment indentation below... [...] MBR, Sergey
Hi Sergey-san, > From: Sergey Shtylyov, Sent: Saturday, January 21, 2023 5:12 AM > > On 1/19/23 7:39 AM, 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: a0d2f20650e8 ("Renesas Ethernet AVB PTP clock driver") > > No, it's actually c156633f1353 ("Renesas Ethernet AVB driver proper|)! I'll fix it on v2. > > Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> > [...] > > > diff --git a/drivers/net/ethernet/renesas/ravb_main.c b/drivers/net/ethernet/renesas/ravb_main.c > > index 3f61100c02f4..bcbb62f90fb7 100644 > > --- a/drivers/net/ethernet/renesas/ravb_main.c > > +++ b/drivers/net/ethernet/renesas/ravb_main.c > > @@ -1101,7 +1101,7 @@ 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), > > Might as well fix the QFF1 comment indentation below... OK, I will also fix it. Best regards, Yoshihiro Shimoda
diff --git a/drivers/net/ethernet/renesas/ravb_main.c b/drivers/net/ethernet/renesas/ravb_main.c index 3f61100c02f4..bcbb62f90fb7 100644 --- a/drivers/net/ethernet/renesas/ravb_main.c +++ b/drivers/net/ethernet/renesas/ravb_main.c @@ -1101,7 +1101,7 @@ 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 */
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: a0d2f20650e8 ("Renesas Ethernet AVB PTP clock driver") Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> --- drivers/net/ethernet/renesas/ravb_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)