Search Linux Wireless

Re: [PATCH 03/13] rt2x00: Wait up to one second on rt2800 for WPDMA to be ready

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

 



Hi,

Am Donnerstag 04 November 2010 schrieb Ivo van Doorn:
> From: Helmut Schaa <helmut.schaa@xxxxxxxxxxxxxx>
> 
> At least some devices need such a long time to inititalize WPDMA. This
> only increases the maximum wait time and shouldn't affect devices that
> have been working before.
> 
> Reported-by: Joshua Smith <jesmith@xxxxxxxx>
> Signed-off-by: Helmut Schaa <helmut.schaa@xxxxxxxxxxxxxx>
> Signed-off-by: Ivo van Doorn <IvDoorn@xxxxxxxxx>
> ---

Ivo, the patch context looks different then in the version I've send to you.

The 
	for (i = 0; i < REGISTER_BUSY_COUNT; i++) {
should be
	for (i = 0; i < 100; i++) {

Otherwise we don't wait up to one second as in the comment but just 50ms :P

However, that change was part of a previous patch that was already merged into
the rt2x00 git tree. Seems like that change got lost during the merge ...

Helmut

>  drivers/net/wireless/rt2x00/rt2800lib.c |    6 +++++-
>  1 files changed, 5 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/net/wireless/rt2x00/rt2800lib.c b/drivers/net/wireless/rt2x00/rt2800lib.c
> index b1738bb..dcd3a89 100644
> --- a/drivers/net/wireless/rt2x00/rt2800lib.c
> +++ b/drivers/net/wireless/rt2x00/rt2800lib.c
> @@ -277,13 +277,17 @@ int rt2800_wait_wpdma_ready(struct rt2x00_dev *rt2x00dev)
>  	unsigned int i;
>  	u32 reg;
>  
> +	/*
> +	 * Some devices are really slow to respond here. Wait a whole second
> +	 * before timing out.
> +	 */
>  	for (i = 0; i < REGISTER_BUSY_COUNT; i++) {
>  		rt2800_register_read(rt2x00dev, WPDMA_GLO_CFG, &reg);
>  		if (!rt2x00_get_field32(reg, WPDMA_GLO_CFG_TX_DMA_BUSY) &&
>  		    !rt2x00_get_field32(reg, WPDMA_GLO_CFG_RX_DMA_BUSY))
>  			return 0;
>  
> -		msleep(1);
> +		msleep(10);
>  	}
>  
>  	ERROR(rt2x00dev, "WPDMA TX/RX busy, aborting.\n");
> 

--
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