aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>2014-01-10 09:27:56 -0500
committerBjorn Helgaas <bhelgaas@google.com>2014-01-14 14:14:25 -0500
commit64cdb4181d87900c6560f8c72d02c7ccf75c9070 (patch)
tree7e534d6ee7d7a817024f50f60c85ee72e260d60f
parent8b9ec1da6a310b438516468c669a7e1be046b18c (diff)
MPT / PCI: Use pci_stop_and_remove_bus_device_locked()
Race conditions are theoretically possible between the MPT PCI device removal and the generic PCI bus rescan and device removal that can be triggered via sysfs. To avoid those race conditions make the MPT PCI code use pci_stop_and_remove_bus_device_locked(). Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
-rw-r--r--drivers/message/fusion/mptbase.c2
-rw-r--r--drivers/scsi/mpt2sas/mpt2sas_base.c2
-rw-r--r--drivers/scsi/mpt3sas/mpt3sas_base.c2
3 files changed, 3 insertions, 3 deletions
diff --git a/drivers/message/fusion/mptbase.c b/drivers/message/fusion/mptbase.c
index 767ff4d839f4..570b18a113ff 100644
--- a/drivers/message/fusion/mptbase.c
+++ b/drivers/message/fusion/mptbase.c
@@ -346,7 +346,7 @@ static int mpt_remove_dead_ioc_func(void *arg)
346 if ((pdev == NULL)) 346 if ((pdev == NULL))
347 return -1; 347 return -1;
348 348
349 pci_stop_and_remove_bus_device(pdev); 349 pci_stop_and_remove_bus_device_locked(pdev);
350 return 0; 350 return 0;
351} 351}
352 352
diff --git a/drivers/scsi/mpt2sas/mpt2sas_base.c b/drivers/scsi/mpt2sas/mpt2sas_base.c
index 3901edc35812..bde63f7452bd 100644
--- a/drivers/scsi/mpt2sas/mpt2sas_base.c
+++ b/drivers/scsi/mpt2sas/mpt2sas_base.c
@@ -128,7 +128,7 @@ static int mpt2sas_remove_dead_ioc_func(void *arg)
128 pdev = ioc->pdev; 128 pdev = ioc->pdev;
129 if ((pdev == NULL)) 129 if ((pdev == NULL))
130 return -1; 130 return -1;
131 pci_stop_and_remove_bus_device(pdev); 131 pci_stop_and_remove_bus_device_locked(pdev);
132 return 0; 132 return 0;
133} 133}
134 134
diff --git a/drivers/scsi/mpt3sas/mpt3sas_base.c b/drivers/scsi/mpt3sas/mpt3sas_base.c
index fa785062e97b..0cf4f7000f94 100644
--- a/drivers/scsi/mpt3sas/mpt3sas_base.c
+++ b/drivers/scsi/mpt3sas/mpt3sas_base.c
@@ -131,7 +131,7 @@ static int mpt3sas_remove_dead_ioc_func(void *arg)
131 pdev = ioc->pdev; 131 pdev = ioc->pdev;
132 if ((pdev == NULL)) 132 if ((pdev == NULL))
133 return -1; 133 return -1;
134 pci_stop_and_remove_bus_device(pdev); 134 pci_stop_and_remove_bus_device_locked(pdev);
135 return 0; 135 return 0;
136} 136}
137 137