diff options
author | Chad Dupuis | 2018-04-25 06:08:55 -0700 |
---|---|---|
committer | Martin K. Petersen | 2018-05-08 00:57:10 -0400 |
commit | 3f9de7f0413df53efa47e1571433f0c951d26e46 (patch) | |
tree | 160befcf251838e2e6fa4627b9e8730d90035c6c /drivers/scsi/qedf | |
parent | a8f192bce17430106157100746699bfabbd6e892 (diff) |
scsi: qedf: Check if link is already up when receiving a link up event from qed
[mkp: typo]
Signed-off-by: Chad Dupuis <chad.dupuis@cavium.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/qedf')
-rw-r--r-- | drivers/scsi/qedf/qedf_main.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/scsi/qedf/qedf_main.c b/drivers/scsi/qedf/qedf_main.c index 28f37113bc9b..c3fbab059599 100644 --- a/drivers/scsi/qedf/qedf_main.c +++ b/drivers/scsi/qedf/qedf_main.c @@ -485,6 +485,11 @@ static void qedf_link_update(void *dev, struct qed_link_output *link) struct qedf_ctx *qedf = (struct qedf_ctx *)dev; if (link->link_up) { + if (atomic_read(&qedf->link_state) == QEDF_LINK_UP) { + QEDF_INFO((&qedf->dbg_ctx), QEDF_LOG_DISC, + "Ignoring link up event as link is already up.\n"); + return; + } QEDF_ERR(&(qedf->dbg_ctx), "LINK UP (%d GB/s).\n", link->speed / 1000); |