Hi,

>Depending on link state change IB_EVENT_PORT_ERR or IB_EVENT_PORT_ACTIVE
>should be dispatched in processing of mac interrupt.
>Plug in the cable happen to result in series of interrupts
>changing driver's link state for 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 they get filtered out by timer based
>nes_port_ibevent() routine.

>Signed-off-by: Maciej Sosnowski [email protected]

>diff --git a/drivers/infiniband/hw/nes/nes_hw.c 
>b/drivers/infiniband/hw/nes/nes_hw.c
>index 1980a46..2b89b06 100644
>--- a/drivers/infiniband/hw/nes/nes_hw.c
>+++ b/drivers/infiniband/hw/nes/nes_hw.c
>@@ -2608,6 +2608,13 @@ static void nes_process_mac_intr(struct
>                                               
> 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);

Is it really "nes_port_ibevent" needed surrounded by spin_lock/unlock ?
To me it looks like setting iw_status to atomic_t and doing atomic operations 
are enough....

--
Viral

This Email may contain confidential or privileged information for the intended 
recipient (s) If you are not the intended recipient, please do not use or 
disseminate the information, notify the sender and delete it from your system.

______________________________________________________________________
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to