summaryrefslogtreecommitdiff
path: root/drivers/scsi/qedf/qedf_fip.c
diff options
context:
space:
mode:
authorSaurav Kashyap <skashyap@marvell.com>2019-03-26 00:38:42 -0700
committerMartin K. Petersen <martin.petersen@oracle.com>2019-03-27 21:54:52 -0400
commit76dbf4ff068c730bf6927193a481b692e87f9f3e (patch)
tree35e6fd89bc69b3b1ab00bef2e492044e0f9310f8 /drivers/scsi/qedf/qedf_fip.c
parent0cbd0075390db67324cfd33a50fa4998b605a085 (diff)
scsi: qedf: Check for link state before processing LL2 packets and send fipvlan retries
- Check if link is UP before sending and processing any packets on wire. Signed-off-by: Saurav Kashyap <skashyap@marvell.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/qedf/qedf_fip.c')
-rw-r--r--drivers/scsi/qedf/qedf_fip.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/scsi/qedf/qedf_fip.c b/drivers/scsi/qedf/qedf_fip.c
index 3fd3af799b3d..e669679e6a3b 100644
--- a/drivers/scsi/qedf/qedf_fip.c
+++ b/drivers/scsi/qedf/qedf_fip.c
@@ -95,6 +95,12 @@ static void qedf_fcoe_process_vlan_resp(struct qedf_ctx *qedf,
rlen -= dlen;
}
+ if (atomic_read(&qedf->link_state) == QEDF_LINK_DOWN) {
+ QEDF_INFO(&qedf->dbg_ctx, QEDF_LOG_DISC,
+ "Dropping VLAN response as link is down.\n");
+ return;
+ }
+
QEDF_INFO(&(qedf->dbg_ctx), QEDF_LOG_DISC, "VLAN response, "
"vid=0x%x.\n", vid);