Patchwork [1/2,net-next] cnic: set error flag when iSCSI connection fails

login
register
mail settings
Submitter Michael Chan
Date Feb. 9, 2012, 3:33 a.m.
Message ID <1328758437-18306-1-git-send-email-mchan@broadcom.com>
Download mbox | patch
Permalink /patch/140302/
State Accepted
Delegated to: David Miller
Headers show

Comments

Michael Chan - Feb. 9, 2012, 3:33 a.m.
From: Jeffrey Huang <huangjw@broadcom.com>

to speed up error recovery due to SPQ failures.  The error flag will
expedite the recovery process by skipping the timeouts.

Signed-off-by: Jeffrey Huang <huangjw@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
---
 drivers/net/ethernet/broadcom/cnic.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
David Miller - Feb. 9, 2012, 7:04 p.m.
From: "Michael Chan" <mchan@broadcom.com>
Date: Wed, 8 Feb 2012 19:33:56 -0800

> From: Jeffrey Huang <huangjw@broadcom.com>
> 
> to speed up error recovery due to SPQ failures.  The error flag will
> expedite the recovery process by skipping the timeouts.
> 
> Signed-off-by: Jeffrey Huang <huangjw@broadcom.com>
> Signed-off-by: Michael Chan <mchan@broadcom.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

Patch

diff --git a/drivers/net/ethernet/broadcom/cnic.c b/drivers/net/ethernet/broadcom/cnic.c
index 7381460..e236560 100644
--- a/drivers/net/ethernet/broadcom/cnic.c
+++ b/drivers/net/ethernet/broadcom/cnic.c
@@ -3927,6 +3927,8 @@  static void cnic_cm_process_kcqe(struct cnic_dev *dev, struct kcqe *kcqe)
 	case L4_KCQE_OPCODE_VALUE_CONNECT_COMPLETE:
 		if (l4kcqe->status == 0)
 			set_bit(SK_F_OFFLD_COMPLETE, &csk->flags);
+		else if (l4kcqe->status == L4_KCQE_COMPLETION_STATUS_NIC_ERROR)
+			set_bit(SK_F_HW_ERR, &csk->flags);
 
 		smp_mb__before_clear_bit();
 		clear_bit(SK_F_OFFLD_SCHED, &csk->flags);