diff options
author | Kashyap, Desai <kashyap.desai@lsi.com> | 2010-04-05 04:50:07 -0400 |
---|---|---|
committer | James Bottomley <James.Bottomley@suse.de> | 2010-04-11 14:42:41 -0400 |
commit | ef7c80c1f18f2c5eea2dabd214f12e0c93ac29cf (patch) | |
tree | 5ae27b0d8f20e5ff8a09e8d8817b1884c0a1434c /drivers/scsi/mpt2sas/mpt2sas_base.c | |
parent | ebda4d38df542e1ff4747c4daadfc7da250b4fa6 (diff) |
[SCSI] mpt2sas: Added support for PCIe Advanced Error Recovery.
Added support in the driver to support EEH and
PCIe Advanced Error Recovery. This involves adding new
pci_error_handler interface for recovering the controller from PCI Bus
errors, such as SERR and PERR. Some tools are available for simulating
PCI errors in order to validate this interface:
http://www.kernel.org/pub/linux/utils/pci/aer-inject
Signed-off-by: Kashyap Desai <kashyap.desai@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/scsi/mpt2sas/mpt2sas_base.c')
-rw-r--r-- | drivers/scsi/mpt2sas/mpt2sas_base.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/scsi/mpt2sas/mpt2sas_base.c b/drivers/scsi/mpt2sas/mpt2sas_base.c index f980b8822f92..b04ccad7d972 100644 --- a/drivers/scsi/mpt2sas/mpt2sas_base.c +++ b/drivers/scsi/mpt2sas/mpt2sas_base.c | |||
@@ -58,6 +58,7 @@ | |||
58 | #include <linux/sort.h> | 58 | #include <linux/sort.h> |
59 | #include <linux/io.h> | 59 | #include <linux/io.h> |
60 | #include <linux/time.h> | 60 | #include <linux/time.h> |
61 | #include <linux/aer.h> | ||
61 | 62 | ||
62 | #include "mpt2sas_base.h" | 63 | #include "mpt2sas_base.h" |
63 | 64 | ||
@@ -1256,6 +1257,9 @@ mpt2sas_base_map_resources(struct MPT2SAS_ADAPTER *ioc) | |||
1256 | goto out_fail; | 1257 | goto out_fail; |
1257 | } | 1258 | } |
1258 | 1259 | ||
1260 | /* AER (Advanced Error Reporting) hooks */ | ||
1261 | pci_enable_pcie_error_reporting(pdev); | ||
1262 | |||
1259 | pci_set_master(pdev); | 1263 | pci_set_master(pdev); |
1260 | 1264 | ||
1261 | if (_base_config_dma_addressing(ioc, pdev) != 0) { | 1265 | if (_base_config_dma_addressing(ioc, pdev) != 0) { |
@@ -1311,6 +1315,7 @@ mpt2sas_base_map_resources(struct MPT2SAS_ADAPTER *ioc) | |||
1311 | ioc->chip_phys = 0; | 1315 | ioc->chip_phys = 0; |
1312 | ioc->pci_irq = -1; | 1316 | ioc->pci_irq = -1; |
1313 | pci_release_selected_regions(ioc->pdev, ioc->bars); | 1317 | pci_release_selected_regions(ioc->pdev, ioc->bars); |
1318 | pci_disable_pcie_error_reporting(pdev); | ||
1314 | pci_disable_device(pdev); | 1319 | pci_disable_device(pdev); |
1315 | return r; | 1320 | return r; |
1316 | } | 1321 | } |
@@ -3547,6 +3552,7 @@ mpt2sas_base_free_resources(struct MPT2SAS_ADAPTER *ioc) | |||
3547 | ioc->pci_irq = -1; | 3552 | ioc->pci_irq = -1; |
3548 | ioc->chip_phys = 0; | 3553 | ioc->chip_phys = 0; |
3549 | pci_release_selected_regions(ioc->pdev, ioc->bars); | 3554 | pci_release_selected_regions(ioc->pdev, ioc->bars); |
3555 | pci_disable_pcie_error_reporting(pdev); | ||
3550 | pci_disable_device(pdev); | 3556 | pci_disable_device(pdev); |
3551 | return; | 3557 | return; |
3552 | } | 3558 | } |