Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 106559
b: refs/heads/master
c: 436a7b1
h: refs/heads/master
i:
  106557: 4f6c143
  106555: 662746c
  106551: 4e9f38e
  106543: d7c5407
  106527: 3687938
  106495: 875b556
v: v3
  • Loading branch information
Andrew Vasquez authored and James Bottomley committed Jul 26, 2008
1 parent 808c607 commit 6072953
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 41 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: 1ee2714632ce3f7e6477069b41cb685112f5f217
refs/heads/master: 436a7b11234ccccd91e3000aacdbdd25bd7847a8
80 changes: 40 additions & 40 deletions trunk/drivers/scsi/qla2xxx/qla_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -768,42 +768,16 @@ qla2x00_alloc_fw_dump(scsi_qla_host_t *ha)
mem_size = (ha->fw_memory_size - 0x100000 + 1) *
sizeof(uint32_t);

/* Allocate memory for Extended Trace Buffer. */
tc = dma_alloc_coherent(&ha->pdev->dev, EFT_SIZE, &tc_dma,
GFP_KERNEL);
if (!tc) {
qla_printk(KERN_WARNING, ha, "Unable to allocate "
"(%d KB) for EFT.\n", EFT_SIZE / 1024);
goto cont_alloc;
}

memset(tc, 0, EFT_SIZE);
rval = qla2x00_enable_eft_trace(ha, tc_dma, EFT_NUM_BUFFERS);
if (rval) {
qla_printk(KERN_WARNING, ha, "Unable to initialize "
"EFT (%d).\n", rval);
dma_free_coherent(&ha->pdev->dev, EFT_SIZE, tc,
tc_dma);
goto cont_alloc;
}

qla_printk(KERN_INFO, ha, "Allocated (%d KB) for EFT...\n",
EFT_SIZE / 1024);

eft_size = EFT_SIZE;
ha->eft_dma = tc_dma;
ha->eft = tc;

/* Allocate memory for Fibre Channel Event Buffer. */
if (!IS_QLA25XX(ha))
goto cont_alloc;
goto try_eft;

tc = dma_alloc_coherent(&ha->pdev->dev, FCE_SIZE, &tc_dma,
GFP_KERNEL);
if (!tc) {
qla_printk(KERN_WARNING, ha, "Unable to allocate "
"(%d KB) for FCE.\n", FCE_SIZE / 1024);
goto cont_alloc;
goto try_eft;
}

memset(tc, 0, FCE_SIZE);
Expand All @@ -815,7 +789,7 @@ qla2x00_alloc_fw_dump(scsi_qla_host_t *ha)
dma_free_coherent(&ha->pdev->dev, FCE_SIZE, tc,
tc_dma);
ha->flags.fce_enabled = 0;
goto cont_alloc;
goto try_eft;
}

qla_printk(KERN_INFO, ha, "Allocated (%d KB) for FCE...\n",
Expand All @@ -825,6 +799,32 @@ qla2x00_alloc_fw_dump(scsi_qla_host_t *ha)
ha->flags.fce_enabled = 1;
ha->fce_dma = tc_dma;
ha->fce = tc;
try_eft:
/* Allocate memory for Extended Trace Buffer. */
tc = dma_alloc_coherent(&ha->pdev->dev, EFT_SIZE, &tc_dma,
GFP_KERNEL);
if (!tc) {
qla_printk(KERN_WARNING, ha, "Unable to allocate "
"(%d KB) for EFT.\n", EFT_SIZE / 1024);
goto cont_alloc;
}

memset(tc, 0, EFT_SIZE);
rval = qla2x00_enable_eft_trace(ha, tc_dma, EFT_NUM_BUFFERS);
if (rval) {
qla_printk(KERN_WARNING, ha, "Unable to initialize "
"EFT (%d).\n", rval);
dma_free_coherent(&ha->pdev->dev, EFT_SIZE, tc,
tc_dma);
goto cont_alloc;
}

qla_printk(KERN_INFO, ha, "Allocated (%d KB) for EFT...\n",
EFT_SIZE / 1024);

eft_size = EFT_SIZE;
ha->eft_dma = tc_dma;
ha->eft = tc;
}
cont_alloc:
req_q_size = ha->request_q_length * sizeof(request_t);
Expand Down Expand Up @@ -3286,17 +3286,6 @@ qla2x00_abort_isp(scsi_qla_host_t *ha)
ha->isp_abort_cnt = 0;
clear_bit(ISP_ABORT_RETRY, &ha->dpc_flags);

if (ha->eft) {
memset(ha->eft, 0, EFT_SIZE);
rval = qla2x00_enable_eft_trace(ha,
ha->eft_dma, EFT_NUM_BUFFERS);
if (rval) {
qla_printk(KERN_WARNING, ha,
"Unable to reinitialize EFT "
"(%d).\n", rval);
}
}

if (ha->fce) {
ha->flags.fce_enabled = 1;
memset(ha->fce, 0,
Expand All @@ -3311,6 +3300,17 @@ qla2x00_abort_isp(scsi_qla_host_t *ha)
ha->flags.fce_enabled = 0;
}
}

if (ha->eft) {
memset(ha->eft, 0, EFT_SIZE);
rval = qla2x00_enable_eft_trace(ha,
ha->eft_dma, EFT_NUM_BUFFERS);
if (rval) {
qla_printk(KERN_WARNING, ha,
"Unable to reinitialize EFT "
"(%d).\n", rval);
}
}
} else { /* failed the ISP abort */
ha->flags.online = 1;
if (test_bit(ISP_ABORT_RETRY, &ha->dpc_flags)) {
Expand Down

0 comments on commit 6072953

Please sign in to comment.