diff options
-rw-r--r-- | drivers/scsi/megaraid/megaraid_sas.h | 3 | ||||
-rw-r--r-- | drivers/scsi/megaraid/megaraid_sas_base.c | 19 |
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: | |||
3901 | static int __devinit | 3901 | static int __devinit |
3902 | megasas_probe_one(struct pci_dev *pdev, const struct pci_device_id *id) | 3902 | megasas_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 |