From: Sarveshwar Bandi Date: Wed, 23 Dec 2009 04:40:36 +0000 (+0000) Subject: be2net: Bug fix to avoid soft lockup in loopback test. X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=d7b901418250f00eaaa18f9135d09ba61b72a5bc;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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 Signed-off-by: David S. Miller --- diff --git a/drivers/net/benet/be_cmds.c b/drivers/net/benet/be_cmds.c index 1b68bd98dc0c..a27fdb35eebf 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);