OSDN Git Service

net: bgmac: Mask interrupts during probe
authorFlorian Fainelli <f.fainelli@gmail.com>
Tue, 27 Mar 2018 23:20:02 +0000 (16:20 -0700)
committerDavid S. Miller <davem@davemloft.net>
Thu, 29 Mar 2018 16:06:10 +0000 (12:06 -0400)
We can have interrupts left enabled form e.g: the bootloader which used
the network device for network boot. Make sure we have those disabled as
early as possible to avoid spurious interrupts.

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/broadcom/bgmac.c

index 46d7b80..2326cc2 100644 (file)
@@ -1492,6 +1492,8 @@ int bgmac_enet_probe(struct bgmac *bgmac)
        struct net_device *net_dev = bgmac->net_dev;
        int err;
 
+       bgmac_chip_intrs_off(bgmac);
+
        net_dev->irq = bgmac->irq;
        SET_NETDEV_DEV(net_dev, bgmac->dev);
        dev_set_drvdata(bgmac->dev, bgmac);