Patchwork [net-2.6,1/3] be2net: Bug fix to avoid soft lockup in loopback test.

login
register
mail settings
Submitter Sarveshwar Bandi
Date Dec. 23, 2009, 2:40 p.m.
Message ID <20091223144026.GA23383@serverengines.com>
Download mbox | patch
Permalink /patch/41670/
State Accepted
Delegated to: David Miller
Headers show

Comments

Sarveshwar Bandi - Dec. 23, 2009, 2:40 p.m.
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>
---
 drivers/net/benet/be_cmds.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
David Miller - Dec. 24, 2009, 4:58 a.m.
From: Sarveshwar Bandi <sarveshwarb@serverengines.com>
Date: Wed, 23 Dec 2009 20:10:36 +0530

> 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>

Applied.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Jan Ceuleers - Dec. 24, 2009, 1:28 p.m.
Sarveshwar Bandi wrote:
> 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.

I don't understand the 2nd sentence, did you mean to say that this could happen if the ports are *not* connected properly in loopback mode?

Thanks, Jan
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Jan Ceuleers - Dec. 24, 2009, 5:42 p.m.
Sarveshwar bandi wrote:
> Yes. thats what i meant.
> 
> - Sarvesh

OK, thanks for clarifying.

Jan
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch

diff --git a/drivers/net/benet/be_cmds.c b/drivers/net/benet/be_cmds.c
index 1b68bd9..a27fdb3 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_adapt
 
 	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);