]> git.baikalelectronics.ru Git - kernel.git/commit
via-velocity: Give RX descriptors to the NIC later on open or MTU change
authorBen Hutchings <ben@decadent.org.uk>
Mon, 14 Dec 2009 16:05:09 +0000 (16:05 +0000)
committerDavid S. Miller <davem@davemloft.net>
Mon, 4 Jan 2010 05:18:40 +0000 (21:18 -0800)
commit1ed3f23931eb87dd1eb918bd32f787836c30457d
treebc8c8182bfba02caaf3f571e22dfc5581f2d0aa8
parent87a0fc941d1f2aabb4c8388e053a93a36f226646
via-velocity: Give RX descriptors to the NIC later on open or MTU change

velocity_open() calls velocity_give_many_rx_descs(), which gives RX
descriptors to the NIC, before installing an interrupt handler or
calling velocity_init_registers().  I think this is very unsafe and it
appears to explain the bug report <http://bugs.debian.org/508527>.

On MTU change, velocity_give_many_rx_descs() is again called before
velocity_init_registers().  I'm not sure whether this is unsafe but
it does look wrong.

Therefore, move the calls to velocity_give_many_rx_descs() after
request_irq() and velocity_init_registers().

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Tested-by: Jan Ceuleers <jan.ceuleers@computer.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/via-velocity.c