]> git.karo-electronics.de Git - karo-tx-linux.git/commit
atl1: fix oops when changing tx/rx ring params
authorJ. K. Cliburn <jcliburn@gmail.com>
Sat, 1 Jan 2011 05:02:12 +0000 (05:02 +0000)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 17 Feb 2011 22:46:37 +0000 (14:46 -0800)
commit4224f23c44f94e49eb0e01f38681c6a43112f93a
tree4516cd00b4e0e90e7a567b6fe3a976dc1a260a11
parentcdde102cd5271d9e3927667b2b1bee676b2ab125
atl1: fix oops when changing tx/rx ring params

commit 2f32c867219734b06abc980d4812f67b6d6fe517 upstream.

Commit 3f5a2a713aad28480d86b0add00c68484b54febc zeroes out the statistics
message block (SMB) and coalescing message block (CMB) when adapter ring
resources are freed.  This is desirable behavior, but, as a side effect,
the commit leads to an oops when atl1_set_ringparam() attempts to alter
the number of rx or tx elements in the ring buffer (by using ethtool
-G, for example).  We don't want SMB or CMB to change during this
operation.

Modify atl1_set_ringparam() to preserve SMB and CMB when changing ring
parameters.

Signed-off-by: Jay Cliburn <jcliburn@gmail.com>
Reported-by: Tõnu Raitviir <jussuf@linux.ee>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/net/atlx/atl1.c