diff options
author | Bjorn Helgaas <bhelgaas@google.com> | 2013-04-17 20:08:44 -0400 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2013-04-18 13:07:46 -0400 |
commit | 99369065970e9ea7d1ca489341ed29d1a72ec0b5 (patch) | |
tree | 92c10c2010e30fa381f87f7743d87d3e65611958 /drivers/scsi/megaraid/megaraid_sas_base.c | |
parent | f6161aa153581da4a3867a2d1a7caf4be19b6ec9 (diff) |
[SCSI] megaraid_sas: Use correct #define for MSI-X capability
Previously we used PCI_MSI_FLAGS to locate a register in the MSI-X
capability. This did work because the MSI and MSI-X flags happen
to be at the same offsets, but was confusing.
PCI_MSIX_FLAGS_ENABLE is already defined in include/uapi/linux/pci_regs.h,
so no need to define it again.
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Acked-by: Adam Radford <aradford@gmail.com>
Diffstat (limited to 'drivers/scsi/megaraid/megaraid_sas_base.c')
-rw-r--r-- | drivers/scsi/megaraid/megaraid_sas_base.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/scsi/megaraid/megaraid_sas_base.c b/drivers/scsi/megaraid/megaraid_sas_base.c index 9d53540207ec..7c90d57b867e 100644 --- a/drivers/scsi/megaraid/megaraid_sas_base.c +++ b/drivers/scsi/megaraid/megaraid_sas_base.c | |||
@@ -3984,12 +3984,12 @@ static int megasas_probe_one(struct pci_dev *pdev, | |||
3984 | if (reset_devices) { | 3984 | if (reset_devices) { |
3985 | pos = pci_find_capability(pdev, PCI_CAP_ID_MSIX); | 3985 | pos = pci_find_capability(pdev, PCI_CAP_ID_MSIX); |
3986 | if (pos) { | 3986 | if (pos) { |
3987 | pci_read_config_word(pdev, msi_control_reg(pos), | 3987 | pci_read_config_word(pdev, pos + PCI_MSIX_FLAGS, |
3988 | &control); | 3988 | &control); |
3989 | if (control & PCI_MSIX_FLAGS_ENABLE) { | 3989 | if (control & PCI_MSIX_FLAGS_ENABLE) { |
3990 | dev_info(&pdev->dev, "resetting MSI-X\n"); | 3990 | dev_info(&pdev->dev, "resetting MSI-X\n"); |
3991 | pci_write_config_word(pdev, | 3991 | pci_write_config_word(pdev, |
3992 | msi_control_reg(pos), | 3992 | pos + PCI_MSIX_FLAGS, |
3993 | control & | 3993 | control & |
3994 | ~PCI_MSIX_FLAGS_ENABLE); | 3994 | ~PCI_MSIX_FLAGS_ENABLE); |
3995 | } | 3995 | } |