From 9e60057b8b9c013b65a987006ecfcfb615e982bc Mon Sep 17 00:00:00 2001 From: Laura Abbott Date: Tue, 14 Jun 2016 08:50:45 -0700 Subject: [PATCH] ath9k: fix GPIO mask for AR9462 and AR9565 (rhbz 1346145) --- ...-fix-GPIO-mask-for-AR9462-and-AR9565.patch | 80 +++++++++++++++++++ kernel.spec | 6 ++ 2 files changed, 86 insertions(+) create mode 100644 ath9k-fix-GPIO-mask-for-AR9462-and-AR9565.patch diff --git a/ath9k-fix-GPIO-mask-for-AR9462-and-AR9565.patch b/ath9k-fix-GPIO-mask-for-AR9462-and-AR9565.patch new file mode 100644 index 000000000..f8cd716f8 --- /dev/null +++ b/ath9k-fix-GPIO-mask-for-AR9462-and-AR9565.patch @@ -0,0 +1,80 @@ +From patchwork Fri Jun 3 05:46:57 2016 +Content-Type: text/plain; charset="utf-8" +MIME-Version: 1.0 +Content-Transfer-Encoding: 7bit +Subject: ath9k: fix GPIO mask for AR9462 and AR9565 +From: miaoqing pan +X-Patchwork-Id: 9151847 +Message-Id: <1464932817-30988-1-git-send-email-miaoqing@codeaurora.org> +To: kvalo@qca.qualcomm.com +Cc: linux-wireless@vger.kernel.org, ath9k-devel@qca.qualcomm.com, + sudipm.mukherjee@gmail.com, Miaoqing Pan +Date: Fri, 3 Jun 2016 13:46:57 +0800 + +From: Miaoqing Pan + +The incorrect GPIO mask cause kernel warning, when AR9462 access GPIO11. +Also fix the mask for AR9565. + +WARNING: CPU: 1 PID: 199 at ../drivers/net/wireless/ath/ath9k/hw.c:2778 ath9k_hw_gpio_get+0x1a9/0x1b0 [ath9k_hw] +CPU: 1 PID: 199 Comm: kworker/u16:9 Not tainted 4.7.0-rc1-next-20160530+ #5 +Hardware name: Acer TravelMate P243/BA40_HC, BIOS V1.01 04/20/2012 +Workqueue: events_power_efficient rfkill_poll + 0000000000000000 ffff88002cf73d28 ffffffff813b8ddc 0000000000000000 + 0000000000000000 ffff88002cf73d68 ffffffff8107a331 00000ada00000086 + ffff880148d9c018 000000000000000b ffff880147e68720 0000000000000200 +Call Trace: + [] dump_stack+0x63/0x87 + [] __warn+0xd1/0xf0 + [] warn_slowpath_null+0x1d/0x20 + [] ath9k_hw_gpio_get+0x1a9/0x1b0 [ath9k_hw] + [] ath9k_rfkill_poll_state+0x34/0x60 [ath9k] + [] ieee80211_rfkill_poll+0x33/0x40 [mac80211] + [] cfg80211_rfkill_poll+0x2a/0xc0 [cfg80211] + [] rfkill_poll+0x24/0x50 + [] process_one_work+0x153/0x3f0 + [] worker_thread+0x12b/0x4b0 + [] ? rescuer_thread+0x340/0x340 + [] kthread+0xc9/0xe0 + [] ret_from_fork+0x1f/0x40 + [] ? kthread_park+0x60/0x60 + +Signed-off-by: Miaoqing Pan +--- + drivers/net/wireless/ath/ath9k/reg.h | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/drivers/net/wireless/ath/ath9k/reg.h b/drivers/net/wireless/ath/ath9k/reg.h +index 9272ca9..80ff69f 100644 +--- a/drivers/net/wireless/ath/ath9k/reg.h ++++ b/drivers/net/wireless/ath/ath9k/reg.h +@@ -1122,12 +1122,12 @@ enum { + #define AR9300_NUM_GPIO 16 + #define AR9330_NUM_GPIO 16 + #define AR9340_NUM_GPIO 23 +-#define AR9462_NUM_GPIO 10 ++#define AR9462_NUM_GPIO 14 + #define AR9485_NUM_GPIO 12 + #define AR9531_NUM_GPIO 18 + #define AR9550_NUM_GPIO 24 + #define AR9561_NUM_GPIO 23 +-#define AR9565_NUM_GPIO 12 ++#define AR9565_NUM_GPIO 14 + #define AR9580_NUM_GPIO 16 + #define AR7010_NUM_GPIO 16 + +@@ -1139,12 +1139,12 @@ enum { + #define AR9300_GPIO_MASK 0x0000F4FF + #define AR9330_GPIO_MASK 0x0000F4FF + #define AR9340_GPIO_MASK 0x0000000F +-#define AR9462_GPIO_MASK 0x000003FF ++#define AR9462_GPIO_MASK 0x00003FFF + #define AR9485_GPIO_MASK 0x00000FFF + #define AR9531_GPIO_MASK 0x0000000F + #define AR9550_GPIO_MASK 0x0000000F + #define AR9561_GPIO_MASK 0x0000000F +-#define AR9565_GPIO_MASK 0x00000FFF ++#define AR9565_GPIO_MASK 0x00003FFF + #define AR9580_GPIO_MASK 0x0000F4FF + #define AR7010_GPIO_MASK 0x0000FFFF + diff --git a/kernel.spec b/kernel.spec index 6c4cf843b..6987499f7 100644 --- a/kernel.spec +++ b/kernel.spec @@ -602,6 +602,9 @@ Patch641: disable-CONFIG_EXPERT-for-ZONE_DMA.patch #CVE-2016-3134 rhbz 1317383 1317384 Patch665: netfilter-x_tables-deal-with-bogus-nextoffset-values.patch +#rhbz 1346145 +Patch666: ath9k-fix-GPIO-mask-for-AR9462-and-AR9565.patch + # END OF PATCH DEFINITIONS %endif @@ -2127,6 +2130,9 @@ fi # # %changelog +* Tue Jun 14 2016 Laura Abbott +- ath9k: fix GPIO mask for AR9462 and AR9565 (rhbz 1346145) + * Tue Jun 14 2016 Laura Abbott - 4.7.0-0.rc3.git1.1 - Linux v4.7-rc3-9-gdb06d75 - Reenable debugging options.