Deleted Added
full compact
31c31
< __FBSDID("$FreeBSD: head/sys/dev/ath/if_ath.c 271823 2014-09-18 20:47:39Z glebius $");
---
> __FBSDID("$FreeBSD: head/sys/dev/ath/if_ath.c 271887 2014-09-20 01:22:17Z adrian $");
1717a1718,1720
> *
> * XXX TODO: well, that's great, except for non-cardbus
> * devices!
1721c1724,1732
< * XXX ensure none of the taskqueues are running
---
> * XXX This doesn't wait until all pending taskqueue
> * items and parallel transmit/receive/other threads
> * are running!
> */
> ath_hal_intrset(sc->sc_ah, 0);
> taskqueue_block(sc->sc_tq);
> callout_drain(&sc->sc_cal_ch);
>
> /*
1723d1733
< * XXX ensure the calibration callout is disabled
1813a1824,1828
> ATH_RX_LOCK(sc);
> sc->sc_rx_stopped = 1;
> sc->sc_rx_resetted = 1;
> ATH_RX_UNLOCK(sc);
>
2018c2033,2068
< ATH_PCU_LOCK(sc);
---
> if (! sc->sc_isedma) {
> ATH_PCU_LOCK(sc);
> /*
> * NB: the hardware should re-read the link when
> * RXE bit is written, but it doesn't work at
> * least on older hardware revs.
> */
> sc->sc_stats.ast_rxeol++;
> /*
> * Disable RXEOL/RXORN - prevent an interrupt
> * storm until the PCU logic can be reset.
> * In case the interface is reset some other
> * way before "sc_kickpcu" is called, don't
> * modify sc_imask - that way if it is reset
> * by a call to ath_reset() somehow, the
> * interrupt mask will be correctly reprogrammed.
> */
> imask = sc->sc_imask;
> imask &= ~(HAL_INT_RXEOL | HAL_INT_RXORN);
> ath_hal_intrset(ah, imask);
> /*
> * Only blank sc_rxlink if we've not yet kicked
> * the PCU.
> *
> * This isn't entirely correct - the correct solution
> * would be to have a PCU lock and engage that for
> * the duration of the PCU fiddling; which would include
> * running the RX process. Otherwise we could end up
> * messing up the RX descriptor chain and making the
> * RX desc list much shorter.
> */
> if (! sc->sc_kickpcu)
> sc->sc_rxlink = NULL;
> sc->sc_kickpcu = 1;
> ATH_PCU_UNLOCK(sc);
> }
2020,2053c2070
< * NB: the hardware should re-read the link when
< * RXE bit is written, but it doesn't work at
< * least on older hardware revs.
< */
< sc->sc_stats.ast_rxeol++;
< /*
< * Disable RXEOL/RXORN - prevent an interrupt
< * storm until the PCU logic can be reset.
< * In case the interface is reset some other
< * way before "sc_kickpcu" is called, don't
< * modify sc_imask - that way if it is reset
< * by a call to ath_reset() somehow, the
< * interrupt mask will be correctly reprogrammed.
< */
< imask = sc->sc_imask;
< imask &= ~(HAL_INT_RXEOL | HAL_INT_RXORN);
< ath_hal_intrset(ah, imask);
< /*
< * Only blank sc_rxlink if we've not yet kicked
< * the PCU.
< *
< * This isn't entirely correct - the correct solution
< * would be to have a PCU lock and engage that for
< * the duration of the PCU fiddling; which would include
< * running the RX process. Otherwise we could end up
< * messing up the RX descriptor chain and making the
< * RX desc list much shorter.
< */
< if (! sc->sc_kickpcu)
< sc->sc_rxlink = NULL;
< sc->sc_kickpcu = 1;
< ATH_PCU_UNLOCK(sc);
< /*
< * Enqueue an RX proc, to handled whatever
---
> * Enqueue an RX proc to handle whatever
2055c2072
< * This will then kick the PCU.
---
> * This will then kick the PCU if required.
2350a2368,2373
>
> ATH_RX_LOCK(sc);
> sc->sc_rx_stopped = 1;
> sc->sc_rx_resetted = 1;
> ATH_RX_UNLOCK(sc);
>
2409,2410c2432
< | HAL_INT_RXEOL | HAL_INT_RXORN
< | HAL_INT_TXURN
---
> | HAL_INT_RXORN | HAL_INT_TXURN
2420a2443,2450
> * If we're an EDMA NIC, we don't care about RXEOL.
> * Writing a new descriptor in will simply restart
> * RX DMA.
> */
> if (! sc->sc_isedma)
> sc->sc_imask |= HAL_INT_RXEOL;
>
> /*
2737a2768,2772
> ATH_RX_LOCK(sc);
> sc->sc_rx_stopped = 1;
> sc->sc_rx_resetted = 1;
> ATH_RX_UNLOCK(sc);
>
5335a5371,5373
> /* Disable interrupts */
> ath_hal_intrset(ah, 0);
>
5342,5343d5379
< ath_hal_intrset(ah, 0);
<
5386a5423,5427
> ATH_RX_LOCK(sc);
> sc->sc_rx_stopped = 1;
> sc->sc_rx_resetted = 1;
> ATH_RX_UNLOCK(sc);
>