[LUCID SRU] Bug#539794 [PATCH] rt2x00: Fix failed SLEEP->AWAKE and AWAKE->SLEEP transitions.
Stefan Bader
stefan.bader at canonical.com
Thu Jul 1 07:29:42 UTC 2010
On 07/01/2010 07:51 AM, Leann Ogasawara wrote:
> On Wed, 2010-06-30 at 18:34 -0500, manoj.iyer at 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 at gmail.com>
>>>>>> Acked-by: Ivo van Doorn<IvDoorn at gmail.com>
>>>>>> Signed-off-by: John W. Linville<linville at 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 at 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 at gmail.com>
>> Acked-by: Ivo van Doorn <IvDoorn at gmail.com>
>> Signed-off-by: John W. Linville <linville at tuxdriver.com>
>>
>>
>>>>>> Signed-off-by: Manoj Iyer<manoj.iyer at 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,®);
>>>>>> - 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,®2);
>>>>>> + 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,®);
>>>>>> - 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,®2);
>>>>>> + 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,®);
>>>>>> - state = rt2x00_get_field32(reg, MAC_CSR12_BBP_CURRENT_STATE);
>>>>>> + rt2x00pci_register_read(rt2x00dev, MAC_CSR12,®2);
>>>>>> + 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,®);
>>>>>> - state = rt2x00_get_field32(reg, MAC_CSR12_BBP_CURRENT_STATE);
>>>>>> + rt2x00usb_register_read(rt2x00dev, MAC_CSR12,®2);
>>>>>> + 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 at canonical.com http://www.canonical.com
>>>>>
>>>>> --
>>>>> kernel-team mailing list
>>>>> kernel-team at 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 at canonical.com http://www.canonical.com
>>>
>>> --
>>> kernel-team mailing list
>>> kernel-team at lists.ubuntu.com
>>> https://lists.ubuntu.com/mailman/listinfo/kernel-team
>>>
>>
>
>
>
More information about the kernel-team
mailing list