|
@@ -65,8 +65,6 @@ MODULE_PARM_DESC(ql2xextended_error_logging,
|
|
|
|
|
|
static void qla2x00_free_device(scsi_qla_host_t *);
|
|
static void qla2x00_free_device(scsi_qla_host_t *);
|
|
|
|
|
|
-static void qla2x00_config_dma_addressing(scsi_qla_host_t *ha);
|
|
|
|
-
|
|
|
|
int ql2xfdmienable=1;
|
|
int ql2xfdmienable=1;
|
|
module_param(ql2xfdmienable, int, S_IRUGO|S_IRUSR);
|
|
module_param(ql2xfdmienable, int, S_IRUGO|S_IRUSR);
|
|
MODULE_PARM_DESC(ql2xfdmienable,
|
|
MODULE_PARM_DESC(ql2xfdmienable,
|
|
@@ -800,6 +798,7 @@ qla2xxx_eh_abort(struct scsi_cmnd *cmd)
|
|
if (ha->isp_ops->abort_command(vha, sp, req)) {
|
|
if (ha->isp_ops->abort_command(vha, sp, req)) {
|
|
DEBUG2(printk("%s(%ld): abort_command "
|
|
DEBUG2(printk("%s(%ld): abort_command "
|
|
"mbx failed.\n", __func__, vha->host_no));
|
|
"mbx failed.\n", __func__, vha->host_no));
|
|
|
|
+ ret = FAILED;
|
|
} else {
|
|
} else {
|
|
DEBUG3(printk("%s(%ld): abort_command "
|
|
DEBUG3(printk("%s(%ld): abort_command "
|
|
"mbx success.\n", __func__, vha->host_no));
|
|
"mbx success.\n", __func__, vha->host_no));
|
|
@@ -1241,9 +1240,8 @@ qla2x00_change_queue_type(struct scsi_device *sdev, int tag_type)
|
|
* supported addressing method.
|
|
* supported addressing method.
|
|
*/
|
|
*/
|
|
static void
|
|
static void
|
|
-qla2x00_config_dma_addressing(scsi_qla_host_t *vha)
|
|
|
|
|
|
+qla2x00_config_dma_addressing(struct qla_hw_data *ha)
|
|
{
|
|
{
|
|
- struct qla_hw_data *ha = vha->hw;
|
|
|
|
/* Assume a 32bit DMA mask. */
|
|
/* Assume a 32bit DMA mask. */
|
|
ha->flags.enable_64bit_addressing = 0;
|
|
ha->flags.enable_64bit_addressing = 0;
|
|
|
|
|
|
@@ -1480,7 +1478,7 @@ static struct isp_operations qla81xx_isp_ops = {
|
|
.reset_adapter = qla24xx_reset_adapter,
|
|
.reset_adapter = qla24xx_reset_adapter,
|
|
.nvram_config = qla81xx_nvram_config,
|
|
.nvram_config = qla81xx_nvram_config,
|
|
.update_fw_options = qla81xx_update_fw_options,
|
|
.update_fw_options = qla81xx_update_fw_options,
|
|
- .load_risc = qla24xx_load_risc,
|
|
|
|
|
|
+ .load_risc = qla81xx_load_risc,
|
|
.pci_info_str = qla24xx_pci_info_str,
|
|
.pci_info_str = qla24xx_pci_info_str,
|
|
.fw_version_str = qla24xx_fw_version_str,
|
|
.fw_version_str = qla24xx_fw_version_str,
|
|
.intr_handler = qla24xx_intr_handler,
|
|
.intr_handler = qla24xx_intr_handler,
|
|
@@ -1869,6 +1867,7 @@ qla2x00_probe_one(struct pci_dev *pdev, const struct pci_device_id *id)
|
|
|
|
|
|
set_bit(0, (unsigned long *) ha->vp_idx_map);
|
|
set_bit(0, (unsigned long *) ha->vp_idx_map);
|
|
|
|
|
|
|
|
+ qla2x00_config_dma_addressing(ha);
|
|
ret = qla2x00_mem_alloc(ha, req_length, rsp_length, &req, &rsp);
|
|
ret = qla2x00_mem_alloc(ha, req_length, rsp_length, &req, &rsp);
|
|
if (!ret) {
|
|
if (!ret) {
|
|
qla_printk(KERN_WARNING, ha,
|
|
qla_printk(KERN_WARNING, ha,
|
|
@@ -1888,13 +1887,13 @@ qla2x00_probe_one(struct pci_dev *pdev, const struct pci_device_id *id)
|
|
"[ERROR] Failed to allocate memory for scsi_host\n");
|
|
"[ERROR] Failed to allocate memory for scsi_host\n");
|
|
|
|
|
|
ret = -ENOMEM;
|
|
ret = -ENOMEM;
|
|
|
|
+ qla2x00_mem_free(ha);
|
|
|
|
+ qla2x00_free_que(ha, req, rsp);
|
|
goto probe_hw_failed;
|
|
goto probe_hw_failed;
|
|
}
|
|
}
|
|
|
|
|
|
pci_set_drvdata(pdev, base_vha);
|
|
pci_set_drvdata(pdev, base_vha);
|
|
|
|
|
|
- qla2x00_config_dma_addressing(base_vha);
|
|
|
|
-
|
|
|
|
host = base_vha->host;
|
|
host = base_vha->host;
|
|
base_vha->req_ques[0] = req->id;
|
|
base_vha->req_ques[0] = req->id;
|
|
host->can_queue = req->length + 128;
|
|
host->can_queue = req->length + 128;
|
|
@@ -1917,14 +1916,13 @@ qla2x00_probe_one(struct pci_dev *pdev, const struct pci_device_id *id)
|
|
/* Set up the irqs */
|
|
/* Set up the irqs */
|
|
ret = qla2x00_request_irqs(ha, rsp);
|
|
ret = qla2x00_request_irqs(ha, rsp);
|
|
if (ret)
|
|
if (ret)
|
|
- goto probe_failed;
|
|
|
|
-
|
|
|
|
|
|
+ goto probe_init_failed;
|
|
/* Alloc arrays of request and response ring ptrs */
|
|
/* Alloc arrays of request and response ring ptrs */
|
|
if (!qla2x00_alloc_queues(ha)) {
|
|
if (!qla2x00_alloc_queues(ha)) {
|
|
qla_printk(KERN_WARNING, ha,
|
|
qla_printk(KERN_WARNING, ha,
|
|
"[ERROR] Failed to allocate memory for queue"
|
|
"[ERROR] Failed to allocate memory for queue"
|
|
" pointers\n");
|
|
" pointers\n");
|
|
- goto probe_failed;
|
|
|
|
|
|
+ goto probe_init_failed;
|
|
}
|
|
}
|
|
ha->rsp_q_map[0] = rsp;
|
|
ha->rsp_q_map[0] = rsp;
|
|
ha->req_q_map[0] = req;
|
|
ha->req_q_map[0] = req;
|
|
@@ -1997,6 +1995,10 @@ qla2x00_probe_one(struct pci_dev *pdev, const struct pci_device_id *id)
|
|
|
|
|
|
return 0;
|
|
return 0;
|
|
|
|
|
|
|
|
+probe_init_failed:
|
|
|
|
+ qla2x00_free_que(ha, req, rsp);
|
|
|
|
+ ha->max_queues = 0;
|
|
|
|
+
|
|
probe_failed:
|
|
probe_failed:
|
|
qla2x00_free_device(base_vha);
|
|
qla2x00_free_device(base_vha);
|
|
|
|
|