Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-7]: src/sys/dev/pci Pull up following revision(s) (requested by m...
details: https://anonhg.NetBSD.org/src/rev/2bb9eb7db2ea
branches: netbsd-7
changeset: 798997:2bb9eb7db2ea
user: martin <martin%NetBSD.org@localhost>
date: Tue Feb 17 14:48:10 2015 +0000
description:
Pull up following revision(s) (requested by msaitoh in ticket #526):
sys/dev/pci/if_bge.c: revision 1.278
Fix three bugs reported by enami@:
- bge_miibus_writereg(): Fix a bug that BCM5906 may leave an APE lock.
- Fix hwcfg4 isn't printed correctly.
- Fix a bug that BGE_PHY_TEST_CTRL_REG isn't set correctly on some PCIe devices.
diffstat:
sys/dev/pci/if_bge.c | 14 +++++++-------
1 files changed, 7 insertions(+), 7 deletions(-)
diffs (53 lines):
diff -r 88fa68638091 -r 2bb9eb7db2ea sys/dev/pci/if_bge.c
--- a/sys/dev/pci/if_bge.c Tue Feb 17 14:45:31 2015 +0000
+++ b/sys/dev/pci/if_bge.c Tue Feb 17 14:48:10 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_bge.c,v 1.277 2014/08/10 16:44:36 tls Exp $ */
+/* $NetBSD: if_bge.c,v 1.277.2.1 2015/02/17 14:48:10 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.277 2014/08/10 16:44:36 tls Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_bge.c,v 1.277.2.1 2015/02/17 14:48:10 martin Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -1397,13 +1397,13 @@
uint32_t autopoll;
int i;
- if (bge_ape_lock(sc, sc->bge_phy_ape_lock) != 0)
- return;
-
if (BGE_ASICREV(sc->bge_chipid) == BGE_ASICREV_BCM5906 &&
(reg == BRGPHY_MII_1000CTL || reg == BRGPHY_MII_AUXCTL))
return;
+ if (bge_ape_lock(sc, sc->bge_phy_ape_lock) != 0)
+ return;
+
/* Reading with autopolling on may trigger PCI errors */
autopoll = CSR_READ_4(sc, BGE_MI_MODE);
if (autopoll & BGE_MIMODE_AUTOPOLL) {
@@ -3742,7 +3742,7 @@
hwcfg2 = bge_readmem_ind(sc, BGE_SRAM_DATA_CFG_2);
if (sc->bge_flags & BGEF_PCIE)
hwcfg3 = bge_readmem_ind(sc, BGE_SRAM_DATA_CFG_3);
- if (BGE_ASICREV(sc->bge_chipid == BGE_ASICREV_BCM5785))
+ if (BGE_ASICREV(sc->bge_chipid) == BGE_ASICREV_BCM5785)
hwcfg4 = bge_readmem_ind(sc, BGE_SRAM_DATA_CFG_4);
if (BGE_IS_5717_PLUS(sc))
hwcfg5 = bge_readmem_ind(sc, BGE_SRAM_DATA_CFG_5);
@@ -4170,7 +4170,7 @@
* XXX: from FreeBSD/Linux; no documentation
*/
if (sc->bge_flags & BGEF_PCIE) {
- if (BGE_ASICREV(sc->bge_chipid != BGE_ASICREV_BCM5785) &&
+ if ((BGE_ASICREV(sc->bge_chipid) != BGE_ASICREV_BCM5785) &&
!BGE_IS_57765_PLUS(sc) &&
(CSR_READ_4(sc, BGE_PHY_TEST_CTRL_REG) ==
(BGE_PHY_PCIE_LTASS_MODE | BGE_PHY_PCIE_SCRAM_MODE))) {
Home |
Main Index |
Thread Index |
Old Index