aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/ethernet')
-rw-r--r--drivers/net/ethernet/qlogic/qlcnic/qlcnic_ctx.c5
-rw-r--r--drivers/net/ethernet/qlogic/qlcnic/qlcnic_hw.c5
-rw-r--r--drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c5
-rw-r--r--drivers/net/ethernet/qlogic/qlcnic/qlcnic_minidump.c3
4 files changed, 6 insertions, 12 deletions
diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_ctx.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_ctx.c
index 58f094ca052e..b14b8f0787ea 100644
--- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_ctx.c
+++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_ctx.c
@@ -134,7 +134,7 @@ int qlcnic_fw_cmd_get_minidump_temp(struct qlcnic_adapter *adapter)
134 __le32 *tmp_buf; 134 __le32 *tmp_buf;
135 struct qlcnic_cmd_args cmd; 135 struct qlcnic_cmd_args cmd;
136 struct qlcnic_hardware_context *ahw; 136 struct qlcnic_hardware_context *ahw;
137 struct qlcnic_dump_template_hdr *tmpl_hdr, *tmp_tmpl; 137 struct qlcnic_dump_template_hdr *tmpl_hdr;
138 dma_addr_t tmp_addr_t = 0; 138 dma_addr_t tmp_addr_t = 0;
139 139
140 ahw = adapter->ahw; 140 ahw = adapter->ahw;
@@ -150,6 +150,8 @@ int qlcnic_fw_cmd_get_minidump_temp(struct qlcnic_adapter *adapter)
150 } 150 }
151 temp_size = cmd.rsp.arg2; 151 temp_size = cmd.rsp.arg2;
152 version = cmd.rsp.arg3; 152 version = cmd.rsp.arg3;
153 dev_info(&adapter->pdev->dev,
154 "minidump template version = 0x%x", version);
153 if (!temp_size) 155 if (!temp_size)
154 return -EIO; 156 return -EIO;
155 157
@@ -174,7 +176,6 @@ int qlcnic_fw_cmd_get_minidump_temp(struct qlcnic_adapter *adapter)
174 err = -EIO; 176 err = -EIO;
175 goto error; 177 goto error;
176 } 178 }
177 tmp_tmpl = tmp_addr;
178 ahw->fw_dump.tmpl_hdr = vzalloc(temp_size); 179 ahw->fw_dump.tmpl_hdr = vzalloc(temp_size);
179 if (!ahw->fw_dump.tmpl_hdr) { 180 if (!ahw->fw_dump.tmpl_hdr) {
180 err = -EIO; 181 err = -EIO;
diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_hw.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_hw.c
index fc48e000f35f..7a6d5ebe4e0f 100644
--- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_hw.c
+++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_hw.c
@@ -365,7 +365,7 @@ static int
365qlcnic_send_cmd_descs(struct qlcnic_adapter *adapter, 365qlcnic_send_cmd_descs(struct qlcnic_adapter *adapter,
366 struct cmd_desc_type0 *cmd_desc_arr, int nr_desc) 366 struct cmd_desc_type0 *cmd_desc_arr, int nr_desc)
367{ 367{
368 u32 i, producer, consumer; 368 u32 i, producer;
369 struct qlcnic_cmd_buffer *pbuf; 369 struct qlcnic_cmd_buffer *pbuf;
370 struct cmd_desc_type0 *cmd_desc; 370 struct cmd_desc_type0 *cmd_desc;
371 struct qlcnic_host_tx_ring *tx_ring; 371 struct qlcnic_host_tx_ring *tx_ring;
@@ -379,7 +379,6 @@ qlcnic_send_cmd_descs(struct qlcnic_adapter *adapter,
379 __netif_tx_lock_bh(tx_ring->txq); 379 __netif_tx_lock_bh(tx_ring->txq);
380 380
381 producer = tx_ring->producer; 381 producer = tx_ring->producer;
382 consumer = tx_ring->sw_consumer;
383 382
384 if (nr_desc >= qlcnic_tx_avail(tx_ring)) { 383 if (nr_desc >= qlcnic_tx_avail(tx_ring)) {
385 netif_tx_stop_queue(tx_ring->txq); 384 netif_tx_stop_queue(tx_ring->txq);
@@ -402,7 +401,7 @@ qlcnic_send_cmd_descs(struct qlcnic_adapter *adapter,
402 pbuf->frag_count = 0; 401 pbuf->frag_count = 0;
403 402
404 memcpy(&tx_ring->desc_head[producer], 403 memcpy(&tx_ring->desc_head[producer],
405 &cmd_desc_arr[i], sizeof(struct cmd_desc_type0)); 404 cmd_desc, sizeof(struct cmd_desc_type0));
406 405
407 producer = get_next_index(producer, tx_ring->num_desc); 406 producer = get_next_index(producer, tx_ring->num_desc);
408 i++; 407 i++;
diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c
index a7554d9aab0c..d833f5927891 100644
--- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c
+++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c
@@ -445,13 +445,10 @@ static int
445qlcnic_set_function_modes(struct qlcnic_adapter *adapter) 445qlcnic_set_function_modes(struct qlcnic_adapter *adapter)
446{ 446{
447 u8 id; 447 u8 id;
448 u32 ref_count;
449 int i, ret = 1; 448 int i, ret = 1;
450 u32 data = QLCNIC_MGMT_FUNC; 449 u32 data = QLCNIC_MGMT_FUNC;
451 struct qlcnic_hardware_context *ahw = adapter->ahw; 450 struct qlcnic_hardware_context *ahw = adapter->ahw;
452 451
453 /* If other drivers are not in use set their privilege level */
454 ref_count = QLCRD32(adapter, QLCNIC_CRB_DRV_ACTIVE);
455 ret = qlcnic_api_lock(adapter); 452 ret = qlcnic_api_lock(adapter);
456 if (ret) 453 if (ret)
457 goto err_lock; 454 goto err_lock;
@@ -531,11 +528,9 @@ static int qlcnic_setup_pci_map(struct pci_dev *pdev,
531{ 528{
532 u32 offset; 529 u32 offset;
533 void __iomem *mem_ptr0 = NULL; 530 void __iomem *mem_ptr0 = NULL;
534 resource_size_t mem_base;
535 unsigned long mem_len, pci_len0 = 0, bar0_len; 531 unsigned long mem_len, pci_len0 = 0, bar0_len;
536 532
537 /* remap phys address */ 533 /* remap phys address */
538 mem_base = pci_resource_start(pdev, 0); /* 0 is for BAR 0 */
539 mem_len = pci_resource_len(pdev, 0); 534 mem_len = pci_resource_len(pdev, 0);
540 535
541 qlcnic_get_bar_length(pdev->device, &bar0_len); 536 qlcnic_get_bar_length(pdev->device, &bar0_len);
diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_minidump.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_minidump.c
index 12ff29270745..0b8d8625834c 100644
--- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_minidump.c
+++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_minidump.c
@@ -197,7 +197,7 @@ static u32 qlcnic_dump_ctrl(struct qlcnic_adapter *adapter,
197 int i, k, timeout = 0; 197 int i, k, timeout = 0;
198 void __iomem *base = adapter->ahw->pci_base0; 198 void __iomem *base = adapter->ahw->pci_base0;
199 u32 addr, data; 199 u32 addr, data;
200 u8 opcode, no_ops; 200 u8 no_ops;
201 struct __ctrl *ctr = &entry->region.ctrl; 201 struct __ctrl *ctr = &entry->region.ctrl;
202 struct qlcnic_dump_template_hdr *t_hdr = adapter->ahw->fw_dump.tmpl_hdr; 202 struct qlcnic_dump_template_hdr *t_hdr = adapter->ahw->fw_dump.tmpl_hdr;
203 203
@@ -206,7 +206,6 @@ static u32 qlcnic_dump_ctrl(struct qlcnic_adapter *adapter,
206 206
207 for (i = 0; i < no_ops; i++) { 207 for (i = 0; i < no_ops; i++) {
208 k = 0; 208 k = 0;
209 opcode = 0;
210 for (k = 0; k < 8; k++) { 209 for (k = 0; k < 8; k++) {
211 if (!(ctr->opcode & (1 << k))) 210 if (!(ctr->opcode & (1 << k)))
212 continue; 211 continue;