diff options
author | Michael Chan <mchan@broadcom.com> | 2009-12-02 10:15:35 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-12-02 22:57:19 -0500 |
commit | c7596b79feb3d15bea64007254f77233bda811f4 (patch) | |
tree | a427ba9f3b555e2feaae8a00441e16b34a8826b2 /drivers/net/cnic.c | |
parent | 8f9b3f69944ab7eacb9273b4723087c42b5f4046 (diff) |
cnic: Fix ring I/O address for bnx2x devices.
Old code was initializing the ring producers using an incorrect I/O
address.
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: Benjamin Li <benli@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/cnic.c')
-rw-r--r-- | drivers/net/cnic.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/net/cnic.c b/drivers/net/cnic.c index ee7eb9ee77e2..10c5cc356305 100644 --- a/drivers/net/cnic.c +++ b/drivers/net/cnic.c | |||
@@ -4131,22 +4131,20 @@ static void cnic_init_rings(struct cnic_dev *dev) | |||
4131 | cnic_init_bnx2_rx_ring(dev); | 4131 | cnic_init_bnx2_rx_ring(dev); |
4132 | } else if (test_bit(CNIC_F_BNX2X_CLASS, &dev->flags)) { | 4132 | } else if (test_bit(CNIC_F_BNX2X_CLASS, &dev->flags)) { |
4133 | struct cnic_local *cp = dev->cnic_priv; | 4133 | struct cnic_local *cp = dev->cnic_priv; |
4134 | struct cnic_eth_dev *ethdev = cp->ethdev; | ||
4135 | u32 cli = BNX2X_ISCSI_CL_ID(CNIC_E1HVN(cp)); | 4134 | u32 cli = BNX2X_ISCSI_CL_ID(CNIC_E1HVN(cp)); |
4136 | union l5cm_specific_data l5_data; | 4135 | union l5cm_specific_data l5_data; |
4137 | struct ustorm_eth_rx_producers rx_prods = {0}; | 4136 | struct ustorm_eth_rx_producers rx_prods = {0}; |
4138 | void __iomem *doorbell; | 4137 | u32 off, i; |
4139 | int i; | ||
4140 | 4138 | ||
4141 | rx_prods.bd_prod = 0; | 4139 | rx_prods.bd_prod = 0; |
4142 | rx_prods.cqe_prod = BNX2X_MAX_RCQ_DESC_CNT; | 4140 | rx_prods.cqe_prod = BNX2X_MAX_RCQ_DESC_CNT; |
4143 | barrier(); | 4141 | barrier(); |
4144 | 4142 | ||
4145 | doorbell = ethdev->io_base2 + BAR_USTRORM_INTMEM + | 4143 | off = BAR_USTRORM_INTMEM + |
4146 | USTORM_RX_PRODS_OFFSET(CNIC_PORT(cp), cli); | 4144 | USTORM_RX_PRODS_OFFSET(CNIC_PORT(cp), cli); |
4147 | 4145 | ||
4148 | for (i = 0; i < sizeof(struct ustorm_eth_rx_producers) / 4; i++) | 4146 | for (i = 0; i < sizeof(struct ustorm_eth_rx_producers) / 4; i++) |
4149 | writel(((u32 *) &rx_prods)[i], doorbell + i * 4); | 4147 | CNIC_WR(dev, off + i * 4, ((u32 *) &rx_prods)[i]); |
4150 | 4148 | ||
4151 | cnic_init_bnx2x_tx_ring(dev); | 4149 | cnic_init_bnx2x_tx_ring(dev); |
4152 | cnic_init_bnx2x_rx_ring(dev); | 4150 | cnic_init_bnx2x_rx_ring(dev); |