Commit 3f9de7f0 authored by Chad Dupuis's avatar Chad Dupuis Committed by Martin K. Petersen

scsi: qedf: Check if link is already up when receiving a link up event from qed

[mkp: typo]
Signed-off-by: default avatarChad Dupuis <chad.dupuis@cavium.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent a8f192bc
...@@ -485,6 +485,11 @@ static void qedf_link_update(void *dev, struct qed_link_output *link) ...@@ -485,6 +485,11 @@ static void qedf_link_update(void *dev, struct qed_link_output *link)
struct qedf_ctx *qedf = (struct qedf_ctx *)dev; struct qedf_ctx *qedf = (struct qedf_ctx *)dev;
if (link->link_up) { 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", QEDF_ERR(&(qedf->dbg_ctx), "LINK UP (%d GB/s).\n",
link->speed / 1000); link->speed / 1000);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment