Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 256293
b: refs/heads/master
c: e1dd883
h: refs/heads/master
i:
  256291: 86019af
v: v3
  • Loading branch information
Michael Chan authored and David S. Miller committed Jul 14, 2011
1 parent 98c54d9 commit ca7f9a0
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: b7d40315c9643034ac4b5c9dda480d0124416f89
refs/heads/master: e1dd883cb15310dc2ded9995a1f1d8b1cb1e88f3
9 changes: 7 additions & 2 deletions trunk/drivers/net/cnic.c
Original file line number Diff line number Diff line change
Expand Up @@ -4923,7 +4923,7 @@ static void cnic_init_rings(struct cnic_dev *dev)
struct client_init_ramrod_data *data;
union l5cm_specific_data l5_data;
struct ustorm_eth_rx_producers rx_prods = {0};
u32 off, i;
u32 off, i, *cid_ptr;

rx_prods.bd_prod = 0;
rx_prods.cqe_prod = BNX2X_MAX_RCQ_DESC_CNT;
Expand All @@ -4942,6 +4942,7 @@ static void cnic_init_rings(struct cnic_dev *dev)
set_bit(CNIC_LCL_FL_L2_WAIT, &cp->cnic_local_flags);

data = udev->l2_buf;
cid_ptr = udev->l2_buf + 12;

memset(data, 0, sizeof(*data));

Expand All @@ -4966,20 +4967,22 @@ static void cnic_init_rings(struct cnic_dev *dev)
"iSCSI CLIENT_SETUP did not complete\n");
cnic_spq_completion(dev, DRV_CTL_RET_L2_SPQ_CREDIT_CMD, 1);
cnic_ring_ctl(dev, cid, cli, 1);
*cid_ptr = cid;
}
}

static void cnic_shutdown_rings(struct cnic_dev *dev)
{
struct cnic_local *cp = dev->cnic_priv;
struct cnic_uio_dev *udev = cp->udev;
void *rx_ring;

if (!test_bit(CNIC_LCL_FL_RINGS_INITED, &cp->cnic_local_flags))
return;

if (test_bit(CNIC_F_BNX2_CLASS, &dev->flags)) {
cnic_shutdown_bnx2_rx_ring(dev);
} else if (test_bit(CNIC_F_BNX2X_CLASS, &dev->flags)) {
struct cnic_local *cp = dev->cnic_priv;
u32 cli = cp->ethdev->iscsi_l2_client_id;
u32 cid = cp->ethdev->iscsi_l2_cid;
union l5cm_specific_data l5_data;
Expand Down Expand Up @@ -5009,6 +5012,8 @@ static void cnic_shutdown_rings(struct cnic_dev *dev)
msleep(10);
}
clear_bit(CNIC_LCL_FL_RINGS_INITED, &cp->cnic_local_flags);
rx_ring = udev->l2_ring + BCM_PAGE_SIZE;
memset(rx_ring, 0, BCM_PAGE_SIZE);
}

static int cnic_register_netdev(struct cnic_dev *dev)
Expand Down

0 comments on commit ca7f9a0

Please sign in to comment.