Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 327840
b: refs/heads/master
c: 51a8f54
h: refs/heads/master
v: v3
  • Loading branch information
Michael Chan authored and David S. Miller committed Sep 10, 2012
1 parent dc2fa7a commit 9cc10ed
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 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: 8cc0e028eda5bc07a4b816411448065b6892e383
refs/heads/master: 51a8f54d13f1b2e91da214ff1e619628bd68fd27
7 changes: 3 additions & 4 deletions trunk/drivers/net/ethernet/broadcom/cnic.c
Original file line number Diff line number Diff line change
Expand Up @@ -1288,7 +1288,7 @@ static int cnic_alloc_bnx2x_resc(struct cnic_dev *dev)
if (ret)
goto error;

if (BNX2X_CHIP_IS_E2_PLUS(cp->chip_id)) {
if (CNIC_SUPPORTS_FCOE(cp)) {
ret = cnic_alloc_kcq(dev, &cp->kcq2, true);
if (ret)
goto error;
Expand Down Expand Up @@ -3130,7 +3130,7 @@ static void cnic_service_bnx2x_bh(unsigned long data)
CNIC_WR16(dev, cp->kcq1.io_addr,
cp->kcq1.sw_prod_idx + MAX_KCQ_IDX);

if (!BNX2X_CHIP_IS_E2_PLUS(cp->chip_id)) {
if (cp->ethdev->drv_state & CNIC_DRV_STATE_NO_FCOE) {
cp->arm_int(dev, status_idx);
break;
}
Expand Down Expand Up @@ -5516,8 +5516,7 @@ static struct cnic_dev *init_bnx2x_cnic(struct net_device *dev)

if (!(ethdev->drv_state & CNIC_DRV_STATE_NO_ISCSI))
cdev->max_iscsi_conn = ethdev->max_iscsi_conn;
if (BNX2X_CHIP_IS_E2_PLUS(cp->chip_id) &&
!(ethdev->drv_state & CNIC_DRV_STATE_NO_FCOE))
if (CNIC_SUPPORTS_FCOE(cp))
cdev->max_fcoe_conn = ethdev->max_fcoe_conn;

if (cdev->max_fcoe_conn > BNX2X_FCOE_NUM_CONNECTIONS)
Expand Down
4 changes: 4 additions & 0 deletions trunk/drivers/net/ethernet/broadcom/cnic.h
Original file line number Diff line number Diff line change
Expand Up @@ -475,6 +475,10 @@ struct bnx2x_bd_chain_next {
MAX_STAT_COUNTER_ID_E1))
#endif

#define CNIC_SUPPORTS_FCOE(cp) \
(BNX2X_CHIP_IS_E2_PLUS((cp)->chip_id) && \
!((cp)->ethdev->drv_state & CNIC_DRV_STATE_NO_FCOE))

#define CNIC_RAMROD_TMO (HZ / 4)

#endif
Expand Down

0 comments on commit 9cc10ed

Please sign in to comment.