Page MenuHomeFreeBSD

[ath] [ath_hal] Pass in the HAL reset type; use it when resetting
ClosedPublic

Authored by adrian on May 24 2020, 3:58 AM.
Tags
None
Referenced Files
F135835813: D24981.id.diff
Thu, Nov 13, 9:14 AM
F135803703: D24981.id72260.diff
Thu, Nov 13, 1:11 AM
Unknown Object (File)
Wed, Nov 12, 7:26 PM
Unknown Object (File)
Sun, Nov 9, 5:58 PM
Unknown Object (File)
Fri, Nov 7, 4:12 AM
Unknown Object (File)
Sat, Nov 1, 4:41 PM
Unknown Object (File)
Sun, Oct 26, 8:01 AM
Unknown Object (File)
Sun, Oct 26, 8:01 AM
Subscribers

Details

Summary

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.

Test Plan
  • So far, just AR9380 STA mode; will test in other modes and other chipsets before landing.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable