Bug 87191
Summary: | iwlwifi dvm - hardware rfkill unblock doesn't work (x230) - MWG100221081 | ||
---|---|---|---|
Product: | Drivers | Reporter: | Oleksii Shevchuk (alxchk) |
Component: | network-wireless | Assignee: | drivers_network-wireless (drivers_network-wireless) |
Status: | CLOSED CODE_FIX | ||
Severity: | normal | CC: | ilw, linville |
Priority: | P1 | ||
Hardware: | All | ||
OS: | Linux | ||
Kernel Version: | 3.17.2 | Subsystem: | |
Regression: | No | Bisected commit-id: | |
Attachments: |
Output with debug=0xffffffff
Yet another output with debug=0xffffffff (without NM, probably smaller) After enabling radio After enabling radio. While toggling radio off Trace record while toggling wifi off then on (after 10 secs) Trace for comment 28 Trace for comment 30 trace io + csr dump trace io + csr dump |
Description
Oleksii Shevchuk
2014-10-30 21:57:32 UTC
please reproduce while recording tracing. What should I do for that? Ok, i built all the things. The problem is, I couldn't reproduce it while tracing now. So, I only managed to catch the bug when I switch on rfkill (i.e. disable wifi) without tracing, then enable tracing and record the rfkill switch off (i.e. enable wifi). trace-cmd record -e mac80211 -e mac80211_msg -e iwlwifi -e iwlwifi_msg -e iwlwifi_data trace-cmd report -i trace.dat version = 6 CPU 0 is empty CPU 1 is empty CPU 2 is empty CPU 3 is empty cpus=4 well... this means that you haven't caught anything. Apparently, you don't have IWLWIFI_TRACING compiled. Can you please try with debug=0xffffffff as a module parameter to iwlwifi? For this, you need CONFIG_IWLWIFI_DEBUG. # START=`date +%s` # rfkill list 0: tpacpi_bluetooth_sw: Bluetooth Soft blocked: yes Hard blocked: no 1: tpacpi_wwan_sw: Wireless WAN Soft blocked: no Hard blocked: no 3: phy1: Wireless LAN Soft blocked: no Hard blocked: no # rfkill list 0: tpacpi_bluetooth_sw: Bluetooth Soft blocked: yes Hard blocked: yes 1: tpacpi_wwan_sw: Wireless WAN Soft blocked: no Hard blocked: yes 3: phy1: Wireless LAN Soft blocked: no Hard blocked: yes # rfkill list 0: tpacpi_bluetooth_sw: Bluetooth Soft blocked: yes Hard blocked: yes 1: tpacpi_wwan_sw: Wireless WAN Soft blocked: no Hard blocked: yes 3: phy1: Wireless LAN Soft blocked: no Hard blocked: yes # rfkill list 0: tpacpi_bluetooth_sw: Bluetooth Soft blocked: yes Hard blocked: no 1: tpacpi_wwan_sw: Wireless WAN Soft blocked: no Hard blocked: no 3: phy1: Wireless LAN Soft blocked: no Hard blocked: yes # rfkill list 0: tpacpi_bluetooth_sw: Bluetooth Soft blocked: yes Hard blocked: no 1: tpacpi_wwan_sw: Wireless WAN Soft blocked: no Hard blocked: no 3: phy1: Wireless LAN Soft blocked: no Hard blocked: yes # END=`date +%s` # journalctl -t kernel --since @1414912587 --until @1414912610 >debug.txt Created attachment 156101 [details]
Output with debug=0xffffffff
ok - that doesn't work. Please clear the log before you do the operation that fails - I am getting lost. Also - please use debug=0x0002000f Let's try with this and add more debug if needed. Thanks. Ok. The problem with the large log was because of NetworkManager. I stopped it, and now I have the next picture. First of all, hardware rfkill now totaly ignored. # ip l show wlan0 9: wlan0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000 link/ether 6c:88:14:49:8a:90 brd ff:ff:ff:ff:ff:ff I enable/disable hardware switch, and rfkill is always in this state: # rfkill list wlan 5: phy3: Wireless LAN Soft blocked: no Hard blocked: no Also, with debug=0x0002000f there is nothing in dmesg. # dmesg -c # date +%s 1414993212 # rfkill list wlan 5: phy3: Wireless LAN Soft blocked: no Hard blocked: no # rfkill list wlan 5: phy3: Wireless LAN Soft blocked: no Hard blocked: no So, i enable wlan card with: ip l set wlan0 up Now I can reproduce the bug: # date +%s 1414993523 # rfkill list wlan 5: phy3: Wireless LAN Soft blocked: no Hard blocked: yes # rfkill list wlan 5: phy3: Wireless LAN Soft blocked: no Hard blocked: yes # date +%s 1414993577 # Here is the log: # journalctl -t kernel --since @1414993523 --until @1414993577 | cut -f 4- -d ':' iwlwifi 0000:03:00.0: RF_KILL bit toggled to disable radio. iwlwifi 0000:03:00.0: I iwlagn_rx_card_state_notif Card state received: HW:Kill SW:On CT:Not reached iwlwifi 0000:03:00.0: U iwlagn_mac_remove_interface enter iwlwifi 0000:03:00.0: U iwlagn_set_rxon_chain rx_chain=0x2406 active=2 idle=1 iwlwifi 0000:03:00.0: U iwl_full_rxon_required need full RXON - !iwl_is_associated_ctx(ctx) iwlwifi 0000:03:00.0: U iwlagn_commit_rxon Going to commit RXON * without RXON_FILTER_ASSOC_MSK * channel = 1 iwlwifi 0000:03:00.0: Not sending command - RF KILL iwlwifi 0000:03:00.0: U iwlagn_mac_remove_interface leave iwlwifi 0000:03:00.0: Not sending command - RF KILL iwlwifi 0000:03:00.0: U iwlagn_mac_stop enter iwlwifi 0000:03:00.0: U iwl_down iwlwifi is going down iwlwifi 0000:03:00.0: U iwl_clear_ucode_stations Clearing ucode stations in driver iwlwifi 0000:03:00.0: I iwl_clear_ucode_stations Clearing ucode active for station 15 iwlwifi 0000:03:00.0: U iwl_pcie_apm_stop Stop card, put in low power state iwlwifi 0000:03:00.0: U iwl_pcie_apm_stop_master stop master iwlwifi 0000:03:00.0: U iwlagn_mac_stop leave FYI, in the attach with the full debug Created attachment 156351 [details]
Yet another output with debug=0xffffffff (without NM, probably smaller)
I don't follow - in the last log, I can see that you disable the radio: iwlwifi 0000:03:00.0: RF_KILL bit toggled to disable radio. so we can't work in that state and rightfully stop any WiFi activity. What is the bug then? The bug is, that the radio is not enabled when I toggle on hardware rfkill switch. To have it work I need to unload module and load it again. So the log you pasted in comment9 is from the moment you try to re-enable WiFi? The log covers my actions: Disabling wifi Showing rfkill state Enabling wifi Showing rfkill state I am not talking about the log you attached, I am talking about the part you pasted in comment9. Yes. It's from there. Once again: # dmesg -c; rfkill list wifi 9: phy7: Wireless LAN Soft blocked: no Hard blocked: no # dmesg -c; rfkill list wifi [57268.874011] iwlwifi 0000:03:00.0: RF_KILL bit toggled to disable radio. [57268.874032] iwlwifi 0000:03:00.0: I iwlagn_rx_card_state_notif Card state received: HW:Kill SW:On CT:Not reached [57268.874977] iwlwifi 0000:03:00.0: U iwlagn_mac_remove_interface enter [57268.874985] iwlwifi 0000:03:00.0: U iwlagn_set_rxon_chain rx_chain=0x2406 active=2 idle=1 [57268.874991] iwlwifi 0000:03:00.0: U iwl_full_rxon_required need full RXON - !iwl_is_associated_ctx(ctx) [57268.874996] iwlwifi 0000:03:00.0: U iwlagn_commit_rxon Going to commit RXON * without RXON_FILTER_ASSOC_MSK * channel = 1 * bssid = 00:00:00:00:00:00 [57268.875001] iwlwifi 0000:03:00.0: Not sending command - RF KILL [57268.875005] iwlwifi 0000:03:00.0: U iwlagn_mac_remove_interface leave [57268.875041] iwlwifi 0000:03:00.0: Not sending command - RF KILL [57268.875046] iwlwifi 0000:03:00.0: U iwlagn_mac_stop enter [57268.875049] iwlwifi 0000:03:00.0: U iwl_down iwlwifi is going down [57268.875054] iwlwifi 0000:03:00.0: U iwl_clear_ucode_stations Clearing ucode stations in driver [57268.875058] iwlwifi 0000:03:00.0: I iwl_clear_ucode_stations Clearing ucode active for station 15 [57268.876048] iwlwifi 0000:03:00.0: U iwl_pcie_apm_stop Stop card, put in low power state [57268.876091] iwlwifi 0000:03:00.0: U iwl_pcie_apm_stop_master stop master [57268.876178] iwlwifi 0000:03:00.0: U iwlagn_mac_stop leave 9: phy7: Wireless LAN Soft blocked: no Hard blocked: yes %% HERE I ENABLED RADIO %% # dmesg -c; rfkill list wifi 9: phy7: Wireless LAN Soft blocked: no Hard blocked: yes # dmesg -c; rfkill list wifi 9: phy7: Wireless LAN Soft blocked: no Hard blocked: yes # dmesg -c; rfkill list wifi 9: phy7: Wireless LAN Soft blocked: no Hard blocked: yes # Looks like when device goes into the powersaving state, it just ignores all the things.. Please do the following before you re-enable the radio: dmesg -c > /dev/null echo 1 > /sys/kernel/debug/iwlwifi/*/trans/csr echo 0xffffffff > /sys/modules/iwlwifi/parameters/debug %% re-enable the radio %% dump the dmesg and paste it here / attach it. --- For this, you'll need to have CONFIG_IWLWIFI_DEBUG and CONFIG_IWLWIFI_DEBUGFS Kconfig options selected. Created attachment 156411 [details]
After enabling radio
Created attachment 156421 [details]
After enabling radio.
Wrong file were uploaded.
ok this is what I feared. The RKFILL interrupt bit is clear in the interrupt mask... Need to check. please let me know what device you have: lspci will make it # lspci -vvv -s 03:00.0 03:00.0 Network controller: Intel Corporation Centrino Advanced-N 6205 [Taylor Peak] (rev 34) Subsystem: Intel Corporation Centrino Advanced-N 6205 AGN Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx+ Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx- Latency: 0, Cache Line Size: 64 bytes Interrupt: pin A routed to IRQ 32 Region 0: Memory at f1c00000 (64-bit, non-prefetchable) [size=8K] Capabilities: [c8] Power Management version 3 Flags: PMEClk- DSI+ D1- D2- AuxCurrent=0mA PME(D0+,D1-,D2-,D3hot+,D3cold+) Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME- Capabilities: [d0] MSI: Enable+ Count=1/1 Maskable- 64bit+ Address: 00000000fee00438 Data: 0000 Capabilities: [e0] Express (v1) Endpoint, MSI 00 DevCap: MaxPayload 128 bytes, PhantFunc 0, Latency L0s <512ns, L1 unlimited ExtTag- AttnBtn- AttnInd- PwrInd- RBE+ FLReset+ DevCtl: Report errors: Correctable- Non-Fatal- Fatal- Unsupported- RlxdOrd+ ExtTag- PhantFunc- AuxPwr- NoSnoop+ FLReset- MaxPayload 128 bytes, MaxReadReq 128 bytes DevSta: CorrErr- UncorrErr- FatalErr- UnsuppReq- AuxPwr+ TransPend- LnkCap: Port #0, Speed 2.5GT/s, Width x1, ASPM L0s L1, Exit Latency L0s <4us, L1 <32us ClockPM+ Surprise- LLActRep- BwNot- LnkCtl: ASPM L1 Enabled; RCB 64 bytes Disabled- CommClk+ ExtSynch- ClockPM+ AutWidDis- BWInt- AutBWInt- LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive- BWMgmt- ABWMgmt- Capabilities: [100 v1] Advanced Error Reporting UESta: DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol- UEMsk: DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol- UESvrt: DLP+ SDES- TLP- FCP+ CmpltTO- CmpltAbrt- UnxCmplt- RxOF+ MalfTLP+ ECRC- UnsupReq- ACSViol- CESta: RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr+ CEMsk: RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr+ AERCap: First Error Pointer: 00, GenCap- CGenEn- ChkCap- ChkEn- Capabilities: [140 v1] Device Serial Number 6c-88-14-ff-ff-49-8a-90 Kernel driver in use: iwlwifi Kernel modules: iwlwifi can you please disable the radio while recording tracing: sudo trace-cmd record -e iwlwifi -e iwlwifi_io and send me trace.dat? thanks. I guess I'll have to send a patch to get further information based on what the tracing will tell me. Created attachment 156551 [details]
While toggling radio off
Something doesn't make sense here. The recording you sent looks fine - you toggled rfkill off, I can see that. I can also see that we enable the rfkill interrupt (in the masks) to be able to get the rfkill interrupt when someone toggle rfkill back to on. After we enable the rfkill interrupt, we make sure that rfkill was not asserted to avoid a case in which we might have missed the interrupt. Fine. But if so, how come that I can see in your log from comment19: [57961.406745] iwlwifi 0000:03:00.0: CSR_INT: 0X00000080 [57961.406772] iwlwifi 0000:03:00.0: CSR_INT_MASK: 0X00000000 Which basically means that there was an RFKILL interrupt, but it was masked? Can you please record while toggling radio off and then on? Please wait 10 seconds between off and on so that I can understand when you do what. Thank you. Created attachment 156791 [details]
Trace record while toggling wifi off then on (after 10 secs)
Unfortunately, there is nothing after I toggled wifi off. I waited 10 sec after toggling it off, then toggle it on. There is nothing in trace.
Btw, trace-cmd eat 100% of CPU at that time.
I'll check. In any case, please take into account that I will travelling the next 2 weeks and that I'll very little time to handle this. I'll do my best, but I can't promise much. Can you please try this? diff --git a/drivers/net/wireless/iwlwifi/pcie/trans.c b/drivers/net/wireless/iwlwifi/pcie/trans.c index 5e33e43..2a916a3 100644 --- a/drivers/net/wireless/iwlwifi/pcie/trans.c +++ b/drivers/net/wireless/iwlwifi/pcie/trans.c @@ -953,6 +953,8 @@ static void iwl_trans_pcie_stop_device(struct iwl_trans *trans) clear_bit(STATUS_TPOWER_PMI, &trans->status); clear_bit(STATUS_RFKILL, &trans->status); + udelay(20); + /* * Even if we stop the HW, we still want the RF kill * interrupt I increase that value to 100, and looks like it works all the time. Thanks! Works for me. 100... Hm. I'd like to avoid that. What about this: diff --git a/drivers/net/wireless/iwlwifi/pcie/trans.c b/drivers/net/wireless/iwlwifi/pcie/trans.c index 5e33e43..ae0e46a 100644 --- a/drivers/net/wireless/iwlwifi/pcie/trans.c +++ b/drivers/net/wireless/iwlwifi/pcie/trans.c @@ -945,7 +945,9 @@ static void iwl_trans_pcie_stop_device(struct iwl_trans *trans) spin_unlock(&trans_pcie->irq_lock); /* stop and reset the on-board processor */ - iwl_write32(trans, CSR_RESET, CSR_RESET_REG_FLAG_NEVO_RESET); + iwl_write32(trans, CSR_RESET, CSR_RESET_REG_FLAG_SW_RESET); + + udelay(20); /* clear all status bits */ clear_bit(STATUS_SYNC_HCMD_ACTIVE, &trans->status); This works for me too OK. Not always. Sometimes it still reproduces, but I couldn't reproduce it when I need So, if I wait enough, rfkill doesn't work neither with first variant, nor in second Please record tracing again. Thank you. Do we have news here? I really didn't understand your last 2 reports. The patch above (comment 30) has been published to our internal repository and will be submitted upstream soon. Created attachment 157661 [details] Trace for comment 28 Ok, I was in the BT overseas, so couldn't response. Here are the traces for patches in comment 28 and comment 30. The picture is. 1. Toggle off radio with hardware rfkill 2. Wait for a minute 3. Toggle on radio with hardware rfkill 4. Radio marked as disabled (This is in the trace) If at step 2 I reduce time to seconds, then all works with both patches. Before patching any time at step 2 doesn't help. Created attachment 157671 [details] Trace for comment 30 Please dump the csr before step 3: echo 1 > /sys/kernel/debug/iwlwifi/*/trans/csr then paste / attach the dmesg output. thanks # echo 1 > /sys/kernel/debug/iwlwifi/*/trans/csr; dmesg -c [23385.051549] iwlwifi 0000:03:00.0: RF_KILL bit toggled to disable radio. [23385.051683] wlan0: deauthenticating from 54:e6:fc:fb:b9:78 by local choice (Reason: 3=DEAUTH_LEAVING) [23385.051749] iwlwifi 0000:03:00.0: Not sending command - RF KILL [23385.051757] wlan0: HW problem - can not stop rx aggregation for 54:e6:fc:fb:b9:78 tid 0 [23385.051762] iwlwifi 0000:03:00.0: Not sending command - RF KILL [23385.051764] wlan0: HW problem - can not stop rx aggregation for 54:e6:fc:fb:b9:78 tid 2 [23385.051768] iwlwifi 0000:03:00.0: Not sending command - RF KILL [23385.051770] wlan0: HW problem - can not stop rx aggregation for 54:e6:fc:fb:b9:78 tid 3 [23385.052324] iwlwifi 0000:03:00.0: Not sending command - RF KILL [23385.052331] wlan0: failed to remove key (0, 54:e6:fc:fb:b9:78) from hardware (-5) [23385.052607] iwlwifi 0000:03:00.0: Not sending command - RF KILL [23385.052617] iwlwifi 0000:03:00.0: Not sending command - RF KILL [23385.052626] iwlwifi 0000:03:00.0: Not sending command - RF KILL [23385.052635] iwlwifi 0000:03:00.0: Not sending command - RF KILL [23385.052651] iwlwifi 0000:03:00.0: Not sending command - RF KILL [23385.061413] iwlwifi 0000:03:00.0: Not sending command - RF KILL [23385.061430] wlan0: failed to remove key (1, ff:ff:ff:ff:ff:ff) from hardware (-5) [23385.061531] iwlwifi 0000:03:00.0: Not sending command - RF KILL [23385.061546] wlan0: failed to remove key (2, ff:ff:ff:ff:ff:ff) from hardware (-5) [23385.061744] iwlwifi 0000:03:00.0: Not sending command - RF KILL [23385.061793] iwlwifi 0000:03:00.0: Not sending command - RF KILL [23385.063218] iwlwifi 0000:03:00.0: RF_KILL bit toggled to disable radio. [23385.067273] cfg80211: Calling CRDA to update world regulatory domain [23385.082276] cfg80211: World regulatory domain updated: [23385.082280] cfg80211: DFS Master region: unset [23385.082282] cfg80211: (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp), (dfs_cac_time) [23385.082286] cfg80211: (2402000 KHz - 2472000 KHz @ 40000 KHz), (N/A, 2000 mBm), (N/A) [23385.082289] cfg80211: (2457000 KHz - 2482000 KHz @ 40000 KHz), (N/A, 2000 mBm), (N/A) [23385.082291] cfg80211: (2474000 KHz - 2494000 KHz @ 20000 KHz), (N/A, 2000 mBm), (N/A) [23385.082295] cfg80211: (5170000 KHz - 5250000 KHz @ 80000 KHz, 160000 KHz AUTO), (N/A, 2000 mBm), (N/A) [23385.082298] cfg80211: (5250000 KHz - 5330000 KHz @ 80000 KHz, 160000 KHz AUTO), (N/A, 2000 mBm), (0 s) [23385.082301] cfg80211: (5490000 KHz - 5730000 KHz @ 160000 KHz), (N/A, 2000 mBm), (0 s) [23385.082303] cfg80211: (5735000 KHz - 5835000 KHz @ 80000 KHz), (N/A, 2000 mBm), (N/A) [23385.082306] cfg80211: (57240000 KHz - 63720000 KHz @ 2160000 KHz), (N/A, 0 mBm), (N/A) [23425.480829] iwlwifi 0000:03:00.0: CSR values: [23425.480833] iwlwifi 0000:03:00.0: (2nd byte of CSR_INT_COALESCING is CSR_INT_PERIODIC_REG) [23425.480866] iwlwifi 0000:03:00.0: CSR_HW_IF_CONFIG_REG: 0X02000000 [23425.480892] iwlwifi 0000:03:00.0: CSR_INT_COALESCING: 0X00000000 [23425.480918] iwlwifi 0000:03:00.0: CSR_INT: 0X00000080 [23425.480944] iwlwifi 0000:03:00.0: CSR_INT_MASK: 0X00000000 [23425.480969] iwlwifi 0000:03:00.0: CSR_FH_INT_STATUS: 0X00000000 [23425.480995] iwlwifi 0000:03:00.0: CSR_GPIO_IN: 0X00000030 [23425.481020] iwlwifi 0000:03:00.0: CSR_RESET: 0X00000001 [23425.481082] iwlwifi 0000:03:00.0: CSR_GP_CNTRL: 0X000003d0 [23425.481123] iwlwifi 0000:03:00.0: CSR_HW_REV: 0X000000b0 [23425.481164] iwlwifi 0000:03:00.0: CSR_EEPROM_REG: 0X00000000 [23425.481196] iwlwifi 0000:03:00.0: CSR_EEPROM_GP: 0X90000001 [23425.481221] iwlwifi 0000:03:00.0: CSR_OTP_GP_REG: 0X00030001 [23425.481247] iwlwifi 0000:03:00.0: CSR_GIO_REG: 0X00080042 [23425.481273] iwlwifi 0000:03:00.0: CSR_GP_UCODE_REG: 0X00000000 [23425.481299] iwlwifi 0000:03:00.0: CSR_GP_DRIVER_REG: 0X00000000 [23425.481324] iwlwifi 0000:03:00.0: CSR_UCODE_DRV_GP1: 0X00000000 [23425.481350] iwlwifi 0000:03:00.0: CSR_UCODE_DRV_GP2: 0X00000000 [23425.481376] iwlwifi 0000:03:00.0: CSR_LED_REG: 0X00000018 [23425.481402] iwlwifi 0000:03:00.0: CSR_DRAM_INT_TBL_REG: 0X00000000 [23425.481427] iwlwifi 0000:03:00.0: CSR_GIO_CHICKEN_BITS: 0X27800200 [23425.481453] iwlwifi 0000:03:00.0: CSR_ANA_PLL_CFG: 0X00000000 [23425.481479] iwlwifi 0000:03:00.0: CSR_MONITOR_STATUS_REG: 0X2bffff1f [23425.481504] iwlwifi 0000:03:00.0: CSR_HW_REV_WA_REG: 0X0001001a [23425.481530] iwlwifi 0000:03:00.0: CSR_DBG_HPET_MEM_REG: 0X82000500 that again explains everything, but it makes no sense. Can you please do the same while recording tracing: dump the CSRs while recording? thanks Created attachment 157811 [details]
trace io + csr dump
[ 421.619628] iwlwifi 0000:03:00.0: CSR values:
[ 421.619630] iwlwifi 0000:03:00.0: (2nd byte of CSR_INT_COALESCING is CSR_INT_PERIODIC_REG)
[ 421.619662] iwlwifi 0000:03:00.0: CSR_HW_IF_CONFIG_REG: 0X00488700
[ 421.619689] iwlwifi 0000:03:00.0: CSR_INT_COALESCING: 0X00000040
[ 421.619726] iwlwifi 0000:03:00.0: CSR_INT: 0X00000000
[ 421.619759] iwlwifi 0000:03:00.0: CSR_INT_MASK: 0Xba00008b
[ 421.619786] iwlwifi 0000:03:00.0: CSR_FH_INT_STATUS: 0X00000000
[ 421.619812] iwlwifi 0000:03:00.0: CSR_GPIO_IN: 0X00000030
[ 421.619838] iwlwifi 0000:03:00.0: CSR_RESET: 0X00000000
[ 421.619864] iwlwifi 0000:03:00.0: CSR_GP_CNTRL: 0X080403c5
[ 421.619889] iwlwifi 0000:03:00.0: CSR_HW_REV: 0X000000b0
[ 421.619915] iwlwifi 0000:03:00.0: CSR_EEPROM_REG: 0Xcafb0ffd
[ 421.619941] iwlwifi 0000:03:00.0: CSR_EEPROM_GP: 0X90000001
[ 421.619967] iwlwifi 0000:03:00.0: CSR_OTP_GP_REG: 0X00030001
[ 421.619992] iwlwifi 0000:03:00.0: CSR_GIO_REG: 0X00080042
[ 421.620018] iwlwifi 0000:03:00.0: CSR_GP_UCODE_REG: 0X0000ca89
[ 421.620044] iwlwifi 0000:03:00.0: CSR_GP_DRIVER_REG: 0X00000000
[ 421.620069] iwlwifi 0000:03:00.0: CSR_UCODE_DRV_GP1: 0X00000000
[ 421.620095] iwlwifi 0000:03:00.0: CSR_UCODE_DRV_GP2: 0X00000000
[ 421.620121] iwlwifi 0000:03:00.0: CSR_LED_REG: 0X00000040
[ 421.620146] iwlwifi 0000:03:00.0: CSR_DRAM_INT_TBL_REG: 0X880fffff
[ 421.620172] iwlwifi 0000:03:00.0: CSR_GIO_CHICKEN_BITS: 0X27800200
[ 421.620197] iwlwifi 0000:03:00.0: CSR_ANA_PLL_CFG: 0X00000000
[ 421.620223] iwlwifi 0000:03:00.0: CSR_MONITOR_STATUS_REG: 0X6bf7ff57
[ 421.620249] iwlwifi 0000:03:00.0: CSR_HW_REV_WA_REG: 0X0001001a
[ 421.620274] iwlwifi 0000:03:00.0: CSR_DBG_HPET_MEM_REG: 0Xffff0000
WinterMute ~ # dmesg -c
[ 434.761157] iwlwifi 0000:03:00.0: RF_KILL bit toggled to disable radio.
[ 434.763073] iwlwifi 0000:03:00.0: Not sending command - RF KILL
[ 434.763109] iwlwifi 0000:03:00.0: Not sending command - RF KILL
[ 434.765674] iwlwifi 0000:03:00.0: RF_KILL bit toggled to disable radio.
WinterMute ~ # echo 1 > /sys/kernel/debug/iwlwifi/*/trans/csr; dmesg -c; rfkill list
[ 494.669203] iwlwifi 0000:03:00.0: CSR values:
[ 494.669206] iwlwifi 0000:03:00.0: (2nd byte of CSR_INT_COALESCING is CSR_INT_PERIODIC_REG)
[ 494.669246] iwlwifi 0000:03:00.0: CSR_HW_IF_CONFIG_REG: 0X02000000
[ 494.669278] iwlwifi 0000:03:00.0: CSR_INT_COALESCING: 0X00000000
[ 494.669305] iwlwifi 0000:03:00.0: CSR_INT: 0X04000000
[ 494.669337] iwlwifi 0000:03:00.0: CSR_INT_MASK: 0X00000000
[ 494.669369] iwlwifi 0000:03:00.0: CSR_FH_INT_STATUS: 0X00000000
[ 494.669394] iwlwifi 0000:03:00.0: CSR_GPIO_IN: 0X00000030
[ 494.669420] iwlwifi 0000:03:00.0: CSR_RESET: 0X00000001
[ 494.669446] iwlwifi 0000:03:00.0: CSR_GP_CNTRL: 0X080403d0
[ 494.669472] iwlwifi 0000:03:00.0: CSR_HW_REV: 0X000000b0
[ 494.669497] iwlwifi 0000:03:00.0: CSR_EEPROM_REG: 0X00000000
[ 494.669523] iwlwifi 0000:03:00.0: CSR_EEPROM_GP: 0X90000001
[ 494.669550] iwlwifi 0000:03:00.0: CSR_OTP_GP_REG: 0X00030001
[ 494.669576] iwlwifi 0000:03:00.0: CSR_GIO_REG: 0X00080042
[ 494.669601] iwlwifi 0000:03:00.0: CSR_GP_UCODE_REG: 0X00000000
[ 494.669627] iwlwifi 0000:03:00.0: CSR_GP_DRIVER_REG: 0X00000000
[ 494.669653] iwlwifi 0000:03:00.0: CSR_UCODE_DRV_GP1: 0X00000000
[ 494.669679] iwlwifi 0000:03:00.0: CSR_UCODE_DRV_GP2: 0X00000000
[ 494.669704] iwlwifi 0000:03:00.0: CSR_LED_REG: 0X00000018
[ 494.669730] iwlwifi 0000:03:00.0: CSR_DRAM_INT_TBL_REG: 0X00000000
[ 494.669756] iwlwifi 0000:03:00.0: CSR_GIO_CHICKEN_BITS: 0X27800200
[ 494.669781] iwlwifi 0000:03:00.0: CSR_ANA_PLL_CFG: 0X00000000
[ 494.669807] iwlwifi 0000:03:00.0: CSR_MONITOR_STATUS_REG: 0X6bffffd7
[ 494.669834] iwlwifi 0000:03:00.0: CSR_HW_REV_WA_REG: 0X0001001a
[ 494.669861] iwlwifi 0000:03:00.0: CSR_DBG_HPET_MEM_REG: 0X82000500
I am travelling - I will take a look next week. what I see here is that you stopped the tracing to early. I can't see the second dump in the trace. Please stop the trace only after you run "echo 1 > /sys/kernel/debug/iwlwifi/*/trans/csr; dmesg -c; rfkill list" thanks Created attachment 159111 [details]
trace io + csr dump
The trace covers:
Toggling wifi off
dump csr + rfkill list
Toggle wifi on
dump csr + rfkill list
Please try this: diff --git a/drivers/net/wireless/iwlwifi/pcie/trans.c b/drivers/net/wireless/iwlwifi/pcie/trans.c index ddb416a..4960d0a 100644 --- a/drivers/net/wireless/iwlwifi/pcie/trans.c +++ b/drivers/net/wireless/iwlwifi/pcie/trans.c @@ -1000,6 +1000,8 @@ static void iwl_trans_pcie_stop_device(struct iwl_trans *trans) clear_bit(STATUS_RFKILL, &trans->status); if (hw_rfkill != was_hw_rfkill) iwl_trans_pcie_rf_kill(trans, hw_rfkill); + + iwl_pcie_prepare_card_hw(trans); } void iwl_trans_pcie_rf_kill(struct iwl_trans *trans, bool state) Wow. I couldn't reproduce the bug with latest patch for now. Thanks. Do you have a V-PRO platform? Does this computer belong to a big company? Yes. I have active AMT/vPro. No. It's my own laptop. (In reply to Oleksii Shevchuk from comment #49) > Yes. I have active AMT/vPro. that explains it all :) > No. It's my own laptop. In that case, I don't see why you want AMT/vPRO active, but that's another discussion :) Anyway - patch will be sent upstream through the regular process. Note that since you are probably the only AMT / vPRO Linux user, this patch will be sent to 3.19 and will *not* be backported. Thanks. > I don't see why you want AMT/vPRO active
To find new bugs, obviously ^_^
|