aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/broadcom
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/ethernet/broadcom')
-rw-r--r--drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c17
1 files changed, 12 insertions, 5 deletions
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
index 571508d044c1..5ff0bcb70b08 100644
--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
+++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
@@ -9974,7 +9974,7 @@ static void __devinit bnx2x_get_common_hwinfo(struct bnx2x *bp)
9974#define IGU_FID(val) GET_FIELD((val), IGU_REG_MAPPING_MEMORY_FID) 9974#define IGU_FID(val) GET_FIELD((val), IGU_REG_MAPPING_MEMORY_FID)
9975#define IGU_VEC(val) GET_FIELD((val), IGU_REG_MAPPING_MEMORY_VECTOR) 9975#define IGU_VEC(val) GET_FIELD((val), IGU_REG_MAPPING_MEMORY_VECTOR)
9976 9976
9977static void __devinit bnx2x_get_igu_cam_info(struct bnx2x *bp) 9977static int __devinit bnx2x_get_igu_cam_info(struct bnx2x *bp)
9978{ 9978{
9979 int pfid = BP_FUNC(bp); 9979 int pfid = BP_FUNC(bp);
9980 int igu_sb_id; 9980 int igu_sb_id;
@@ -9991,7 +9991,7 @@ static void __devinit bnx2x_get_igu_cam_info(struct bnx2x *bp)
9991 bp->igu_dsb_id = E1HVN_MAX * FP_SB_MAX_E1x + 9991 bp->igu_dsb_id = E1HVN_MAX * FP_SB_MAX_E1x +
9992 (CHIP_MODE_IS_4_PORT(bp) ? pfid : vn); 9992 (CHIP_MODE_IS_4_PORT(bp) ? pfid : vn);
9993 9993
9994 return; 9994 return 0;
9995 } 9995 }
9996 9996
9997 /* IGU in normal mode - read CAM */ 9997 /* IGU in normal mode - read CAM */
@@ -10025,8 +10025,12 @@ static void __devinit bnx2x_get_igu_cam_info(struct bnx2x *bp)
10025 bp->igu_sb_cnt = min_t(int, bp->igu_sb_cnt, igu_sb_cnt); 10025 bp->igu_sb_cnt = min_t(int, bp->igu_sb_cnt, igu_sb_cnt);
10026#endif 10026#endif
10027 10027
10028 if (igu_sb_cnt == 0) 10028 if (igu_sb_cnt == 0) {
10029 BNX2X_ERR("CAM configuration error\n"); 10029 BNX2X_ERR("CAM configuration error\n");
10030 return -EINVAL;
10031 }
10032
10033 return 0;
10030} 10034}
10031 10035
10032static void __devinit bnx2x_link_settings_supported(struct bnx2x *bp, 10036static void __devinit bnx2x_link_settings_supported(struct bnx2x *bp,
@@ -10706,6 +10710,8 @@ static int __devinit bnx2x_get_hwinfo(struct bnx2x *bp)
10706 if (REG_RD(bp, IGU_REG_RESET_MEMORIES)) { 10710 if (REG_RD(bp, IGU_REG_RESET_MEMORIES)) {
10707 dev_err(&bp->pdev->dev, 10711 dev_err(&bp->pdev->dev,
10708 "FORCING Normal Mode failed!!!\n"); 10712 "FORCING Normal Mode failed!!!\n");
10713 bnx2x_release_hw_lock(bp,
10714 HW_LOCK_RESOURCE_RESET);
10709 return -EPERM; 10715 return -EPERM;
10710 } 10716 }
10711 } 10717 }
@@ -10716,9 +10722,10 @@ static int __devinit bnx2x_get_hwinfo(struct bnx2x *bp)
10716 } else 10722 } else
10717 BNX2X_DEV_INFO("IGU Normal Mode\n"); 10723 BNX2X_DEV_INFO("IGU Normal Mode\n");
10718 10724
10719 bnx2x_get_igu_cam_info(bp); 10725 rc = bnx2x_get_igu_cam_info(bp);
10720
10721 bnx2x_release_hw_lock(bp, HW_LOCK_RESOURCE_RESET); 10726 bnx2x_release_hw_lock(bp, HW_LOCK_RESOURCE_RESET);
10727 if (rc)
10728 return rc;
10722 } 10729 }
10723 10730
10724 /* 10731 /*