summaryrefslogtreecommitdiff
path: root/drivers/scsi/mpt2sas/mpt2sas_scsih.c
diff options
context:
space:
mode:
authorJoe Lawrence <joe.lawrence@stratus.com>2013-08-08 16:45:38 -0400
committerJames Bottomley <JBottomley@Parallels.com>2013-08-26 18:53:44 +0400
commit3b3e6f8df3b03642d6705d1db84842c24415b21f (patch)
tree3a383b0486eb5f9957e51806d072b513c6e82aa2 /drivers/scsi/mpt2sas/mpt2sas_scsih.c
parent279afdfe78a020b4b1a68bffd0009b961b12982e (diff)
[SCSI] mpt2sas: fix cleanup on controller resource mapping failure
If mpt2sas_base_map_resources takes an early error path then its counterpart, mpt2sas_base_free_resources needs to be careful about cleaning up: 1 - _base_mask_interrupts and _base_make_ioc_ready require memory mapped I/O registers, make sure that this is true. 2 - _base_free_irq iterates over the adapter's reply_queue_list, so move this list head initialization out of _base_enable_msix to _scsih_probe so this will always be safe. 3 - check that the controller PCI device and its BARs have been enabled before disabling them. Signed-off-by: Joe Lawrence <joe.lawrence@stratus.com> Acked-by: Sreekanth Reddy <Sreekanth.Reddy@lsi.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers/scsi/mpt2sas/mpt2sas_scsih.c')
-rw-r--r--drivers/scsi/mpt2sas/mpt2sas_scsih.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/scsi/mpt2sas/mpt2sas_scsih.c b/drivers/scsi/mpt2sas/mpt2sas_scsih.c
index 51004768d0f5..389d79290861 100644
--- a/drivers/scsi/mpt2sas/mpt2sas_scsih.c
+++ b/drivers/scsi/mpt2sas/mpt2sas_scsih.c
@@ -8175,6 +8175,7 @@ _scsih_probe(struct pci_dev *pdev, const struct pci_device_id *id)
INIT_LIST_HEAD(&ioc->sas_hba.sas_port_list);
INIT_LIST_HEAD(&ioc->delayed_tr_list);
INIT_LIST_HEAD(&ioc->delayed_tr_volume_list);
+ INIT_LIST_HEAD(&ioc->reply_queue_list);
/* init shost parameters */
shost->max_cmd_len = 32;