]> git.ipfire.org Git - thirdparty/ipxe.git/commitdiff
[hermon] Poll for link state changes while DOWN
authorMichael Brown <mcb30@ipxe.org>
Thu, 16 Sep 2010 02:28:41 +0000 (03:28 +0100)
committerMichael Brown <mcb30@ipxe.org>
Thu, 16 Sep 2010 02:30:45 +0000 (03:30 +0100)
No event is generated upon reaching INIT, so we must poll separately
for link state changes while we remain DOWN.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
src/drivers/infiniband/hermon.c

index 907865ded5e305f8a28bf8884181f10896c59901..06255c3a8954be3389a9071af3a89a6280b804cd 100644 (file)
@@ -1836,6 +1836,15 @@ static void hermon_poll_eq ( struct ib_device *ibdev ) {
        unsigned int eqe_idx_mask;
        unsigned int event_type;
 
+       /* No event is generated upon reaching INIT, so we must poll
+        * separately for link state changes while we remain DOWN.
+        */
+       if ( ib_is_open ( ibdev ) &&
+            ( ibdev->port_state == IB_PORT_STATE_DOWN ) ) {
+               ib_smc_update ( ibdev, hermon_mad );
+       }
+
+       /* Poll event queue */
        while ( 1 ) {
                /* Look for event entry */
                eqe_idx_mask = ( HERMON_NUM_EQES - 1 );