[ofa-general] Re: [PATCH 13/13] RDMA/nes: Enhanced PFT management scheme

Roland Dreier rdreier at cisco.com
Fri Oct 3 12:26:31 PDT 2008


This patch seems broken:

 > @@ -842,7 +845,12 @@ static void nes_netdev_set_multicast_list(struct net_device *netdev)
 >  
 > +	spin_lock_irqsave(&nesadapter->resource_lock, flags);

nes_netdev_set_multicast_list() takes resource lock unconditionally
here, but...

 >  	if (!mc_all_on) {

 ...

 > +		spin_unlock_irqrestore(&nesadapter->resource_lock, flags);
 >  	}
 >  }

only drops the lock if mc_all_on is not set.

I rolled the below into the patch to fix things:

diff --git a/drivers/infiniband/hw/nes/nes_nic.c b/drivers/infiniband/hw/nes/nes_nic.c
index 26809f4..12ff698 100644
--- a/drivers/infiniband/hw/nes/nes_nic.c
+++ b/drivers/infiniband/hw/nes/nes_nic.c
@@ -952,8 +952,9 @@ static void nes_netdev_set_multicast_list(struct net_device *netdev)
 			nes_write_indexed(nesdev, NES_IDX_NIC_UNICAST_ALL,
 								nic_active);
 		}
-		spin_unlock_irqrestore(&nesadapter->resource_lock, flags);
 	}
+
+	spin_unlock_irqrestore(&nesadapter->resource_lock, flags);
 }
 
 



More information about the general mailing list