summaryrefslogtreecommitdiffstats
path: root/sys/dev/ath/if_ath.c
diff options
context:
space:
mode:
authoradrian <adrian@FreeBSD.org>2012-05-25 05:01:27 +0000
committeradrian <adrian@FreeBSD.org>2012-05-25 05:01:27 +0000
commitd6bb741dfb281f0bbb1d8e2e4c57dd471d1bf910 (patch)
treef58721e274825c623378bf926219031813fe4c79 /sys/dev/ath/if_ath.c
parentf162edc8256cdf933668ed8a30625452e0400359 (diff)
downloadFreeBSD-src-d6bb741dfb281f0bbb1d8e2e4c57dd471d1bf910.zip
FreeBSD-src-d6bb741dfb281f0bbb1d8e2e4c57dd471d1bf910.tar.gz
oops - ath_hal_disablepcie is actually destined for another purpose,
not to disable the PCIe PHY in prepration for reset. Extend the enablepci method to have a "poweroff" flag, which if equal to true means the hardware is about to go to sleep.
Diffstat (limited to 'sys/dev/ath/if_ath.c')
-rw-r--r--sys/dev/ath/if_ath.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/sys/dev/ath/if_ath.c b/sys/dev/ath/if_ath.c
index 065a428..a4df6a9 100644
--- a/sys/dev/ath/if_ath.c
+++ b/sys/dev/ath/if_ath.c
@@ -1319,8 +1319,14 @@ ath_suspend(struct ath_softc *sc)
* CardBus detaches the device.
*/
- /* For PCIe, this matters */
- ath_hal_disablepcie(sc->sc_ah);
+ /*
+ * XXX ensure none of the taskqueues are running
+ * XXX ensure sc_invalid is 1
+ * XXX ensure the calibration callout is disabled
+ */
+
+ /* Disable the PCIe PHY, complete with workarounds */
+ ath_hal_enablepcie(sc->sc_ah, 1, 1);
}
/*
@@ -1354,7 +1360,7 @@ ath_resume(struct ath_softc *sc)
__func__, ifp->if_flags);
/* Re-enable PCIe, re-enable the PCIe bus */
- ath_hal_enablepcie(ah, 1);
+ ath_hal_enablepcie(ah, 0, 0);
/*
* Must reset the chip before we reload the
OpenPOWER on IntegriCloud