Re: [PATCH 1/2] rtl8xxxu: Increase default polling timeout for firmware startup

2016-05-18 Thread Jes Sorensen
Daniel Lenski  writes:
> On Tue, May 17, 2016 at 8:35 PM, Jes Sorensen  wrote:
>> Dan Lenski  writes:
>>> diff --git a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.h
>>> b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.h
>>> index f2a1bac..39c6ce7 100644
>>> --- a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.h
>>> +++ b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.h
>>> @@ -49,7 +49,7 @@
>>>  #define TX_PAGE_NUM_NORM_PQ  0x02
>>>
>>>  #define RTL_FW_PAGE_SIZE 4096
>>> -#define RTL8XXXU_FIRMWARE_POLL_MAX   1000
>>> +#define RTL8XXXU_FIRMWARE_POLL_MAX   5000
>>
>> This is a long delay - how about 2000?
>
> I tried 2000 first, and it worked for me on only 1 out of 3 cold boots.

OK, lets go for 5000 then to be safe.

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


Re: [PATCH 1/2] rtl8xxxu: Increase default polling timeout for firmware startup

2016-05-17 Thread Daniel Lenski
On Tue, May 17, 2016 at 8:35 PM, Jes Sorensen  wrote:
> Dan Lenski  writes:
>> diff --git a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.h
>> b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.h
>> index f2a1bac..39c6ce7 100644
>> --- a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.h
>> +++ b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.h
>> @@ -49,7 +49,7 @@
>>  #define TX_PAGE_NUM_NORM_PQ  0x02
>>
>>  #define RTL_FW_PAGE_SIZE 4096
>> -#define RTL8XXXU_FIRMWARE_POLL_MAX   1000
>> +#define RTL8XXXU_FIRMWARE_POLL_MAX   5000
>
> This is a long delay - how about 2000?

I tried 2000 first, and it worked for me on only 1 out of 3 cold boots.

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


Re: [PATCH 1/2] rtl8xxxu: Increase default polling timeout for firmware startup

2016-05-17 Thread Jes Sorensen
Dan Lenski  writes:
> This patch increases the default value for the maximum number of polling
> loops to wait for the rtl8xxxu MCU to start after the firmware is loaded
> (from 1000 to 5000).
>
> With RTL8723AU chipset, I frequently encounter "Firmware failed to start"
> errors from rtl8xxxu after a cold boot.
>
> It appears that other chipsets supported by the driver have the same
> problem. Here are a couple of relevant bug reports:
> - http://ubuntuforums.org/showthread.php?t=2321756
> - https://www.mail-archive.com/ubuntu-bugs@lists.ubuntu.com/msg4942468.html
>
> This issue seems to occur because RTL8XXXU_FIRMWARE_POLL_MAX (1000) is
> too short, and the MCU fails to start up as quickly as expected.
>
> With a longer value (5000), the driver starts up consistently and
> successfully after cold-boot.
>
> Signed-off-by: Dan Lenski 
> ---
>  drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

As previously pointed out, please provide some details about the system
where this goes wrong.

> diff --git a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.h
> b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.h
> index f2a1bac..39c6ce7 100644
> --- a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.h
> +++ b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.h
> @@ -49,7 +49,7 @@
>  #define TX_PAGE_NUM_NORM_PQ  0x02
>  
>  #define RTL_FW_PAGE_SIZE 4096
> -#define RTL8XXXU_FIRMWARE_POLL_MAX   1000
> +#define RTL8XXXU_FIRMWARE_POLL_MAX   5000

This is a long delay - how about 2000?

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


Re: [PATCH 1/2] rtl8xxxu: Increase default polling timeout for firmware startup

2016-05-17 Thread Julian Calaby
Hi,

On Wed, May 18, 2016 at 11:14 AM, Dan Lenski  wrote:
> This patch increases the default value for the maximum number of polling
> loops to wait for the rtl8xxxu MCU to start after the firmware is loaded
> (from 1000 to 5000).
>
> With RTL8723AU chipset, I frequently encounter "Firmware failed to start"
> errors from rtl8xxxu after a cold boot.
>
> It appears that other chipsets supported by the driver have the same
> problem. Here are a couple of relevant bug reports:
> - http://ubuntuforums.org/showthread.php?t=2321756
> - https://www.mail-archive.com/ubuntu-bugs@lists.ubuntu.com/msg4942468.html
>
> This issue seems to occur because RTL8XXXU_FIRMWARE_POLL_MAX (1000) is
> too short, and the MCU fails to start up as quickly as expected.
>
> With a longer value (5000), the driver starts up consistently and
> successfully after cold-boot.
>
> Signed-off-by: Dan Lenski 

This looks good to me.

Reviewed-by: Julian Calaby 

> ---
>  drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.h 
> b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.h
> index f2a1bac..39c6ce7 100644
> --- a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.h
> +++ b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.h
> @@ -49,7 +49,7 @@
>  #define TX_PAGE_NUM_NORM_PQ0x02
>
>  #define RTL_FW_PAGE_SIZE   4096
> -#define RTL8XXXU_FIRMWARE_POLL_MAX 1000
> +#define RTL8XXXU_FIRMWARE_POLL_MAX 5000
>
>  #define RTL8723A_CHANNEL_GROUPS3
>  #define RTL8723A_MAX_RF_PATHS  2
> --
> 2.8.2
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
> the body of a message to majord...@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html



-- 
Julian Calaby

Email: julian.cal...@gmail.com
Profile: http://www.google.com/profiles/julian.calaby/
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 1/2] rtl8xxxu: Increase default polling timeout for firmware startup

2016-05-17 Thread Dan Lenski
This patch increases the default value for the maximum number of polling
loops to wait for the rtl8xxxu MCU to start after the firmware is loaded
(from 1000 to 5000).

With RTL8723AU chipset, I frequently encounter "Firmware failed to start"
errors from rtl8xxxu after a cold boot.

It appears that other chipsets supported by the driver have the same
problem. Here are a couple of relevant bug reports:
- http://ubuntuforums.org/showthread.php?t=2321756
- https://www.mail-archive.com/ubuntu-bugs@lists.ubuntu.com/msg4942468.html

This issue seems to occur because RTL8XXXU_FIRMWARE_POLL_MAX (1000) is
too short, and the MCU fails to start up as quickly as expected.

With a longer value (5000), the driver starts up consistently and
successfully after cold-boot.

Signed-off-by: Dan Lenski 
---
 drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.h 
b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.h
index f2a1bac..39c6ce7 100644
--- a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.h
+++ b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.h
@@ -49,7 +49,7 @@
 #define TX_PAGE_NUM_NORM_PQ0x02
 
 #define RTL_FW_PAGE_SIZE   4096
-#define RTL8XXXU_FIRMWARE_POLL_MAX 1000
+#define RTL8XXXU_FIRMWARE_POLL_MAX 5000
 
 #define RTL8723A_CHANNEL_GROUPS3
 #define RTL8723A_MAX_RF_PATHS  2
-- 
2.8.2

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