diff options
author | David Gwynne <dlg@cvs.openbsd.org> | 2015-02-19 04:58:35 +0000 |
---|---|---|
committer | David Gwynne <dlg@cvs.openbsd.org> | 2015-02-19 04:58:35 +0000 |
commit | c6c47b70c6f70783ed1cf15614a91cbb671e7ad8 (patch) | |
tree | ef403c3c7e5a7c437085336f7715a50f264915dc | |
parent | 28d502c0c0c951b80c030b70d93ad53d7866452e (diff) |
when reading the max packet size in the pcie device config and
status register, correctly mask things so we're left with the mps
field instead of everything but the mps field.
tested by bcallah@ and jim smith
-rw-r--r-- | sys/dev/pci/if_re_pci.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/pci/if_re_pci.c b/sys/dev/pci/if_re_pci.c index 8dd43c73a92..00700de277b 100644 --- a/sys/dev/pci/if_re_pci.c +++ b/sys/dev/pci/if_re_pci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_re_pci.c,v 1.45 2015/01/26 09:58:47 brad Exp $ */ +/* $OpenBSD: if_re_pci.c,v 1.46 2015/02/19 04:58:34 dlg Exp $ */ /* * Copyright (c) 2005 Peter Valchev <pvalchev@openbsd.org> @@ -182,7 +182,7 @@ re_pci_attach(struct device *parent, struct device *self, void *aux) /* Set PCIe maximum read request size to 2048. */ reg = pci_conf_read(pa->pa_pc, pa->pa_tag, sc->rl_expcap + PCI_PCIE_DCSR); - reg = (reg & ~PCI_PCIE_DCSR_MPS); + reg &= PCI_PCIE_DCSR_MPS; reg >>= 12; rrs = (1 << (reg + 7)); if (rrs < 2048) { |