sky2: Avoid down and up during sky2_reset
authorMike McCormack <mikem@ring3k.org>
Fri, 12 Feb 2010 06:58:06 +0000 (06:58 +0000)
committerDavid S. Miller <davem@davemloft.net>
Sat, 13 Feb 2010 00:21:04 +0000 (16:21 -0800)
commit8a0c9228f110218f443d9ef8f9ab629251959733
tree2aee6ed0512901e8a060d91bffdb10faa53e1765
parentf2b31cb3ae491f9e82443cf25cc5a9ebdbc63619
sky2: Avoid down and up during sky2_reset

Rewrite sky2_reset to work with interrupts disabled and
 avoid freeing and reallocing memory.

The old code used sky2_down and sky2_up to implement sky2_reset,
 which meant interrupts could not be disabled, and the transmit and
 receive ring buffers would be free'd and reallocated.

To avoid the interrupt handler waking the transmit queue while
 we're doing a reset, it's better to have interrupts and NAPI
 polls disabled.

Note: Modified Mike's patch to do IRQ disable in sky2_down before
 calling sky2_hw_down - Stephen

Signed-off-by: Mike McCormack <mikem@ring3k.org>
Acked-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/sky2.c