diff options
author | Rafał Miłecki <zajec5@gmail.com> | 2015-01-26 12:06:24 -0500 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2015-01-27 09:14:26 -0500 |
commit | 88b71f9c81ef94fbea5fc497cb9ce837b8c7f12c (patch) | |
tree | db90a32067904240ddf58575d8b607bd907384e7 | |
parent | ff59887f2de1692e7691004858adba3febcade20 (diff) |
[SCSI] esas2r: use PCI define for Max_Read_Request_Size
Replace a magic number with a PCI #define symbol.
[bhelgaas: add parenthesis]
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
-rw-r--r-- | drivers/scsi/esas2r/esas2r_init.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/scsi/esas2r/esas2r_init.c b/drivers/scsi/esas2r/esas2r_init.c index 6776931e25d4..78ce4d61a69b 100644 --- a/drivers/scsi/esas2r/esas2r_init.c +++ b/drivers/scsi/esas2r/esas2r_init.c | |||
@@ -813,12 +813,13 @@ static void esas2r_init_pci_cfg_space(struct esas2r_adapter *a) | |||
813 | pci_read_config_word(a->pcid, pcie_cap_reg + PCI_EXP_DEVCTL, | 813 | pci_read_config_word(a->pcid, pcie_cap_reg + PCI_EXP_DEVCTL, |
814 | &devcontrol); | 814 | &devcontrol); |
815 | 815 | ||
816 | if ((devcontrol & PCI_EXP_DEVCTL_READRQ) > 0x2000) { | 816 | if ((devcontrol & PCI_EXP_DEVCTL_READRQ) > |
817 | PCI_EXP_DEVCTL_READRQ_512B) { | ||
817 | esas2r_log(ESAS2R_LOG_INFO, | 818 | esas2r_log(ESAS2R_LOG_INFO, |
818 | "max read request size > 512B"); | 819 | "max read request size > 512B"); |
819 | 820 | ||
820 | devcontrol &= ~PCI_EXP_DEVCTL_READRQ; | 821 | devcontrol &= ~PCI_EXP_DEVCTL_READRQ; |
821 | devcontrol |= 0x2000; | 822 | devcontrol |= PCI_EXP_DEVCTL_READRQ_512B; |
822 | pci_write_config_word(a->pcid, | 823 | pci_write_config_word(a->pcid, |
823 | pcie_cap_reg + PCI_EXP_DEVCTL, | 824 | pcie_cap_reg + PCI_EXP_DEVCTL, |
824 | devcontrol); | 825 | devcontrol); |