diff options
author | Stanislaw Gruszka <sgruszka@redhat.com> | 2013-09-09 06:37:37 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2013-09-09 14:44:34 -0400 |
commit | f4e1a4d3ecbb9e42bdf8e7869ee8a4ebfa27fb20 (patch) | |
tree | 8387f2af05e0e200c71ca788e02605658115ea1e | |
parent | aaa2ced15ad8dca8048666c9f70736424d696a6b (diff) |
rt2800: change initialization sequence to fix system freeze
My commit
commit c630ccf1a127578421a928489d51e99c05037054
Author: Stanislaw Gruszka <stf_xl@wp.pl>
Date: Sat Mar 16 19:19:46 2013 +0100
rt2800: rearrange bbp/rfcsr initialization
make Maxim machine freeze when try to start wireless device.
Initialization order and sending MCU_BOOT_SIGNAL request, changed in
above commit, is important. Doing things incorrectly make PCIe bus
problems, which can froze the machine.
This patch change initialization sequence like vendor driver do:
function NICInitializeAsic() from
2011_1007_RT5390_RT5392_Linux_STA_V2.5.0.3_DPO (PCI devices) and
DPO_RT5572_LinuxSTA_2.6.1.3_20121022 (according Mediatek, latest driver
for RT8070/RT3070/RT3370/RT3572/RT5370/RT5372/RT5572 USB devices).
It fixes freezes on Maxim system.
Resolve:
https://bugzilla.redhat.com/show_bug.cgi?id=1000679
Reported-and-tested-by: Maxim Polyakov <polyakov@dexmalabs.com>
Bisected-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
Cc: stable@vger.kernel.org # 3.10+
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2800lib.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2800lib.c b/drivers/net/wireless/rt2x00/rt2800lib.c index 95e6e61c3de0..88ce656f96cd 100644 --- a/drivers/net/wireless/rt2x00/rt2800lib.c +++ b/drivers/net/wireless/rt2x00/rt2800lib.c | |||
@@ -6659,19 +6659,20 @@ int rt2800_enable_radio(struct rt2x00_dev *rt2x00dev) | |||
6659 | rt2800_init_registers(rt2x00dev))) | 6659 | rt2800_init_registers(rt2x00dev))) |
6660 | return -EIO; | 6660 | return -EIO; |
6661 | 6661 | ||
6662 | if (unlikely(rt2800_wait_bbp_rf_ready(rt2x00dev))) | ||
6663 | return -EIO; | ||
6664 | |||
6662 | /* | 6665 | /* |
6663 | * Send signal to firmware during boot time. | 6666 | * Send signal to firmware during boot time. |
6664 | */ | 6667 | */ |
6665 | rt2800_register_write(rt2x00dev, H2M_BBP_AGENT, 0); | 6668 | rt2800_register_write(rt2x00dev, H2M_BBP_AGENT, 0); |
6666 | rt2800_register_write(rt2x00dev, H2M_MAILBOX_CSR, 0); | 6669 | rt2800_register_write(rt2x00dev, H2M_MAILBOX_CSR, 0); |
6667 | if (rt2x00_is_usb(rt2x00dev)) { | 6670 | if (rt2x00_is_usb(rt2x00dev)) |
6668 | rt2800_register_write(rt2x00dev, H2M_INT_SRC, 0); | 6671 | rt2800_register_write(rt2x00dev, H2M_INT_SRC, 0); |
6669 | rt2800_mcu_request(rt2x00dev, MCU_BOOT_SIGNAL, 0, 0, 0); | 6672 | rt2800_mcu_request(rt2x00dev, MCU_BOOT_SIGNAL, 0, 0, 0); |
6670 | } | ||
6671 | msleep(1); | 6673 | msleep(1); |
6672 | 6674 | ||
6673 | if (unlikely(rt2800_wait_bbp_rf_ready(rt2x00dev) || | 6675 | if (unlikely(rt2800_wait_bbp_ready(rt2x00dev))) |
6674 | rt2800_wait_bbp_ready(rt2x00dev))) | ||
6675 | return -EIO; | 6676 | return -EIO; |
6676 | 6677 | ||
6677 | rt2800_init_bbp(rt2x00dev); | 6678 | rt2800_init_bbp(rt2x00dev); |