if_bge.c (226821) | if_bge.c (226864) |
---|---|
1/*- 2 * Copyright (c) 2001 Wind River Systems 3 * Copyright (c) 1997, 1998, 1999, 2001 4 * Bill Paul <wpaul@windriver.com>. All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 18 unchanged lines hidden (view full) --- 27 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 28 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 29 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 30 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 31 * THE POSSIBILITY OF SUCH DAMAGE. 32 */ 33 34#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 2001 Wind River Systems 3 * Copyright (c) 1997, 1998, 1999, 2001 4 * Bill Paul <wpaul@windriver.com>. All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 18 unchanged lines hidden (view full) --- 27 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 28 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 29 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 30 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 31 * THE POSSIBILITY OF SUCH DAMAGE. 32 */ 33 34#include <sys/cdefs.h> |
35__FBSDID("$FreeBSD: head/sys/dev/bge/if_bge.c 226821 2011-10-26 23:52:02Z yongari $"); | 35__FBSDID("$FreeBSD: head/sys/dev/bge/if_bge.c 226864 2011-10-27 20:54:53Z yongari $"); |
36 37/* 38 * Broadcom BCM570x family gigabit ethernet driver for FreeBSD. 39 * 40 * The Broadcom BCM5700 is based on technology originally developed by 41 * Alteon Networks as part of the Tigon I and Tigon II gigabit ethernet 42 * MAC chips. The BCM5700, sometimes referred to as the Tigon III, has 43 * two on-board MIPS R4000 CPUs and can have as much as 16MB of external --- 1319 unchanged lines hidden (view full) --- 1363} 1364 1365static void 1366bge_stop_fw(struct bge_softc *sc) 1367{ 1368 int i; 1369 1370 if (sc->bge_asf_mode) { | 36 37/* 38 * Broadcom BCM570x family gigabit ethernet driver for FreeBSD. 39 * 40 * The Broadcom BCM5700 is based on technology originally developed by 41 * Alteon Networks as part of the Tigon I and Tigon II gigabit ethernet 42 * MAC chips. The BCM5700, sometimes referred to as the Tigon III, has 43 * two on-board MIPS R4000 CPUs and can have as much as 16MB of external --- 1319 unchanged lines hidden (view full) --- 1363} 1364 1365static void 1366bge_stop_fw(struct bge_softc *sc) 1367{ 1368 int i; 1369 1370 if (sc->bge_asf_mode) { |
1371 bge_writemem_ind(sc, BGE_SRAM_FW_CMD_MB, BGE_FW_PAUSE); | 1371 bge_writemem_ind(sc, BGE_SRAM_FW_CMD_MB, BGE_FW_CMD_PAUSE); |
1372 CSR_WRITE_4(sc, BGE_RX_CPU_EVENT, 1373 CSR_READ_4(sc, BGE_RX_CPU_EVENT) | (1 << 14)); 1374 1375 for (i = 0; i < 100; i++ ) { 1376 if (!(CSR_READ_4(sc, BGE_RX_CPU_EVENT) & (1 << 14))) 1377 break; 1378 DELAY(10); 1379 } --- 2722 unchanged lines hidden (view full) --- 4102{ 4103 if (sc->bge_asf_mode & ASF_STACKUP) { 4104 /* Send ASF heartbeat aprox. every 2s */ 4105 if (sc->bge_asf_count) 4106 sc->bge_asf_count --; 4107 else { 4108 sc->bge_asf_count = 2; 4109 bge_writemem_ind(sc, BGE_SRAM_FW_CMD_MB, | 1372 CSR_WRITE_4(sc, BGE_RX_CPU_EVENT, 1373 CSR_READ_4(sc, BGE_RX_CPU_EVENT) | (1 << 14)); 1374 1375 for (i = 0; i < 100; i++ ) { 1376 if (!(CSR_READ_4(sc, BGE_RX_CPU_EVENT) & (1 << 14))) 1377 break; 1378 DELAY(10); 1379 } --- 2722 unchanged lines hidden (view full) --- 4102{ 4103 if (sc->bge_asf_mode & ASF_STACKUP) { 4104 /* Send ASF heartbeat aprox. every 2s */ 4105 if (sc->bge_asf_count) 4106 sc->bge_asf_count --; 4107 else { 4108 sc->bge_asf_count = 2; 4109 bge_writemem_ind(sc, BGE_SRAM_FW_CMD_MB, |
4110 BGE_FW_DRV_ALIVE); | 4110 BGE_FW_CMD_DRV_ALIVE); |
4111 bge_writemem_ind(sc, BGE_SRAM_FW_CMD_LEN_MB, 4); 4112 bge_writemem_ind(sc, BGE_SRAM_FW_CMD_DATA_MB, 3); 4113 CSR_WRITE_4(sc, BGE_RX_CPU_EVENT, 4114 CSR_READ_4(sc, BGE_RX_CPU_EVENT) | (1 << 14)); 4115 } 4116 } 4117} 4118 --- 1884 unchanged lines hidden --- | 4111 bge_writemem_ind(sc, BGE_SRAM_FW_CMD_LEN_MB, 4); 4112 bge_writemem_ind(sc, BGE_SRAM_FW_CMD_DATA_MB, 3); 4113 CSR_WRITE_4(sc, BGE_RX_CPU_EVENT, 4114 CSR_READ_4(sc, BGE_RX_CPU_EVENT) | (1 << 14)); 4115 } 4116 } 4117} 4118 --- 1884 unchanged lines hidden --- |