aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/qlcnic/qlcnic_ctx.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/qlcnic/qlcnic_ctx.c')
-rw-r--r--drivers/net/qlcnic/qlcnic_ctx.c26
1 files changed, 4 insertions, 22 deletions
diff --git a/drivers/net/qlcnic/qlcnic_ctx.c b/drivers/net/qlcnic/qlcnic_ctx.c
index 941cd0873f87..7969a7a87c85 100644
--- a/drivers/net/qlcnic/qlcnic_ctx.c
+++ b/drivers/net/qlcnic/qlcnic_ctx.c
@@ -224,12 +224,7 @@ qlcnic_fw_cmd_create_rx_ctx(struct qlcnic_adapter *adapter)
224 rds_ring = &recv_ctx->rds_rings[i]; 224 rds_ring = &recv_ctx->rds_rings[i];
225 225
226 reg = le32_to_cpu(prsp_rds[i].host_producer_crb); 226 reg = le32_to_cpu(prsp_rds[i].host_producer_crb);
227 if (adapter->fw_hal_version == QLCNIC_FW_BASE) 227 rds_ring->crb_rcv_producer = adapter->ahw.pci_base0 + reg;
228 rds_ring->crb_rcv_producer = qlcnic_get_ioaddr(adapter,
229 QLCNIC_REG(reg - 0x200));
230 else
231 rds_ring->crb_rcv_producer = adapter->ahw.pci_base0 +
232 reg;
233 } 228 }
234 229
235 prsp_sds = ((struct qlcnic_cardrsp_sds_ring *) 230 prsp_sds = ((struct qlcnic_cardrsp_sds_ring *)
@@ -241,16 +236,8 @@ qlcnic_fw_cmd_create_rx_ctx(struct qlcnic_adapter *adapter)
241 reg = le32_to_cpu(prsp_sds[i].host_consumer_crb); 236 reg = le32_to_cpu(prsp_sds[i].host_consumer_crb);
242 reg2 = le32_to_cpu(prsp_sds[i].interrupt_crb); 237 reg2 = le32_to_cpu(prsp_sds[i].interrupt_crb);
243 238
244 if (adapter->fw_hal_version == QLCNIC_FW_BASE) { 239 sds_ring->crb_sts_consumer = adapter->ahw.pci_base0 + reg;
245 sds_ring->crb_sts_consumer = qlcnic_get_ioaddr(adapter, 240 sds_ring->crb_intr_mask = adapter->ahw.pci_base0 + reg2;
246 QLCNIC_REG(reg - 0x200));
247 sds_ring->crb_intr_mask = qlcnic_get_ioaddr(adapter,
248 QLCNIC_REG(reg2 - 0x200));
249 } else {
250 sds_ring->crb_sts_consumer = adapter->ahw.pci_base0 +
251 reg;
252 sds_ring->crb_intr_mask = adapter->ahw.pci_base0 + reg2;
253 }
254 } 241 }
255 242
256 recv_ctx->state = le32_to_cpu(prsp->host_ctx_state); 243 recv_ctx->state = le32_to_cpu(prsp->host_ctx_state);
@@ -352,12 +339,7 @@ qlcnic_fw_cmd_create_tx_ctx(struct qlcnic_adapter *adapter)
352 339
353 if (err == QLCNIC_RCODE_SUCCESS) { 340 if (err == QLCNIC_RCODE_SUCCESS) {
354 temp = le32_to_cpu(prsp->cds_ring.host_producer_crb); 341 temp = le32_to_cpu(prsp->cds_ring.host_producer_crb);
355 if (adapter->fw_hal_version == QLCNIC_FW_BASE) 342 tx_ring->crb_cmd_producer = adapter->ahw.pci_base0 + temp;
356 tx_ring->crb_cmd_producer = qlcnic_get_ioaddr(adapter,
357 QLCNIC_REG(temp - 0x200));
358 else
359 tx_ring->crb_cmd_producer = adapter->ahw.pci_base0 +
360 temp;
361 343
362 adapter->tx_context_id = 344 adapter->tx_context_id =
363 le16_to_cpu(prsp->context_id); 345 le16_to_cpu(prsp->context_id);