cnic: set error flag when iSCSI connection fails
authorJeffrey Huang <huangjw@broadcom.com>
Wed, 8 Feb 2012 17:33:56 +0000 (17:33 +0000)
committerDavid S. Miller <davem@davemloft.net>
Thu, 9 Feb 2012 19:03:50 +0000 (14:03 -0500)
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>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/broadcom/cnic.c

index 7381460142e6b9f77565b7d9cefc197efdc6d280..e2365609a0be025943798c01dff12a83275d0c69 100644 (file)
@@ -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);