On 09/01/2016 11:15 PM, Jeremy Linton wrote:

The /proc/irq/xx information is incorrect for smsc911x because
the request_irq is happening before the register_netdev has the
proper device name. Moving it to the open also fixes the case
of when the device is renamed.

Reported-by: Will Deacon <will.dea...@arm.com>
Signed-off-by: Jeremy Linton <jeremy.lin...@arm.com>
---
 drivers/net/ethernet/smsc/smsc911x.c | 47 ++++++++++++++----------------------
 1 file changed, 18 insertions(+), 29 deletions(-)

diff --git a/drivers/net/ethernet/smsc/smsc911x.c 
b/drivers/net/ethernet/smsc/smsc911x.c
index c2e56f0..4f8910b 100644
--- a/drivers/net/ethernet/smsc/smsc911x.c
+++ b/drivers/net/ethernet/smsc/smsc911x.c
[...]
@@ -2480,38 +2491,18 @@ static int smsc911x_drv_probe(struct platform_device 
*pdev)
        if (retval < 0)
                goto out_disable_resources;

-       /* configure irq polarity and type before connecting isr */
-       if (pdata->config.irq_polarity == SMSC911X_IRQ_POLARITY_ACTIVE_HIGH)
-               intcfg |= INT_CFG_IRQ_POL_;
-
-       if (pdata->config.irq_type == SMSC911X_IRQ_TYPE_PUSH_PULL)
-               intcfg |= INT_CFG_IRQ_TYPE_;
-
-       smsc911x_reg_write(pdata, INT_CFG, intcfg);
-
-       /* Ensure interrupts are globally disabled before connecting ISR */
-       smsc911x_disable_irq_chip(dev);
-

   Hmm, I didn't see where this code got moved to...

-       retval = request_irq(dev->irq, smsc911x_irqhandler,
-                            irq_flags | IRQF_SHARED, dev->name, dev);
-       if (retval) {
-               SMSC_WARN(pdata, probe,
-                         "Unable to claim requested irq: %d", dev->irq);
-               goto out_disable_resources;
-       }
-
        netif_carrier_off(dev);


[...]

MBR, Sergei

Reply via email to