]> git.baikalelectronics.ru Git - kernel.git/commit
net: bcmgenet: Fix early link interrupt enabling
authorFlorian Fainelli <f.fainelli@gmail.com>
Sat, 17 Oct 2015 21:22:46 +0000 (14:22 -0700)
committerDavid S. Miller <davem@davemloft.net>
Mon, 19 Oct 2015 06:07:12 +0000 (23:07 -0700)
commit82db83717991a85c5737caa5774bec27f6f7f5ec
tree6ad2868a2f479da816ce19eb8666e0456ad70c5d
parent578395face747950ab424f5fb1adb5a9b0f0febe
net: bcmgenet: Fix early link interrupt enabling

Link interrupts are enabled in init_umac(), which is too early for us to
process them since we do not yet have a valid PHY device pointer. On
BCM7425 chips for instance, we will crash calling phy_mac_interrupt()
because phydev is NULL.

Fix this by moving the link interrupts enabling in
bcmgenet_netif_start(), under a specific function:
bcmgenet_link_intr_enable() and while at it, update the comments
surrounding the code.

Fixes: bcd97aaef739d ("net: bcmgenet: Delay PHY initialization to bcmgenet_open()")
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/broadcom/genet/bcmgenet.c