Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 277559
b: refs/heads/master
c: 293c4a7
h: refs/heads/master
i:
  277557: 7f7ca6f
  277555: f863917
  277551: 1d20520
v: v3
  • Loading branch information
Padmanabh Ratnakar authored and David S. Miller committed Nov 16, 2011
1 parent 7ca6948 commit ed6c97f
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 10 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: 9ca36f7db29a1e4bde58fa7cf98b542c032b7180
refs/heads/master: 293c4a7d9b95d0beeb5df03c14bd35bc21f9e6f2
15 changes: 10 additions & 5 deletions trunk/drivers/net/ethernet/emulex/benet/be_cmds.c
Original file line number Diff line number Diff line change
Expand Up @@ -916,10 +916,14 @@ int be_cmd_txq_create(struct be_adapter *adapter,
void *ctxt;
int status;

if (mutex_lock_interruptible(&adapter->mbox_lock))
return -1;
spin_lock_bh(&adapter->mcc_lock);

wrb = wrb_from_mccq(adapter);
if (!wrb) {
status = -EBUSY;
goto err;
}

wrb = wrb_from_mbox(adapter);
req = embedded_payload(wrb);
ctxt = &req->context;

Expand All @@ -945,14 +949,15 @@ int be_cmd_txq_create(struct be_adapter *adapter,

be_cmd_page_addrs_prepare(req->pages, ARRAY_SIZE(req->pages), q_mem);

status = be_mbox_notify_wait(adapter);
status = be_mcc_notify_wait(adapter);
if (!status) {
struct be_cmd_resp_eth_tx_create *resp = embedded_payload(wrb);
txq->id = le16_to_cpu(resp->cid);
txq->created = true;
}

mutex_unlock(&adapter->mbox_lock);
err:
spin_unlock_bh(&adapter->mcc_lock);

return status;
}
Expand Down
12 changes: 8 additions & 4 deletions trunk/drivers/net/ethernet/emulex/benet/be_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1689,9 +1689,6 @@ static int be_tx_queues_create(struct be_adapter *adapter)
if (be_queue_alloc(adapter, q, TX_Q_LEN,
sizeof(struct be_eth_wrb)))
goto err;

if (be_cmd_txq_create(adapter, q, cq))
goto err;
}
return 0;

Expand Down Expand Up @@ -2572,8 +2569,9 @@ static int be_setup(struct be_adapter *adapter)
struct net_device *netdev = adapter->netdev;
u32 cap_flags, en_flags;
u32 tx_fc, rx_fc;
int status;
int status, i;
u8 mac[ETH_ALEN];
struct be_tx_obj *txo;

be_setup_init(adapter);

Expand Down Expand Up @@ -2613,6 +2611,12 @@ static int be_setup(struct be_adapter *adapter)
if (status != 0)
goto err;

for_all_tx_queues(adapter, txo, i) {
status = be_cmd_txq_create(adapter, &txo->q, &txo->cq);
if (status)
goto err;
}

/* For BEx, the VF's permanent mac queried from card is incorrect.
* Query the mac configued by the PF using if_handle
*/
Expand Down

0 comments on commit ed6c97f

Please sign in to comment.