summaryrefslogtreecommitdiffstats
path: root/drivers/net/benet/be_cmds.c
diff options
context:
space:
mode:
authorSarveshwar Bandi <sarveshwarb@serverengines.com>2009-12-23 04:40:36 +0000
committerDavid S. Miller <davem@davemloft.net>2009-12-23 20:58:13 -0800
commitd7b901418250f00eaaa18f9135d09ba61b72a5bc (patch)
tree71d3feac4abb7894f04f83a727e505b317493221 /drivers/net/benet/be_cmds.c
parent1242b6f31e1d0688f1eb1dc78036dbd975bd6140 (diff)
be2net: Bug fix to avoid soft lockup in loopback test.
This change ensures that loopback test command gives up after 4 seconds when the hardware is not responsive. This could happen if the ports are connected properly in loopback mode. Signed-off-by: Sarveshwar Bandi <sarveshwarb@serverengines.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/benet/be_cmds.c')
-rw-r--r--drivers/net/benet/be_cmds.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/benet/be_cmds.c b/drivers/net/benet/be_cmds.c
index 1b68bd98dc0..a27fdb35eeb 100644
--- a/drivers/net/benet/be_cmds.c
+++ b/drivers/net/benet/be_cmds.c
@@ -1501,6 +1501,7 @@ int be_cmd_loopback_test(struct be_adapter *adapter, u32 port_num,
be_cmd_hdr_prepare(&req->hdr, CMD_SUBSYSTEM_LOWLEVEL,
OPCODE_LOWLEVEL_LOOPBACK_TEST, sizeof(*req));
+ req->hdr.timeout = 4;
req->pattern = cpu_to_le64(pattern);
req->src_port = cpu_to_le32(port_num);