- patches.fixes/0001-rt2x00-Remove-incorrect-led-blink.patch:
[opensuse:kernel-source.git] / patches.fixes / 0005-rt2800-zero-MAC_SYS_CTRL-bits-during-BBP-and-MAC-re.patch
1 Subject: [PATCH 1/18] rt2800: zero MAC_SYS_CTRL bits during BBP and MAC reset
2
3 From: Stanislaw Gruszka <sgruszka@redhat.com>
4 Git-commit: 2a48e8ae113be506a7169d50c0b8fcb3ab0c462a
5 Patch-mainline: v3.4-rc1
6 References: bnc#774902
7
8 Zero all other bits than RESET_CSR and RESET_BBP when want to do the
9 reset, that the vendor driver behaviour.
10
11 Acked-by: Helmut Schaa <helmut.schaa@googlemail.com>
12 Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
13 Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
14 Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 Acked-by: Chen, Chien-Chia <machen@suse.com>
16 ---
17  drivers/net/wireless/rt2x00/rt2800pci.c |    2 +-
18  drivers/net/wireless/rt2x00/rt2800usb.c |    2 +-
19  2 files changed, 2 insertions(+), 2 deletions(-)
20
21 diff --git a/drivers/net/wireless/rt2x00/rt2800pci.c b/drivers/net/wireless/rt2x00/rt2800pci.c
22 index fdbf4a8..abe34d9 100644
23 --- a/drivers/net/wireless/rt2x00/rt2800pci.c
24 +++ b/drivers/net/wireless/rt2x00/rt2800pci.c
25 @@ -495,7 +495,7 @@ static int rt2800pci_init_registers(struct rt2x00_dev *rt2x00dev)
26  
27         rt2x00pci_register_write(rt2x00dev, PWR_PIN_CFG, 0x00000003);
28  
29 -       rt2x00pci_register_read(rt2x00dev, MAC_SYS_CTRL, &reg);
30 +       reg = 0;
31         rt2x00_set_field32(&reg, MAC_SYS_CTRL_RESET_CSR, 1);
32         rt2x00_set_field32(&reg, MAC_SYS_CTRL_RESET_BBP, 1);
33         rt2x00pci_register_write(rt2x00dev, MAC_SYS_CTRL, reg);
34 diff --git a/drivers/net/wireless/rt2x00/rt2800usb.c b/drivers/net/wireless/rt2x00/rt2800usb.c
35 index 72af6a0..d2ca19c 100644
36 --- a/drivers/net/wireless/rt2x00/rt2800usb.c
37 +++ b/drivers/net/wireless/rt2x00/rt2800usb.c
38 @@ -228,7 +228,7 @@ static int rt2800usb_init_registers(struct rt2x00_dev *rt2x00dev)
39  
40         rt2x00usb_register_write(rt2x00dev, PWR_PIN_CFG, 0x00000003);
41  
42 -       rt2x00usb_register_read(rt2x00dev, MAC_SYS_CTRL, &reg);
43 +       reg = 0;
44         rt2x00_set_field32(&reg, MAC_SYS_CTRL_RESET_CSR, 1);
45         rt2x00_set_field32(&reg, MAC_SYS_CTRL_RESET_BBP, 1);
46         rt2x00usb_register_write(rt2x00dev, MAC_SYS_CTRL, reg);
47 -- 
48 1.6.0.2
49