Commit 52d07b1f authored by Harvey Harrison's avatar Harvey Harrison Committed by David S. Miller

bnx2: annotate bp->phy_lock functions

It looks like the locking is OK as the locks were being taken before the
various phy setup functions, add the annotations as they release and
reacquire the phy_lock.
Signed-off-by: default avatarHarvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 7be2df45
...@@ -1497,6 +1497,8 @@ static int bnx2_fw_sync(struct bnx2 *, u32, int, int); ...@@ -1497,6 +1497,8 @@ static int bnx2_fw_sync(struct bnx2 *, u32, int, int);
static int static int
bnx2_setup_remote_phy(struct bnx2 *bp, u8 port) bnx2_setup_remote_phy(struct bnx2 *bp, u8 port)
__releases(&bp->phy_lock)
__acquires(&bp->phy_lock)
{ {
u32 speed_arg = 0, pause_adv; u32 speed_arg = 0, pause_adv;
...@@ -1554,6 +1556,8 @@ bnx2_setup_remote_phy(struct bnx2 *bp, u8 port) ...@@ -1554,6 +1556,8 @@ bnx2_setup_remote_phy(struct bnx2 *bp, u8 port)
static int static int
bnx2_setup_serdes_phy(struct bnx2 *bp, u8 port) bnx2_setup_serdes_phy(struct bnx2 *bp, u8 port)
__releases(&bp->phy_lock)
__acquires(&bp->phy_lock)
{ {
u32 adv, bmcr; u32 adv, bmcr;
u32 new_adv = 0; u32 new_adv = 0;
...@@ -1866,6 +1870,8 @@ bnx2_set_remote_link(struct bnx2 *bp) ...@@ -1866,6 +1870,8 @@ bnx2_set_remote_link(struct bnx2 *bp)
static int static int
bnx2_setup_copper_phy(struct bnx2 *bp) bnx2_setup_copper_phy(struct bnx2 *bp)
__releases(&bp->phy_lock)
__acquires(&bp->phy_lock)
{ {
u32 bmcr; u32 bmcr;
u32 new_bmcr; u32 new_bmcr;
...@@ -1963,6 +1969,8 @@ bnx2_setup_copper_phy(struct bnx2 *bp) ...@@ -1963,6 +1969,8 @@ bnx2_setup_copper_phy(struct bnx2 *bp)
static int static int
bnx2_setup_phy(struct bnx2 *bp, u8 port) bnx2_setup_phy(struct bnx2 *bp, u8 port)
__releases(&bp->phy_lock)
__acquires(&bp->phy_lock)
{ {
if (bp->loopback == MAC_LOOPBACK) if (bp->loopback == MAC_LOOPBACK)
return 0; return 0;
...@@ -2176,6 +2184,8 @@ bnx2_init_copper_phy(struct bnx2 *bp, int reset_phy) ...@@ -2176,6 +2184,8 @@ bnx2_init_copper_phy(struct bnx2 *bp, int reset_phy)
static int static int
bnx2_init_phy(struct bnx2 *bp, int reset_phy) bnx2_init_phy(struct bnx2 *bp, int reset_phy)
__releases(&bp->phy_lock)
__acquires(&bp->phy_lock)
{ {
u32 val; u32 val;
int rc = 0; int rc = 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment