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>
This commit is contained in:
Sarveshwar Bandi 2009-12-23 04:40:36 +00:00 committed by David S. Miller
parent 1242b6f31e
commit d7b9014182

View file

@ -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, be_cmd_hdr_prepare(&req->hdr, CMD_SUBSYSTEM_LOWLEVEL,
OPCODE_LOWLEVEL_LOOPBACK_TEST, sizeof(*req)); OPCODE_LOWLEVEL_LOOPBACK_TEST, sizeof(*req));
req->hdr.timeout = 4;
req->pattern = cpu_to_le64(pattern); req->pattern = cpu_to_le64(pattern);
req->src_port = cpu_to_le32(port_num); req->src_port = cpu_to_le32(port_num);