Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 341725
b: refs/heads/master
c: 9b341bb
h: refs/heads/master
i:
  341723: f5c3017
v: v3
  • Loading branch information
Barak Witkowski authored and David S. Miller committed Dec 3, 2012
1 parent 1289355 commit c4101c7
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 382e513a18ef988e547b0744c63c110aa052afd2
refs/heads/master: 9b341bb1d8e6bc9f00044bd9d66824505b127e4a
17 changes: 12 additions & 5 deletions trunk/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -9974,7 +9974,7 @@ static void __devinit bnx2x_get_common_hwinfo(struct bnx2x *bp)
#define IGU_FID(val) GET_FIELD((val), IGU_REG_MAPPING_MEMORY_FID)
#define IGU_VEC(val) GET_FIELD((val), IGU_REG_MAPPING_MEMORY_VECTOR)

static void __devinit bnx2x_get_igu_cam_info(struct bnx2x *bp)
static int __devinit bnx2x_get_igu_cam_info(struct bnx2x *bp)
{
int pfid = BP_FUNC(bp);
int igu_sb_id;
Expand All @@ -9991,7 +9991,7 @@ static void __devinit bnx2x_get_igu_cam_info(struct bnx2x *bp)
bp->igu_dsb_id = E1HVN_MAX * FP_SB_MAX_E1x +
(CHIP_MODE_IS_4_PORT(bp) ? pfid : vn);

return;
return 0;
}

/* IGU in normal mode - read CAM */
Expand Down Expand Up @@ -10025,8 +10025,12 @@ static void __devinit bnx2x_get_igu_cam_info(struct bnx2x *bp)
bp->igu_sb_cnt = min_t(int, bp->igu_sb_cnt, igu_sb_cnt);
#endif

if (igu_sb_cnt == 0)
if (igu_sb_cnt == 0) {
BNX2X_ERR("CAM configuration error\n");
return -EINVAL;
}

return 0;
}

static void __devinit bnx2x_link_settings_supported(struct bnx2x *bp,
Expand Down Expand Up @@ -10706,6 +10710,8 @@ static int __devinit bnx2x_get_hwinfo(struct bnx2x *bp)
if (REG_RD(bp, IGU_REG_RESET_MEMORIES)) {
dev_err(&bp->pdev->dev,
"FORCING Normal Mode failed!!!\n");
bnx2x_release_hw_lock(bp,
HW_LOCK_RESOURCE_RESET);
return -EPERM;
}
}
Expand All @@ -10716,9 +10722,10 @@ static int __devinit bnx2x_get_hwinfo(struct bnx2x *bp)
} else
BNX2X_DEV_INFO("IGU Normal Mode\n");

bnx2x_get_igu_cam_info(bp);

rc = bnx2x_get_igu_cam_info(bp);
bnx2x_release_hw_lock(bp, HW_LOCK_RESOURCE_RESET);
if (rc)
return rc;
}

/*
Expand Down

0 comments on commit c4101c7

Please sign in to comment.