diff options
author | Ralph Campbell <ralph.campbell@qlogic.com> | 2007-10-05 19:03:21 -0400 |
---|---|---|
committer | Roland Dreier <rolandd@cisco.com> | 2007-10-10 00:02:08 -0400 |
commit | bda94e32b39c0e60d43b34a175363601b6f12ca4 (patch) | |
tree | 449de15b91f5188d498a2e5174b90af45e179b77 /drivers/infiniband | |
parent | 49739b3e24a10d819d3167a1c5b319d0b1186245 (diff) |
IB/ipath: Remove redundant link state checks
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>
Diffstat (limited to 'drivers/infiniband')
-rw-r--r-- | drivers/infiniband/hw/ipath/ipath_mad.c | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/drivers/infiniband/hw/ipath/ipath_mad.c b/drivers/infiniband/hw/ipath/ipath_mad.c index 0ae3a7c3f86..3d1432d1e3f 100644 --- a/drivers/infiniband/hw/ipath/ipath_mad.c +++ b/drivers/infiniband/hw/ipath/ipath_mad.c | |||
@@ -402,7 +402,6 @@ static int recv_subn_set_portinfo(struct ib_smp *smp, | |||
402 | struct ib_event event; | 402 | struct ib_event event; |
403 | struct ipath_ibdev *dev; | 403 | struct ipath_ibdev *dev; |
404 | struct ipath_devdata *dd; | 404 | struct ipath_devdata *dd; |
405 | u32 flags; | ||
406 | char clientrereg = 0; | 405 | char clientrereg = 0; |
407 | u16 lid, smlid; | 406 | u16 lid, smlid; |
408 | u8 lwe; | 407 | u8 lwe; |
@@ -541,7 +540,6 @@ static int recv_subn_set_portinfo(struct ib_smp *smp, | |||
541 | * is down or is being set to down. | 540 | * is down or is being set to down. |
542 | */ | 541 | */ |
543 | state = pip->linkspeed_portstate & 0xF; | 542 | state = pip->linkspeed_portstate & 0xF; |
544 | flags = dd->ipath_flags; | ||
545 | lstate = (pip->portphysstate_linkdown >> 4) & 0xF; | 543 | lstate = (pip->portphysstate_linkdown >> 4) & 0xF; |
546 | if (lstate && !(state == IB_PORT_DOWN || state == IB_PORT_NOP)) | 544 | if (lstate && !(state == IB_PORT_DOWN || state == IB_PORT_NOP)) |
547 | goto err; | 545 | goto err; |
@@ -572,13 +570,9 @@ static int recv_subn_set_portinfo(struct ib_smp *smp, | |||
572 | ipath_set_linkstate(dd, lstate); | 570 | ipath_set_linkstate(dd, lstate); |
573 | break; | 571 | break; |
574 | case IB_PORT_ARMED: | 572 | case IB_PORT_ARMED: |
575 | if (!(flags & (IPATH_LINKINIT | IPATH_LINKACTIVE))) | ||
576 | break; | ||
577 | ipath_set_linkstate(dd, IPATH_IB_LINKARM); | 573 | ipath_set_linkstate(dd, IPATH_IB_LINKARM); |
578 | break; | 574 | break; |
579 | case IB_PORT_ACTIVE: | 575 | case IB_PORT_ACTIVE: |
580 | if (!(flags & IPATH_LINKARMED)) | ||
581 | break; | ||
582 | ipath_set_linkstate(dd, IPATH_IB_LINKACTIVE); | 576 | ipath_set_linkstate(dd, IPATH_IB_LINKACTIVE); |
583 | break; | 577 | break; |
584 | default: | 578 | default: |