From 1d51a1325e43e0c05df626735c66d52203d610fd Mon Sep 17 00:00:00 2001 From: Rasesh Mody Date: Fri, 16 Sep 2011 15:06:46 +0000 Subject: bna: Semaphore Lock Fix Remove a BUG_ON() as it is not required. Change the unconditional write to release a semaphore to read sem first and then write. This will eliminate the possibility of sem getting locked while trying to release it in case if previous sem_get operation failed. Signed-off-by: Gurunatha Karaje Signed-off-by: Rasesh Mody Signed-off-by: David S. Miller --- drivers/net/ethernet/brocade/bna/bfa_ioc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/net/ethernet/brocade') diff --git a/drivers/net/ethernet/brocade/bna/bfa_ioc.c b/drivers/net/ethernet/brocade/bna/bfa_ioc.c index 029fb527e80d..4282fef24f95 100644 --- a/drivers/net/ethernet/brocade/bna/bfa_ioc.c +++ b/drivers/net/ethernet/brocade/bna/bfa_ioc.c @@ -1201,13 +1201,13 @@ bfa_nw_ioc_sem_get(void __iomem *sem_reg) if (!(r32 & 1)) return true; - BUG_ON(!(cnt < BFA_SEM_SPINCNT)); return false; } void bfa_nw_ioc_sem_release(void __iomem *sem_reg) { + readl(sem_reg); writel(1, sem_reg); } -- cgit v1.2.3