aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/ipath/ipath_mad.c
diff options
context:
space:
mode:
authorRalph Campbell <ralph.campbell@qlogic.com>2007-09-19 19:47:31 -0400
committerRoland Dreier <rolandd@cisco.com>2007-10-10 00:01:38 -0400
commit49739b3e24a10d819d3167a1c5b319d0b1186245 (patch)
tree487d4df80efa73d31ab414564021503d289b6b3f /drivers/infiniband/hw/ipath/ipath_mad.c
parent6a733cdc71b7aa8107caa57f2a16629aa731242a (diff)
IB/ipath: Fix IB_EVENT_PORT_ERR event
The link state event calls were being generated when the SM told the SMA to change link states. This works for IB_EVENT_PORT_ACTIVE but not if the link goes down and stays down. The fix is to generate event calls from the interrupt handler when the HW link state changes. Signed-off-by: Ralph Campbell <ralph.campbell@qlogic.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband/hw/ipath/ipath_mad.c')
-rw-r--r--drivers/infiniband/hw/ipath/ipath_mad.c10
1 files changed, 0 insertions, 10 deletions
diff --git a/drivers/infiniband/hw/ipath/ipath_mad.c b/drivers/infiniband/hw/ipath/ipath_mad.c
index 8f152167208a..0ae3a7c3f86e 100644
--- a/drivers/infiniband/hw/ipath/ipath_mad.c
+++ b/drivers/infiniband/hw/ipath/ipath_mad.c
@@ -570,26 +570,16 @@ static int recv_subn_set_portinfo(struct ib_smp *smp,
570 else 570 else
571 goto err; 571 goto err;
572 ipath_set_linkstate(dd, lstate); 572 ipath_set_linkstate(dd, lstate);
573 if (flags & IPATH_LINKACTIVE) {
574 event.event = IB_EVENT_PORT_ERR;
575 ib_dispatch_event(&event);
576 }
577 break; 573 break;
578 case IB_PORT_ARMED: 574 case IB_PORT_ARMED:
579 if (!(flags & (IPATH_LINKINIT | IPATH_LINKACTIVE))) 575 if (!(flags & (IPATH_LINKINIT | IPATH_LINKACTIVE)))
580 break; 576 break;
581 ipath_set_linkstate(dd, IPATH_IB_LINKARM); 577 ipath_set_linkstate(dd, IPATH_IB_LINKARM);
582 if (flags & IPATH_LINKACTIVE) {
583 event.event = IB_EVENT_PORT_ERR;
584 ib_dispatch_event(&event);
585 }
586 break; 578 break;
587 case IB_PORT_ACTIVE: 579 case IB_PORT_ACTIVE:
588 if (!(flags & IPATH_LINKARMED)) 580 if (!(flags & IPATH_LINKARMED))
589 break; 581 break;
590 ipath_set_linkstate(dd, IPATH_IB_LINKACTIVE); 582 ipath_set_linkstate(dd, IPATH_IB_LINKACTIVE);
591 event.event = IB_EVENT_PORT_ACTIVE;
592 ib_dispatch_event(&event);
593 break; 583 break;
594 default: 584 default:
595 /* XXX We have already partially updated our state! */ 585 /* XXX We have already partially updated our state! */