it looks like it reads the DCSR register and then keeps everything
except the MPS field.

this might cause it to erronously consider the mps to be much bigger
than 2048, which in turn could prevent it from setting it correctly.

i dont actually have one of these chips. can someone give it a spin?

Index: if_re_pci.c
===================================================================
RCS file: /cvs/src/sys/dev/pci/if_re_pci.c,v
retrieving revision 1.45
diff -u -p -r1.45 if_re_pci.c
--- if_re_pci.c 26 Jan 2015 09:58:47 -0000      1.45
+++ if_re_pci.c 18 Feb 2015 01:12:22 -0000
@@ -182,7 +182,7 @@ re_pci_attach(struct device *parent, str
                        /* 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) {

Reply via email to