Search Linux Wireless

Re: [PATCH 3/4] ath9k: fix the .flush driver op implementation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Mar 10, 2011 at 06:05:02AM +0530, Felix Fietkau wrote:
> ath9k has a timeout of 60ms for the flush, but instead waiting 60 ms for
> all tx activity to finish, it resets it for every single queue.

No, it does not do reset for every queue.

> +	for (j = 0; j < timeout; j++) {
> +		int npend = 0;
> +		for (i = 0; i < ATH9K_NUM_TX_QUEUES; i++) {
> +			if (!ATH_TXQ_SETUP(sc, i))
> +				continue;
>  
> -		if (drop || ath9k_has_pending_frames(sc, txq)) {
> -			ath_dbg(common, ATH_DBG_QUEUE, "Drop frames from hw queue:%d\n",
> -				txq->axq_qnum);
> -			spin_lock_bh(&txq->axq_lock);
> -			txq->txq_flush_inprogress = true;
> -			spin_unlock_bh(&txq->axq_lock);
> -
> -			ath9k_ps_wakeup(sc);
> -			ath9k_hw_stoptxdma(ah, txq->axq_qnum);
> -			npend = ath9k_hw_numtxpending(ah, txq->axq_qnum);
> -			ath9k_ps_restore(sc);
> -			if (npend)
> -				break;
> -
> -			ath_draintxq(sc, txq, false);
> -			txq->txq_flush_inprogress = false;
> +			npend += ath9k_has_pending_frames(sc, &sc->tx.txq[i]);
>  		}
> -	}
>  
> -	if (npend) {
> -		ath_reset(sc, false);
> -		txq->txq_flush_inprogress = false;
> +		if (!npend)
> +		    goto out;
> +
> +		usleep_range(1000, 2000);

Existing flush gives about 60ms for every q, that is reasonable
time, but this 60ms for all the queues is too small. This flush
is also called before sending null func in PS, so reset after
hw queue stuck is necessary to find the hang early on.
The usage of txq_flush_inprogress needs to be removed in other
places in xmit.

Vasanth
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux