]> bbs.cooldavid.org Git - net-next-2.6.git/commitdiff
be2net: Bug fix to avoid soft lockup in loopback test.
authorSarveshwar Bandi <sarveshwarb@serverengines.com>
Wed, 23 Dec 2009 04:40:36 +0000 (04:40 +0000)
committerDavid S. Miller <davem@davemloft.net>
Thu, 24 Dec 2009 04:58:13 +0000 (20:58 -0800)
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>
drivers/net/benet/be_cmds.c

index 1b68bd98dc0c1955dfc6c33b5bb00875835a6b06..a27fdb35eebf1357546d2d5d5ee230dc3a28694d 100644 (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,
                        OPCODE_LOWLEVEL_LOOPBACK_TEST, sizeof(*req));
+       req->hdr.timeout = 4;
 
        req->pattern = cpu_to_le64(pattern);
        req->src_port = cpu_to_le32(port_num);