8139cp: set intr mask after its handler is registered
authorJason Wang <jasowang@redhat.com>
Wed, 11 Apr 2012 22:10:54 +0000 (22:10 +0000)
committerDavid S. Miller <davem@davemloft.net>
Fri, 13 Apr 2012 17:41:52 +0000 (13:41 -0400)
commita8c9cb106fe79c28d6b7f1397652cadd228715ff
tree9e6e765d0b579bd84e680b544ad57ce15455e421
parent03662e41c7cff64a776bfb1b3816de4be43de881
8139cp: set intr mask after its handler is registered

We set intr mask before its handler is registered, this does not work well when
8139cp is sharing irq line with other devices. As the irq could be enabled by
the device before 8139cp's hander is registered which may lead unhandled
irq. Fix this by introducing an helper cp_irq_enable() and call it after
request_irq().

Signed-off-by: Jason Wang <jasowang@redhat.com>
Reviewed-by: Flavio Leitner <fbl@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/realtek/8139cp.c