diff options
Diffstat (limited to 'drivers/scsi/qla2xxx/qla_mbx.c')
-rw-r--r-- | drivers/scsi/qla2xxx/qla_mbx.c | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/drivers/scsi/qla2xxx/qla_mbx.c b/drivers/scsi/qla2xxx/qla_mbx.c index 7d0a8a4c7719..210060420809 100644 --- a/drivers/scsi/qla2xxx/qla_mbx.c +++ b/drivers/scsi/qla2xxx/qla_mbx.c | |||
@@ -681,7 +681,7 @@ qla2x00_verify_checksum(scsi_qla_host_t *ha, uint32_t risc_addr) | |||
681 | * Context: | 681 | * Context: |
682 | * Kernel context. | 682 | * Kernel context. |
683 | */ | 683 | */ |
684 | int | 684 | static int |
685 | qla2x00_issue_iocb_timeout(scsi_qla_host_t *ha, void *buffer, | 685 | qla2x00_issue_iocb_timeout(scsi_qla_host_t *ha, void *buffer, |
686 | dma_addr_t phys_addr, size_t size, uint32_t tov) | 686 | dma_addr_t phys_addr, size_t size, uint32_t tov) |
687 | { | 687 | { |
@@ -784,7 +784,6 @@ qla2x00_abort_command(scsi_qla_host_t *ha, srb_t *sp) | |||
784 | DEBUG2_3_11(printk("qla2x00_abort_command(%ld): failed=%x.\n", | 784 | DEBUG2_3_11(printk("qla2x00_abort_command(%ld): failed=%x.\n", |
785 | ha->host_no, rval)); | 785 | ha->host_no, rval)); |
786 | } else { | 786 | } else { |
787 | sp->flags |= SRB_ABORT_PENDING; | ||
788 | DEBUG11(printk("qla2x00_abort_command(%ld): done.\n", | 787 | DEBUG11(printk("qla2x00_abort_command(%ld): done.\n", |
789 | ha->host_no)); | 788 | ha->host_no)); |
790 | } | 789 | } |
@@ -1469,7 +1468,7 @@ qla24xx_login_fabric(scsi_qla_host_t *ha, uint16_t loop_id, uint8_t domain, | |||
1469 | lg->port_id[0] = al_pa; | 1468 | lg->port_id[0] = al_pa; |
1470 | lg->port_id[1] = area; | 1469 | lg->port_id[1] = area; |
1471 | lg->port_id[2] = domain; | 1470 | lg->port_id[2] = domain; |
1472 | lg->vp_index = cpu_to_le16(ha->vp_idx); | 1471 | lg->vp_index = ha->vp_idx; |
1473 | rval = qla2x00_issue_iocb(ha, lg, lg_dma, 0); | 1472 | rval = qla2x00_issue_iocb(ha, lg, lg_dma, 0); |
1474 | if (rval != QLA_SUCCESS) { | 1473 | if (rval != QLA_SUCCESS) { |
1475 | DEBUG2_3_11(printk("%s(%ld): failed to issue Login IOCB " | 1474 | DEBUG2_3_11(printk("%s(%ld): failed to issue Login IOCB " |
@@ -1724,7 +1723,7 @@ qla24xx_fabric_logout(scsi_qla_host_t *ha, uint16_t loop_id, uint8_t domain, | |||
1724 | lg->port_id[0] = al_pa; | 1723 | lg->port_id[0] = al_pa; |
1725 | lg->port_id[1] = area; | 1724 | lg->port_id[1] = area; |
1726 | lg->port_id[2] = domain; | 1725 | lg->port_id[2] = domain; |
1727 | lg->vp_index = cpu_to_le16(ha->vp_idx); | 1726 | lg->vp_index = ha->vp_idx; |
1728 | rval = qla2x00_issue_iocb(ha, lg, lg_dma, 0); | 1727 | rval = qla2x00_issue_iocb(ha, lg, lg_dma, 0); |
1729 | if (rval != QLA_SUCCESS) { | 1728 | if (rval != QLA_SUCCESS) { |
1730 | DEBUG2_3_11(printk("%s(%ld): failed to issue Logout IOCB " | 1729 | DEBUG2_3_11(printk("%s(%ld): failed to issue Logout IOCB " |
@@ -2210,7 +2209,6 @@ qla24xx_abort_command(scsi_qla_host_t *ha, srb_t *sp) | |||
2210 | rval = QLA_FUNCTION_FAILED; | 2209 | rval = QLA_FUNCTION_FAILED; |
2211 | } else { | 2210 | } else { |
2212 | DEBUG11(printk("%s(%ld): done.\n", __func__, ha->host_no)); | 2211 | DEBUG11(printk("%s(%ld): done.\n", __func__, ha->host_no)); |
2213 | sp->flags |= SRB_ABORT_PENDING; | ||
2214 | } | 2212 | } |
2215 | 2213 | ||
2216 | dma_pool_free(ha->s_dma_pool, abt, abt_dma); | 2214 | dma_pool_free(ha->s_dma_pool, abt, abt_dma); |
@@ -2644,12 +2642,11 @@ qla24xx_report_id_acquisition(scsi_qla_host_t *ha, | |||
2644 | struct vp_rpt_id_entry_24xx *rptid_entry) | 2642 | struct vp_rpt_id_entry_24xx *rptid_entry) |
2645 | { | 2643 | { |
2646 | uint8_t vp_idx; | 2644 | uint8_t vp_idx; |
2645 | uint16_t stat = le16_to_cpu(rptid_entry->vp_idx); | ||
2647 | scsi_qla_host_t *vha; | 2646 | scsi_qla_host_t *vha; |
2648 | 2647 | ||
2649 | if (rptid_entry->entry_status != 0) | 2648 | if (rptid_entry->entry_status != 0) |
2650 | return; | 2649 | return; |
2651 | if (rptid_entry->entry_status != __constant_cpu_to_le16(CS_COMPLETE)) | ||
2652 | return; | ||
2653 | 2650 | ||
2654 | if (rptid_entry->format == 0) { | 2651 | if (rptid_entry->format == 0) { |
2655 | DEBUG15(printk("%s:format 0 : scsi(%ld) number of VPs setup %d," | 2652 | DEBUG15(printk("%s:format 0 : scsi(%ld) number of VPs setup %d," |
@@ -2659,17 +2656,17 @@ qla24xx_report_id_acquisition(scsi_qla_host_t *ha, | |||
2659 | rptid_entry->port_id[2], rptid_entry->port_id[1], | 2656 | rptid_entry->port_id[2], rptid_entry->port_id[1], |
2660 | rptid_entry->port_id[0])); | 2657 | rptid_entry->port_id[0])); |
2661 | } else if (rptid_entry->format == 1) { | 2658 | } else if (rptid_entry->format == 1) { |
2662 | vp_idx = LSB(rptid_entry->vp_idx); | 2659 | vp_idx = LSB(stat); |
2663 | DEBUG15(printk("%s:format 1: scsi(%ld): VP[%d] enabled " | 2660 | DEBUG15(printk("%s:format 1: scsi(%ld): VP[%d] enabled " |
2664 | "- status %d - " | 2661 | "- status %d - " |
2665 | "with port id %02x%02x%02x\n",__func__,ha->host_no, | 2662 | "with port id %02x%02x%02x\n",__func__,ha->host_no, |
2666 | vp_idx, MSB(rptid_entry->vp_idx), | 2663 | vp_idx, MSB(stat), |
2667 | rptid_entry->port_id[2], rptid_entry->port_id[1], | 2664 | rptid_entry->port_id[2], rptid_entry->port_id[1], |
2668 | rptid_entry->port_id[0])); | 2665 | rptid_entry->port_id[0])); |
2669 | if (vp_idx == 0) | 2666 | if (vp_idx == 0) |
2670 | return; | 2667 | return; |
2671 | 2668 | ||
2672 | if (MSB(rptid_entry->vp_idx) == 1) | 2669 | if (MSB(stat) == 1) |
2673 | return; | 2670 | return; |
2674 | 2671 | ||
2675 | list_for_each_entry(vha, &ha->vp_list, vp_list) | 2672 | list_for_each_entry(vha, &ha->vp_list, vp_list) |
@@ -2982,8 +2979,8 @@ qla84xx_verify_chip(struct scsi_qla_host *ha, uint16_t *status) | |||
2982 | /* We update the firmware with only one data sequence. */ | 2979 | /* We update the firmware with only one data sequence. */ |
2983 | options |= VCO_END_OF_DATA; | 2980 | options |= VCO_END_OF_DATA; |
2984 | 2981 | ||
2985 | retry = 0; | ||
2986 | do { | 2982 | do { |
2983 | retry = 0; | ||
2987 | memset(mn, 0, sizeof(*mn)); | 2984 | memset(mn, 0, sizeof(*mn)); |
2988 | mn->p.req.entry_type = VERIFY_CHIP_IOCB_TYPE; | 2985 | mn->p.req.entry_type = VERIFY_CHIP_IOCB_TYPE; |
2989 | mn->p.req.entry_count = 1; | 2986 | mn->p.req.entry_count = 1; |