[LUCID SRU] Bug#539794 [PATCH] rt2x00: Fix failed SLEEP->AWAKE and AWAKE->SLEEP transitions.
Brad Figg
brad.figg at canonical.com
Wed Jun 30 23:25:41 UTC 2010
On 06/30/2010 03:24 PM, manoj.iyer at 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 at 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 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)
>>>
>>> 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
More information about the kernel-team
mailing list