RDMA/nes: Generate IB_EVENT_PORT_ERR/PORT_ACTIVE events
Depending on link state change, IB_EVENT_PORT_ERR or IB_EVENT_PORT_ACTIVE should be generated when handling MAC interrupts. Plugging in a cable happens to result in series of interrupts changing driver's link state a number of times before finally staying at link up (e.g. link up, link down, link up, link down, ..., link up). To prevent sending series of redundant IB_EVENT_PORT_ACTIVE and IB_EVENT_PORT_ERR events, we use a timer to debounce them in nes_port_ibevent(). Signed-off-by: Maciej Sosnowski <maciej.sosnowski@intel.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
Este commit está contenido en:

cometido por
Roland Dreier

padre
2a4c97ead4
commit
ea623455b7
@@ -2608,6 +2608,13 @@ static void nes_process_mac_intr(struct nes_device *nesdev, u32 mac_number)
|
||||
netif_start_queue(nesvnic->netdev);
|
||||
nesvnic->linkup = 1;
|
||||
netif_carrier_on(nesvnic->netdev);
|
||||
|
||||
spin_lock(&nesvnic->port_ibevent_lock);
|
||||
if (nesdev->iw_status == 0) {
|
||||
nesdev->iw_status = 1;
|
||||
nes_port_ibevent(nesvnic);
|
||||
}
|
||||
spin_unlock(&nesvnic->port_ibevent_lock);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
@@ -2633,6 +2640,13 @@ static void nes_process_mac_intr(struct nes_device *nesdev, u32 mac_number)
|
||||
netif_stop_queue(nesvnic->netdev);
|
||||
nesvnic->linkup = 0;
|
||||
netif_carrier_off(nesvnic->netdev);
|
||||
|
||||
spin_lock(&nesvnic->port_ibevent_lock);
|
||||
if (nesdev->iw_status == 1) {
|
||||
nesdev->iw_status = 0;
|
||||
nes_port_ibevent(nesvnic);
|
||||
}
|
||||
spin_unlock(&nesvnic->port_ibevent_lock);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Referencia en una nueva incidencia
Block a user