]> git.baikalelectronics.ru Git - kernel.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)
committerDavid S. Miller <davem@davemloft.net>
Mon, 3 Jan 2011 19:04:49 +0000 (11:04 -0800)
commit5a4a0dbd35480da02273b46526e07635f2ef5a14
treebada002a03498e5204c2706de19f635d9432bb2e
parent2dbec9e35a8baa04e3bf28f1c201c95f6b3ea769
atl1: fix oops when changing tx/rx ring params

Commit 0e2954e1884d1d5a9e9540576a5f20b594a573b5 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.

Cc: stable@kernel.org
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>
drivers/net/atlx/atl1.c