diff mbox

[LUCID,SRU] Bug#539794 [PATCH] rt2x00: Fix failed SLEEP->AWAKE and AWAKE->SLEEP transitions.

Message ID alpine.DEB.2.00.1006301347410.21088@hungry
State Rejected
Delegated to: Brad Figg
Headers show

Commit Message

Manoj Iyer June 30, 2010, 6:56 p.m. UTC
SRU Justification: rt2500pci wireless regression in lucid causes wireless 
not to work. Network manager does not display any wireless networks. After 
about 5 minutes, the main home wireless network is sometimes displayed. 
However no other wireless networks is displayed.

TEST: Originator has tested the patch reports some success in #38 on bug 
report.

FIX: Ralink devices do not properly go to sleep or wake up, with timeouts 
occurring. Fix this by retrying telling the device that it has to wake up 
or sleep. Cherry picked patch from upstream. Fix is driver specific and 
not in common code.

The following changes since commit 
1bb2b36688ab7e879e279667e48e05d118ad0880:
   Manoj Iyer (1):
         rt2x00: Fix failed SLEEP->AWAKE and AWAKE->SLEEP transitions.

are available in the git repository at:

git://kernel.ubuntu.com/manjo/ubuntu-lucid.git  lp539794

>From 1bb2b36688ab7e879e279667e48e05d118ad0880 Mon Sep 17 00:00:00 2001
From: Manoj Iyer <manoj.iyer@canonical.com>
Date: Thu, 13 May 2010 21:16:03 +0200
Subject: [PATCH] rt2x00: Fix failed SLEEP->AWAKE and AWAKE->SLEEP transitions.

(Based on a patch created by Ondrej Zary)

In some circumstances the Ralink devices do not properly go to sleep
or wake up, with timeouts occurring.
Fix this by retrying telling the device that it has to wake up or
sleep.

Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
(cherry picked from commit 9655a6ec19ca656af246fb80817aa337892aefbf)

Signed-off-by: Manoj Iyer <manoj.iyer@canonical.com>

BugLink: http://launchpad.net/bugs/539794
---
  drivers/net/wireless/rt2x00/rt2400pci.c |    9 +++++----
  drivers/net/wireless/rt2x00/rt2500pci.c |    9 +++++----
  drivers/net/wireless/rt2x00/rt61pci.c   |    7 ++++---
  drivers/net/wireless/rt2x00/rt73usb.c   |    7 ++++---
  4 files changed, 18 insertions(+), 14 deletions(-)

Comments

Brad Figg June 30, 2010, 9:48 p.m. UTC | #1
On 06/30/2010 11:56 AM, Manoj Iyer wrote:
>
> SRU Justification: rt2500pci wireless regression in lucid causes wireless
> not to work. Network manager does not display any wireless networks. After
> about 5 minutes, the main home wireless network is sometimes displayed.
> However no other wireless networks is displayed.
>
> TEST: Originator has tested the patch reports some success in #38 on bug
> report.
>
> FIX: Ralink devices do not properly go to sleep or wake up, with timeouts
> occurring. Fix this by retrying telling the device that it has to wake up
> or sleep. Cherry picked patch from upstream. Fix is driver specific and
> not in common code.
>
> The following changes since commit
> 1bb2b36688ab7e879e279667e48e05d118ad0880:
>     Manoj Iyer (1):
>           rt2x00: Fix failed SLEEP->AWAKE and AWAKE->SLEEP transitions.
>
> are available in the git repository at:
>
> git://kernel.ubuntu.com/manjo/ubuntu-lucid.git  lp539794
>
>> From 1bb2b36688ab7e879e279667e48e05d118ad0880 Mon Sep 17 00:00:00 2001
> From: Manoj Iyer<manoj.iyer@canonical.com>
> Date: Thu, 13 May 2010 21:16:03 +0200
> Subject: [PATCH] rt2x00: Fix failed SLEEP->AWAKE and AWAKE->SLEEP transitions.
>
> (Based on a patch created by Ondrej Zary)
>
> In some circumstances the Ralink devices do not properly go to sleep
> or wake up, with timeouts occurring.
> Fix this by retrying telling the device that it has to wake up or
> sleep.
>
> Signed-off-by: Gertjan van Wingerde<gwingerde@gmail.com>
> Acked-by: Ivo van Doorn<IvDoorn@gmail.com>
> Signed-off-by: John W. Linville<linville@tuxdriver.com>
> (cherry picked from commit 9655a6ec19ca656af246fb80817aa337892aefbf)
>
> Signed-off-by: Manoj Iyer<manoj.iyer@canonical.com>
>
> BugLink: http://launchpad.net/bugs/539794
> ---
>    drivers/net/wireless/rt2x00/rt2400pci.c |    9 +++++----
>    drivers/net/wireless/rt2x00/rt2500pci.c |    9 +++++----
>    drivers/net/wireless/rt2x00/rt61pci.c   |    7 ++++---
>    drivers/net/wireless/rt2x00/rt73usb.c   |    7 ++++---
>    4 files changed, 18 insertions(+), 14 deletions(-)
>
> diff --git a/drivers/net/wireless/rt2x00/rt2400pci.c b/drivers/net/wireless/rt2x00/rt2400pci.c
> index 4020bad..37475e8 100644
> --- a/drivers/net/wireless/rt2x00/rt2400pci.c
> +++ b/drivers/net/wireless/rt2x00/rt2400pci.c
> @@ -925,7 +925,7 @@ static void rt2400pci_disable_radio(struct rt2x00_dev *rt2x00dev)
>    static int rt2400pci_set_state(struct rt2x00_dev *rt2x00dev,
>    			       enum dev_state state)
>    {
> -	u32 reg;
> +	u32 reg, reg2;
>    	unsigned int i;
>    	char put_to_sleep;
>    	char bbp_state;
> @@ -946,11 +946,12 @@ static int rt2400pci_set_state(struct rt2x00_dev *rt2x00dev,
>    	 * device has entered the correct state.
>    	 */
>    	for (i = 0; i<  REGISTER_BUSY_COUNT; i++) {
> -		rt2x00pci_register_read(rt2x00dev, PWRCSR1,&reg);
> -		bbp_state = rt2x00_get_field32(reg, PWRCSR1_BBP_CURR_STATE);
> -		rf_state = rt2x00_get_field32(reg, PWRCSR1_RF_CURR_STATE);
> +		rt2x00pci_register_read(rt2x00dev, PWRCSR1,&reg2);
> +		bbp_state = rt2x00_get_field32(reg2, PWRCSR1_BBP_CURR_STATE);
> +		rf_state = rt2x00_get_field32(reg2, PWRCSR1_RF_CURR_STATE);
>    		if (bbp_state == state&&  rf_state == state)
>    			return 0;
> +		rt2x00pci_register_write(rt2x00dev, PWRCSR1, reg);
>    		msleep(10);
>    	}
>
> diff --git a/drivers/net/wireless/rt2x00/rt2500pci.c b/drivers/net/wireless/rt2x00/rt2500pci.c
> index 8f15e41..30526f0 100644
> --- a/drivers/net/wireless/rt2x00/rt2500pci.c
> +++ b/drivers/net/wireless/rt2x00/rt2500pci.c
> @@ -1084,7 +1084,7 @@ static void rt2500pci_disable_radio(struct rt2x00_dev *rt2x00dev)
>    static int rt2500pci_set_state(struct rt2x00_dev *rt2x00dev,
>    			       enum dev_state state)
>    {
> -	u32 reg;
> +	u32 reg, reg2;
>    	unsigned int i;
>    	char put_to_sleep;
>    	char bbp_state;
> @@ -1105,11 +1105,12 @@ static int rt2500pci_set_state(struct rt2x00_dev *rt2x00dev,
>    	 * device has entered the correct state.
>    	 */
>    	for (i = 0; i<  REGISTER_BUSY_COUNT; i++) {
> -		rt2x00pci_register_read(rt2x00dev, PWRCSR1,&reg);
> -		bbp_state = rt2x00_get_field32(reg, PWRCSR1_BBP_CURR_STATE);
> -		rf_state = rt2x00_get_field32(reg, PWRCSR1_RF_CURR_STATE);
> +		rt2x00pci_register_read(rt2x00dev, PWRCSR1,&reg2);
> +		bbp_state = rt2x00_get_field32(reg2, PWRCSR1_BBP_CURR_STATE);
> +		rf_state = rt2x00_get_field32(reg2, PWRCSR1_RF_CURR_STATE);
>    		if (bbp_state == state&&  rf_state == state)
>    			return 0;
> +		rt2x00pci_register_write(rt2x00dev, PWRCSR1, reg);
>    		msleep(10);
>    	}
>
> diff --git a/drivers/net/wireless/rt2x00/rt61pci.c b/drivers/net/wireless/rt2x00/rt61pci.c
> index 9a6ceb4..68317d7 100644
> --- a/drivers/net/wireless/rt2x00/rt61pci.c
> +++ b/drivers/net/wireless/rt2x00/rt61pci.c
> @@ -1690,7 +1690,7 @@ static void rt61pci_disable_radio(struct rt2x00_dev *rt2x00dev)
>
>    static int rt61pci_set_state(struct rt2x00_dev *rt2x00dev, enum dev_state state)
>    {
> -	u32 reg;
> +	u32 reg, reg2;
>    	unsigned int i;
>    	char put_to_sleep;
>
> @@ -1707,10 +1707,11 @@ static int rt61pci_set_state(struct rt2x00_dev *rt2x00dev, enum dev_state state)
>    	 * device has entered the correct state.
>    	 */
>    	for (i = 0; i<  REGISTER_BUSY_COUNT; i++) {
> -		rt2x00pci_register_read(rt2x00dev, MAC_CSR12,&reg);
> -		state = rt2x00_get_field32(reg, MAC_CSR12_BBP_CURRENT_STATE);
> +		rt2x00pci_register_read(rt2x00dev, MAC_CSR12,&reg2);
> +		state = rt2x00_get_field32(reg2, MAC_CSR12_BBP_CURRENT_STATE);
>    		if (state == !put_to_sleep)
>    			return 0;
> +		rt2x00pci_register_write(rt2x00dev, MAC_CSR12, reg);
>    		msleep(10);
>    	}
>
> diff --git a/drivers/net/wireless/rt2x00/rt73usb.c b/drivers/net/wireless/rt2x00/rt73usb.c
> index 0a0c095..dbf650a 100644
> --- a/drivers/net/wireless/rt2x00/rt73usb.c
> +++ b/drivers/net/wireless/rt2x00/rt73usb.c
> @@ -1369,7 +1369,7 @@ static void rt73usb_disable_radio(struct rt2x00_dev *rt2x00dev)
>
>    static int rt73usb_set_state(struct rt2x00_dev *rt2x00dev, enum dev_state state)
>    {
> -	u32 reg;
> +	u32 reg, reg2;
>    	unsigned int i;
>    	char put_to_sleep;
>
> @@ -1386,10 +1386,11 @@ static int rt73usb_set_state(struct rt2x00_dev *rt2x00dev, enum dev_state state)
>    	 * device has entered the correct state.
>    	 */
>    	for (i = 0; i<  REGISTER_BUSY_COUNT; i++) {
> -		rt2x00usb_register_read(rt2x00dev, MAC_CSR12,&reg);
> -		state = rt2x00_get_field32(reg, MAC_CSR12_BBP_CURRENT_STATE);
> +		rt2x00usb_register_read(rt2x00dev, MAC_CSR12,&reg2);
> +		state = rt2x00_get_field32(reg2, MAC_CSR12_BBP_CURRENT_STATE);
>    		if (state == !put_to_sleep)
>    			return 0;
> +		rt2x00usb_register_write(rt2x00dev, MAC_CSR12, reg);
>    		msleep(10);
>    	}
>

Has this patch been submitted to upstream stable? As I understand it,
this is a cherrypick of a patch to Linus's tree. Is that correct?

Brad
Manoj Iyer June 30, 2010, 10:24 p.m. UTC | #2
On Wed, 30 Jun 2010, Brad Figg wrote:

> On 06/30/2010 11:56 AM, Manoj Iyer wrote:
>>
>> SRU Justification: rt2500pci wireless regression in lucid causes wireless
>> not to work. Network manager does not display any wireless networks. After
>> about 5 minutes, the main home wireless network is sometimes displayed.
>> However no other wireless networks is displayed.
>>
>> TEST: Originator has tested the patch reports some success in #38 on bug
>> report.
>>
>> FIX: Ralink devices do not properly go to sleep or wake up, with timeouts
>> occurring. Fix this by retrying telling the device that it has to wake up
>> or sleep. Cherry picked patch from upstream. Fix is driver specific and
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^

yes, cherry picked from upstream.

>> not in common code.
>>
>> The following changes since commit
>> 1bb2b36688ab7e879e279667e48e05d118ad0880:
>>     Manoj Iyer (1):
>>           rt2x00: Fix failed SLEEP->AWAKE and AWAKE->SLEEP transitions.
>>
>> are available in the git repository at:
>>
>> git://kernel.ubuntu.com/manjo/ubuntu-lucid.git  lp539794
>>
>>> From 1bb2b36688ab7e879e279667e48e05d118ad0880 Mon Sep 17 00:00:00 2001
>> From: Manoj Iyer<manoj.iyer@canonical.com>
>> Date: Thu, 13 May 2010 21:16:03 +0200
>> Subject: [PATCH] rt2x00: Fix failed SLEEP->AWAKE and AWAKE->SLEEP transitions.
>>
>> (Based on a patch created by Ondrej Zary)
>>
>> In some circumstances the Ralink devices do not properly go to sleep
>> or wake up, with timeouts occurring.
>> Fix this by retrying telling the device that it has to wake up or
>> sleep.
>>
>> Signed-off-by: Gertjan van Wingerde<gwingerde@gmail.com>
>> Acked-by: Ivo van Doorn<IvDoorn@gmail.com>
>> Signed-off-by: John W. Linville<linville@tuxdriver.com>
>> (cherry picked from commit 9655a6ec19ca656af246fb80817aa337892aefbf)
>>
>> Signed-off-by: Manoj Iyer<manoj.iyer@canonical.com>
>>
>> BugLink: http://launchpad.net/bugs/539794
>> ---
>>    drivers/net/wireless/rt2x00/rt2400pci.c |    9 +++++----
>>    drivers/net/wireless/rt2x00/rt2500pci.c |    9 +++++----
>>    drivers/net/wireless/rt2x00/rt61pci.c   |    7 ++++---
>>    drivers/net/wireless/rt2x00/rt73usb.c   |    7 ++++---
>>    4 files changed, 18 insertions(+), 14 deletions(-)
>>
>> diff --git a/drivers/net/wireless/rt2x00/rt2400pci.c b/drivers/net/wireless/rt2x00/rt2400pci.c
>> index 4020bad..37475e8 100644
>> --- a/drivers/net/wireless/rt2x00/rt2400pci.c
>> +++ b/drivers/net/wireless/rt2x00/rt2400pci.c
>> @@ -925,7 +925,7 @@ static void rt2400pci_disable_radio(struct rt2x00_dev *rt2x00dev)
>>    static int rt2400pci_set_state(struct rt2x00_dev *rt2x00dev,
>>    			       enum dev_state state)
>>    {
>> -	u32 reg;
>> +	u32 reg, reg2;
>>    	unsigned int i;
>>    	char put_to_sleep;
>>    	char bbp_state;
>> @@ -946,11 +946,12 @@ static int rt2400pci_set_state(struct rt2x00_dev *rt2x00dev,
>>    	 * device has entered the correct state.
>>    	 */
>>    	for (i = 0; i<  REGISTER_BUSY_COUNT; i++) {
>> -		rt2x00pci_register_read(rt2x00dev, PWRCSR1,&reg);
>> -		bbp_state = rt2x00_get_field32(reg, PWRCSR1_BBP_CURR_STATE);
>> -		rf_state = rt2x00_get_field32(reg, PWRCSR1_RF_CURR_STATE);
>> +		rt2x00pci_register_read(rt2x00dev, PWRCSR1,&reg2);
>> +		bbp_state = rt2x00_get_field32(reg2, PWRCSR1_BBP_CURR_STATE);
>> +		rf_state = rt2x00_get_field32(reg2, PWRCSR1_RF_CURR_STATE);
>>    		if (bbp_state == state&&  rf_state == state)
>>    			return 0;
>> +		rt2x00pci_register_write(rt2x00dev, PWRCSR1, reg);
>>    		msleep(10);
>>    	}
>>
>> diff --git a/drivers/net/wireless/rt2x00/rt2500pci.c b/drivers/net/wireless/rt2x00/rt2500pci.c
>> index 8f15e41..30526f0 100644
>> --- a/drivers/net/wireless/rt2x00/rt2500pci.c
>> +++ b/drivers/net/wireless/rt2x00/rt2500pci.c
>> @@ -1084,7 +1084,7 @@ static void rt2500pci_disable_radio(struct rt2x00_dev *rt2x00dev)
>>    static int rt2500pci_set_state(struct rt2x00_dev *rt2x00dev,
>>    			       enum dev_state state)
>>    {
>> -	u32 reg;
>> +	u32 reg, reg2;
>>    	unsigned int i;
>>    	char put_to_sleep;
>>    	char bbp_state;
>> @@ -1105,11 +1105,12 @@ static int rt2500pci_set_state(struct rt2x00_dev *rt2x00dev,
>>    	 * device has entered the correct state.
>>    	 */
>>    	for (i = 0; i<  REGISTER_BUSY_COUNT; i++) {
>> -		rt2x00pci_register_read(rt2x00dev, PWRCSR1,&reg);
>> -		bbp_state = rt2x00_get_field32(reg, PWRCSR1_BBP_CURR_STATE);
>> -		rf_state = rt2x00_get_field32(reg, PWRCSR1_RF_CURR_STATE);
>> +		rt2x00pci_register_read(rt2x00dev, PWRCSR1,&reg2);
>> +		bbp_state = rt2x00_get_field32(reg2, PWRCSR1_BBP_CURR_STATE);
>> +		rf_state = rt2x00_get_field32(reg2, PWRCSR1_RF_CURR_STATE);
>>    		if (bbp_state == state&&  rf_state == state)
>>    			return 0;
>> +		rt2x00pci_register_write(rt2x00dev, PWRCSR1, reg);
>>    		msleep(10);
>>    	}
>>
>> diff --git a/drivers/net/wireless/rt2x00/rt61pci.c b/drivers/net/wireless/rt2x00/rt61pci.c
>> index 9a6ceb4..68317d7 100644
>> --- a/drivers/net/wireless/rt2x00/rt61pci.c
>> +++ b/drivers/net/wireless/rt2x00/rt61pci.c
>> @@ -1690,7 +1690,7 @@ static void rt61pci_disable_radio(struct rt2x00_dev *rt2x00dev)
>>
>>    static int rt61pci_set_state(struct rt2x00_dev *rt2x00dev, enum dev_state state)
>>    {
>> -	u32 reg;
>> +	u32 reg, reg2;
>>    	unsigned int i;
>>    	char put_to_sleep;
>>
>> @@ -1707,10 +1707,11 @@ static int rt61pci_set_state(struct rt2x00_dev *rt2x00dev, enum dev_state state)
>>    	 * device has entered the correct state.
>>    	 */
>>    	for (i = 0; i<  REGISTER_BUSY_COUNT; i++) {
>> -		rt2x00pci_register_read(rt2x00dev, MAC_CSR12,&reg);
>> -		state = rt2x00_get_field32(reg, MAC_CSR12_BBP_CURRENT_STATE);
>> +		rt2x00pci_register_read(rt2x00dev, MAC_CSR12,&reg2);
>> +		state = rt2x00_get_field32(reg2, MAC_CSR12_BBP_CURRENT_STATE);
>>    		if (state == !put_to_sleep)
>>    			return 0;
>> +		rt2x00pci_register_write(rt2x00dev, MAC_CSR12, reg);
>>    		msleep(10);
>>    	}
>>
>> diff --git a/drivers/net/wireless/rt2x00/rt73usb.c b/drivers/net/wireless/rt2x00/rt73usb.c
>> index 0a0c095..dbf650a 100644
>> --- a/drivers/net/wireless/rt2x00/rt73usb.c
>> +++ b/drivers/net/wireless/rt2x00/rt73usb.c
>> @@ -1369,7 +1369,7 @@ static void rt73usb_disable_radio(struct rt2x00_dev *rt2x00dev)
>>
>>    static int rt73usb_set_state(struct rt2x00_dev *rt2x00dev, enum dev_state state)
>>    {
>> -	u32 reg;
>> +	u32 reg, reg2;
>>    	unsigned int i;
>>    	char put_to_sleep;
>>
>> @@ -1386,10 +1386,11 @@ static int rt73usb_set_state(struct rt2x00_dev *rt2x00dev, enum dev_state state)
>>    	 * device has entered the correct state.
>>    	 */
>>    	for (i = 0; i<  REGISTER_BUSY_COUNT; i++) {
>> -		rt2x00usb_register_read(rt2x00dev, MAC_CSR12,&reg);
>> -		state = rt2x00_get_field32(reg, MAC_CSR12_BBP_CURRENT_STATE);
>> +		rt2x00usb_register_read(rt2x00dev, MAC_CSR12,&reg2);
>> +		state = rt2x00_get_field32(reg2, MAC_CSR12_BBP_CURRENT_STATE);
>>    		if (state == !put_to_sleep)
>>    			return 0;
>> +		rt2x00usb_register_write(rt2x00dev, MAC_CSR12, reg);
>>    		msleep(10);
>>    	}
>>
>
> Has this patch been submitted to upstream stable? As I understand it,
> this is a cherrypick of a patch to Linus's tree. Is that correct?
>
> Brad
> -- 
> Brad Figg brad.figg@canonical.com http://www.canonical.com
>
> -- 
> kernel-team mailing list
> kernel-team@lists.ubuntu.com
> https://lists.ubuntu.com/mailman/listinfo/kernel-team
>
Brad Figg June 30, 2010, 11:25 p.m. UTC | #3
On 06/30/2010 03:24 PM, manoj.iyer@canonical.com wrote:
>
> On Wed, 30 Jun 2010, Brad Figg wrote:
>
>> On 06/30/2010 11:56 AM, Manoj Iyer wrote:
>>>
>>> SRU Justification: rt2500pci wireless regression in lucid causes wireless
>>> not to work. Network manager does not display any wireless networks. After
>>> about 5 minutes, the main home wireless network is sometimes displayed.
>>> However no other wireless networks is displayed.
>>>
>>> TEST: Originator has tested the patch reports some success in #38 on bug
>>> report.
>>>
>>> FIX: Ralink devices do not properly go to sleep or wake up, with timeouts
>>> occurring. Fix this by retrying telling the device that it has to wake up
>>> or sleep. Cherry picked patch from upstream. Fix is driver specific and
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>
> yes, cherry picked from upstream.
>
>>> not in common code.
>>>
>>> The following changes since commit
>>> 1bb2b36688ab7e879e279667e48e05d118ad0880:
>>> Manoj Iyer (1):
>>> rt2x00: Fix failed SLEEP->AWAKE and AWAKE->SLEEP transitions.
>>>
>>> are available in the git repository at:
>>>
>>> git://kernel.ubuntu.com/manjo/ubuntu-lucid.git lp539794
>>>
>>>> From 1bb2b36688ab7e879e279667e48e05d118ad0880 Mon Sep 17 00:00:00 2001
>>> From: Manoj Iyer<manoj.iyer@canonical.com>
>>> Date: Thu, 13 May 2010 21:16:03 +0200
>>> Subject: [PATCH] rt2x00: Fix failed SLEEP->AWAKE and AWAKE->SLEEP transitions.
>>>
>>> (Based on a patch created by Ondrej Zary)
>>>
>>> In some circumstances the Ralink devices do not properly go to sleep
>>> or wake up, with timeouts occurring.
>>> Fix this by retrying telling the device that it has to wake up or
>>> sleep.
>>>
>>> Signed-off-by: Gertjan van Wingerde<gwingerde@gmail.com>
>>> Acked-by: Ivo van Doorn<IvDoorn@gmail.com>
>>> Signed-off-by: John W. Linville<linville@tuxdriver.com>
>>> (cherry picked from commit 9655a6ec19ca656af246fb80817aa337892aefbf)
>>>
>>> Signed-off-by: Manoj Iyer<manoj.iyer@canonical.com>
>>>
>>> BugLink: http://launchpad.net/bugs/539794
>>> ---
>>> drivers/net/wireless/rt2x00/rt2400pci.c | 9 +++++----
>>> drivers/net/wireless/rt2x00/rt2500pci.c | 9 +++++----
>>> drivers/net/wireless/rt2x00/rt61pci.c | 7 ++++---
>>> drivers/net/wireless/rt2x00/rt73usb.c | 7 ++++---
>>> 4 files changed, 18 insertions(+), 14 deletions(-)
>>>
>>> diff --git a/drivers/net/wireless/rt2x00/rt2400pci.c b/drivers/net/wireless/rt2x00/rt2400pci.c
>>> index 4020bad..37475e8 100644
>>> --- a/drivers/net/wireless/rt2x00/rt2400pci.c
>>> +++ b/drivers/net/wireless/rt2x00/rt2400pci.c
>>> @@ -925,7 +925,7 @@ static void rt2400pci_disable_radio(struct rt2x00_dev *rt2x00dev)
>>> static int rt2400pci_set_state(struct rt2x00_dev *rt2x00dev,
>>> enum dev_state state)
>>> {
>>> - u32 reg;
>>> + u32 reg, reg2;
>>> unsigned int i;
>>> char put_to_sleep;
>>> char bbp_state;
>>> @@ -946,11 +946,12 @@ static int rt2400pci_set_state(struct rt2x00_dev *rt2x00dev,
>>> * device has entered the correct state.
>>> */
>>> for (i = 0; i< REGISTER_BUSY_COUNT; i++) {
>>> - rt2x00pci_register_read(rt2x00dev, PWRCSR1,&reg);
>>> - bbp_state = rt2x00_get_field32(reg, PWRCSR1_BBP_CURR_STATE);
>>> - rf_state = rt2x00_get_field32(reg, PWRCSR1_RF_CURR_STATE);
>>> + rt2x00pci_register_read(rt2x00dev, PWRCSR1,&reg2);
>>> + bbp_state = rt2x00_get_field32(reg2, PWRCSR1_BBP_CURR_STATE);
>>> + rf_state = rt2x00_get_field32(reg2, PWRCSR1_RF_CURR_STATE);
>>> if (bbp_state == state&& rf_state == state)
>>> return 0;
>>> + rt2x00pci_register_write(rt2x00dev, PWRCSR1, reg);
>>> msleep(10);
>>> }
>>>
>>> diff --git a/drivers/net/wireless/rt2x00/rt2500pci.c b/drivers/net/wireless/rt2x00/rt2500pci.c
>>> index 8f15e41..30526f0 100644
>>> --- a/drivers/net/wireless/rt2x00/rt2500pci.c
>>> +++ b/drivers/net/wireless/rt2x00/rt2500pci.c
>>> @@ -1084,7 +1084,7 @@ static void rt2500pci_disable_radio(struct rt2x00_dev *rt2x00dev)
>>> static int rt2500pci_set_state(struct rt2x00_dev *rt2x00dev,
>>> enum dev_state state)
>>> {
>>> - u32 reg;
>>> + u32 reg, reg2;
>>> unsigned int i;
>>> char put_to_sleep;
>>> char bbp_state;
>>> @@ -1105,11 +1105,12 @@ static int rt2500pci_set_state(struct rt2x00_dev *rt2x00dev,
>>> * device has entered the correct state.
>>> */
>>> for (i = 0; i< REGISTER_BUSY_COUNT; i++) {
>>> - rt2x00pci_register_read(rt2x00dev, PWRCSR1,&reg);
>>> - bbp_state = rt2x00_get_field32(reg, PWRCSR1_BBP_CURR_STATE);
>>> - rf_state = rt2x00_get_field32(reg, PWRCSR1_RF_CURR_STATE);
>>> + rt2x00pci_register_read(rt2x00dev, PWRCSR1,&reg2);
>>> + bbp_state = rt2x00_get_field32(reg2, PWRCSR1_BBP_CURR_STATE);
>>> + rf_state = rt2x00_get_field32(reg2, PWRCSR1_RF_CURR_STATE);
>>> if (bbp_state == state&& rf_state == state)
>>> return 0;
>>> + rt2x00pci_register_write(rt2x00dev, PWRCSR1, reg);
>>> msleep(10);
>>> }
>>>
>>> diff --git a/drivers/net/wireless/rt2x00/rt61pci.c b/drivers/net/wireless/rt2x00/rt61pci.c
>>> index 9a6ceb4..68317d7 100644
>>> --- a/drivers/net/wireless/rt2x00/rt61pci.c
>>> +++ b/drivers/net/wireless/rt2x00/rt61pci.c
>>> @@ -1690,7 +1690,7 @@ static void rt61pci_disable_radio(struct rt2x00_dev *rt2x00dev)
>>>
>>> static int rt61pci_set_state(struct rt2x00_dev *rt2x00dev, enum dev_state state)
>>> {
>>> - u32 reg;
>>> + u32 reg, reg2;
>>> unsigned int i;
>>> char put_to_sleep;
>>>
>>> @@ -1707,10 +1707,11 @@ static int rt61pci_set_state(struct rt2x00_dev *rt2x00dev, enum dev_state state)
>>> * device has entered the correct state.
>>> */
>>> for (i = 0; i< REGISTER_BUSY_COUNT; i++) {
>>> - rt2x00pci_register_read(rt2x00dev, MAC_CSR12,&reg);
>>> - state = rt2x00_get_field32(reg, MAC_CSR12_BBP_CURRENT_STATE);
>>> + rt2x00pci_register_read(rt2x00dev, MAC_CSR12,&reg2);
>>> + state = rt2x00_get_field32(reg2, MAC_CSR12_BBP_CURRENT_STATE);
>>> if (state == !put_to_sleep)
>>> return 0;
>>> + rt2x00pci_register_write(rt2x00dev, MAC_CSR12, reg);
>>> msleep(10);
>>> }
>>>
>>> diff --git a/drivers/net/wireless/rt2x00/rt73usb.c b/drivers/net/wireless/rt2x00/rt73usb.c
>>> index 0a0c095..dbf650a 100644
>>> --- a/drivers/net/wireless/rt2x00/rt73usb.c
>>> +++ b/drivers/net/wireless/rt2x00/rt73usb.c
>>> @@ -1369,7 +1369,7 @@ static void rt73usb_disable_radio(struct rt2x00_dev *rt2x00dev)
>>>
>>> static int rt73usb_set_state(struct rt2x00_dev *rt2x00dev, enum dev_state state)
>>> {
>>> - u32 reg;
>>> + u32 reg, reg2;
>>> unsigned int i;
>>> char put_to_sleep;
>>>
>>> @@ -1386,10 +1386,11 @@ static int rt73usb_set_state(struct rt2x00_dev *rt2x00dev, enum dev_state state)
>>> * device has entered the correct state.
>>> */
>>> for (i = 0; i< REGISTER_BUSY_COUNT; i++) {
>>> - rt2x00usb_register_read(rt2x00dev, MAC_CSR12,&reg);
>>> - state = rt2x00_get_field32(reg, MAC_CSR12_BBP_CURRENT_STATE);
>>> + rt2x00usb_register_read(rt2x00dev, MAC_CSR12,&reg2);
>>> + state = rt2x00_get_field32(reg2, MAC_CSR12_BBP_CURRENT_STATE);
>>> if (state == !put_to_sleep)
>>> return 0;
>>> + rt2x00usb_register_write(rt2x00dev, MAC_CSR12, reg);
>>> msleep(10);
>>> }
>>>
>>
>> Has this patch been submitted to upstream stable? As I understand it,
>> this is a cherrypick of a patch to Linus's tree. Is that correct?
>>
>> Brad
>> --
>> Brad Figg brad.figg@canonical.com http://www.canonical.com
>>
>> --
>> kernel-team mailing list
>> kernel-team@lists.ubuntu.com
>> https://lists.ubuntu.com/mailman/listinfo/kernel-team
>>

That still doesn't answer if it has been submitted to upstream stable. As you
are aware we prefer to take SRU patches from stable releases. If the patch
is not part of a stable release we like it if the patches have at least been
submitted to stable for inclusion and hopefully accepted for a future stable
release.

I went up to LKML and saw that this patch was part of a bulk patch for networking
changes that came from David Miller. There is no indication any of these
patches have been submitted to stable.

Do you plan to submit this patch to upstream stable?

Brad
Manoj Iyer June 30, 2010, 11:34 p.m. UTC | #4
>>>> Date: Thu, 13 May 2010 21:16:03 +0200
>>>> Subject: [PATCH] rt2x00: Fix failed SLEEP->AWAKE and AWAKE->SLEEP transitions.
>>>>
>>>> (Based on a patch created by Ondrej Zary)
>>>>
>>>> In some circumstances the Ralink devices do not properly go to sleep
>>>> or wake up, with timeouts occurring.
>>>> Fix this by retrying telling the device that it has to wake up or
>>>> sleep.
>>>>
>>>> Signed-off-by: Gertjan van Wingerde<gwingerde@gmail.com>
>>>> Acked-by: Ivo van Doorn<IvDoorn@gmail.com>
>>>> Signed-off-by: John W. Linville<linville@tuxdriver.com>
>>>> (cherry picked from commit 9655a6ec19ca656af246fb80817aa337892aefbf)
>>>>

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Please read the SRU request submission carefully

from 2.6 linus tree...

commit 9655a6ec19ca656af246fb80817aa337892aefbf
Author: Gertjan van Wingerde <gwingerde@gmail.com>
Date:   Thu May 13 21:16:03 2010 +0200

     rt2x00: Fix failed SLEEP->AWAKE and AWAKE->SLEEP transitions.

     (Based on a patch created by Ondrej Zary)

     In some circumstances the Ralink devices do not properly go to sleep
     or wake up, with timeouts occurring.
     Fix this by retrying telling the device that it has to wake up or
     sleep.

     Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com>
     Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
     Signed-off-by: John W. Linville <linville@tuxdriver.com>


>>>> Signed-off-by: Manoj Iyer<manoj.iyer@canonical.com>
>>>>
>>>> BugLink: http://launchpad.net/bugs/539794
>>>> ---
>>>> drivers/net/wireless/rt2x00/rt2400pci.c | 9 +++++----
>>>> drivers/net/wireless/rt2x00/rt2500pci.c | 9 +++++----
>>>> drivers/net/wireless/rt2x00/rt61pci.c | 7 ++++---
>>>> drivers/net/wireless/rt2x00/rt73usb.c | 7 ++++---
>>>> 4 files changed, 18 insertions(+), 14 deletions(-)
>>>>
>>>> diff --git a/drivers/net/wireless/rt2x00/rt2400pci.c b/drivers/net/wireless/rt2x00/rt2400pci.c
>>>> index 4020bad..37475e8 100644
>>>> --- a/drivers/net/wireless/rt2x00/rt2400pci.c
>>>> +++ b/drivers/net/wireless/rt2x00/rt2400pci.c
>>>> @@ -925,7 +925,7 @@ static void rt2400pci_disable_radio(struct rt2x00_dev *rt2x00dev)
>>>> static int rt2400pci_set_state(struct rt2x00_dev *rt2x00dev,
>>>> enum dev_state state)
>>>> {
>>>> - u32 reg;
>>>> + u32 reg, reg2;
>>>> unsigned int i;
>>>> char put_to_sleep;
>>>> char bbp_state;
>>>> @@ -946,11 +946,12 @@ static int rt2400pci_set_state(struct rt2x00_dev *rt2x00dev,
>>>> * device has entered the correct state.
>>>> */
>>>> for (i = 0; i< REGISTER_BUSY_COUNT; i++) {
>>>> - rt2x00pci_register_read(rt2x00dev, PWRCSR1,&reg);
>>>> - bbp_state = rt2x00_get_field32(reg, PWRCSR1_BBP_CURR_STATE);
>>>> - rf_state = rt2x00_get_field32(reg, PWRCSR1_RF_CURR_STATE);
>>>> + rt2x00pci_register_read(rt2x00dev, PWRCSR1,&reg2);
>>>> + bbp_state = rt2x00_get_field32(reg2, PWRCSR1_BBP_CURR_STATE);
>>>> + rf_state = rt2x00_get_field32(reg2, PWRCSR1_RF_CURR_STATE);
>>>> if (bbp_state == state&& rf_state == state)
>>>> return 0;
>>>> + rt2x00pci_register_write(rt2x00dev, PWRCSR1, reg);
>>>> msleep(10);
>>>> }
>>>>
>>>> diff --git a/drivers/net/wireless/rt2x00/rt2500pci.c b/drivers/net/wireless/rt2x00/rt2500pci.c
>>>> index 8f15e41..30526f0 100644
>>>> --- a/drivers/net/wireless/rt2x00/rt2500pci.c
>>>> +++ b/drivers/net/wireless/rt2x00/rt2500pci.c
>>>> @@ -1084,7 +1084,7 @@ static void rt2500pci_disable_radio(struct rt2x00_dev *rt2x00dev)
>>>> static int rt2500pci_set_state(struct rt2x00_dev *rt2x00dev,
>>>> enum dev_state state)
>>>> {
>>>> - u32 reg;
>>>> + u32 reg, reg2;
>>>> unsigned int i;
>>>> char put_to_sleep;
>>>> char bbp_state;
>>>> @@ -1105,11 +1105,12 @@ static int rt2500pci_set_state(struct rt2x00_dev *rt2x00dev,
>>>> * device has entered the correct state.
>>>> */
>>>> for (i = 0; i< REGISTER_BUSY_COUNT; i++) {
>>>> - rt2x00pci_register_read(rt2x00dev, PWRCSR1,&reg);
>>>> - bbp_state = rt2x00_get_field32(reg, PWRCSR1_BBP_CURR_STATE);
>>>> - rf_state = rt2x00_get_field32(reg, PWRCSR1_RF_CURR_STATE);
>>>> + rt2x00pci_register_read(rt2x00dev, PWRCSR1,&reg2);
>>>> + bbp_state = rt2x00_get_field32(reg2, PWRCSR1_BBP_CURR_STATE);
>>>> + rf_state = rt2x00_get_field32(reg2, PWRCSR1_RF_CURR_STATE);
>>>> if (bbp_state == state&& rf_state == state)
>>>> return 0;
>>>> + rt2x00pci_register_write(rt2x00dev, PWRCSR1, reg);
>>>> msleep(10);
>>>> }
>>>>
>>>> diff --git a/drivers/net/wireless/rt2x00/rt61pci.c b/drivers/net/wireless/rt2x00/rt61pci.c
>>>> index 9a6ceb4..68317d7 100644
>>>> --- a/drivers/net/wireless/rt2x00/rt61pci.c
>>>> +++ b/drivers/net/wireless/rt2x00/rt61pci.c
>>>> @@ -1690,7 +1690,7 @@ static void rt61pci_disable_radio(struct rt2x00_dev *rt2x00dev)
>>>>
>>>> static int rt61pci_set_state(struct rt2x00_dev *rt2x00dev, enum dev_state state)
>>>> {
>>>> - u32 reg;
>>>> + u32 reg, reg2;
>>>> unsigned int i;
>>>> char put_to_sleep;
>>>>
>>>> @@ -1707,10 +1707,11 @@ static int rt61pci_set_state(struct rt2x00_dev *rt2x00dev, enum dev_state state)
>>>> * device has entered the correct state.
>>>> */
>>>> for (i = 0; i< REGISTER_BUSY_COUNT; i++) {
>>>> - rt2x00pci_register_read(rt2x00dev, MAC_CSR12,&reg);
>>>> - state = rt2x00_get_field32(reg, MAC_CSR12_BBP_CURRENT_STATE);
>>>> + rt2x00pci_register_read(rt2x00dev, MAC_CSR12,&reg2);
>>>> + state = rt2x00_get_field32(reg2, MAC_CSR12_BBP_CURRENT_STATE);
>>>> if (state == !put_to_sleep)
>>>> return 0;
>>>> + rt2x00pci_register_write(rt2x00dev, MAC_CSR12, reg);
>>>> msleep(10);
>>>> }
>>>>
>>>> diff --git a/drivers/net/wireless/rt2x00/rt73usb.c b/drivers/net/wireless/rt2x00/rt73usb.c
>>>> index 0a0c095..dbf650a 100644
>>>> --- a/drivers/net/wireless/rt2x00/rt73usb.c
>>>> +++ b/drivers/net/wireless/rt2x00/rt73usb.c
>>>> @@ -1369,7 +1369,7 @@ static void rt73usb_disable_radio(struct rt2x00_dev *rt2x00dev)
>>>>
>>>> static int rt73usb_set_state(struct rt2x00_dev *rt2x00dev, enum dev_state state)
>>>> {
>>>> - u32 reg;
>>>> + u32 reg, reg2;
>>>> unsigned int i;
>>>> char put_to_sleep;
>>>>
>>>> @@ -1386,10 +1386,11 @@ static int rt73usb_set_state(struct rt2x00_dev *rt2x00dev, enum dev_state state)
>>>> * device has entered the correct state.
>>>> */
>>>> for (i = 0; i< REGISTER_BUSY_COUNT; i++) {
>>>> - rt2x00usb_register_read(rt2x00dev, MAC_CSR12,&reg);
>>>> - state = rt2x00_get_field32(reg, MAC_CSR12_BBP_CURRENT_STATE);
>>>> + rt2x00usb_register_read(rt2x00dev, MAC_CSR12,&reg2);
>>>> + state = rt2x00_get_field32(reg2, MAC_CSR12_BBP_CURRENT_STATE);
>>>> if (state == !put_to_sleep)
>>>> return 0;
>>>> + rt2x00usb_register_write(rt2x00dev, MAC_CSR12, reg);
>>>> msleep(10);
>>>> }
>>>>
>>>
>>> Has this patch been submitted to upstream stable? As I understand it,
>>> this is a cherrypick of a patch to Linus's tree. Is that correct?
>>>
>>> Brad
>>> --
>>> Brad Figg brad.figg@canonical.com http://www.canonical.com
>>>
>>> --
>>> kernel-team mailing list
>>> kernel-team@lists.ubuntu.com
>>> https://lists.ubuntu.com/mailman/listinfo/kernel-team
>>>
>
> That still doesn't answer if it has been submitted to upstream stable. As you
> are aware we prefer to take SRU patches from stable releases. If the patch
> is not part of a stable release we like it if the patches have at least been
> submitted to stable for inclusion and hopefully accepted for a future stable
> release.
>
> I went up to LKML and saw that this patch was part of a bulk patch for networking
> changes that came from David Miller. There is no indication any of these
> patches have been submitted to stable.
>
> Do you plan to submit this patch to upstream stable?
>
> Brad
> -- 
> Brad Figg brad.figg@canonical.com http://www.canonical.com
>
> -- 
> kernel-team mailing list
> kernel-team@lists.ubuntu.com
> https://lists.ubuntu.com/mailman/listinfo/kernel-team
>
Leann Ogasawara July 1, 2010, 5:51 a.m. UTC | #5
On Wed, 2010-06-30 at 18:34 -0500, manoj.iyer@canonical.com wrote:
> 
> 
> >>>> Date: Thu, 13 May 2010 21:16:03 +0200
> >>>> Subject: [PATCH] rt2x00: Fix failed SLEEP->AWAKE and AWAKE->SLEEP transitions.
> >>>>
> >>>> (Based on a patch created by Ondrej Zary)
> >>>>
> >>>> In some circumstances the Ralink devices do not properly go to sleep
> >>>> or wake up, with timeouts occurring.
> >>>> Fix this by retrying telling the device that it has to wake up or
> >>>> sleep.
> >>>>
> >>>> Signed-off-by: Gertjan van Wingerde<gwingerde@gmail.com>
> >>>> Acked-by: Ivo van Doorn<IvDoorn@gmail.com>
> >>>> Signed-off-by: John W. Linville<linville@tuxdriver.com>
> >>>> (cherry picked from commit 9655a6ec19ca656af246fb80817aa337892aefbf)
> >>>>
> 
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> 
> Please read the SRU request submission carefully

Maybe I'm missing something, but I still don't see any mention if this
has been submitted to upstream stable or not....

Leann

> from 2.6 linus tree...
> 
> commit 9655a6ec19ca656af246fb80817aa337892aefbf
> Author: Gertjan van Wingerde <gwingerde@gmail.com>
> Date:   Thu May 13 21:16:03 2010 +0200
> 
>      rt2x00: Fix failed SLEEP->AWAKE and AWAKE->SLEEP transitions.
> 
>      (Based on a patch created by Ondrej Zary)
> 
>      In some circumstances the Ralink devices do not properly go to sleep
>      or wake up, with timeouts occurring.
>      Fix this by retrying telling the device that it has to wake up or
>      sleep.
> 
>      Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com>
>      Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
>      Signed-off-by: John W. Linville <linville@tuxdriver.com>
> 
> 
> >>>> Signed-off-by: Manoj Iyer<manoj.iyer@canonical.com>
> >>>>
> >>>> BugLink: http://launchpad.net/bugs/539794
> >>>> ---
> >>>> drivers/net/wireless/rt2x00/rt2400pci.c | 9 +++++----
> >>>> drivers/net/wireless/rt2x00/rt2500pci.c | 9 +++++----
> >>>> drivers/net/wireless/rt2x00/rt61pci.c | 7 ++++---
> >>>> drivers/net/wireless/rt2x00/rt73usb.c | 7 ++++---
> >>>> 4 files changed, 18 insertions(+), 14 deletions(-)
> >>>>
> >>>> diff --git a/drivers/net/wireless/rt2x00/rt2400pci.c b/drivers/net/wireless/rt2x00/rt2400pci.c
> >>>> index 4020bad..37475e8 100644
> >>>> --- a/drivers/net/wireless/rt2x00/rt2400pci.c
> >>>> +++ b/drivers/net/wireless/rt2x00/rt2400pci.c
> >>>> @@ -925,7 +925,7 @@ static void rt2400pci_disable_radio(struct rt2x00_dev *rt2x00dev)
> >>>> static int rt2400pci_set_state(struct rt2x00_dev *rt2x00dev,
> >>>> enum dev_state state)
> >>>> {
> >>>> - u32 reg;
> >>>> + u32 reg, reg2;
> >>>> unsigned int i;
> >>>> char put_to_sleep;
> >>>> char bbp_state;
> >>>> @@ -946,11 +946,12 @@ static int rt2400pci_set_state(struct rt2x00_dev *rt2x00dev,
> >>>> * device has entered the correct state.
> >>>> */
> >>>> for (i = 0; i< REGISTER_BUSY_COUNT; i++) {
> >>>> - rt2x00pci_register_read(rt2x00dev, PWRCSR1,&reg);
> >>>> - bbp_state = rt2x00_get_field32(reg, PWRCSR1_BBP_CURR_STATE);
> >>>> - rf_state = rt2x00_get_field32(reg, PWRCSR1_RF_CURR_STATE);
> >>>> + rt2x00pci_register_read(rt2x00dev, PWRCSR1,&reg2);
> >>>> + bbp_state = rt2x00_get_field32(reg2, PWRCSR1_BBP_CURR_STATE);
> >>>> + rf_state = rt2x00_get_field32(reg2, PWRCSR1_RF_CURR_STATE);
> >>>> if (bbp_state == state&& rf_state == state)
> >>>> return 0;
> >>>> + rt2x00pci_register_write(rt2x00dev, PWRCSR1, reg);
> >>>> msleep(10);
> >>>> }
> >>>>
> >>>> diff --git a/drivers/net/wireless/rt2x00/rt2500pci.c b/drivers/net/wireless/rt2x00/rt2500pci.c
> >>>> index 8f15e41..30526f0 100644
> >>>> --- a/drivers/net/wireless/rt2x00/rt2500pci.c
> >>>> +++ b/drivers/net/wireless/rt2x00/rt2500pci.c
> >>>> @@ -1084,7 +1084,7 @@ static void rt2500pci_disable_radio(struct rt2x00_dev *rt2x00dev)
> >>>> static int rt2500pci_set_state(struct rt2x00_dev *rt2x00dev,
> >>>> enum dev_state state)
> >>>> {
> >>>> - u32 reg;
> >>>> + u32 reg, reg2;
> >>>> unsigned int i;
> >>>> char put_to_sleep;
> >>>> char bbp_state;
> >>>> @@ -1105,11 +1105,12 @@ static int rt2500pci_set_state(struct rt2x00_dev *rt2x00dev,
> >>>> * device has entered the correct state.
> >>>> */
> >>>> for (i = 0; i< REGISTER_BUSY_COUNT; i++) {
> >>>> - rt2x00pci_register_read(rt2x00dev, PWRCSR1,&reg);
> >>>> - bbp_state = rt2x00_get_field32(reg, PWRCSR1_BBP_CURR_STATE);
> >>>> - rf_state = rt2x00_get_field32(reg, PWRCSR1_RF_CURR_STATE);
> >>>> + rt2x00pci_register_read(rt2x00dev, PWRCSR1,&reg2);
> >>>> + bbp_state = rt2x00_get_field32(reg2, PWRCSR1_BBP_CURR_STATE);
> >>>> + rf_state = rt2x00_get_field32(reg2, PWRCSR1_RF_CURR_STATE);
> >>>> if (bbp_state == state&& rf_state == state)
> >>>> return 0;
> >>>> + rt2x00pci_register_write(rt2x00dev, PWRCSR1, reg);
> >>>> msleep(10);
> >>>> }
> >>>>
> >>>> diff --git a/drivers/net/wireless/rt2x00/rt61pci.c b/drivers/net/wireless/rt2x00/rt61pci.c
> >>>> index 9a6ceb4..68317d7 100644
> >>>> --- a/drivers/net/wireless/rt2x00/rt61pci.c
> >>>> +++ b/drivers/net/wireless/rt2x00/rt61pci.c
> >>>> @@ -1690,7 +1690,7 @@ static void rt61pci_disable_radio(struct rt2x00_dev *rt2x00dev)
> >>>>
> >>>> static int rt61pci_set_state(struct rt2x00_dev *rt2x00dev, enum dev_state state)
> >>>> {
> >>>> - u32 reg;
> >>>> + u32 reg, reg2;
> >>>> unsigned int i;
> >>>> char put_to_sleep;
> >>>>
> >>>> @@ -1707,10 +1707,11 @@ static int rt61pci_set_state(struct rt2x00_dev *rt2x00dev, enum dev_state state)
> >>>> * device has entered the correct state.
> >>>> */
> >>>> for (i = 0; i< REGISTER_BUSY_COUNT; i++) {
> >>>> - rt2x00pci_register_read(rt2x00dev, MAC_CSR12,&reg);
> >>>> - state = rt2x00_get_field32(reg, MAC_CSR12_BBP_CURRENT_STATE);
> >>>> + rt2x00pci_register_read(rt2x00dev, MAC_CSR12,&reg2);
> >>>> + state = rt2x00_get_field32(reg2, MAC_CSR12_BBP_CURRENT_STATE);
> >>>> if (state == !put_to_sleep)
> >>>> return 0;
> >>>> + rt2x00pci_register_write(rt2x00dev, MAC_CSR12, reg);
> >>>> msleep(10);
> >>>> }
> >>>>
> >>>> diff --git a/drivers/net/wireless/rt2x00/rt73usb.c b/drivers/net/wireless/rt2x00/rt73usb.c
> >>>> index 0a0c095..dbf650a 100644
> >>>> --- a/drivers/net/wireless/rt2x00/rt73usb.c
> >>>> +++ b/drivers/net/wireless/rt2x00/rt73usb.c
> >>>> @@ -1369,7 +1369,7 @@ static void rt73usb_disable_radio(struct rt2x00_dev *rt2x00dev)
> >>>>
> >>>> static int rt73usb_set_state(struct rt2x00_dev *rt2x00dev, enum dev_state state)
> >>>> {
> >>>> - u32 reg;
> >>>> + u32 reg, reg2;
> >>>> unsigned int i;
> >>>> char put_to_sleep;
> >>>>
> >>>> @@ -1386,10 +1386,11 @@ static int rt73usb_set_state(struct rt2x00_dev *rt2x00dev, enum dev_state state)
> >>>> * device has entered the correct state.
> >>>> */
> >>>> for (i = 0; i< REGISTER_BUSY_COUNT; i++) {
> >>>> - rt2x00usb_register_read(rt2x00dev, MAC_CSR12,&reg);
> >>>> - state = rt2x00_get_field32(reg, MAC_CSR12_BBP_CURRENT_STATE);
> >>>> + rt2x00usb_register_read(rt2x00dev, MAC_CSR12,&reg2);
> >>>> + state = rt2x00_get_field32(reg2, MAC_CSR12_BBP_CURRENT_STATE);
> >>>> if (state == !put_to_sleep)
> >>>> return 0;
> >>>> + rt2x00usb_register_write(rt2x00dev, MAC_CSR12, reg);
> >>>> msleep(10);
> >>>> }
> >>>>
> >>>
> >>> Has this patch been submitted to upstream stable? As I understand it,
> >>> this is a cherrypick of a patch to Linus's tree. Is that correct?
> >>>
> >>> Brad
> >>> --
> >>> Brad Figg brad.figg@canonical.com http://www.canonical.com
> >>>
> >>> --
> >>> kernel-team mailing list
> >>> kernel-team@lists.ubuntu.com
> >>> https://lists.ubuntu.com/mailman/listinfo/kernel-team
> >>>
> >
> > That still doesn't answer if it has been submitted to upstream stable. As you
> > are aware we prefer to take SRU patches from stable releases. If the patch
> > is not part of a stable release we like it if the patches have at least been
> > submitted to stable for inclusion and hopefully accepted for a future stable
> > release.
> >
> > I went up to LKML and saw that this patch was part of a bulk patch for networking
> > changes that came from David Miller. There is no indication any of these
> > patches have been submitted to stable.
> >
> > Do you plan to submit this patch to upstream stable?
> >
> > Brad
> > -- 
> > Brad Figg brad.figg@canonical.com http://www.canonical.com
> >
> > -- 
> > kernel-team mailing list
> > kernel-team@lists.ubuntu.com
> > https://lists.ubuntu.com/mailman/listinfo/kernel-team
> >
>
Stefan Bader July 1, 2010, 7:29 a.m. UTC | #6
On 07/01/2010 07:51 AM, Leann Ogasawara wrote:
> On Wed, 2010-06-30 at 18:34 -0500, manoj.iyer@canonical.com wrote:
>>
>>
>>>>>> Date: Thu, 13 May 2010 21:16:03 +0200
>>>>>> Subject: [PATCH] rt2x00: Fix failed SLEEP->AWAKE and AWAKE->SLEEP transitions.
>>>>>>
>>>>>> (Based on a patch created by Ondrej Zary)
>>>>>>
>>>>>> In some circumstances the Ralink devices do not properly go to sleep
>>>>>> or wake up, with timeouts occurring.
>>>>>> Fix this by retrying telling the device that it has to wake up or
>>>>>> sleep.
>>>>>>
>>>>>> Signed-off-by: Gertjan van Wingerde<gwingerde@gmail.com>
>>>>>> Acked-by: Ivo van Doorn<IvDoorn@gmail.com>
>>>>>> Signed-off-by: John W. Linville<linville@tuxdriver.com>
>>>>>> (cherry picked from commit 9655a6ec19ca656af246fb80817aa337892aefbf)
>>>>>>
>>
>> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>>
>> Please read the SRU request submission carefully
> 
> Maybe I'm missing something, but I still don't see any mention if this
> has been submitted to upstream stable or not....
> 
> Leann
> 

Neither do I. Linus tree is not upstream stable and the patch itself will not
automatically get picked up. Some maintainers do this manually. So when doing
SRUs we want to ask.

Basically every SRU request should either say: "has been submitted to upstream
stable" or say it has been rejected there because ...

Stefan

>> from 2.6 linus tree...
>>
>> commit 9655a6ec19ca656af246fb80817aa337892aefbf
>> Author: Gertjan van Wingerde <gwingerde@gmail.com>
>> Date:   Thu May 13 21:16:03 2010 +0200
>>
>>      rt2x00: Fix failed SLEEP->AWAKE and AWAKE->SLEEP transitions.
>>
>>      (Based on a patch created by Ondrej Zary)
>>
>>      In some circumstances the Ralink devices do not properly go to sleep
>>      or wake up, with timeouts occurring.
>>      Fix this by retrying telling the device that it has to wake up or
>>      sleep.
>>
>>      Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com>
>>      Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
>>      Signed-off-by: John W. Linville <linville@tuxdriver.com>
>>
>>
>>>>>> Signed-off-by: Manoj Iyer<manoj.iyer@canonical.com>
>>>>>>
>>>>>> BugLink: http://launchpad.net/bugs/539794
>>>>>> ---
>>>>>> drivers/net/wireless/rt2x00/rt2400pci.c | 9 +++++----
>>>>>> drivers/net/wireless/rt2x00/rt2500pci.c | 9 +++++----
>>>>>> drivers/net/wireless/rt2x00/rt61pci.c | 7 ++++---
>>>>>> drivers/net/wireless/rt2x00/rt73usb.c | 7 ++++---
>>>>>> 4 files changed, 18 insertions(+), 14 deletions(-)
>>>>>>
>>>>>> diff --git a/drivers/net/wireless/rt2x00/rt2400pci.c b/drivers/net/wireless/rt2x00/rt2400pci.c
>>>>>> index 4020bad..37475e8 100644
>>>>>> --- a/drivers/net/wireless/rt2x00/rt2400pci.c
>>>>>> +++ b/drivers/net/wireless/rt2x00/rt2400pci.c
>>>>>> @@ -925,7 +925,7 @@ static void rt2400pci_disable_radio(struct rt2x00_dev *rt2x00dev)
>>>>>> static int rt2400pci_set_state(struct rt2x00_dev *rt2x00dev,
>>>>>> enum dev_state state)
>>>>>> {
>>>>>> - u32 reg;
>>>>>> + u32 reg, reg2;
>>>>>> unsigned int i;
>>>>>> char put_to_sleep;
>>>>>> char bbp_state;
>>>>>> @@ -946,11 +946,12 @@ static int rt2400pci_set_state(struct rt2x00_dev *rt2x00dev,
>>>>>> * device has entered the correct state.
>>>>>> */
>>>>>> for (i = 0; i< REGISTER_BUSY_COUNT; i++) {
>>>>>> - rt2x00pci_register_read(rt2x00dev, PWRCSR1,&reg);
>>>>>> - bbp_state = rt2x00_get_field32(reg, PWRCSR1_BBP_CURR_STATE);
>>>>>> - rf_state = rt2x00_get_field32(reg, PWRCSR1_RF_CURR_STATE);
>>>>>> + rt2x00pci_register_read(rt2x00dev, PWRCSR1,&reg2);
>>>>>> + bbp_state = rt2x00_get_field32(reg2, PWRCSR1_BBP_CURR_STATE);
>>>>>> + rf_state = rt2x00_get_field32(reg2, PWRCSR1_RF_CURR_STATE);
>>>>>> if (bbp_state == state&& rf_state == state)
>>>>>> return 0;
>>>>>> + rt2x00pci_register_write(rt2x00dev, PWRCSR1, reg);
>>>>>> msleep(10);
>>>>>> }
>>>>>>
>>>>>> diff --git a/drivers/net/wireless/rt2x00/rt2500pci.c b/drivers/net/wireless/rt2x00/rt2500pci.c
>>>>>> index 8f15e41..30526f0 100644
>>>>>> --- a/drivers/net/wireless/rt2x00/rt2500pci.c
>>>>>> +++ b/drivers/net/wireless/rt2x00/rt2500pci.c
>>>>>> @@ -1084,7 +1084,7 @@ static void rt2500pci_disable_radio(struct rt2x00_dev *rt2x00dev)
>>>>>> static int rt2500pci_set_state(struct rt2x00_dev *rt2x00dev,
>>>>>> enum dev_state state)
>>>>>> {
>>>>>> - u32 reg;
>>>>>> + u32 reg, reg2;
>>>>>> unsigned int i;
>>>>>> char put_to_sleep;
>>>>>> char bbp_state;
>>>>>> @@ -1105,11 +1105,12 @@ static int rt2500pci_set_state(struct rt2x00_dev *rt2x00dev,
>>>>>> * device has entered the correct state.
>>>>>> */
>>>>>> for (i = 0; i< REGISTER_BUSY_COUNT; i++) {
>>>>>> - rt2x00pci_register_read(rt2x00dev, PWRCSR1,&reg);
>>>>>> - bbp_state = rt2x00_get_field32(reg, PWRCSR1_BBP_CURR_STATE);
>>>>>> - rf_state = rt2x00_get_field32(reg, PWRCSR1_RF_CURR_STATE);
>>>>>> + rt2x00pci_register_read(rt2x00dev, PWRCSR1,&reg2);
>>>>>> + bbp_state = rt2x00_get_field32(reg2, PWRCSR1_BBP_CURR_STATE);
>>>>>> + rf_state = rt2x00_get_field32(reg2, PWRCSR1_RF_CURR_STATE);
>>>>>> if (bbp_state == state&& rf_state == state)
>>>>>> return 0;
>>>>>> + rt2x00pci_register_write(rt2x00dev, PWRCSR1, reg);
>>>>>> msleep(10);
>>>>>> }
>>>>>>
>>>>>> diff --git a/drivers/net/wireless/rt2x00/rt61pci.c b/drivers/net/wireless/rt2x00/rt61pci.c
>>>>>> index 9a6ceb4..68317d7 100644
>>>>>> --- a/drivers/net/wireless/rt2x00/rt61pci.c
>>>>>> +++ b/drivers/net/wireless/rt2x00/rt61pci.c
>>>>>> @@ -1690,7 +1690,7 @@ static void rt61pci_disable_radio(struct rt2x00_dev *rt2x00dev)
>>>>>>
>>>>>> static int rt61pci_set_state(struct rt2x00_dev *rt2x00dev, enum dev_state state)
>>>>>> {
>>>>>> - u32 reg;
>>>>>> + u32 reg, reg2;
>>>>>> unsigned int i;
>>>>>> char put_to_sleep;
>>>>>>
>>>>>> @@ -1707,10 +1707,11 @@ static int rt61pci_set_state(struct rt2x00_dev *rt2x00dev, enum dev_state state)
>>>>>> * device has entered the correct state.
>>>>>> */
>>>>>> for (i = 0; i< REGISTER_BUSY_COUNT; i++) {
>>>>>> - rt2x00pci_register_read(rt2x00dev, MAC_CSR12,&reg);
>>>>>> - state = rt2x00_get_field32(reg, MAC_CSR12_BBP_CURRENT_STATE);
>>>>>> + rt2x00pci_register_read(rt2x00dev, MAC_CSR12,&reg2);
>>>>>> + state = rt2x00_get_field32(reg2, MAC_CSR12_BBP_CURRENT_STATE);
>>>>>> if (state == !put_to_sleep)
>>>>>> return 0;
>>>>>> + rt2x00pci_register_write(rt2x00dev, MAC_CSR12, reg);
>>>>>> msleep(10);
>>>>>> }
>>>>>>
>>>>>> diff --git a/drivers/net/wireless/rt2x00/rt73usb.c b/drivers/net/wireless/rt2x00/rt73usb.c
>>>>>> index 0a0c095..dbf650a 100644
>>>>>> --- a/drivers/net/wireless/rt2x00/rt73usb.c
>>>>>> +++ b/drivers/net/wireless/rt2x00/rt73usb.c
>>>>>> @@ -1369,7 +1369,7 @@ static void rt73usb_disable_radio(struct rt2x00_dev *rt2x00dev)
>>>>>>
>>>>>> static int rt73usb_set_state(struct rt2x00_dev *rt2x00dev, enum dev_state state)
>>>>>> {
>>>>>> - u32 reg;
>>>>>> + u32 reg, reg2;
>>>>>> unsigned int i;
>>>>>> char put_to_sleep;
>>>>>>
>>>>>> @@ -1386,10 +1386,11 @@ static int rt73usb_set_state(struct rt2x00_dev *rt2x00dev, enum dev_state state)
>>>>>> * device has entered the correct state.
>>>>>> */
>>>>>> for (i = 0; i< REGISTER_BUSY_COUNT; i++) {
>>>>>> - rt2x00usb_register_read(rt2x00dev, MAC_CSR12,&reg);
>>>>>> - state = rt2x00_get_field32(reg, MAC_CSR12_BBP_CURRENT_STATE);
>>>>>> + rt2x00usb_register_read(rt2x00dev, MAC_CSR12,&reg2);
>>>>>> + state = rt2x00_get_field32(reg2, MAC_CSR12_BBP_CURRENT_STATE);
>>>>>> if (state == !put_to_sleep)
>>>>>> return 0;
>>>>>> + rt2x00usb_register_write(rt2x00dev, MAC_CSR12, reg);
>>>>>> msleep(10);
>>>>>> }
>>>>>>
>>>>>
>>>>> Has this patch been submitted to upstream stable? As I understand it,
>>>>> this is a cherrypick of a patch to Linus's tree. Is that correct?
>>>>>
>>>>> Brad
>>>>> --
>>>>> Brad Figg brad.figg@canonical.com http://www.canonical.com
>>>>>
>>>>> --
>>>>> kernel-team mailing list
>>>>> kernel-team@lists.ubuntu.com
>>>>> https://lists.ubuntu.com/mailman/listinfo/kernel-team
>>>>>
>>>
>>> That still doesn't answer if it has been submitted to upstream stable. As you
>>> are aware we prefer to take SRU patches from stable releases. If the patch
>>> is not part of a stable release we like it if the patches have at least been
>>> submitted to stable for inclusion and hopefully accepted for a future stable
>>> release.
>>>
>>> I went up to LKML and saw that this patch was part of a bulk patch for networking
>>> changes that came from David Miller. There is no indication any of these
>>> patches have been submitted to stable.
>>>
>>> Do you plan to submit this patch to upstream stable?
>>>
>>> Brad
>>> -- 
>>> Brad Figg brad.figg@canonical.com http://www.canonical.com
>>>
>>> -- 
>>> kernel-team mailing list
>>> kernel-team@lists.ubuntu.com
>>> https://lists.ubuntu.com/mailman/listinfo/kernel-team
>>>
>>
> 
> 
>
Manoj Iyer July 1, 2010, 3:22 p.m. UTC | #7
My bad... The patch is in stable. 
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-2.6-stable.git
commit b1cdc4670b9508fcd47a15fbd12f70d269880b37
Merge: ce7d022 f925b13


Cheers
--- manjo

On Thu, 1 Jul 2010, Stefan Bader wrote:

> On 07/01/2010 07:51 AM, Leann Ogasawara wrote:
>> On Wed, 2010-06-30 at 18:34 -0500, manoj.iyer@canonical.com wrote:
>>>
>>>
>>>>>>> Date: Thu, 13 May 2010 21:16:03 +0200
>>>>>>> Subject: [PATCH] rt2x00: Fix failed SLEEP->AWAKE and AWAKE->SLEEP transitions.
>>>>>>>
>>>>>>> (Based on a patch created by Ondrej Zary)
>>>>>>>
>>>>>>> In some circumstances the Ralink devices do not properly go to sleep
>>>>>>> or wake up, with timeouts occurring.
>>>>>>> Fix this by retrying telling the device that it has to wake up or
>>>>>>> sleep.
>>>>>>>
>>>>>>> Signed-off-by: Gertjan van Wingerde<gwingerde@gmail.com>
>>>>>>> Acked-by: Ivo van Doorn<IvDoorn@gmail.com>
>>>>>>> Signed-off-by: John W. Linville<linville@tuxdriver.com>
>>>>>>> (cherry picked from commit 9655a6ec19ca656af246fb80817aa337892aefbf)
>>>>>>>
>>>
>>> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>>>
>>> Please read the SRU request submission carefully
>>
>> Maybe I'm missing something, but I still don't see any mention if this
>> has been submitted to upstream stable or not....
>>
>> Leann
>>
>
> Neither do I. Linus tree is not upstream stable and the patch itself will not
> automatically get picked up. Some maintainers do this manually. So when doing
> SRUs we want to ask.
>
> Basically every SRU request should either say: "has been submitted to upstream
> stable" or say it has been rejected there because ...
>
> Stefan
>
>>> from 2.6 linus tree...
>>>
>>> commit 9655a6ec19ca656af246fb80817aa337892aefbf
>>> Author: Gertjan van Wingerde <gwingerde@gmail.com>
>>> Date:   Thu May 13 21:16:03 2010 +0200
>>>
>>>      rt2x00: Fix failed SLEEP->AWAKE and AWAKE->SLEEP transitions.
>>>
>>>      (Based on a patch created by Ondrej Zary)
>>>
>>>      In some circumstances the Ralink devices do not properly go to sleep
>>>      or wake up, with timeouts occurring.
>>>      Fix this by retrying telling the device that it has to wake up or
>>>      sleep.
>>>
>>>      Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com>
>>>      Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
>>>      Signed-off-by: John W. Linville <linville@tuxdriver.com>
>>>
>>>
>>>>>>> Signed-off-by: Manoj Iyer<manoj.iyer@canonical.com>
>>>>>>>
>>>>>>> BugLink: http://launchpad.net/bugs/539794
>>>>>>> ---
>>>>>>> drivers/net/wireless/rt2x00/rt2400pci.c | 9 +++++----
>>>>>>> drivers/net/wireless/rt2x00/rt2500pci.c | 9 +++++----
>>>>>>> drivers/net/wireless/rt2x00/rt61pci.c | 7 ++++---
>>>>>>> drivers/net/wireless/rt2x00/rt73usb.c | 7 ++++---
>>>>>>> 4 files changed, 18 insertions(+), 14 deletions(-)
>>>>>>>
>>>>>>> diff --git a/drivers/net/wireless/rt2x00/rt2400pci.c b/drivers/net/wireless/rt2x00/rt2400pci.c
>>>>>>> index 4020bad..37475e8 100644
>>>>>>> --- a/drivers/net/wireless/rt2x00/rt2400pci.c
>>>>>>> +++ b/drivers/net/wireless/rt2x00/rt2400pci.c
>>>>>>> @@ -925,7 +925,7 @@ static void rt2400pci_disable_radio(struct rt2x00_dev *rt2x00dev)
>>>>>>> static int rt2400pci_set_state(struct rt2x00_dev *rt2x00dev,
>>>>>>> enum dev_state state)
>>>>>>> {
>>>>>>> - u32 reg;
>>>>>>> + u32 reg, reg2;
>>>>>>> unsigned int i;
>>>>>>> char put_to_sleep;
>>>>>>> char bbp_state;
>>>>>>> @@ -946,11 +946,12 @@ static int rt2400pci_set_state(struct rt2x00_dev *rt2x00dev,
>>>>>>> * device has entered the correct state.
>>>>>>> */
>>>>>>> for (i = 0; i< REGISTER_BUSY_COUNT; i++) {
>>>>>>> - rt2x00pci_register_read(rt2x00dev, PWRCSR1,&reg);
>>>>>>> - bbp_state = rt2x00_get_field32(reg, PWRCSR1_BBP_CURR_STATE);
>>>>>>> - rf_state = rt2x00_get_field32(reg, PWRCSR1_RF_CURR_STATE);
>>>>>>> + rt2x00pci_register_read(rt2x00dev, PWRCSR1,&reg2);
>>>>>>> + bbp_state = rt2x00_get_field32(reg2, PWRCSR1_BBP_CURR_STATE);
>>>>>>> + rf_state = rt2x00_get_field32(reg2, PWRCSR1_RF_CURR_STATE);
>>>>>>> if (bbp_state == state&& rf_state == state)
>>>>>>> return 0;
>>>>>>> + rt2x00pci_register_write(rt2x00dev, PWRCSR1, reg);
>>>>>>> msleep(10);
>>>>>>> }
>>>>>>>
>>>>>>> diff --git a/drivers/net/wireless/rt2x00/rt2500pci.c b/drivers/net/wireless/rt2x00/rt2500pci.c
>>>>>>> index 8f15e41..30526f0 100644
>>>>>>> --- a/drivers/net/wireless/rt2x00/rt2500pci.c
>>>>>>> +++ b/drivers/net/wireless/rt2x00/rt2500pci.c
>>>>>>> @@ -1084,7 +1084,7 @@ static void rt2500pci_disable_radio(struct rt2x00_dev *rt2x00dev)
>>>>>>> static int rt2500pci_set_state(struct rt2x00_dev *rt2x00dev,
>>>>>>> enum dev_state state)
>>>>>>> {
>>>>>>> - u32 reg;
>>>>>>> + u32 reg, reg2;
>>>>>>> unsigned int i;
>>>>>>> char put_to_sleep;
>>>>>>> char bbp_state;
>>>>>>> @@ -1105,11 +1105,12 @@ static int rt2500pci_set_state(struct rt2x00_dev *rt2x00dev,
>>>>>>> * device has entered the correct state.
>>>>>>> */
>>>>>>> for (i = 0; i< REGISTER_BUSY_COUNT; i++) {
>>>>>>> - rt2x00pci_register_read(rt2x00dev, PWRCSR1,&reg);
>>>>>>> - bbp_state = rt2x00_get_field32(reg, PWRCSR1_BBP_CURR_STATE);
>>>>>>> - rf_state = rt2x00_get_field32(reg, PWRCSR1_RF_CURR_STATE);
>>>>>>> + rt2x00pci_register_read(rt2x00dev, PWRCSR1,&reg2);
>>>>>>> + bbp_state = rt2x00_get_field32(reg2, PWRCSR1_BBP_CURR_STATE);
>>>>>>> + rf_state = rt2x00_get_field32(reg2, PWRCSR1_RF_CURR_STATE);
>>>>>>> if (bbp_state == state&& rf_state == state)
>>>>>>> return 0;
>>>>>>> + rt2x00pci_register_write(rt2x00dev, PWRCSR1, reg);
>>>>>>> msleep(10);
>>>>>>> }
>>>>>>>
>>>>>>> diff --git a/drivers/net/wireless/rt2x00/rt61pci.c b/drivers/net/wireless/rt2x00/rt61pci.c
>>>>>>> index 9a6ceb4..68317d7 100644
>>>>>>> --- a/drivers/net/wireless/rt2x00/rt61pci.c
>>>>>>> +++ b/drivers/net/wireless/rt2x00/rt61pci.c
>>>>>>> @@ -1690,7 +1690,7 @@ static void rt61pci_disable_radio(struct rt2x00_dev *rt2x00dev)
>>>>>>>
>>>>>>> static int rt61pci_set_state(struct rt2x00_dev *rt2x00dev, enum dev_state state)
>>>>>>> {
>>>>>>> - u32 reg;
>>>>>>> + u32 reg, reg2;
>>>>>>> unsigned int i;
>>>>>>> char put_to_sleep;
>>>>>>>
>>>>>>> @@ -1707,10 +1707,11 @@ static int rt61pci_set_state(struct rt2x00_dev *rt2x00dev, enum dev_state state)
>>>>>>> * device has entered the correct state.
>>>>>>> */
>>>>>>> for (i = 0; i< REGISTER_BUSY_COUNT; i++) {
>>>>>>> - rt2x00pci_register_read(rt2x00dev, MAC_CSR12,&reg);
>>>>>>> - state = rt2x00_get_field32(reg, MAC_CSR12_BBP_CURRENT_STATE);
>>>>>>> + rt2x00pci_register_read(rt2x00dev, MAC_CSR12,&reg2);
>>>>>>> + state = rt2x00_get_field32(reg2, MAC_CSR12_BBP_CURRENT_STATE);
>>>>>>> if (state == !put_to_sleep)
>>>>>>> return 0;
>>>>>>> + rt2x00pci_register_write(rt2x00dev, MAC_CSR12, reg);
>>>>>>> msleep(10);
>>>>>>> }
>>>>>>>
>>>>>>> diff --git a/drivers/net/wireless/rt2x00/rt73usb.c b/drivers/net/wireless/rt2x00/rt73usb.c
>>>>>>> index 0a0c095..dbf650a 100644
>>>>>>> --- a/drivers/net/wireless/rt2x00/rt73usb.c
>>>>>>> +++ b/drivers/net/wireless/rt2x00/rt73usb.c
>>>>>>> @@ -1369,7 +1369,7 @@ static void rt73usb_disable_radio(struct rt2x00_dev *rt2x00dev)
>>>>>>>
>>>>>>> static int rt73usb_set_state(struct rt2x00_dev *rt2x00dev, enum dev_state state)
>>>>>>> {
>>>>>>> - u32 reg;
>>>>>>> + u32 reg, reg2;
>>>>>>> unsigned int i;
>>>>>>> char put_to_sleep;
>>>>>>>
>>>>>>> @@ -1386,10 +1386,11 @@ static int rt73usb_set_state(struct rt2x00_dev *rt2x00dev, enum dev_state state)
>>>>>>> * device has entered the correct state.
>>>>>>> */
>>>>>>> for (i = 0; i< REGISTER_BUSY_COUNT; i++) {
>>>>>>> - rt2x00usb_register_read(rt2x00dev, MAC_CSR12,&reg);
>>>>>>> - state = rt2x00_get_field32(reg, MAC_CSR12_BBP_CURRENT_STATE);
>>>>>>> + rt2x00usb_register_read(rt2x00dev, MAC_CSR12,&reg2);
>>>>>>> + state = rt2x00_get_field32(reg2, MAC_CSR12_BBP_CURRENT_STATE);
>>>>>>> if (state == !put_to_sleep)
>>>>>>> return 0;
>>>>>>> + rt2x00usb_register_write(rt2x00dev, MAC_CSR12, reg);
>>>>>>> msleep(10);
>>>>>>> }
>>>>>>>
>>>>>>
>>>>>> Has this patch been submitted to upstream stable? As I understand it,
>>>>>> this is a cherrypick of a patch to Linus's tree. Is that correct?
>>>>>>
>>>>>> Brad
>>>>>> --
>>>>>> Brad Figg brad.figg@canonical.com http://www.canonical.com
>>>>>>
>>>>>> --
>>>>>> kernel-team mailing list
>>>>>> kernel-team@lists.ubuntu.com
>>>>>> https://lists.ubuntu.com/mailman/listinfo/kernel-team
>>>>>>
>>>>
>>>> That still doesn't answer if it has been submitted to upstream stable. As you
>>>> are aware we prefer to take SRU patches from stable releases. If the patch
>>>> is not part of a stable release we like it if the patches have at least been
>>>> submitted to stable for inclusion and hopefully accepted for a future stable
>>>> release.
>>>>
>>>> I went up to LKML and saw that this patch was part of a bulk patch for networking
>>>> changes that came from David Miller. There is no indication any of these
>>>> patches have been submitted to stable.
>>>>
>>>> Do you plan to submit this patch to upstream stable?
>>>>
>>>> Brad
>>>> --
>>>> Brad Figg brad.figg@canonical.com http://www.canonical.com
>>>>
>>>> --
>>>> kernel-team mailing list
>>>> kernel-team@lists.ubuntu.com
>>>> https://lists.ubuntu.com/mailman/listinfo/kernel-team
>>>>
>>>
>>
>>
>>
>
>
> -- 
> kernel-team mailing list
> kernel-team@lists.ubuntu.com
> https://lists.ubuntu.com/mailman/listinfo/kernel-team
>
Stefan Bader July 1, 2010, 4:55 p.m. UTC | #8
On 07/01/2010 05:22 PM, manoj.iyer@canonical.com wrote:
> 
> My bad... The patch is in stable. 
> git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-2.6-stable.git
> commit b1cdc4670b9508fcd47a15fbd12f70d269880b37
> Merge: ce7d022 f925b13
> 

Unfortunately that proves nothing. The tree you reference is some mangling tree
which has the branches auto-follow the real stable trees but also contains some
upstream only object.

Have you actually _asked_ anybody on the s-o-b list about sending it upstream
stable. Like John Linville?

-Stefan
> 
> Cheers
> --- manjo
> 
> On Thu, 1 Jul 2010, Stefan Bader wrote:
> 
>> On 07/01/2010 07:51 AM, Leann Ogasawara wrote:
>>> On Wed, 2010-06-30 at 18:34 -0500, manoj.iyer@canonical.com wrote:
>>>>
>>>>
>>>>>>>> Date: Thu, 13 May 2010 21:16:03 +0200
>>>>>>>> Subject: [PATCH] rt2x00: Fix failed SLEEP->AWAKE and AWAKE->SLEEP transitions.
>>>>>>>>
>>>>>>>> (Based on a patch created by Ondrej Zary)
>>>>>>>>
>>>>>>>> In some circumstances the Ralink devices do not properly go to sleep
>>>>>>>> or wake up, with timeouts occurring.
>>>>>>>> Fix this by retrying telling the device that it has to wake up or
>>>>>>>> sleep.
>>>>>>>>
>>>>>>>> Signed-off-by: Gertjan van Wingerde<gwingerde@gmail.com>
>>>>>>>> Acked-by: Ivo van Doorn<IvDoorn@gmail.com>
>>>>>>>> Signed-off-by: John W. Linville<linville@tuxdriver.com>
>>>>>>>> (cherry picked from commit 9655a6ec19ca656af246fb80817aa337892aefbf)
>>>>>>>>
>>>>
>>>> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>>>>
>>>> Please read the SRU request submission carefully
>>>
>>> Maybe I'm missing something, but I still don't see any mention if this
>>> has been submitted to upstream stable or not....
>>>
>>> Leann
>>>
>>
>> Neither do I. Linus tree is not upstream stable and the patch itself will not
>> automatically get picked up. Some maintainers do this manually. So when doing
>> SRUs we want to ask.
>>
>> Basically every SRU request should either say: "has been submitted to upstream
>> stable" or say it has been rejected there because ...
>>
>> Stefan
>>
>>>> from 2.6 linus tree...
>>>>
>>>> commit 9655a6ec19ca656af246fb80817aa337892aefbf
>>>> Author: Gertjan van Wingerde <gwingerde@gmail.com>
>>>> Date:   Thu May 13 21:16:03 2010 +0200
>>>>
>>>>      rt2x00: Fix failed SLEEP->AWAKE and AWAKE->SLEEP transitions.
>>>>
>>>>      (Based on a patch created by Ondrej Zary)
>>>>
>>>>      In some circumstances the Ralink devices do not properly go to sleep
>>>>      or wake up, with timeouts occurring.
>>>>      Fix this by retrying telling the device that it has to wake up or
>>>>      sleep.
>>>>
>>>>      Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com>
>>>>      Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
>>>>      Signed-off-by: John W. Linville <linville@tuxdriver.com>
>>>>
>>>>
>>>>>>>> Signed-off-by: Manoj Iyer<manoj.iyer@canonical.com>
>>>>>>>>
>>>>>>>> BugLink: http://launchpad.net/bugs/539794
>>>>>>>> ---
>>>>>>>> drivers/net/wireless/rt2x00/rt2400pci.c | 9 +++++----
>>>>>>>> drivers/net/wireless/rt2x00/rt2500pci.c | 9 +++++----
>>>>>>>> drivers/net/wireless/rt2x00/rt61pci.c | 7 ++++---
>>>>>>>> drivers/net/wireless/rt2x00/rt73usb.c | 7 ++++---
>>>>>>>> 4 files changed, 18 insertions(+), 14 deletions(-)
>>>>>>>>
>>>>>>>> diff --git a/drivers/net/wireless/rt2x00/rt2400pci.c b/drivers/net/wireless/rt2x00/rt2400pci.c
>>>>>>>> index 4020bad..37475e8 100644
>>>>>>>> --- a/drivers/net/wireless/rt2x00/rt2400pci.c
>>>>>>>> +++ b/drivers/net/wireless/rt2x00/rt2400pci.c
>>>>>>>> @@ -925,7 +925,7 @@ static void rt2400pci_disable_radio(struct rt2x00_dev *rt2x00dev)
>>>>>>>> static int rt2400pci_set_state(struct rt2x00_dev *rt2x00dev,
>>>>>>>> enum dev_state state)
>>>>>>>> {
>>>>>>>> - u32 reg;
>>>>>>>> + u32 reg, reg2;
>>>>>>>> unsigned int i;
>>>>>>>> char put_to_sleep;
>>>>>>>> char bbp_state;
>>>>>>>> @@ -946,11 +946,12 @@ static int rt2400pci_set_state(struct rt2x00_dev *rt2x00dev,
>>>>>>>> * device has entered the correct state.
>>>>>>>> */
>>>>>>>> for (i = 0; i< REGISTER_BUSY_COUNT; i++) {
>>>>>>>> - rt2x00pci_register_read(rt2x00dev, PWRCSR1,&reg);
>>>>>>>> - bbp_state = rt2x00_get_field32(reg, PWRCSR1_BBP_CURR_STATE);
>>>>>>>> - rf_state = rt2x00_get_field32(reg, PWRCSR1_RF_CURR_STATE);
>>>>>>>> + rt2x00pci_register_read(rt2x00dev, PWRCSR1,&reg2);
>>>>>>>> + bbp_state = rt2x00_get_field32(reg2, PWRCSR1_BBP_CURR_STATE);
>>>>>>>> + rf_state = rt2x00_get_field32(reg2, PWRCSR1_RF_CURR_STATE);
>>>>>>>> if (bbp_state == state&& rf_state == state)
>>>>>>>> return 0;
>>>>>>>> + rt2x00pci_register_write(rt2x00dev, PWRCSR1, reg);
>>>>>>>> msleep(10);
>>>>>>>> }
>>>>>>>>
>>>>>>>> diff --git a/drivers/net/wireless/rt2x00/rt2500pci.c b/drivers/net/wireless/rt2x00/rt2500pci.c
>>>>>>>> index 8f15e41..30526f0 100644
>>>>>>>> --- a/drivers/net/wireless/rt2x00/rt2500pci.c
>>>>>>>> +++ b/drivers/net/wireless/rt2x00/rt2500pci.c
>>>>>>>> @@ -1084,7 +1084,7 @@ static void rt2500pci_disable_radio(struct rt2x00_dev *rt2x00dev)
>>>>>>>> static int rt2500pci_set_state(struct rt2x00_dev *rt2x00dev,
>>>>>>>> enum dev_state state)
>>>>>>>> {
>>>>>>>> - u32 reg;
>>>>>>>> + u32 reg, reg2;
>>>>>>>> unsigned int i;
>>>>>>>> char put_to_sleep;
>>>>>>>> char bbp_state;
>>>>>>>> @@ -1105,11 +1105,12 @@ static int rt2500pci_set_state(struct rt2x00_dev *rt2x00dev,
>>>>>>>> * device has entered the correct state.
>>>>>>>> */
>>>>>>>> for (i = 0; i< REGISTER_BUSY_COUNT; i++) {
>>>>>>>> - rt2x00pci_register_read(rt2x00dev, PWRCSR1,&reg);
>>>>>>>> - bbp_state = rt2x00_get_field32(reg, PWRCSR1_BBP_CURR_STATE);
>>>>>>>> - rf_state = rt2x00_get_field32(reg, PWRCSR1_RF_CURR_STATE);
>>>>>>>> + rt2x00pci_register_read(rt2x00dev, PWRCSR1,&reg2);
>>>>>>>> + bbp_state = rt2x00_get_field32(reg2, PWRCSR1_BBP_CURR_STATE);
>>>>>>>> + rf_state = rt2x00_get_field32(reg2, PWRCSR1_RF_CURR_STATE);
>>>>>>>> if (bbp_state == state&& rf_state == state)
>>>>>>>> return 0;
>>>>>>>> + rt2x00pci_register_write(rt2x00dev, PWRCSR1, reg);
>>>>>>>> msleep(10);
>>>>>>>> }
>>>>>>>>
>>>>>>>> diff --git a/drivers/net/wireless/rt2x00/rt61pci.c b/drivers/net/wireless/rt2x00/rt61pci.c
>>>>>>>> index 9a6ceb4..68317d7 100644
>>>>>>>> --- a/drivers/net/wireless/rt2x00/rt61pci.c
>>>>>>>> +++ b/drivers/net/wireless/rt2x00/rt61pci.c
>>>>>>>> @@ -1690,7 +1690,7 @@ static void rt61pci_disable_radio(struct rt2x00_dev *rt2x00dev)
>>>>>>>>
>>>>>>>> static int rt61pci_set_state(struct rt2x00_dev *rt2x00dev, enum dev_state state)
>>>>>>>> {
>>>>>>>> - u32 reg;
>>>>>>>> + u32 reg, reg2;
>>>>>>>> unsigned int i;
>>>>>>>> char put_to_sleep;
>>>>>>>>
>>>>>>>> @@ -1707,10 +1707,11 @@ static int rt61pci_set_state(struct rt2x00_dev *rt2x00dev, enum dev_state state)
>>>>>>>> * device has entered the correct state.
>>>>>>>> */
>>>>>>>> for (i = 0; i< REGISTER_BUSY_COUNT; i++) {
>>>>>>>> - rt2x00pci_register_read(rt2x00dev, MAC_CSR12,&reg);
>>>>>>>> - state = rt2x00_get_field32(reg, MAC_CSR12_BBP_CURRENT_STATE);
>>>>>>>> + rt2x00pci_register_read(rt2x00dev, MAC_CSR12,&reg2);
>>>>>>>> + state = rt2x00_get_field32(reg2, MAC_CSR12_BBP_CURRENT_STATE);
>>>>>>>> if (state == !put_to_sleep)
>>>>>>>> return 0;
>>>>>>>> + rt2x00pci_register_write(rt2x00dev, MAC_CSR12, reg);
>>>>>>>> msleep(10);
>>>>>>>> }
>>>>>>>>
>>>>>>>> diff --git a/drivers/net/wireless/rt2x00/rt73usb.c b/drivers/net/wireless/rt2x00/rt73usb.c
>>>>>>>> index 0a0c095..dbf650a 100644
>>>>>>>> --- a/drivers/net/wireless/rt2x00/rt73usb.c
>>>>>>>> +++ b/drivers/net/wireless/rt2x00/rt73usb.c
>>>>>>>> @@ -1369,7 +1369,7 @@ static void rt73usb_disable_radio(struct rt2x00_dev *rt2x00dev)
>>>>>>>>
>>>>>>>> static int rt73usb_set_state(struct rt2x00_dev *rt2x00dev, enum dev_state state)
>>>>>>>> {
>>>>>>>> - u32 reg;
>>>>>>>> + u32 reg, reg2;
>>>>>>>> unsigned int i;
>>>>>>>> char put_to_sleep;
>>>>>>>>
>>>>>>>> @@ -1386,10 +1386,11 @@ static int rt73usb_set_state(struct rt2x00_dev *rt2x00dev, enum dev_state state)
>>>>>>>> * device has entered the correct state.
>>>>>>>> */
>>>>>>>> for (i = 0; i< REGISTER_BUSY_COUNT; i++) {
>>>>>>>> - rt2x00usb_register_read(rt2x00dev, MAC_CSR12,&reg);
>>>>>>>> - state = rt2x00_get_field32(reg, MAC_CSR12_BBP_CURRENT_STATE);
>>>>>>>> + rt2x00usb_register_read(rt2x00dev, MAC_CSR12,&reg2);
>>>>>>>> + state = rt2x00_get_field32(reg2, MAC_CSR12_BBP_CURRENT_STATE);
>>>>>>>> if (state == !put_to_sleep)
>>>>>>>> return 0;
>>>>>>>> + rt2x00usb_register_write(rt2x00dev, MAC_CSR12, reg);
>>>>>>>> msleep(10);
>>>>>>>> }
>>>>>>>>
>>>>>>>
>>>>>>> Has this patch been submitted to upstream stable? As I understand it,
>>>>>>> this is a cherrypick of a patch to Linus's tree. Is that correct?
>>>>>>>
>>>>>>> Brad
>>>>>>> --
>>>>>>> Brad Figg brad.figg@canonical.com http://www.canonical.com
>>>>>>>
>>>>>>> --
>>>>>>> kernel-team mailing list
>>>>>>> kernel-team@lists.ubuntu.com
>>>>>>> https://lists.ubuntu.com/mailman/listinfo/kernel-team
>>>>>>>
>>>>>
>>>>> That still doesn't answer if it has been submitted to upstream stable. As you
>>>>> are aware we prefer to take SRU patches from stable releases. If the patch
>>>>> is not part of a stable release we like it if the patches have at least been
>>>>> submitted to stable for inclusion and hopefully accepted for a future stable
>>>>> release.
>>>>>
>>>>> I went up to LKML and saw that this patch was part of a bulk patch for networking
>>>>> changes that came from David Miller. There is no indication any of these
>>>>> patches have been submitted to stable.
>>>>>
>>>>> Do you plan to submit this patch to upstream stable?
>>>>>
>>>>> Brad
>>>>> --
>>>>> Brad Figg brad.figg@canonical.com http://www.canonical.com
>>>>>
>>>>> --
>>>>> kernel-team mailing list
>>>>> kernel-team@lists.ubuntu.com
>>>>> https://lists.ubuntu.com/mailman/listinfo/kernel-team
>>>>>
>>>>
>>>
>>>
>>>
>>
>>
>> -- 
>> kernel-team mailing list
>> kernel-team@lists.ubuntu.com
>> https://lists.ubuntu.com/mailman/listinfo/kernel-team
>>
>
Manoj Iyer July 1, 2010, 6:23 p.m. UTC | #9
John,

The patch rt2x00: Fix failed SLEEP->AWAKE and AWAKE->SLEEP transitions. 
From Linus 2.6 tree commit 9655a6ec19ca656af246fb80817aa337892aefbf seems 
to fix the bug http://launchpad.net/bugs/539794. We see that this patch is 
not in GKH linux-2.6.32.y.git or GKH stable-queue.git.

Any chance that this patch is already submitted to stable or is there any 
chance of doing that? I will be happy to send this to GKH 
linux-2.6.32.y.git stable if this patch is not submitted to stable.

Cheers
--- manjo
John W. Linville July 1, 2010, 6:32 p.m. UTC | #10
On Thu, Jul 01, 2010 at 01:23:16PM -0500, manoj.iyer@canonical.com wrote:

> The patch rt2x00: Fix failed SLEEP->AWAKE and AWAKE->SLEEP
> transitions. From Linus 2.6 tree commit
> 9655a6ec19ca656af246fb80817aa337892aefbf seems to fix the bug
> http://launchpad.net/bugs/539794. We see that this patch is not in
> GKH linux-2.6.32.y.git or GKH stable-queue.git.
> 
> Any chance that this patch is already submitted to stable or is
> there any chance of doing that? I will be happy to send this to GKH
> linux-2.6.32.y.git stable if this patch is not submitted to stable.

AFAIK it has not been submitted for stable -- please feel free to do so!

Thanks,

John
Manoj Iyer July 1, 2010, 9:58 p.m. UTC | #11
Ok, this is the 1st time(and last) I am having to do this, I am 
withdrawing this SRU request. Please do not process this request any 
further. Looks like the 2 patches I picked from upstream only fixes the 
issue partially, I came to this conclusion after I pinged the originator 
of the bug for more clarification before I submitted them to stable.

I am back to square one.


Cheers
--- manjo

On Thu, 1 Jul 2010, Stefan Bader wrote:

> On 07/01/2010 05:22 PM, manoj.iyer@canonical.com wrote:
>>
>> My bad... The patch is in stable.
>> git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-2.6-stable.git
>> commit b1cdc4670b9508fcd47a15fbd12f70d269880b37
>> Merge: ce7d022 f925b13
>>
>
> Unfortunately that proves nothing. The tree you reference is some mangling tree
> which has the branches auto-follow the real stable trees but also contains some
> upstream only object.
>
> Have you actually _asked_ anybody on the s-o-b list about sending it upstream
> stable. Like John Linville?
>
> -Stefan
>>
>> Cheers
>> --- manjo
>>
>> On Thu, 1 Jul 2010, Stefan Bader wrote:
>>
>>> On 07/01/2010 07:51 AM, Leann Ogasawara wrote:
>>>> On Wed, 2010-06-30 at 18:34 -0500, manoj.iyer@canonical.com wrote:
>>>>>
>>>>>
>>>>>>>>> Date: Thu, 13 May 2010 21:16:03 +0200
>>>>>>>>> Subject: [PATCH] rt2x00: Fix failed SLEEP->AWAKE and AWAKE->SLEEP transitions.
>>>>>>>>>
>>>>>>>>> (Based on a patch created by Ondrej Zary)
>>>>>>>>>
>>>>>>>>> In some circumstances the Ralink devices do not properly go to sleep
>>>>>>>>> or wake up, with timeouts occurring.
>>>>>>>>> Fix this by retrying telling the device that it has to wake up or
>>>>>>>>> sleep.
>>>>>>>>>
>>>>>>>>> Signed-off-by: Gertjan van Wingerde<gwingerde@gmail.com>
>>>>>>>>> Acked-by: Ivo van Doorn<IvDoorn@gmail.com>
>>>>>>>>> Signed-off-by: John W. Linville<linville@tuxdriver.com>
>>>>>>>>> (cherry picked from commit 9655a6ec19ca656af246fb80817aa337892aefbf)
>>>>>>>>>
>>>>>
>>>>> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>>>>>
>>>>> Please read the SRU request submission carefully
>>>>
>>>> Maybe I'm missing something, but I still don't see any mention if this
>>>> has been submitted to upstream stable or not....
>>>>
>>>> Leann
>>>>
>>>
>>> Neither do I. Linus tree is not upstream stable and the patch itself will not
>>> automatically get picked up. Some maintainers do this manually. So when doing
>>> SRUs we want to ask.
>>>
>>> Basically every SRU request should either say: "has been submitted to upstream
>>> stable" or say it has been rejected there because ...
>>>
>>> Stefan
>>>
>>>>> from 2.6 linus tree...
>>>>>
>>>>> commit 9655a6ec19ca656af246fb80817aa337892aefbf
>>>>> Author: Gertjan van Wingerde <gwingerde@gmail.com>
>>>>> Date:   Thu May 13 21:16:03 2010 +0200
>>>>>
>>>>>      rt2x00: Fix failed SLEEP->AWAKE and AWAKE->SLEEP transitions.
>>>>>
>>>>>      (Based on a patch created by Ondrej Zary)
>>>>>
>>>>>      In some circumstances the Ralink devices do not properly go to sleep
>>>>>      or wake up, with timeouts occurring.
>>>>>      Fix this by retrying telling the device that it has to wake up or
>>>>>      sleep.
>>>>>
>>>>>      Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com>
>>>>>      Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
>>>>>      Signed-off-by: John W. Linville <linville@tuxdriver.com>
>>>>>
>>>>>
>>>>>>>>> Signed-off-by: Manoj Iyer<manoj.iyer@canonical.com>
>>>>>>>>>
>>>>>>>>> BugLink: http://launchpad.net/bugs/539794
>>>>>>>>> ---
>>>>>>>>> drivers/net/wireless/rt2x00/rt2400pci.c | 9 +++++----
>>>>>>>>> drivers/net/wireless/rt2x00/rt2500pci.c | 9 +++++----
>>>>>>>>> drivers/net/wireless/rt2x00/rt61pci.c | 7 ++++---
>>>>>>>>> drivers/net/wireless/rt2x00/rt73usb.c | 7 ++++---
>>>>>>>>> 4 files changed, 18 insertions(+), 14 deletions(-)
>>>>>>>>>
>>>>>>>>> diff --git a/drivers/net/wireless/rt2x00/rt2400pci.c b/drivers/net/wireless/rt2x00/rt2400pci.c
>>>>>>>>> index 4020bad..37475e8 100644
>>>>>>>>> --- a/drivers/net/wireless/rt2x00/rt2400pci.c
>>>>>>>>> +++ b/drivers/net/wireless/rt2x00/rt2400pci.c
>>>>>>>>> @@ -925,7 +925,7 @@ static void rt2400pci_disable_radio(struct rt2x00_dev *rt2x00dev)
>>>>>>>>> static int rt2400pci_set_state(struct rt2x00_dev *rt2x00dev,
>>>>>>>>> enum dev_state state)
>>>>>>>>> {
>>>>>>>>> - u32 reg;
>>>>>>>>> + u32 reg, reg2;
>>>>>>>>> unsigned int i;
>>>>>>>>> char put_to_sleep;
>>>>>>>>> char bbp_state;
>>>>>>>>> @@ -946,11 +946,12 @@ static int rt2400pci_set_state(struct rt2x00_dev *rt2x00dev,
>>>>>>>>> * device has entered the correct state.
>>>>>>>>> */
>>>>>>>>> for (i = 0; i< REGISTER_BUSY_COUNT; i++) {
>>>>>>>>> - rt2x00pci_register_read(rt2x00dev, PWRCSR1,&reg);
>>>>>>>>> - bbp_state = rt2x00_get_field32(reg, PWRCSR1_BBP_CURR_STATE);
>>>>>>>>> - rf_state = rt2x00_get_field32(reg, PWRCSR1_RF_CURR_STATE);
>>>>>>>>> + rt2x00pci_register_read(rt2x00dev, PWRCSR1,&reg2);
>>>>>>>>> + bbp_state = rt2x00_get_field32(reg2, PWRCSR1_BBP_CURR_STATE);
>>>>>>>>> + rf_state = rt2x00_get_field32(reg2, PWRCSR1_RF_CURR_STATE);
>>>>>>>>> if (bbp_state == state&& rf_state == state)
>>>>>>>>> return 0;
>>>>>>>>> + rt2x00pci_register_write(rt2x00dev, PWRCSR1, reg);
>>>>>>>>> msleep(10);
>>>>>>>>> }
>>>>>>>>>
>>>>>>>>> diff --git a/drivers/net/wireless/rt2x00/rt2500pci.c b/drivers/net/wireless/rt2x00/rt2500pci.c
>>>>>>>>> index 8f15e41..30526f0 100644
>>>>>>>>> --- a/drivers/net/wireless/rt2x00/rt2500pci.c
>>>>>>>>> +++ b/drivers/net/wireless/rt2x00/rt2500pci.c
>>>>>>>>> @@ -1084,7 +1084,7 @@ static void rt2500pci_disable_radio(struct rt2x00_dev *rt2x00dev)
>>>>>>>>> static int rt2500pci_set_state(struct rt2x00_dev *rt2x00dev,
>>>>>>>>> enum dev_state state)
>>>>>>>>> {
>>>>>>>>> - u32 reg;
>>>>>>>>> + u32 reg, reg2;
>>>>>>>>> unsigned int i;
>>>>>>>>> char put_to_sleep;
>>>>>>>>> char bbp_state;
>>>>>>>>> @@ -1105,11 +1105,12 @@ static int rt2500pci_set_state(struct rt2x00_dev *rt2x00dev,
>>>>>>>>> * device has entered the correct state.
>>>>>>>>> */
>>>>>>>>> for (i = 0; i< REGISTER_BUSY_COUNT; i++) {
>>>>>>>>> - rt2x00pci_register_read(rt2x00dev, PWRCSR1,&reg);
>>>>>>>>> - bbp_state = rt2x00_get_field32(reg, PWRCSR1_BBP_CURR_STATE);
>>>>>>>>> - rf_state = rt2x00_get_field32(reg, PWRCSR1_RF_CURR_STATE);
>>>>>>>>> + rt2x00pci_register_read(rt2x00dev, PWRCSR1,&reg2);
>>>>>>>>> + bbp_state = rt2x00_get_field32(reg2, PWRCSR1_BBP_CURR_STATE);
>>>>>>>>> + rf_state = rt2x00_get_field32(reg2, PWRCSR1_RF_CURR_STATE);
>>>>>>>>> if (bbp_state == state&& rf_state == state)
>>>>>>>>> return 0;
>>>>>>>>> + rt2x00pci_register_write(rt2x00dev, PWRCSR1, reg);
>>>>>>>>> msleep(10);
>>>>>>>>> }
>>>>>>>>>
>>>>>>>>> diff --git a/drivers/net/wireless/rt2x00/rt61pci.c b/drivers/net/wireless/rt2x00/rt61pci.c
>>>>>>>>> index 9a6ceb4..68317d7 100644
>>>>>>>>> --- a/drivers/net/wireless/rt2x00/rt61pci.c
>>>>>>>>> +++ b/drivers/net/wireless/rt2x00/rt61pci.c
>>>>>>>>> @@ -1690,7 +1690,7 @@ static void rt61pci_disable_radio(struct rt2x00_dev *rt2x00dev)
>>>>>>>>>
>>>>>>>>> static int rt61pci_set_state(struct rt2x00_dev *rt2x00dev, enum dev_state state)
>>>>>>>>> {
>>>>>>>>> - u32 reg;
>>>>>>>>> + u32 reg, reg2;
>>>>>>>>> unsigned int i;
>>>>>>>>> char put_to_sleep;
>>>>>>>>>
>>>>>>>>> @@ -1707,10 +1707,11 @@ static int rt61pci_set_state(struct rt2x00_dev *rt2x00dev, enum dev_state state)
>>>>>>>>> * device has entered the correct state.
>>>>>>>>> */
>>>>>>>>> for (i = 0; i< REGISTER_BUSY_COUNT; i++) {
>>>>>>>>> - rt2x00pci_register_read(rt2x00dev, MAC_CSR12,&reg);
>>>>>>>>> - state = rt2x00_get_field32(reg, MAC_CSR12_BBP_CURRENT_STATE);
>>>>>>>>> + rt2x00pci_register_read(rt2x00dev, MAC_CSR12,&reg2);
>>>>>>>>> + state = rt2x00_get_field32(reg2, MAC_CSR12_BBP_CURRENT_STATE);
>>>>>>>>> if (state == !put_to_sleep)
>>>>>>>>> return 0;
>>>>>>>>> + rt2x00pci_register_write(rt2x00dev, MAC_CSR12, reg);
>>>>>>>>> msleep(10);
>>>>>>>>> }
>>>>>>>>>
>>>>>>>>> diff --git a/drivers/net/wireless/rt2x00/rt73usb.c b/drivers/net/wireless/rt2x00/rt73usb.c
>>>>>>>>> index 0a0c095..dbf650a 100644
>>>>>>>>> --- a/drivers/net/wireless/rt2x00/rt73usb.c
>>>>>>>>> +++ b/drivers/net/wireless/rt2x00/rt73usb.c
>>>>>>>>> @@ -1369,7 +1369,7 @@ static void rt73usb_disable_radio(struct rt2x00_dev *rt2x00dev)
>>>>>>>>>
>>>>>>>>> static int rt73usb_set_state(struct rt2x00_dev *rt2x00dev, enum dev_state state)
>>>>>>>>> {
>>>>>>>>> - u32 reg;
>>>>>>>>> + u32 reg, reg2;
>>>>>>>>> unsigned int i;
>>>>>>>>> char put_to_sleep;
>>>>>>>>>
>>>>>>>>> @@ -1386,10 +1386,11 @@ static int rt73usb_set_state(struct rt2x00_dev *rt2x00dev, enum dev_state state)
>>>>>>>>> * device has entered the correct state.
>>>>>>>>> */
>>>>>>>>> for (i = 0; i< REGISTER_BUSY_COUNT; i++) {
>>>>>>>>> - rt2x00usb_register_read(rt2x00dev, MAC_CSR12,&reg);
>>>>>>>>> - state = rt2x00_get_field32(reg, MAC_CSR12_BBP_CURRENT_STATE);
>>>>>>>>> + rt2x00usb_register_read(rt2x00dev, MAC_CSR12,&reg2);
>>>>>>>>> + state = rt2x00_get_field32(reg2, MAC_CSR12_BBP_CURRENT_STATE);
>>>>>>>>> if (state == !put_to_sleep)
>>>>>>>>> return 0;
>>>>>>>>> + rt2x00usb_register_write(rt2x00dev, MAC_CSR12, reg);
>>>>>>>>> msleep(10);
>>>>>>>>> }
>>>>>>>>>
>>>>>>>>
>>>>>>>> Has this patch been submitted to upstream stable? As I understand it,
>>>>>>>> this is a cherrypick of a patch to Linus's tree. Is that correct?
>>>>>>>>
>>>>>>>> Brad
>>>>>>>> --
>>>>>>>> Brad Figg brad.figg@canonical.com http://www.canonical.com
>>>>>>>>
>>>>>>>> --
>>>>>>>> kernel-team mailing list
>>>>>>>> kernel-team@lists.ubuntu.com
>>>>>>>> https://lists.ubuntu.com/mailman/listinfo/kernel-team
>>>>>>>>
>>>>>>
>>>>>> That still doesn't answer if it has been submitted to upstream stable. As you
>>>>>> are aware we prefer to take SRU patches from stable releases. If the patch
>>>>>> is not part of a stable release we like it if the patches have at least been
>>>>>> submitted to stable for inclusion and hopefully accepted for a future stable
>>>>>> release.
>>>>>>
>>>>>> I went up to LKML and saw that this patch was part of a bulk patch for networking
>>>>>> changes that came from David Miller. There is no indication any of these
>>>>>> patches have been submitted to stable.
>>>>>>
>>>>>> Do you plan to submit this patch to upstream stable?
>>>>>>
>>>>>> Brad
>>>>>> --
>>>>>> Brad Figg brad.figg@canonical.com http://www.canonical.com
>>>>>>
>>>>>> --
>>>>>> kernel-team mailing list
>>>>>> kernel-team@lists.ubuntu.com
>>>>>> https://lists.ubuntu.com/mailman/listinfo/kernel-team
>>>>>>
>>>>>
>>>>
>>>>
>>>>
>>>
>>>
>>> --
>>> kernel-team mailing list
>>> kernel-team@lists.ubuntu.com
>>> https://lists.ubuntu.com/mailman/listinfo/kernel-team
>>>
>>
>
>
diff mbox

Patch

diff --git a/drivers/net/wireless/rt2x00/rt2400pci.c b/drivers/net/wireless/rt2x00/rt2400pci.c
index 4020bad..37475e8 100644
--- a/drivers/net/wireless/rt2x00/rt2400pci.c
+++ b/drivers/net/wireless/rt2x00/rt2400pci.c
@@ -925,7 +925,7 @@  static void rt2400pci_disable_radio(struct rt2x00_dev *rt2x00dev)
  static int rt2400pci_set_state(struct rt2x00_dev *rt2x00dev,
  			       enum dev_state state)
  {
-	u32 reg;
+	u32 reg, reg2;
  	unsigned int i;
  	char put_to_sleep;
  	char bbp_state;
@@ -946,11 +946,12 @@  static int rt2400pci_set_state(struct rt2x00_dev *rt2x00dev,
  	 * device has entered the correct state.
  	 */
  	for (i = 0; i < REGISTER_BUSY_COUNT; i++) {
-		rt2x00pci_register_read(rt2x00dev, PWRCSR1, &reg);
-		bbp_state = rt2x00_get_field32(reg, PWRCSR1_BBP_CURR_STATE);
-		rf_state = rt2x00_get_field32(reg, PWRCSR1_RF_CURR_STATE);
+		rt2x00pci_register_read(rt2x00dev, PWRCSR1, &reg2);
+		bbp_state = rt2x00_get_field32(reg2, PWRCSR1_BBP_CURR_STATE);
+		rf_state = rt2x00_get_field32(reg2, PWRCSR1_RF_CURR_STATE);
  		if (bbp_state == state && rf_state == state)
  			return 0;
+		rt2x00pci_register_write(rt2x00dev, PWRCSR1, reg);
  		msleep(10);
  	}

diff --git a/drivers/net/wireless/rt2x00/rt2500pci.c b/drivers/net/wireless/rt2x00/rt2500pci.c
index 8f15e41..30526f0 100644
--- a/drivers/net/wireless/rt2x00/rt2500pci.c
+++ b/drivers/net/wireless/rt2x00/rt2500pci.c
@@ -1084,7 +1084,7 @@  static void rt2500pci_disable_radio(struct rt2x00_dev *rt2x00dev)
  static int rt2500pci_set_state(struct rt2x00_dev *rt2x00dev,
  			       enum dev_state state)
  {
-	u32 reg;
+	u32 reg, reg2;
  	unsigned int i;
  	char put_to_sleep;
  	char bbp_state;
@@ -1105,11 +1105,12 @@  static int rt2500pci_set_state(struct rt2x00_dev *rt2x00dev,
  	 * device has entered the correct state.
  	 */
  	for (i = 0; i < REGISTER_BUSY_COUNT; i++) {
-		rt2x00pci_register_read(rt2x00dev, PWRCSR1, &reg);
-		bbp_state = rt2x00_get_field32(reg, PWRCSR1_BBP_CURR_STATE);
-		rf_state = rt2x00_get_field32(reg, PWRCSR1_RF_CURR_STATE);
+		rt2x00pci_register_read(rt2x00dev, PWRCSR1, &reg2);
+		bbp_state = rt2x00_get_field32(reg2, PWRCSR1_BBP_CURR_STATE);
+		rf_state = rt2x00_get_field32(reg2, PWRCSR1_RF_CURR_STATE);
  		if (bbp_state == state && rf_state == state)
  			return 0;
+		rt2x00pci_register_write(rt2x00dev, PWRCSR1, reg);
  		msleep(10);
  	}

diff --git a/drivers/net/wireless/rt2x00/rt61pci.c b/drivers/net/wireless/rt2x00/rt61pci.c
index 9a6ceb4..68317d7 100644
--- a/drivers/net/wireless/rt2x00/rt61pci.c
+++ b/drivers/net/wireless/rt2x00/rt61pci.c
@@ -1690,7 +1690,7 @@  static void rt61pci_disable_radio(struct rt2x00_dev *rt2x00dev)

  static int rt61pci_set_state(struct rt2x00_dev *rt2x00dev, enum dev_state state)
  {
-	u32 reg;
+	u32 reg, reg2;
  	unsigned int i;
  	char put_to_sleep;

@@ -1707,10 +1707,11 @@  static int rt61pci_set_state(struct rt2x00_dev *rt2x00dev, enum dev_state state)
  	 * device has entered the correct state.
  	 */
  	for (i = 0; i < REGISTER_BUSY_COUNT; i++) {
-		rt2x00pci_register_read(rt2x00dev, MAC_CSR12, &reg);
-		state = rt2x00_get_field32(reg, MAC_CSR12_BBP_CURRENT_STATE);
+		rt2x00pci_register_read(rt2x00dev, MAC_CSR12, &reg2);
+		state = rt2x00_get_field32(reg2, MAC_CSR12_BBP_CURRENT_STATE);
  		if (state == !put_to_sleep)
  			return 0;
+		rt2x00pci_register_write(rt2x00dev, MAC_CSR12, reg);
  		msleep(10);
  	}

diff --git a/drivers/net/wireless/rt2x00/rt73usb.c b/drivers/net/wireless/rt2x00/rt73usb.c
index 0a0c095..dbf650a 100644
--- a/drivers/net/wireless/rt2x00/rt73usb.c
+++ b/drivers/net/wireless/rt2x00/rt73usb.c
@@ -1369,7 +1369,7 @@  static void rt73usb_disable_radio(struct rt2x00_dev *rt2x00dev)

  static int rt73usb_set_state(struct rt2x00_dev *rt2x00dev, enum dev_state state)
  {
-	u32 reg;
+	u32 reg, reg2;
  	unsigned int i;
  	char put_to_sleep;

@@ -1386,10 +1386,11 @@  static int rt73usb_set_state(struct rt2x00_dev *rt2x00dev, enum dev_state state)
  	 * device has entered the correct state.
  	 */
  	for (i = 0; i < REGISTER_BUSY_COUNT; i++) {
-		rt2x00usb_register_read(rt2x00dev, MAC_CSR12, &reg);
-		state = rt2x00_get_field32(reg, MAC_CSR12_BBP_CURRENT_STATE);
+		rt2x00usb_register_read(rt2x00dev, MAC_CSR12, &reg2);
+		state = rt2x00_get_field32(reg2, MAC_CSR12_BBP_CURRENT_STATE);
  		if (state == !put_to_sleep)
  			return 0;
+		rt2x00usb_register_write(rt2x00dev, MAC_CSR12, reg);
  		msleep(10);
  	}