Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-6-1]: src/sys/dev/pci Pullup revision 1.260 (via patch), requeste...



details:   https://anonhg.NetBSD.org/src/rev/eed734bcfb8a
branches:  netbsd-6-1
changeset: 776015:eed734bcfb8a
user:      martin <martin%NetBSD.org@localhost>
date:      Sat Nov 29 11:42:12 2014 +0000

description:
Pullup revision 1.260 (via patch), requested by msaitoh in #1200:

Set maximum read byte count to 2048 for PCI-X BCM5703/5704 devices.
For PCI-X BCM5704, set maximum outstanding split transactions to 0.
This change fixes a serious stability problem on those chips.

diffstat:

 sys/dev/pci/if_bge.c |  17 +++++++++++++++--
 1 files changed, 15 insertions(+), 2 deletions(-)

diffs (38 lines):

diff -r c990e045f93e -r eed734bcfb8a sys/dev/pci/if_bge.c
--- a/sys/dev/pci/if_bge.c      Sun Nov 09 08:01:58 2014 +0000
+++ b/sys/dev/pci/if_bge.c      Sat Nov 29 11:42:12 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_bge.c,v 1.200 2012/02/02 19:43:05 tls Exp $ */
+/*     $NetBSD: if_bge.c,v 1.200.8.1 2014/11/29 11:42:12 martin Exp $  */
 
 /*
  * Copyright (c) 2001 Wind River Systems
@@ -79,7 +79,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_bge.c,v 1.200 2012/02/02 19:43:05 tls Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_bge.c,v 1.200.8.1 2014/11/29 11:42:12 martin Exp $");
 
 #include "vlan.h"
 
@@ -3184,6 +3184,19 @@
        if (sc->bge_flags & BGE_PCIX) {
                reg = pci_conf_read(sc->sc_pc, sc->sc_pcitag, sc->bge_pcixcap
                    + PCI_PCIX_CMD);
+               /* Set max memory read byte count to 2K */
+               if (BGE_ASICREV(sc->bge_chipid) == BGE_ASICREV_BCM5703) {
+                       reg &= ~PCI_PCIX_CMD_BYTECNT_MASK;
+                       reg |= PCI_PCIX_CMD_BCNT_2048;
+               } else if (BGE_ASICREV(sc->bge_chipid) == BGE_ASICREV_BCM5704){
+                       /*
+                        * For 5704, set max outstanding split transaction
+                        * field to 0 (0 means it supports 1 request)
+                        */
+                       reg &= ~(PCI_PCIX_CMD_SPLTRANS_MASK
+                           | PCI_PCIX_CMD_BYTECNT_MASK);
+                       reg |= PCI_PCIX_CMD_BCNT_2048;
+               }
                pci_conf_write(sc->sc_pc, sc->sc_pcitag, sc->bge_pcixcap
                    + PCI_PCIX_CMD, reg & ~PCI_PCIX_CMD_RELAXED_ORDER);
        }



Home | Main Index | Thread Index | Old Index