aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/megaraid
diff options
context:
space:
mode:
authoradam radford <aradford@gmail.com>2011-02-24 23:56:28 -0500
committerJames Bottomley <James.Bottomley@suse.de>2011-02-28 12:47:48 -0500
commit66192dfe1e74eae31a76cfc36092dabdba1324e6 (patch)
tree50d23dfbb7fb154c43ccf9eb28ec5e4d8e984ae2 /drivers/scsi/megaraid
parente1419191d8d38098fb6ef29e94aadd15dabff3da (diff)
[SCSI] megaraid_sas: Fix probe_one to clear MSI-X flags in kdump
The following patch for megaraid_sas fixes megasas_probe_one() to clear MSI-X flags in kdump when the 'reset_devices' kernel parameter is passed in. Signed-off-by: Adam Radford <aradford@gmail.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/scsi/megaraid')
-rw-r--r--drivers/scsi/megaraid/megaraid_sas.h3
-rw-r--r--drivers/scsi/megaraid/megaraid_sas_base.c19
2 files changed, 21 insertions, 1 deletions
diff --git a/drivers/scsi/megaraid/megaraid_sas.h b/drivers/scsi/megaraid/megaraid_sas.h
index 1b5e375732c0..e00ee4afdbc7 100644
--- a/drivers/scsi/megaraid/megaraid_sas.h
+++ b/drivers/scsi/megaraid/megaraid_sas.h
@@ -1477,4 +1477,7 @@ struct megasas_mgmt_info {
1477 int max_index; 1477 int max_index;
1478}; 1478};
1479 1479
1480#define msi_control_reg(base) (base + PCI_MSI_FLAGS)
1481#define PCI_MSIX_FLAGS_ENABLE (1 << 15)
1482
1480#endif /*LSI_MEGARAID_SAS_H */ 1483#endif /*LSI_MEGARAID_SAS_H */
diff --git a/drivers/scsi/megaraid/megaraid_sas_base.c b/drivers/scsi/megaraid/megaraid_sas_base.c
index 050ec1694e68..a521e1afd738 100644
--- a/drivers/scsi/megaraid/megaraid_sas_base.c
+++ b/drivers/scsi/megaraid/megaraid_sas_base.c
@@ -3901,9 +3901,26 @@ fail_set_dma_mask:
3901static int __devinit 3901static int __devinit
3902megasas_probe_one(struct pci_dev *pdev, const struct pci_device_id *id) 3902megasas_probe_one(struct pci_dev *pdev, const struct pci_device_id *id)
3903{ 3903{
3904 int rval; 3904 int rval, pos;
3905 struct Scsi_Host *host; 3905 struct Scsi_Host *host;
3906 struct megasas_instance *instance; 3906 struct megasas_instance *instance;
3907 u16 control = 0;
3908
3909 /* Reset MSI-X in the kdump kernel */
3910 if (reset_devices) {
3911 pos = pci_find_capability(pdev, PCI_CAP_ID_MSIX);
3912 if (pos) {
3913 pci_read_config_word(pdev, msi_control_reg(pos),
3914 &control);
3915 if (control & PCI_MSIX_FLAGS_ENABLE) {
3916 dev_info(&pdev->dev, "resetting MSI-X\n");
3917 pci_write_config_word(pdev,
3918 msi_control_reg(pos),
3919 control &
3920 ~PCI_MSIX_FLAGS_ENABLE);
3921 }
3922 }
3923 }
3907 3924
3908 /* 3925 /*
3909 * Announce PCI information 3926 * Announce PCI information