1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-19 10:53:58 +00:00

Define BGE_FW_HB_TIMEOUT_SEC and remove one more magic value.

bge(4) sends BGE_FW_CMD_DRV_ALIVE command to firmware every 2
seconds.  BGE_FW_CMD_DRV_ALIVE command requires 4 bytes data.  This
data contains timeout value in seconds until the next
BGE_FW_CMD_DRV_ALIVE command.
Broadcom recommends driver set the value 3 times longer than the
interval that it sends BGE_FW_CMD_DRV_ALIVE.  Currently bge(4) uses
3 seconds so probably we have to increase it in future and use
different ALIVE command(e.g. BGE_FW_CMD_DRV_ALIVE3).

No functional changes.
This commit is contained in:
Pyun YongHyeon 2011-10-27 22:10:52 +00:00
parent 9931ba85e3
commit 941a6e134b
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=226867
2 changed files with 4 additions and 1 deletions

View File

@ -4110,7 +4110,8 @@ bge_asf_driver_up(struct bge_softc *sc)
bge_writemem_ind(sc, BGE_SRAM_FW_CMD_MB,
BGE_FW_CMD_DRV_ALIVE);
bge_writemem_ind(sc, BGE_SRAM_FW_CMD_LEN_MB, 4);
bge_writemem_ind(sc, BGE_SRAM_FW_CMD_DATA_MB, 3);
bge_writemem_ind(sc, BGE_SRAM_FW_CMD_DATA_MB,
BGE_FW_HB_TIMEOUT_SEC);
CSR_WRITE_4(sc, BGE_RX_CPU_EVENT,
CSR_READ_4(sc, BGE_RX_CPU_EVENT) |
BGE_RX_CPU_DRV_EVENT);

View File

@ -100,6 +100,8 @@
#define BGE_FW_CMD_DRV_ALIVE2 0x0000000D
#define BGE_FW_CMD_DRV_ALIVE3 0x0000000E
#define BGE_FW_HB_TIMEOUT_SEC 3
#define BGE_FW_DRV_STATE_START 0x00000001
#define BGE_FW_DRV_STATE_START_DONE 0x80000001
#define BGE_FW_DRV_STATE_UNLOAD 0x00000002