diff options
Diffstat (limited to 'drivers/scsi/qla2xxx/qla_os.c')
-rw-r--r-- | drivers/scsi/qla2xxx/qla_os.c | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c index cf32653fe01a..c11f872d3e10 100644 --- a/drivers/scsi/qla2xxx/qla_os.c +++ b/drivers/scsi/qla2xxx/qla_os.c | |||
@@ -65,8 +65,6 @@ MODULE_PARM_DESC(ql2xextended_error_logging, | |||
65 | 65 | ||
66 | static void qla2x00_free_device(scsi_qla_host_t *); | 66 | static void qla2x00_free_device(scsi_qla_host_t *); |
67 | 67 | ||
68 | static void qla2x00_config_dma_addressing(scsi_qla_host_t *ha); | ||
69 | |||
70 | int ql2xfdmienable=1; | 68 | int ql2xfdmienable=1; |
71 | module_param(ql2xfdmienable, int, S_IRUGO|S_IRUSR); | 69 | module_param(ql2xfdmienable, int, S_IRUGO|S_IRUSR); |
72 | MODULE_PARM_DESC(ql2xfdmienable, | 70 | MODULE_PARM_DESC(ql2xfdmienable, |
@@ -800,6 +798,7 @@ qla2xxx_eh_abort(struct scsi_cmnd *cmd) | |||
800 | if (ha->isp_ops->abort_command(vha, sp, req)) { | 798 | if (ha->isp_ops->abort_command(vha, sp, req)) { |
801 | DEBUG2(printk("%s(%ld): abort_command " | 799 | DEBUG2(printk("%s(%ld): abort_command " |
802 | "mbx failed.\n", __func__, vha->host_no)); | 800 | "mbx failed.\n", __func__, vha->host_no)); |
801 | ret = FAILED; | ||
803 | } else { | 802 | } else { |
804 | DEBUG3(printk("%s(%ld): abort_command " | 803 | DEBUG3(printk("%s(%ld): abort_command " |
805 | "mbx success.\n", __func__, vha->host_no)); | 804 | "mbx success.\n", __func__, vha->host_no)); |
@@ -1241,9 +1240,8 @@ qla2x00_change_queue_type(struct scsi_device *sdev, int tag_type) | |||
1241 | * supported addressing method. | 1240 | * supported addressing method. |
1242 | */ | 1241 | */ |
1243 | static void | 1242 | static void |
1244 | qla2x00_config_dma_addressing(scsi_qla_host_t *vha) | 1243 | qla2x00_config_dma_addressing(struct qla_hw_data *ha) |
1245 | { | 1244 | { |
1246 | struct qla_hw_data *ha = vha->hw; | ||
1247 | /* Assume a 32bit DMA mask. */ | 1245 | /* Assume a 32bit DMA mask. */ |
1248 | ha->flags.enable_64bit_addressing = 0; | 1246 | ha->flags.enable_64bit_addressing = 0; |
1249 | 1247 | ||
@@ -1480,7 +1478,7 @@ static struct isp_operations qla81xx_isp_ops = { | |||
1480 | .reset_adapter = qla24xx_reset_adapter, | 1478 | .reset_adapter = qla24xx_reset_adapter, |
1481 | .nvram_config = qla81xx_nvram_config, | 1479 | .nvram_config = qla81xx_nvram_config, |
1482 | .update_fw_options = qla81xx_update_fw_options, | 1480 | .update_fw_options = qla81xx_update_fw_options, |
1483 | .load_risc = qla24xx_load_risc, | 1481 | .load_risc = qla81xx_load_risc, |
1484 | .pci_info_str = qla24xx_pci_info_str, | 1482 | .pci_info_str = qla24xx_pci_info_str, |
1485 | .fw_version_str = qla24xx_fw_version_str, | 1483 | .fw_version_str = qla24xx_fw_version_str, |
1486 | .intr_handler = qla24xx_intr_handler, | 1484 | .intr_handler = qla24xx_intr_handler, |
@@ -1869,6 +1867,7 @@ qla2x00_probe_one(struct pci_dev *pdev, const struct pci_device_id *id) | |||
1869 | 1867 | ||
1870 | set_bit(0, (unsigned long *) ha->vp_idx_map); | 1868 | set_bit(0, (unsigned long *) ha->vp_idx_map); |
1871 | 1869 | ||
1870 | qla2x00_config_dma_addressing(ha); | ||
1872 | ret = qla2x00_mem_alloc(ha, req_length, rsp_length, &req, &rsp); | 1871 | ret = qla2x00_mem_alloc(ha, req_length, rsp_length, &req, &rsp); |
1873 | if (!ret) { | 1872 | if (!ret) { |
1874 | qla_printk(KERN_WARNING, ha, | 1873 | qla_printk(KERN_WARNING, ha, |
@@ -1888,13 +1887,13 @@ qla2x00_probe_one(struct pci_dev *pdev, const struct pci_device_id *id) | |||
1888 | "[ERROR] Failed to allocate memory for scsi_host\n"); | 1887 | "[ERROR] Failed to allocate memory for scsi_host\n"); |
1889 | 1888 | ||
1890 | ret = -ENOMEM; | 1889 | ret = -ENOMEM; |
1890 | qla2x00_mem_free(ha); | ||
1891 | qla2x00_free_que(ha, req, rsp); | ||
1891 | goto probe_hw_failed; | 1892 | goto probe_hw_failed; |
1892 | } | 1893 | } |
1893 | 1894 | ||
1894 | pci_set_drvdata(pdev, base_vha); | 1895 | pci_set_drvdata(pdev, base_vha); |
1895 | 1896 | ||
1896 | qla2x00_config_dma_addressing(base_vha); | ||
1897 | |||
1898 | host = base_vha->host; | 1897 | host = base_vha->host; |
1899 | base_vha->req_ques[0] = req->id; | 1898 | base_vha->req_ques[0] = req->id; |
1900 | host->can_queue = req->length + 128; | 1899 | host->can_queue = req->length + 128; |
@@ -1917,14 +1916,13 @@ qla2x00_probe_one(struct pci_dev *pdev, const struct pci_device_id *id) | |||
1917 | /* Set up the irqs */ | 1916 | /* Set up the irqs */ |
1918 | ret = qla2x00_request_irqs(ha, rsp); | 1917 | ret = qla2x00_request_irqs(ha, rsp); |
1919 | if (ret) | 1918 | if (ret) |
1920 | goto probe_failed; | 1919 | goto probe_init_failed; |
1921 | |||
1922 | /* Alloc arrays of request and response ring ptrs */ | 1920 | /* Alloc arrays of request and response ring ptrs */ |
1923 | if (!qla2x00_alloc_queues(ha)) { | 1921 | if (!qla2x00_alloc_queues(ha)) { |
1924 | qla_printk(KERN_WARNING, ha, | 1922 | qla_printk(KERN_WARNING, ha, |
1925 | "[ERROR] Failed to allocate memory for queue" | 1923 | "[ERROR] Failed to allocate memory for queue" |
1926 | " pointers\n"); | 1924 | " pointers\n"); |
1927 | goto probe_failed; | 1925 | goto probe_init_failed; |
1928 | } | 1926 | } |
1929 | ha->rsp_q_map[0] = rsp; | 1927 | ha->rsp_q_map[0] = rsp; |
1930 | ha->req_q_map[0] = req; | 1928 | ha->req_q_map[0] = req; |
@@ -1997,6 +1995,10 @@ qla2x00_probe_one(struct pci_dev *pdev, const struct pci_device_id *id) | |||
1997 | 1995 | ||
1998 | return 0; | 1996 | return 0; |
1999 | 1997 | ||
1998 | probe_init_failed: | ||
1999 | qla2x00_free_que(ha, req, rsp); | ||
2000 | ha->max_queues = 0; | ||
2001 | |||
2000 | probe_failed: | 2002 | probe_failed: |
2001 | qla2x00_free_device(base_vha); | 2003 | qla2x00_free_device(base_vha); |
2002 | 2004 | ||