summaryrefslogtreecommitdiffstats
path: root/drivers/net/sfc/selftest.c
diff options
context:
space:
mode:
authorBen Hutchings <bhutchings@solarflare.com>2008-12-13 06:59:24 +0100
committerDavid S. Miller <davem@davemloft.net>2008-12-13 06:59:24 +0100
commit766ca0fa6bf1600bdf4bc7726c74f14c8455c6b8 (patch)
treeb1ea2df622753f2493b1053fda21c0db3f18a043 /drivers/net/sfc/selftest.c
parentsfc: Implement auto-negotiation (diff)
downloadlinux-766ca0fa6bf1600bdf4bc7726c74f14c8455c6b8.tar.xz
linux-766ca0fa6bf1600bdf4bc7726c74f14c8455c6b8.zip
sfc: Rework MAC, PHY and board event handling
From: Steve Hodgson <shodgson@solarflare.com> MAC, PHY and board events may be separately enabled and signalled. Our current arrangement of chaining the polling functions can result in events being missed. Change them to be more independent. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/sfc/selftest.c')
-rw-r--r--drivers/net/sfc/selftest.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/net/sfc/selftest.c b/drivers/net/sfc/selftest.c
index 8142e37a518f..578b7f410ed4 100644
--- a/drivers/net/sfc/selftest.c
+++ b/drivers/net/sfc/selftest.c
@@ -594,12 +594,14 @@ static int efx_test_loopbacks(struct efx_nic *efx, struct ethtool_cmd ecmd,
efx->loopback_mode = mode;
efx_reconfigure_port(efx);
- /* Wait for the PHY to signal the link is up */
+ /* Wait for the PHY to signal the link is up. Interrupts
+ * are enabled for PHY's using LASI, otherwise we poll()
+ * quickly */
count = 0;
do {
struct efx_channel *channel = &efx->channel[0];
- efx->mac_op->check_hw(efx);
+ efx->phy_op->poll(efx);
schedule_timeout_uninterruptible(HZ / 10);
if (channel->work_pending)
efx_process_channel_now(channel);