diff options
author | yongari <yongari@FreeBSD.org> | 2009-06-21 06:18:19 +0000 |
---|---|---|
committer | yongari <yongari@FreeBSD.org> | 2009-06-21 06:18:19 +0000 |
commit | 0e5575121cc2631be70948b1ee62e3357f36c014 (patch) | |
tree | 0737fa82bae8986dcb70c33c29e9da14b0cd35be /sys/dev/fxp/if_fxp.c | |
parent | e0aec8b799ca9a039172b50e8e392b6869568a4c (diff) | |
download | FreeBSD-src-0e5575121cc2631be70948b1ee62e3357f36c014.zip FreeBSD-src-0e5575121cc2631be70948b1ee62e3357f36c014.tar.gz |
Due to possible PCI bus lock-up issues fxp(4) didn't perform full
hardware reset in attach phase. Selective reset does not clear
configured parameters so I think full hardware reset is required.
To prevent PCI bus lock-up, do selective reset first which will get
off the controller from PCI bus and request software reset after
selective reset. Software reset will unmask interrupts so disable
it after the reset.
Diffstat (limited to 'sys/dev/fxp/if_fxp.c')
-rw-r--r-- | sys/dev/fxp/if_fxp.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/dev/fxp/if_fxp.c b/sys/dev/fxp/if_fxp.c index 6bd6f37..b2ef0ef 100644 --- a/sys/dev/fxp/if_fxp.c +++ b/sys/dev/fxp/if_fxp.c @@ -466,10 +466,14 @@ fxp_attach(device_t dev) } /* - * Reset to a stable state. + * Put CU/RU idle state and prepare full reset. */ CSR_WRITE_4(sc, FXP_CSR_PORT, FXP_PORT_SELECTIVE_RESET); DELAY(10); + /* Full reset and disable interrupts. */ + CSR_WRITE_4(sc, FXP_CSR_PORT, FXP_PORT_SOFTWARE_RESET); + DELAY(10); + CSR_WRITE_1(sc, FXP_CSR_SCB_INTRCNTL, FXP_SCB_INTR_DISABLE); /* * Find out how large of an SEEPROM we have. |