Skip to content

Commit

Permalink
[SCSI] esas2r: use PCI define for Max_Read_Request_Size
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Rafał Miłecki authored and Bjorn Helgaas committed Jan 27, 2015
1 parent ff59887 commit 88b71f9
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions drivers/scsi/esas2r/esas2r_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 88b71f9

Please sign in to comment.