From: Bhanu Prakash Gollapudi Date: Tue, 24 Jan 2012 02:00:47 +0000 (-0800) Subject: bnx2fc: Handle LOGO flooding from the target X-Git-Tag: v2.6.39-400.9.0~423^2~19^2~11^2~413 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=5d24dc28d0a45cb160d0d62ee5176b56e9de2c1b;p=users%2Fjedix%2Flinux-maple.git bnx2fc: Handle LOGO flooding from the target Host drops sessions when flood of unsolicited LOGOs are received from the target. Because of unsufficient PLOGI retries, upon exceeding the retry count of 3, the target sessions are dropped. Increased the retry count to 255 to allow sufficient retries in this scenario. Signed-off-by: Bhanu Prakash Gollapudi Signed-off-by: James Bottomley (cherry picked from commit 44c570b5b09d1d1cc3167834f89f754f1bc5ac14) Signed-off-by: Joe Jin --- diff --git a/drivers/scsi/bnx2fc/bnx2fc.h b/drivers/scsi/bnx2fc/bnx2fc.h index 20dc441c47d1..3dfd1f9cbdf5 100644 --- a/drivers/scsi/bnx2fc/bnx2fc.h +++ b/drivers/scsi/bnx2fc/bnx2fc.h @@ -114,6 +114,8 @@ #define BNX2FC_HASH_TBL_CHUNK_SIZE (16 * 1024) #define BNX2FC_MAX_SEQS 255 +#define BNX2FC_MAX_RETRY_CNT 3 +#define BNX2FC_MAX_RPORT_RETRY_CNT 255 #define BNX2FC_READ (1 << 1) #define BNX2FC_WRITE (1 << 0) diff --git a/drivers/scsi/bnx2fc/bnx2fc_fcoe.c b/drivers/scsi/bnx2fc/bnx2fc_fcoe.c index 6e38f63b5124..1b4f230f6ec2 100644 --- a/drivers/scsi/bnx2fc/bnx2fc_fcoe.c +++ b/drivers/scsi/bnx2fc/bnx2fc_fcoe.c @@ -954,8 +954,8 @@ static int bnx2fc_lport_config(struct fc_lport *lport) { lport->link_up = 0; lport->qfull = 0; - lport->max_retry_count = 3; - lport->max_rport_retry_count = 3; + lport->max_retry_count = BNX2FC_MAX_RETRY_CNT; + lport->max_rport_retry_count = BNX2FC_MAX_RPORT_RETRY_CNT; lport->e_d_tov = 2 * 1000; lport->r_a_tov = 10 * 1000;