From owner-svn-src-head@FreeBSD.ORG Wed Jul 14 21:47:50 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 46B3B106566B; Wed, 14 Jul 2010 21:47:50 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 35EEE8FC1F; Wed, 14 Jul 2010 21:47:50 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6ELloLL089608; Wed, 14 Jul 2010 21:47:50 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6ELloES089606; Wed, 14 Jul 2010 21:47:50 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201007142147.o6ELloES089606@svn.freebsd.org> From: Pyun YongHyeon Date: Wed, 14 Jul 2010 21:47:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210083 - head/sys/dev/bge X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Jul 2010 21:47:50 -0000 Author: yongari Date: Wed Jul 14 21:47:49 2010 New Revision: 210083 URL: http://svn.freebsd.org/changeset/base/210083 Log: Remove enabling Data FIFO protection with indirect memory access. r165114 added that code and that change ignored the same logic committed in r135772. In addition, data FIFO protection should be selectively enabled instead of applying to all PCIe devices. While I'm here add BCM5785 to devices that do not require this fix. Modified: head/sys/dev/bge/if_bge.c Modified: head/sys/dev/bge/if_bge.c ============================================================================== --- head/sys/dev/bge/if_bge.c Wed Jul 14 21:24:18 2010 (r210082) +++ head/sys/dev/bge/if_bge.c Wed Jul 14 21:47:49 2010 (r210083) @@ -3246,11 +3246,6 @@ bge_reset(struct bge_softc *sc) DELAY(10); } - if (sc->bge_flags & BGE_FLAG_PCIE) { - reset = bge_readmem_ind(sc, 0x7C00); - bge_writemem_ind(sc, 0x7C00, reset | (1 << 25)); - } - /* Fix up byte swapping. */ CSR_WRITE_4(sc, BGE_MODE_CTL, BGE_DMA_SWAP_OPTIONS | BGE_MODECTL_BYTESWAP_DATA); @@ -3275,7 +3270,9 @@ bge_reset(struct bge_softc *sc) /* XXX: Broadcom Linux driver. */ if (sc->bge_flags & BGE_FLAG_PCIE && - sc->bge_chipid != BGE_CHIPID_BCM5750_A0) { + sc->bge_chipid != BGE_CHIPID_BCM5750_A0 && + sc->bge_asicrev != BGE_ASICREV_BCM5785) { + /* Enable Data FIFO protection. */ val = CSR_READ_4(sc, 0x7C00); CSR_WRITE_4(sc, 0x7C00, val | (1 << 25)); }