]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
[ath] [ath_hal] Propagate the HAL_RESET_TYPE through to the chip reset; set it during...
authoradrian <adrian@FreeBSD.org>
Mon, 25 May 2020 22:31:45 +0000 (22:31 +0000)
committeradrian <adrian@FreeBSD.org>
Mon, 25 May 2020 22:31:45 +0000 (22:31 +0000)
commit949e5e3c00b0ba908b2ef089ddc9cdc0ff660842
tree8464d3e72fdac1897f00a4b7c42ff95112fc63df
parent7468e2983f86583d1ddea266f2fa7018c0d7559e
[ath] [ath_hal] Propagate the HAL_RESET_TYPE through to the chip reset; set it during ath_reset()

Although I added the reset type field to ath_hal_reset() years ago,
I never finished adding it both throughout the HALs and in if_ath.c.

This will eventually deprecate the ath_hal force_full_reset option
because it can be requested at the driver layer.

So:

* Teach ar5416ChipReset() and ar9300_chip_reset() about the HAL type
* Use it in ar5416Reset() and ar9300_reset() when doing a full chip reset
* Extend ath_reset() to include the HAL_RESET_TYPE parameter added in the above functions
* Use HAL_RESET_NORMAL in most calls to ath_reset()
* .. but use HAL_RESET_BBPANIC for the BB panics, and HAL_RESET_FORCE_COLD during fatal, beacon miss and other hardware related hangs.

This should be a glorified no-op outside of actual hardware issues.
I've tested things with ath_hal force_full_reset set to 1 for years now,
so I know that feature and a full reset works (albeit much slower than
a warm reset!) and it does unwedge hardware.

The eventual aim is to use this for all the places where the driver
detects a potential hang as well as if long calibration - ie, noise floor
calibration - fails to complete. That's one of the big hardware related
things that causes station mode operation to hang without easy recovery.

Differential Revision: https://reviews.freebsd.org/D24981
14 files changed:
sys/contrib/dev/ath/ath_hal/ar9300/ar9300.h
sys/contrib/dev/ath/ath_hal/ar9300/ar9300_freebsd.c
sys/contrib/dev/ath/ath_hal/ar9300/ar9300_reset.c
sys/dev/ath/ath_hal/ar5416/ar5416.h
sys/dev/ath/ath_hal/ar5416/ar5416_attach.c
sys/dev/ath/ath_hal/ar5416/ar5416_reset.c
sys/dev/ath/ath_hal/ar9001/ar9130_attach.c
sys/dev/ath/ath_hal/ar9001/ar9160_attach.c
sys/dev/ath/ath_hal/ar9002/ar9280_attach.c
sys/dev/ath/ath_hal/ar9002/ar9285_attach.c
sys/dev/ath/ath_hal/ar9002/ar9287_attach.c
sys/dev/ath/if_ath.c
sys/dev/ath/if_ath_misc.h
sys/dev/ath/if_ath_sysctl.c