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)
committerBen Hutchings <ben@decadent.org.uk>
Fri, 11 May 2012 12:14:23 +0000 (13:14 +0100)
commit71335bb4ceec1191b26eeb068a3877918cb066d6
treefdbabb8991b0bf287d61fa48bedc875540a6ed1f
parent2f69fc5ed7e603d90aeb088fe5989701a903f14b
8139cp: set intr mask after its handler is registered

[ Upstream commit a8c9cb106fe79c28d6b7f1397652cadd228715ff ]

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>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
drivers/net/ethernet/realtek/8139cp.c