Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 314674
b: refs/heads/master
c: a2028b2
h: refs/heads/master
v: v3
  • Loading branch information
Michael Chan authored and David S. Miller committed Jun 28, 2012
1 parent 309115a commit 9e26b3f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 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: c10237e077cef50e925f052e49f3b4fead9d71f9
refs/heads/master: a2028b2376a858cb68a7fcc129f6508f59b45381
9 changes: 7 additions & 2 deletions trunk/drivers/net/ethernet/broadcom/cnic.c
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,9 @@ static int cnic_get_l5_cid(struct cnic_local *cp, u32 cid, u32 *l5_cid)
{
u32 i;

if (!cp->ctx_tbl)
return -EINVAL;

for (i = 0; i < cp->max_cid_space; i++) {
if (cp->ctx_tbl[i].cid == cid) {
*l5_cid = i;
Expand Down Expand Up @@ -3220,6 +3223,9 @@ static int cnic_ctl(void *data, struct cnic_ctl_info *info)
u32 l5_cid;
struct cnic_local *cp = dev->cnic_priv;

if (!test_bit(CNIC_F_CNIC_UP, &dev->flags))
break;

if (cnic_get_l5_cid(cp, cid, &l5_cid) == 0) {
struct cnic_context *ctx = &cp->ctx_tbl[l5_cid];

Expand Down Expand Up @@ -4253,8 +4259,6 @@ static int cnic_cm_shutdown(struct cnic_dev *dev)
struct cnic_local *cp = dev->cnic_priv;
int i;

cp->stop_cm(dev);

if (!cp->csk_tbl)
return 0;

Expand Down Expand Up @@ -5290,6 +5294,7 @@ static void cnic_stop_hw(struct cnic_dev *dev)
i++;
}
cnic_shutdown_rings(dev);
cp->stop_cm(dev);
clear_bit(CNIC_F_CNIC_UP, &dev->flags);
RCU_INIT_POINTER(cp->ulp_ops[CNIC_ULP_L4], NULL);
synchronize_rcu();
Expand Down

0 comments on commit 9e26b3f

Please sign in to comment.