IB/hfi1: Remove lstate from hfi1_pportdata
Do not track logical state separately from host_link_state. Deduce logical state from host_link_state when required. Transitions in set_link_state and goto_offline already make sure host_link_state reflects hardware's logical state properly. Reviewed-by: Ira Weiny <ira.weiny@intel.com> Signed-off-by: Jakub Byczkowski <jakub.byczkowski@intel.com> Signed-off-by: Dennis Dalessandro <dennis.dalessandro@intel.com> Signed-off-by: Doug Ledford <dledford@redhat.com>
This commit is contained in:

zatwierdzone przez
Doug Ledford

rodzic
16570d3da0
commit
02a222c7f6
@@ -591,8 +591,6 @@ struct hfi1_pportdata {
|
||||
struct mutex hls_lock;
|
||||
u32 host_link_state;
|
||||
|
||||
u32 lstate; /* logical link state */
|
||||
|
||||
/* these are the "32 bit" regs */
|
||||
|
||||
u32 ibmtu; /* The MTU programmed for this unit */
|
||||
@@ -1296,21 +1294,6 @@ static inline __le32 *get_rhf_addr(struct hfi1_ctxtdata *rcd)
|
||||
|
||||
int hfi1_reset_device(int);
|
||||
|
||||
/* return the driver's idea of the logical OPA port state */
|
||||
static inline u32 driver_lstate(struct hfi1_pportdata *ppd)
|
||||
{
|
||||
/*
|
||||
* The driver does some processing from the time the logical
|
||||
* link state is at INIT to the time the SM can be notified
|
||||
* as such. Return IB_PORT_DOWN until the software state
|
||||
* is ready.
|
||||
*/
|
||||
if (ppd->lstate == IB_PORT_INIT && !(ppd->host_link_state & HLS_UP))
|
||||
return IB_PORT_DOWN;
|
||||
else
|
||||
return ppd->lstate;
|
||||
}
|
||||
|
||||
/* return the driver's idea of the physical OPA port state */
|
||||
static inline u32 driver_pstate(struct hfi1_pportdata *ppd)
|
||||
{
|
||||
|
Reference in New Issue
Block a user