RE: [PATCH net-next v9 2/2] net: ethernet: Add driver for Sunplus SP7021

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Francois,


> [...]
> > I will add disable_irq() and enable_irq() for spl2sw_rx_poll() and spl2sw_tx_poll()
> as shown below:
> >
> > spl2sw_rx_poll():
> >
> > 	wmb();	/* make sure settings are effective. */
> > 	disable_irq(comm->irq);
> > 	mask = readl(comm->l2sw_reg_base + L2SW_SW_INT_MASK_0);
> > 	mask &= ~MAC_INT_RX;
> > 	writel(mask, comm->l2sw_reg_base + L2SW_SW_INT_MASK_0);
> > 	enable_irq(comm->irq);
> >
> > spl2sw_tx_poll():
> >
> > 	wmb();			/* make sure settings are effective. */
> > 	disable_irq(comm->irq);
> > 	mask = readl(comm->l2sw_reg_base + L2SW_SW_INT_MASK_0);
> > 	mask &= ~MAC_INT_TX;
> > 	writel(mask, comm->l2sw_reg_base + L2SW_SW_INT_MASK_0);
> > 	enable_irq(comm->irq);
> >
> >
> > Is the modification ok?
> 
> disable_irq prevents future irq processing but it does not help against irq code currently
> running on a different cpu.
> 
> You may use plain spin_{lock / unlock} in IRQ context and spin_{loq_irqsave / irq_restore}
> in NAPI context.
> 
> --
> Ueimor

Thank you for teaching me how to fix the issue.
I'll add them next patch.


Best regards,
Wells




[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux