[SCSI] esas2r: use PCI define for Max_Read_Request_Size
authorRafał Miłecki <zajec5@gmail.com>
Mon, 26 Jan 2015 17:06:24 +0000 (18:06 +0100)
committerBjorn Helgaas <bhelgaas@google.com>
Tue, 27 Jan 2015 14:14:26 +0000 (08:14 -0600)
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>
drivers/scsi/esas2r/esas2r_init.c

index 6776931e25d45a598c0f5b9883e89e3db7dd5f4a..78ce4d61a69bbab88e1f90d52ea8c3084c12f0fe 100644 (file)
@@ -813,12 +813,13 @@ static void esas2r_init_pci_cfg_space(struct esas2r_adapter *a)
                pci_read_config_word(a->pcid, pcie_cap_reg + PCI_EXP_DEVCTL,
                                     &devcontrol);
 
-               if ((devcontrol & PCI_EXP_DEVCTL_READRQ) > 0x2000) {
+               if ((devcontrol & PCI_EXP_DEVCTL_READRQ) >
+                    PCI_EXP_DEVCTL_READRQ_512B) {
                        esas2r_log(ESAS2R_LOG_INFO,
                                   "max read request size > 512B");
 
                        devcontrol &= ~PCI_EXP_DEVCTL_READRQ;
-                       devcontrol |= 0x2000;
+                       devcontrol |= PCI_EXP_DEVCTL_READRQ_512B;
                        pci_write_config_word(a->pcid,
                                              pcie_cap_reg + PCI_EXP_DEVCTL,
                                              devcontrol);