提交 64a296f5 编写于 作者: B Bartlomiej Dudek 提交者: Doug Ledford

IB/hfi1: Use host_link_state to read state when DC is shut down

When DC is shut down (by e.g.  disconnecting the cable), the
driver should use host_link_state to get port's current
physical state. This is due to the fact that physical state
is read from DC's CSRs and when DC is shut down and state is
changed, its registers are not impacted.
Reviewed-by: NJakub Byczkowski <jakub.byczkowski@intel.com>
Signed-off-by: NBartlomiej Dudek <bartlomiej.dudek@intel.com>
Signed-off-by: NDennis Dalessandro <dennis.dalessandro@intel.com>
Signed-off-by: NDoug Ledford <dledford@redhat.com>
上级 02a222c7
......@@ -1297,6 +1297,13 @@ int hfi1_reset_device(int);
/* return the driver's idea of the physical OPA port state */
static inline u32 driver_pstate(struct hfi1_pportdata *ppd)
{
/*
* When DC is shut down and state is changed, its CSRs are not
* impacted, therefore host_link_state should be used to get
* current physical state.
*/
if (ppd->dd->dc_shutdown)
return driver_physical_state(ppd);
/*
* The driver does some processing from the time the physical
* link state is at LINKUP to the time the SM can be notified
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册