Skip to content

Commit

Permalink
IB/ipath: Remove redundant link state checks
Browse files Browse the repository at this point in the history
This patch removes some redundant checks when the SMA changes the link
state since the same checks are made in the lower level function that
sets the state.

Signed-off-by: Ralph Campbell <ralph.campbell@qlogic.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
  • Loading branch information
Ralph Campbell authored and Roland Dreier committed Oct 10, 2007
1 parent 49739b3 commit bda94e3
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions drivers/infiniband/hw/ipath/ipath_mad.c
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,6 @@ static int recv_subn_set_portinfo(struct ib_smp *smp,
struct ib_event event;
struct ipath_ibdev *dev;
struct ipath_devdata *dd;
u32 flags;
char clientrereg = 0;
u16 lid, smlid;
u8 lwe;
Expand Down Expand Up @@ -541,7 +540,6 @@ static int recv_subn_set_portinfo(struct ib_smp *smp,
* is down or is being set to down.
*/
state = pip->linkspeed_portstate & 0xF;
flags = dd->ipath_flags;
lstate = (pip->portphysstate_linkdown >> 4) & 0xF;
if (lstate && !(state == IB_PORT_DOWN || state == IB_PORT_NOP))
goto err;
Expand Down Expand Up @@ -572,13 +570,9 @@ static int recv_subn_set_portinfo(struct ib_smp *smp,
ipath_set_linkstate(dd, lstate);
break;
case IB_PORT_ARMED:
if (!(flags & (IPATH_LINKINIT | IPATH_LINKACTIVE)))
break;
ipath_set_linkstate(dd, IPATH_IB_LINKARM);
break;
case IB_PORT_ACTIVE:
if (!(flags & IPATH_LINKARMED))
break;
ipath_set_linkstate(dd, IPATH_IB_LINKACTIVE);
break;
default:
Expand Down

0 comments on commit bda94e3

Please sign in to comment.