Re: [PATCH 1/1] net: fec: fix miss init spinlock
From: Jim Baxter <hidden>
Date: 2013-02-21 17:59:42
Fabio Estevam <festevam <at> gmail.com> writes:
On Thu, Feb 21, 2013 at 2:07 PM, Jim Baxter <jim_baxter <at> mentor.com> wrote:quoted
Is the general issue in this driver that the fec_probe function: request_irq(irq, fec_enet_interrupt, IRQF_DISABLED, pdev->name, ndev); is called before fec_ptp_init() and fec_enet_init() have been called so that there is a chance the fec_enet_interrupt can occur before the hardware and
data
quoted
structures are fully setup?The scenario you described is fixed by the patch that Frank proposed at: http://patchwork.ozlabs.org/patch/222164/
That is a good patch that will stop interrupts occurring before request_irq is called. What about the problem of fec_enet_interrupt calling fec_ptp_start_cyclecounter before fec_ptp_init has been called? Should fec_enet_init and fec_ptp_init be setup before the request_irq is called?