Re: [PATCH] ath9k: fix GPIO mask for AR9462 and AR9565
Hi On 2016-08-04, Pan, Miaoqing wrote: > Sorry, try the patch. AR5416 will invoke ath9k_hw_gpio_get() before gpio > initialized correctly. > > Thanks, > Miaoqing Thanks a lot, the patch appears to work. Feel free to add Tested-by: Stefan Lippers-Hollmann and please also send it to stable-4.7 (confirmed working). Cc: stable-4.7+ #4.7+ Regards Stefan Lippers-Hollmann -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] ath9k: fix GPIO mask for AR9462 and AR9565
Sorry, try the patch. AR5416 will invoke ath9k_hw_gpio_get() before gpio initialized correctly. Thanks, Miaoqing From: Valo, Kalle Sent: Wednesday, August 3, 2016 9:54 PM To: Stefan Lippers-Hollmann; miaoq...@codeaurora.org Cc: linux-wireless@vger.kernel.org; ath9k-devel; sudipm.mukher...@gmail.com Subject: Re: [PATCH] ath9k: fix GPIO mask for AR9462 and AR9565 Stefan Lippers-Hollmann writes: > Hi > > On 2016-06-03, miaoq...@codeaurora.org wrote: >> From: Miaoqing Pan >> >> The incorrect GPIO mask cause kernel warning, when AR9462 access GPIO11. >> Also fix the mask for AR9565. > [...] > > I think I'm seeing a very similar issue on AR5008/ AR5416+AR2133 and > 4.7-rc7 (mainline v4.7-rc7-92-g47ef4ad, to be exact). > > [4.958874] ath9k :02:02.0: enabling device ( -> 0002) > [...] > [5.401086] [ cut here ] > [5.401093] WARNING: CPU: 1 PID: 1159 at > /build/linux-aptosid-4.7~rc7/drivers/net/wireless/ath/ath9k/hw.c:2776 > ath9k_hw_gpio_get+0x148/0x1a0 [ath9k_hw] [...] > Reverting this, and the other patches depending on it, fixes the > problem for me: > > e024111f6946f45cf1559a8c6fd48d2d0f696d07 Revert "ath9k: fix GPIO mask for > AR9462 and AR9565" > db2221901fbded787daed153281ed875de489692 Revert "ath9k: free GPIO resource > for SOC GPIOs" > c7212b7136ba69efb9785df68b669381cb893920 Revert "ath9k: fix BTCoex > configuration for SOC chips" > dfcf02cd2998e2240b2bc7b4f4412578b8070bdb Revert "ath9k: fix BTCoex access > invalid registers for SOC chips" > 668ae0a3e48ac6811f431915b466514bf167e2f4 Revert "ath9k: add bits definition > of BTCoex MODE2/3 for SOC chips" > c8770bcf5cefa8cbfae21c07c4fe3428f5a9d42a Revert "ath9k: Allow platform > override BTCoex pin" > 79d4db1214a0c7b1818aaf64d0606b17ff1acea7 Revert "ath9k: cleanup led_pin > initial" > b2d70d4944c1789bc64376ad97a811f37e230c87 Revert "ath9k: make GPIO API to > support both of WMAC and SOC" > a01ab81b09c55025365c1de1345b941a18e05529 Revert "ath9k: define correct GPIO > numbers and bits mask" > > AR9285 (168c:002b) is fine either way. Miaoqing, have you looked at this? Looks like another regression which should be fixed. -- Kalle Valo --- a/drivers/net/wireless/ath/ath9k/hw.c +++ b/drivers/net/wireless/ath/ath9k/hw.c @@ -2482,6 +2482,8 @@ int ath9k_hw_fill_cap_info(struct ath_hw *ah) return -EINVAL; } + ath9k_gpio_cap_init(ah); + if (AR_SREV_9485(ah) || AR_SREV_9285(ah) || AR_SREV_9330(ah) || @@ -2531,8 +2533,6 @@ int ath9k_hw_fill_cap_info(struct ath_hw *ah) else pCap->hw_caps &= ~ATH9K_HW_CAP_HT; - ath9k_gpio_cap_init(ah); - if (AR_SREV_9160_10_OR_LATER(ah) || AR_SREV_9100(ah)) pCap->rts_aggr_limit = ATH_AMPDU_LIMIT_MAX; else
Re: [PATCH] ath9k: fix GPIO mask for AR9462 and AR9565
Stefan Lippers-Hollmann writes: > Hi > > On 2016-06-03, miaoq...@codeaurora.org wrote: >> From: Miaoqing Pan >> >> The incorrect GPIO mask cause kernel warning, when AR9462 access GPIO11. >> Also fix the mask for AR9565. > [...] > > I think I'm seeing a very similar issue on AR5008/ AR5416+AR2133 and > 4.7-rc7 (mainline v4.7-rc7-92-g47ef4ad, to be exact). > > [4.958874] ath9k :02:02.0: enabling device ( -> 0002) > [...] > [5.401086] [ cut here ] > [5.401093] WARNING: CPU: 1 PID: 1159 at > /build/linux-aptosid-4.7~rc7/drivers/net/wireless/ath/ath9k/hw.c:2776 > ath9k_hw_gpio_get+0x148/0x1a0 [ath9k_hw] [...] > Reverting this, and the other patches depending on it, fixes the > problem for me: > > e024111f6946f45cf1559a8c6fd48d2d0f696d07 Revert "ath9k: fix GPIO mask for > AR9462 and AR9565" > db2221901fbded787daed153281ed875de489692 Revert "ath9k: free GPIO resource > for SOC GPIOs" > c7212b7136ba69efb9785df68b669381cb893920 Revert "ath9k: fix BTCoex > configuration for SOC chips" > dfcf02cd2998e2240b2bc7b4f4412578b8070bdb Revert "ath9k: fix BTCoex access > invalid registers for SOC chips" > 668ae0a3e48ac6811f431915b466514bf167e2f4 Revert "ath9k: add bits definition > of BTCoex MODE2/3 for SOC chips" > c8770bcf5cefa8cbfae21c07c4fe3428f5a9d42a Revert "ath9k: Allow platform > override BTCoex pin" > 79d4db1214a0c7b1818aaf64d0606b17ff1acea7 Revert "ath9k: cleanup led_pin > initial" > b2d70d4944c1789bc64376ad97a811f37e230c87 Revert "ath9k: make GPIO API to > support both of WMAC and SOC" > a01ab81b09c55025365c1de1345b941a18e05529 Revert "ath9k: define correct GPIO > numbers and bits mask" > > AR9285 (168c:002b) is fine either way. Miaoqing, have you looked at this? Looks like another regression which should be fixed. -- Kalle Valo-- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] ath9k: fix GPIO mask for AR9462 and AR9565
Hi On 2016-06-03, miaoq...@codeaurora.org wrote: > From: Miaoqing Pan > > The incorrect GPIO mask cause kernel warning, when AR9462 access GPIO11. > Also fix the mask for AR9565. [...] I think I'm seeing a very similar issue on AR5008/ AR5416+AR2133 and 4.7-rc7 (mainline v4.7-rc7-92-g47ef4ad, to be exact). [4.958874] ath9k :02:02.0: enabling device ( -> 0002) [...] [5.401086] [ cut here ] [5.401093] WARNING: CPU: 1 PID: 1159 at /build/linux-aptosid-4.7~rc7/drivers/net/wireless/ath/ath9k/hw.c:2776 ath9k_hw_gpio_get+0x148/0x1a0 [ath9k_hw] [5.401116] Modules linked in: iTCO_wdt gpio_ich iTCO_vendor_support evdev intel_rapl x86_pkg_temp_thermal intel_powerclamp coretemp ir_lirc_codec lirc_dev kvm_intel kvm irqbypass crct10dif_pclmul crc32_pclmul rtl2832_sdr videobuf2_vmalloc videobuf2_memops videobuf2_v4l2 videobuf2_core videodev ghash_clmulni_intel fc0013 rtl2832 i2c_mux regmap_i2c sha256_ssse3 sha256_generic drbg ansi_cprng rc_medion_x10_digitainer dvb_usb_rtl28xxu dvb_usb_v2 dvb_usb_dw2102(+) dvb_usb aesni_intel dvb_core aes_x86_64 lrw ati_remote media gf128mul glue_helper ablk_helper cryptd intel_cstate intel_rapl_perf snd_hda_codec_hdmi(+) i915 snd_hda_codec_realtek snd_hda_codec_generic pcspkr serio_raw i2c_i801 ath9k(+) ath9k_common video ath9k_hw i2c_algo_bit drm_kms_helper ath snd_hda_intel drm snd_hda_codec mac80211 snd_hda_core [5.401135] snd_hwdep snd_pcm cfg80211 i2c_core intel_gtt rfkill snd_timer syscopyarea lpc_ich sysfillrect snd sg sysimgblt mfd_core mei_me soundcore fb_sys_fops mei nuvoton_cir floppy(+) rc_core button w83627ehf hwmon_vid parport_pc ppdev lp parport autofs4 ext4 crc16 jbd2 mbcache hid_generic usbhid hid dm_mod sd_mod sr_mod cdrom ohci_pci crc32c_intel psmouse r8169 ahci libahci libata scsi_mod xhci_pci xhci_hcd ohci_hcd e100 mii ehci_pci ehci_hcd usbcore usb_common e1000e ptp pps_core fjes [5.401137] CPU: 1 PID: 1159 Comm: systemd-udevd Not tainted 4.7.0-rc7-aptosid-amd64 #1 aptosid 4.7~rc7-1~git92.slh.3 [5.401138] Hardware name: /DH67CL, BIOS BLH6710H.86A.0160.2012.1204.1156 12/04/2012 [5.401140] 0286 f912d633 81290fd3 [5.401141] 81063fd4 88040c6dc018 [5.401143] 0002 0100 88040c6dc018 [5.401143] Call Trace: [5.401148] [] ? dump_stack+0x5c/0x79 [5.401150] [] ? __warn+0xb4/0xd0 [5.401153] [] ? ath9k_hw_gpio_get+0x148/0x1a0 [ath9k_hw] [5.401156] [] ? ath9k_hw_fill_cap_info+0x163/0x830 [ath9k_hw] [5.401159] [] ? ath9k_hw_init+0x664/0xb10 [ath9k_hw] [5.401167] [] ? ath9k_init_device+0x4df/0xe00 [ath9k] [5.401170] [] ? request_threaded_irq+0xf1/0x1a0 [5.401176] [] ? ath_pci_probe+0x1c9/0x370 [ath9k] [5.401178] [] ? local_pci_probe+0x3a/0x90 [5.401179] [] ? pci_match_device+0xcf/0xf0 [5.401180] [] ? pci_device_probe+0xfb/0x140 [5.401183] [] ? driver_probe_device+0x1ed/0x2b0 [5.401184] [] ? __driver_attach+0x8f/0xa0 [5.401185] [] ? driver_probe_device+0x2b0/0x2b0 [5.401186] [] ? bus_for_each_dev+0x62/0xb0 [5.401188] [] ? bus_add_driver+0x19a/0x210 [5.401189] [] ? 0xa0718000 [5.401190] [] ? driver_register+0x52/0xc0 [5.401195] [] ? ath9k_init+0x5/0x34 [ath9k] [5.401197] [] ? do_one_initcall+0x47/0x180 [5.401199] [] ? do_init_module+0x51/0x1b9 [5.401201] [] ? load_module+0x1f77/0x23a0 [5.401202] [] ? __symbol_put+0x80/0x80 [5.401205] [] ? security_capable+0x3c/0x50 [5.401207] [] ? SYSC_finit_module+0xc2/0xd0 [5.401210] [] ? entry_SYSCALL_64_fastpath+0x1a/0xa4 [5.401211] ---[ end trace ac762697fb0d9f1d ]--- [5.401211] [ cut here ] [5.401214] WARNING: CPU: 1 PID: 1159 at /build/linux-aptosid-4.7~rc7/drivers/net/wireless/ath/ath9k/hw.c:2796 ath9k_hw_gpio_get+0xb4/0x1a0 [ath9k_hw] [5.401234] Modules linked in: iTCO_wdt gpio_ich iTCO_vendor_support evdev intel_rapl x86_pkg_temp_thermal intel_powerclamp coretemp ir_lirc_codec lirc_dev kvm_intel kvm irqbypass crct10dif_pclmul crc32_pclmul rtl2832_sdr videobuf2_vmalloc videobuf2_memops videobuf2_v4l2 videobuf2_core videodev ghash_clmulni_intel fc0013 rtl2832 i2c_mux regmap_i2c sha256_ssse3 sha256_generic drbg ansi_cprng rc_medion_x10_digitainer dvb_usb_rtl28xxu dvb_usb_v2 dvb_usb_dw2102(+) dvb_usb aesni_intel dvb_core aes_x86_64 lrw ati_remote media gf128mul glue_helper ablk_helper cryptd intel_cstate intel_rapl_perf snd_hda_codec_hdmi(+) i915 snd_hda_codec_realtek snd_hda_codec_generic pcspkr serio_raw i2c_i801 ath9k(+) ath9k_common video ath9k_hw i2c_algo_bit drm_kms_helper ath snd_hda_intel drm snd_hda_codec mac80211 snd_hda_core [5.401254] snd_hwdep snd_pcm cfg80211 i2c_core intel_gtt rfkill snd_timer syscopyarea lpc_ich sysfillrect snd sg sysimgblt mfd_core mei_me soundcore fb_sys_fop
[PATCH] ath9k: fix GPIO mask for AR9462 and AR9565
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 88002cf73d28 813b8ddc 88002cf73d68 8107a331 0ada0086 880148d9c018 000b 880147e68720 0200 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_MASK0xF4FF #define AR9330_GPIO_MASK0xF4FF #define AR9340_GPIO_MASK0x000F -#define AR9462_GPIO_MASK0x03FF +#define AR9462_GPIO_MASK0x3FFF #define AR9485_GPIO_MASK0x0FFF #define AR9531_GPIO_MASK0x000F #define AR9550_GPIO_MASK0x000F #define AR9561_GPIO_MASK0x000F -#define AR9565_GPIO_MASK0x0FFF +#define AR9565_GPIO_MASK0x3FFF #define AR9580_GPIO_MASK0xF4FF #define AR7010_GPIO_MASK0x -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html