Commit 623bba2d authored by Easwar Hariharan's avatar Easwar Hariharan Committed by Doug Ledford

IB/hfi1: Remove module presence check outside pre-LNI checks

The pre-LNI SerDes and channel tuning algorithm already checks for
module presence assertion for the relevant port types. The extraneous
check removed in this patch blocks link up for port types for which
the module presence assertion is not relevant.
Reviewed-by: default avatarDean Luick <dean.luick@intel.com>
Signed-off-by: default avatarEaswar Hariharan <easwar.hariharan@intel.com>
Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
parent 145dd2b3
......@@ -6849,7 +6849,7 @@ void handle_link_down(struct work_struct *work)
* If there is no cable attached, turn the DC off. Otherwise,
* start the link bring up.
*/
if (!qsfp_mod_present(ppd)) {
if (ppd->port_type == PORT_TYPE_QSFP && !qsfp_mod_present(ppd)) {
dc_shutdown(ppd->dd);
} else {
tune_serdes(ppd);
......@@ -9008,9 +9008,9 @@ static int set_local_link_attributes(struct hfi1_pportdata *ppd)
}
/*
* Call this to start the link. Schedule a retry if the cable is not
* present or if unable to start polling. Do not do anything if the
* link is disabled. Returns 0 if link is disabled or moved to polling
* Call this to start the link.
* Do not do anything if the link is disabled.
* Returns 0 if link is disabled, moved to polling, or the driver is not ready.
*/
int start_link(struct hfi1_pportdata *ppd)
{
......@@ -9027,15 +9027,7 @@ int start_link(struct hfi1_pportdata *ppd)
return 0;
}
if (qsfp_mod_present(ppd) || loopback == LOOPBACK_SERDES ||
loopback == LOOPBACK_LCB ||
ppd->dd->icode == ICODE_FUNCTIONAL_SIMULATOR)
return set_link_state(ppd, HLS_DN_POLL);
dd_dev_info(ppd->dd,
"%s: stopping link start because no cable is present\n",
__func__);
return -EAGAIN;
return set_link_state(ppd, HLS_DN_POLL);
}
static void wait_for_qsfp_init(struct hfi1_pportdata *ppd)
......@@ -9206,7 +9198,7 @@ static int handle_qsfp_error_conditions(struct hfi1_pportdata *ppd,
return 0;
}
/* This routine will only be scheduled if the QSFP module is present */
/* This routine will only be scheduled if the QSFP module present is asserted */
void qsfp_event(struct work_struct *work)
{
struct qsfp_data *qd;
......
......@@ -838,9 +838,11 @@ void tune_serdes(struct hfi1_pportdata *ppd)
total_atten = platform_atten + remote_atten;
tuning_method = OPA_PASSIVE_TUNING;
} else
} else {
ppd->offline_disabled_reason =
HFI1_ODR_MASK(OPA_LINKDOWN_REASON_CHASSIS_CONFIG);
goto bail;
}
break;
case PORT_TYPE_QSFP:
if (qsfp_mod_present(ppd)) {
......@@ -869,10 +871,12 @@ void tune_serdes(struct hfi1_pportdata *ppd)
__func__);
goto bail;
}
} else
} else {
ppd->offline_disabled_reason =
HFI1_ODR_MASK(
OPA_LINKDOWN_REASON_LOCAL_MEDIA_NOT_INSTALLED);
goto bail;
}
break;
default:
dd_dev_info(ppd->dd, "%s: Unknown port type\n", __func__);
......
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