Commit 96603ed8 authored by Jan Sokolowski's avatar Jan Sokolowski Committed by Doug Ledford

IB/hfi1: Do not enable disabled port on cable insert

Fix issue where a disabled port can be enabled by
inserting a cable. The port should be explicitly
enabled instead.
Reviewed-by: default avatarMichael J. Ruhl <michael.j.ruhl@intel.com>
Reviewed-by: default avatarJakub Byczkowski <jakub.byczkowski@intel.com>
Signed-off-by: default avatarJan Sokolowski <jan.sokolowski@intel.com>
Signed-off-by: default avatarDennis Dalessandro <dennis.dalessandro@intel.com>
Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
parent 5efd40ca
...@@ -9306,12 +9306,6 @@ int start_link(struct hfi1_pportdata *ppd) ...@@ -9306,12 +9306,6 @@ int start_link(struct hfi1_pportdata *ppd)
*/ */
tune_serdes(ppd); tune_serdes(ppd);
if (!ppd->link_enabled) {
dd_dev_info(ppd->dd,
"%s: stopping link start because link is disabled\n",
__func__);
return 0;
}
if (!ppd->driver_link_ready) { if (!ppd->driver_link_ready) {
dd_dev_info(ppd->dd, dd_dev_info(ppd->dd,
"%s: stopping link start because driver is not ready\n", "%s: stopping link start because driver is not ready\n",
...@@ -9529,6 +9523,13 @@ void qsfp_event(struct work_struct *work) ...@@ -9529,6 +9523,13 @@ void qsfp_event(struct work_struct *work)
if (!qsfp_mod_present(ppd)) if (!qsfp_mod_present(ppd))
return; return;
if (ppd->host_link_state == HLS_DN_DISABLE) {
dd_dev_info(ppd->dd,
"%s: stopping link start because link is disabled\n",
__func__);
return;
}
/* /*
* Turn DC back on after cable has been re-inserted. Up until * Turn DC back on after cable has been re-inserted. Up until
* now, the DC has been in reset to save power. * now, the DC has been in reset to save power.
......
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