]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commit
[PATCH] corruption during e100 MDI register access
authorODonnell, Michael <Michael.ODonnell@stratus.com>
Wed, 11 Jan 2006 19:26:22 +0000 (11:26 -0800)
committerJeff Garzik <jgarzik@pobox.com>
Thu, 12 Jan 2006 21:31:51 +0000 (16:31 -0500)
commitac7c66698a2c51e4c6a34b84621c79e7cb89e07d
treee128ebef78d7250fe7351580d7d44646faab9de5
parentbf785ee0aeea7a3e717cb1e11df4135b6cbde7da
[PATCH] corruption during e100 MDI register access

We have identified two related bugs in the e100 driver.

Both bugs are related to manipulation of the MDI control register.

The first problem is that the Ready bit is being ignored when writing to
the Control register; we noticed this because the Linux bonding driver
would occasionally come to the spurious conclusion that the link was down
when querying Link State.  It turned out that by failing to wait for a
previous command to complete it was selecting what was essentially a random
register in the MDI register set.  When we added code that waits for the
Ready bit (as shown in the patch file below) all such problems ceased.

The second problem is that, although access to the MDI registers involves
multiple steps which must not be intermixed, nothing was defending against
two or more threads attempting simultaneous access.  The most obvious
situation where such interference could occur involves the watchdog versus
ioctl paths, but there are probably others, so we recommend the locking
shown in our patch file.

Signed-off-by: Michael O'Donnell <Michael.ODonnell@stratus.com>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Jeff Garzik <jgarzik@pobox.com>
Cc: John Ronciak <john.ronciak@intel.com>
Cc: Ganesh Venkatesan <ganesh.venkatesan@intel.com>
Cc: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
drivers/net/e100.c