]> git.baikalelectronics.ru Git - kernel.git/commit
tg3: Fix loopback tests
authorMatt Carlson <mcarlson@broadcom.com>
Tue, 25 Jan 2011 15:58:52 +0000 (15:58 +0000)
committerDavid S. Miller <davem@davemloft.net>
Wed, 26 Jan 2011 03:38:18 +0000 (19:38 -0800)
commit0e217bbc46f694c32266a55fcbf49f95d21b0a2a
tree369ecfec808cd59aae198ada75837f5c0baea1af
parent9c92d72b28df993f39ea042187ebb488bf8a903e
tg3: Fix loopback tests

The half-duplex bit in the MAC MODE register will be set during the
loopback test if the external link is in half-duplex mode.  This will
cause the loopback test to fail on newer devices.  This patch turns the
half-duplex bit off for the test.

Also, newer devices fail the internal phy loopback test because the phy
link takes a little while to come up.  This patch adds code to wait for
the link before proceeding with the test.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/tg3.c