summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h
diff options
context:
space:
mode:
authorAriel Elior2012-01-26 07:01:50 +0100
committerDavid S. Miller2012-01-26 19:39:52 +0100
commitf16da43b5df947cef427f19b8f5c4b2f5d566231 (patch)
treea9076701c918b56a4daedc4e7bd6336101f4cdf8 /drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h
parentbnx2x: Loaded Firmware Version Validation (diff)
downloadkernel-qcow2-linux-f16da43b5df947cef427f19b8f5c4b2f5d566231.tar.gz
kernel-qcow2-linux-f16da43b5df947cef427f19b8f5c4b2f5d566231.tar.xz
kernel-qcow2-linux-f16da43b5df947cef427f19b8f5c4b2f5d566231.zip
bnx2x: Lock PF-common resources
Use hardware locks to protect resources common to several Physical Functions. In a virtualized environment the RTNL lock only protects a PF's driver against the PFs sharing it's VMs with regard to device resources. Other PFs may reside in other VMs under other OSs, and are not subject to the lock. Such resources which were previously protected implicitly by the RTNL lock must now be protected explicitly with dedicated HW locks. Signed-off-by: Ariel Elior <ariele@broadcom.com> Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h')
-rw-r--r--drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h
index 0dd22bb44f0d..bd990c2e5d1b 100644
--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h
+++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h
@@ -1540,7 +1540,7 @@ static inline void bnx2x_update_drv_flags(struct bnx2x *bp, u32 flags, u32 set)
{
if (SHMEM2_HAS(bp, drv_flags)) {
u32 drv_flags;
- bnx2x_acquire_hw_lock(bp, HW_LOCK_DRV_FLAGS);
+ bnx2x_acquire_hw_lock(bp, HW_LOCK_RESOURCE_DRV_FLAGS);
drv_flags = SHMEM2_RD(bp, drv_flags);
if (set)
@@ -1550,7 +1550,7 @@ static inline void bnx2x_update_drv_flags(struct bnx2x *bp, u32 flags, u32 set)
SHMEM2_WR(bp, drv_flags, drv_flags);
DP(NETIF_MSG_HW, "drv_flags 0x%08x\n", drv_flags);
- bnx2x_release_hw_lock(bp, HW_LOCK_DRV_FLAGS);
+ bnx2x_release_hw_lock(bp, HW_LOCK_RESOURCE_DRV_FLAGS);
}
}