diff mbox

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

Message ID 20091223144026.GA23383@serverengines.com
State Accepted, archived
Delegated to: David Miller
Headers show

Commit Message

Sarveshwar Bandi Dec. 23, 2009, 2:40 p.m. UTC
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(-)

Comments

David Miller Dec. 24, 2009, 4:58 a.m. UTC | #1
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. UTC | #2
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. UTC | #3
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
diff mbox

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