On 8/25/21 10:01 AM, Biju Das wrote: > R-Car Gen3 supports separate interrupts for E-MAC and DMA queues, > whereas R-Car Gen2 and RZ/G2L have a single interrupt instead. > > Add a multi_irq hw feature bit to struct ravb_hw_info to enable So you have 'multi_irq' in the patch subject/description but 'multi_irqs'? Not very consistent... > this only for R-Car Gen3. > > Signed-off-by: Biju Das <biju.das.jz@xxxxxxxxxxxxxx> > Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@xxxxxxxxxxxxxx> > --- > drivers/net/ethernet/renesas/ravb.h | 1 + > drivers/net/ethernet/renesas/ravb_main.c | 22 ++++++++++++++-------- > drivers/net/ethernet/renesas/ravb_ptp.c | 8 +++++--- > 3 files changed, 20 insertions(+), 11 deletions(-) > > diff --git a/drivers/net/ethernet/renesas/ravb.h b/drivers/net/ethernet/renesas/ravb.h > index 84700a82a41c..da486e06b322 100644 > --- a/drivers/net/ethernet/renesas/ravb.h > +++ b/drivers/net/ethernet/renesas/ravb.h > @@ -997,6 +997,7 @@ struct ravb_hw_info { > /* hardware features */ > unsigned internal_delay:1; /* AVB-DMAC has internal delays */ > unsigned tx_counters:1; /* E-MAC has TX counters */ > + unsigned multi_irqs:1; /* AVB-DMAC and E-MAC has multiple irqs */ It's generally written IRQs but we can live with that. :-) [...] > diff --git a/drivers/net/ethernet/renesas/ravb_ptp.c b/drivers/net/ethernet/renesas/ravb_ptp.c > index 6984bd5b7da9..c099656dd75b 100644 > --- a/drivers/net/ethernet/renesas/ravb_ptp.c > +++ b/drivers/net/ethernet/renesas/ravb_ptp.c [...] > @@ -252,7 +254,7 @@ static int ravb_ptp_perout(struct ptp_clock_info *ptp, > error = ravb_ptp_update_compare(priv, (u32)start_ns); > if (!error) { > /* Unmask interrupt */ > - if (priv->chip_id == RCAR_GEN2) > + if (!info->multi_irqs) > ravb_modify(ndev, GIC, GIC_PTME, GIC_PTME); > else > ravb_write(ndev, GIE_PTMS0, GIE); > @@ -264,7 +266,7 @@ static int ravb_ptp_perout(struct ptp_clock_info *ptp, > perout->period = 0; > > /* Mask interrupt */ > - if (priv->chip_id == RCAR_GEN2) > + if (!info->multi_irqs) > ravb_modify(ndev, GIC, GIC_PTME, 0); > else > ravb_write(ndev, GID_PTMD0, GID); Hm... Let's assume GIE/GID are a part of multi-IRQ feature... Reviewed-by: Sergey Shtylyov <s.shtylyov@xxxxxx> [...] MBR, Sergey