Bug 176891 - iwlwifi: 7265: improper cleanup after RF-Kill prevents device from being restarted [WIFILNX-118]
Summary: iwlwifi: 7265: improper cleanup after RF-Kill prevents device from being rest...
Status: CLOSED CODE_FIX
Alias: None
Product: Drivers
Classification: Unclassified
Component: network-wireless (show other bugs)
Hardware: Intel Linux
: P1 normal
Assignee: DO NOT USE - assign "network-wireless-intel" component instead
URL:
Keywords:
: 175471 (view as bug list)
Depends on:
Blocks:
 
Reported: 2016-10-06 18:24 UTC by Petr Bena
Modified: 2017-04-15 15:30 UTC (History)
2 users (show)

See Also:
Kernel Version: 4.8
Subsystem:
Regression: No
Bisected commit-id:


Attachments

Description Petr Bena 2016-10-06 18:24:02 UTC
I have DELL E5550 which has a wi-fi switch on keyboard, shortcut is fn + PrtScr

This button is able to turn wi-fi on or off while I am in BIOS, it works even in GRUB, but when I boot linux kernel it stops working. Wi-fi is automatically turned off when I plug ethernet cable, making it impossible to connect both to wired eth and wi-fi and it turns on (most of time) when I unplug the cable. However on some special occasions it doesn't, for example when I suspend to RAM while the cable is plugged in, then unplug the cable and resume PC, it stay turned off and I have to reboot the kernel in order to fix it (I can't unload the module, it say it's in use, so reboot is the only option)

So yes, that is basically the problem. In addition I get these:

[   12.990686] iwlwifi 0000:02:00.0: Direct firmware load for iwlwifi-7265D-24.ucode failed with error -2
[   12.990719] iwlwifi 0000:02:00.0: Direct firmware load for iwlwifi-7265D-23.ucode failed with error -2
[   12.990745] iwlwifi 0000:02:00.0: Direct firmware load for iwlwifi-7265D-22.ucode failed with error -2
[   13.000764] iwlwifi 0000:02:00.0: loaded firmware version 21.302800.0 op_mode iwlmvm
[   13.012601] iwlwifi 0000:02:00.0: Detected Intel(R) Dual Band Wireless AC 7265, REV=0x210

But I suppose that is OK, it just keeps loading different firmwares until it succeeds
Comment 1 Petr Bena 2016-10-06 18:25:46 UTC
localhost petanb # uname -a
Linux localhost.localdomain 4.8.0hardened #3 SMP Thu Oct 6 00:06:14 CEST 2016 x86_64 Intel(R) Core(TM) i7-5600U CPU @ 2.60GHz GenuineIntel GNU/Linux
Comment 2 Petr Bena 2016-10-06 18:26:16 UTC
localhost petanb # lspci
00:00.0 Host bridge: Intel Corporation Broadwell-U Host Bridge -OPI (rev 09)
00:02.0 VGA compatible controller: Intel Corporation Broadwell-U Integrated Graphics (rev 09)
00:03.0 Audio device: Intel Corporation Broadwell-U Audio Controller (rev 09)
00:04.0 Signal processing controller: Intel Corporation Broadwell-U Camarillo Device (rev 09)
00:14.0 USB controller: Intel Corporation Wildcat Point-LP USB xHCI Controller (rev 03)
00:16.0 Communication controller: Intel Corporation Wildcat Point-LP MEI Controller #1 (rev 03)
00:19.0 Ethernet controller: Intel Corporation Ethernet Connection (3) I218-LM (rev 03)
00:1b.0 Audio device: Intel Corporation Wildcat Point-LP High Definition Audio Controller (rev 03)
00:1c.0 PCI bridge: Intel Corporation Wildcat Point-LP PCI Express Root Port #1 (rev e3)
00:1c.3 PCI bridge: Intel Corporation Wildcat Point-LP PCI Express Root Port #4 (rev e3)
00:1c.4 PCI bridge: Intel Corporation Wildcat Point-LP PCI Express Root Port #5 (rev e3)
00:1d.0 USB controller: Intel Corporation Wildcat Point-LP USB EHCI Controller (rev 03)
00:1f.0 ISA bridge: Intel Corporation Wildcat Point-LP LPC Controller (rev 03)
00:1f.2 RAID bus controller: Intel Corporation 82801 Mobile SATA Controller [RAID mode] (rev 03)
00:1f.3 SMBus: Intel Corporation Wildcat Point-LP SMBus Controller (rev 03)
01:00.0 SD Host controller: O2 Micro, Inc. SD/MMC Card Reader Controller (rev 01)
02:00.0 Network controller: Intel Corporation Wireless 7265 (rev 59)
03:00.0 3D controller: NVIDIA Corporation GM108M [GeForce 840M] (rev a2)
Comment 3 Petr Bena 2016-10-07 07:24:47 UTC
Now I figured out that since I upgraded to this version of kernel, wifi completely stops working once I plug in cable, it can't recover even when I unplug it, I get these

[37727.119891] iwlwifi 0000:02:00.0: L1 Enabled - LTR Enabled
[37951.827644] iwlwifi 0000:02:00.0: RF_KILL bit toggled to disable radio.
[37952.059246] iwlwifi 0000:02:00.0: Failed to wake NIC for hcmd
[37952.059366] iwlwifi 0000:02:00.0: Error sending TXPATH_FLUSH: enqueue_hcmd failed: -5
[37952.059372] iwlwifi 0000:02:00.0: Failed to send flush command (-5)
[37952.290585] iwlwifi 0000:02:00.0: Failed to wake NIC for hcmd
[37952.290721] iwlwifi 0000:02:00.0: Error sending MAC_CONTEXT_CMD: enqueue_hcmd failed: -5
[37952.290725] iwlwifi 0000:02:00.0: Failed to remove MAC context: -5
[37952.521227] iwlwifi 0000:02:00.0: Failed to wake NIC for hcmd
[37952.521325] iwlwifi 0000:02:00.0: Error sending SCD_QUEUE_CFG: enqueue_hcmd failed: -5
[37952.521328] iwlwifi 0000:02:00.0: Failed to disable queue 0 (ret=-5)
[37952.752050] iwlwifi 0000:02:00.0: Failed to wake NIC for hcmd
[37952.752132] iwlwifi 0000:02:00.0: Error sending SCD_QUEUE_CFG: enqueue_hcmd failed: -5
[37952.752139] iwlwifi 0000:02:00.0: Failed to disable queue 1 (ret=-5)
[37952.982903] iwlwifi 0000:02:00.0: Failed to wake NIC for hcmd
[37952.982987] iwlwifi 0000:02:00.0: Error sending SCD_QUEUE_CFG: enqueue_hcmd failed: -5
[37952.982989] iwlwifi 0000:02:00.0: Failed to disable queue 2 (ret=-5)
[37953.213726] iwlwifi 0000:02:00.0: Failed to wake NIC for hcmd
[37953.213818] iwlwifi 0000:02:00.0: Error sending SCD_QUEUE_CFG: enqueue_hcmd failed: -5
[37953.213820] iwlwifi 0000:02:00.0: Failed to disable queue 3 (ret=-5)
[37967.942339] iwlwifi 0000:02:00.0: RF_KILL bit toggled to enable radio.
[37967.949201] iwlwifi 0000:02:00.0: L1 Enabled - LTR Enabled
[37967.950846] iwlwifi 0000:02:00.0: L1 Enabled - LTR Enabled
[37968.023608] iwlwifi 0000:02:00.0: L1 Enabled - LTR Enabled
[37968.025272] iwlwifi 0000:02:00.0: L1 Enabled - LTR Enabled
[37968.062485] WARNING: CPU: 1 PID: 4663 at drivers/net/wireless/intel/iwlwifi/mvm/mac-ctxt.c:1322 iwl_mvm_mac_ctxt_add+0xc3/0xd0 [iwlmvm]
[37968.062487] Modules linked in: xt_nat iptable_nat nf_nat_ipv4 nf_nat vboxpci(O) vboxnetadp(O) vboxnetflt(O) vboxdrv(O) ppdev cdc_mbim cdc_wdm qcserial cdc_ncm uvcvideo usb_wwan usbnet usbserial videobuf2_vmalloc videobuf2_memops videobuf2_v4l2 videobuf2_core joydev iwlmvm nvidiafb iwlwifi vgastate mei_me mei parport_pc snd_hda_codec_hdmi parport snd_soc_rt5640 snd_soc_rl6231 snd_soc_ssm4567 dell_smo8800 snd_soc_core elan_i2c snd_compress snd_soc_sst_acpi fjes snd_pcm_dmaengine snd_soc_sst_match gpio_lynxpoint i2c_designware_platform 8250_dw i2c_designware_core intel_smartconnect dell_rbtn algif_skcipher af_alg crc32_pclmul crc32c_intel ghash_clmulni_intel aesni_intel aes_x86_64 lrw glue_helper ablk_helper cryptd serio_raw nouveau sdhci_pci i2c_hid
[37968.062576]  [<ffffffffa046fa53>] iwl_mvm_mac_ctxt_add+0xc3/0xd0 [iwlmvm]
[37968.062581]  [<ffffffffa0469b28>] iwl_mvm_mac_add_interface+0xf8/0x260 [iwlmvm]
[38014.103752] iwlwifi 0000:02:00.0: RF_KILL bit toggled to disable radio.
Comment 4 Luca Coelho 2016-10-11 07:43:37 UTC
Thanks for reporting.

This is a recurring problem that we are currently investigating.  I'll send you a firmware with debugging capabilities so that we can get more information on what is going on.
Comment 5 Luca Coelho 2016-10-11 07:54:49 UTC
Oops, sorry, my mistake.  I wrote this in the wrong report.  This is a different issue.

First of all, you are correct that the driver will try to load different firmwares starting from the newest down to the oldest version supported and it will take the newest one available.  So those initial messages are harmless.

Second, the iwlwifi driver doesn't know anything about the ethernet cable.  What is probably happening is that your connection manager, when seeing the ethernet cable plugged in, toggles rfkill on the WiFi interface, because it doesn't want to use it.  I don't know which connection manager you are using, but I know that NetworkManager, with certain configurations, does that.  Please check the settings to see if there is an option to change this behavior.

Now, your comment #3 seems to be an actual problem.  According to the logs you pasted, it seems that the driver is failing to clean thing up properly when rfkill is enabled and that causes it not to work properly anymore.  We will investigate this issue.

In the meantime, try to configure your network manager to properly handle multiple interfaces at the same time.
Comment 6 Petr Bena 2016-10-11 09:33:26 UTC
Hi,

Thanks for reply, I will try to do that and keep you posted, I recompiled kernel to contain debugging information in iwlwifi but I don't know if that would be of any help to you

This from moment when wi-fi stopped working, this version of kernel has RF input compiled in, so the shortcut to disable / enable wi-fi actually works now (but it toggles soft block only). When I keep pressing the button, I see wi-fi LED flash for microsecond and then it turns off the logs from that moment (me pressing the button and LED flashing) is here:

[182628.534624] iwlwifi 0000:02:00.0: U iwl_pcie_prepare_card_hw iwl_trans_prepare_card_hw enter
[182628.534784] iwlwifi 0000:02:00.0: U iwl_pcie_set_hw_ready hardware ready
[182628.536516] iwlwifi 0000:02:00.0: U iwl_pcie_apm_init Init card's basic functions
[182628.536686] iwlwifi 0000:02:00.0: L1 Enabled - LTR Enabled
[182628.537109] iwlwifi 0000:02:00.0: U iwl_pcie_prepare_card_hw iwl_trans_prepare_card_hw enter
[182628.537122] iwlwifi 0000:02:00.0: U iwl_pcie_set_hw_ready hardware ready
[182628.537135] iwlwifi 0000:02:00.0: U iwl_pcie_apm_init Init card's basic functions
[182628.537159] iwlwifi 0000:02:00.0: L1 Enabled - LTR Enabled
[182628.537245] iwlwifi 0000:02:00.0: U iwl_mvm_nic_config Radio type=0x0-0x2-0x1
[182628.537851] iwlwifi 0000:02:00.0: U iwl_pcie_nic_init Enabling shadow registers in device
[182628.548035] iwlwifi 0000:02:00.0: U iwl_pcie_send_hcmd_sync Attempting to send sync command BT_CONFIG
[182628.548042] iwlwifi 0000:02:00.0: U iwl_pcie_send_hcmd_sync Setting HCMD_ACTIVE for command BT_CONFIG
[182628.548422] iwlwifi 0000:02:00.0: I iwl_pcie_hcmd_complete Clearing HCMD_ACTIVE for command BT_CONFIG
[182628.548443] iwlwifi 0000:02:00.0: U iwl_nvm_check_version device EEPROM VER=0xc11, CALIB=0xff
[182628.548447] iwlwifi 0000:02:00.0: U iwl_pcie_send_hcmd_sync Attempting to send sync command TX_ANT_CONFIGURATION_CMD
[182628.548450] iwlwifi 0000:02:00.0: U iwl_pcie_send_hcmd_sync Setting HCMD_ACTIVE for command TX_ANT_CONFIGURATION_CMD
[182628.548806] iwlwifi 0000:02:00.0: I iwl_pcie_hcmd_complete Clearing HCMD_ACTIVE for command TX_ANT_CONFIGURATION_CMD
[182628.548833] iwlwifi 0000:02:00.0: U iwl_send_phy_cfg_cmd Sending Phy CFG command: 0x330018
[182628.548836] iwlwifi 0000:02:00.0: U iwl_pcie_send_hcmd_sync Attempting to send sync command PHY_CONFIGURATION_CMD
[182628.548839] iwlwifi 0000:02:00.0: U iwl_pcie_send_hcmd_sync Setting HCMD_ACTIVE for command PHY_CONFIGURATION_CMD
[182628.549092] iwlwifi 0000:02:00.0: I iwl_pcie_hcmd_complete Clearing HCMD_ACTIVE for command PHY_CONFIGURATION_CMD
[182628.596551] iwlwifi 0000:02:00.0: I iwl_phy_db_set_section iwl_phy_db_set_section(282): [PHYDB]SET: Type 1 , Size: 2348
[182628.596562] iwlwifi 0000:02:00.0: I iwl_phy_db_set_section iwl_phy_db_set_section(282): [PHYDB]SET: Type 2 , Size: 3416
[182628.596769] iwlwifi 0000:02:00.0: I iwl_phy_db_set_section iwl_phy_db_set_section(282): [PHYDB]SET: Type 4 , Size: 2052
[182628.596776] iwlwifi 0000:02:00.0: I iwl_phy_db_set_section iwl_phy_db_set_section(282): [PHYDB]SET: Type 4 , Size: 2052
[182628.596782] iwlwifi 0000:02:00.0: I iwl_phy_db_set_section iwl_phy_db_set_section(282): [PHYDB]SET: Type 4 , Size: 2052
[182628.596788] iwlwifi 0000:02:00.0: I iwl_phy_db_set_section iwl_phy_db_set_section(282): [PHYDB]SET: Type 4 , Size: 2052
[182628.596793] iwlwifi 0000:02:00.0: I iwl_phy_db_set_section iwl_phy_db_set_section(282): [PHYDB]SET: Type 5 , Size: 36
[182628.596797] iwlwifi 0000:02:00.0: I iwl_phy_db_set_section iwl_phy_db_set_section(282): [PHYDB]SET: Type 5 , Size: 36
[182628.596801] iwlwifi 0000:02:00.0: I iwl_phy_db_set_section iwl_phy_db_set_section(282): [PHYDB]SET: Type 5 , Size: 36
[182628.596805] iwlwifi 0000:02:00.0: I iwl_phy_db_set_section iwl_phy_db_set_section(282): [PHYDB]SET: Type 5 , Size: 36
[182628.596808] iwlwifi 0000:02:00.0: I iwl_phy_db_set_section iwl_phy_db_set_section(282): [PHYDB]SET: Type 5 , Size: 36
[182628.596812] iwlwifi 0000:02:00.0: I iwl_phy_db_set_section iwl_phy_db_set_section(282): [PHYDB]SET: Type 5 , Size: 36
[182628.596816] iwlwifi 0000:02:00.0: I iwl_phy_db_set_section iwl_phy_db_set_section(282): [PHYDB]SET: Type 5 , Size: 36
[182628.596820] iwlwifi 0000:02:00.0: I iwl_phy_db_set_section iwl_phy_db_set_section(282): [PHYDB]SET: Type 5 , Size: 36
[182628.596824] iwlwifi 0000:02:00.0: I iwl_phy_db_set_section iwl_phy_db_set_section(282): [PHYDB]SET: Type 5 , Size: 36
[182628.596913] iwlwifi 0000:02:00.0: U _iwl_trans_pcie_stop_device DEVICE_ENABLED bit was set and is now cleared
[182628.597233] iwlwifi 0000:02:00.0: U iwl_pcie_apm_stop Stop card, put in low power state
[182628.597350] iwlwifi 0000:02:00.0: U iwl_pcie_apm_stop_master stop master
[182628.600670] iwlwifi 0000:02:00.0: U iwl_pcie_prepare_card_hw iwl_trans_prepare_card_hw enter
[182628.600825] iwlwifi 0000:02:00.0: U iwl_pcie_set_hw_ready hardware ready
[182628.600830] iwlwifi 0000:02:00.0: U iwl_pcie_prepare_card_hw iwl_trans_prepare_card_hw enter
[182628.600984] iwlwifi 0000:02:00.0: U iwl_pcie_set_hw_ready hardware ready
[182628.602546] iwlwifi 0000:02:00.0: U iwl_pcie_apm_init Init card's basic functions
[182628.602719] iwlwifi 0000:02:00.0: L1 Enabled - LTR Enabled
[182628.603141] iwlwifi 0000:02:00.0: U iwl_pcie_prepare_card_hw iwl_trans_prepare_card_hw enter
[182628.603154] iwlwifi 0000:02:00.0: U iwl_pcie_set_hw_ready hardware ready
[182628.603167] iwlwifi 0000:02:00.0: U iwl_pcie_apm_init Init card's basic functions
[182628.603191] iwlwifi 0000:02:00.0: L1 Enabled - LTR Enabled
[182628.603275] iwlwifi 0000:02:00.0: U iwl_mvm_nic_config Radio type=0x0-0x2-0x1
[182628.603921] iwlwifi 0000:02:00.0: U iwl_pcie_nic_init Enabling shadow registers in device
[182628.611377] iwlwifi 0000:02:00.0: U iwl_pcie_send_hcmd_sync Attempting to send sync command SHARED_MEM_CFG
[182628.611382] iwlwifi 0000:02:00.0: U iwl_pcie_send_hcmd_sync Setting HCMD_ACTIVE for command SHARED_MEM_CFG
[182628.611773] iwlwifi 0000:02:00.0: I iwl_pcie_hcmd_complete Clearing HCMD_ACTIVE for command SHARED_MEM_CFG
[182628.611792] iwlwifi 0000:02:00.0: U iwl_mvm_get_shared_mem_conf SHARED MEM CFG: got memory offsets/sizes
[182628.611944] iwlwifi 0000:02:00.0: U iwl_pcie_send_hcmd_sync Attempting to send sync command TX_ANT_CONFIGURATION_CMD
[182628.611949] iwlwifi 0000:02:00.0: U iwl_pcie_send_hcmd_sync Setting HCMD_ACTIVE for command TX_ANT_CONFIGURATION_CMD
[182628.612231] iwlwifi 0000:02:00.0: I iwl_pcie_hcmd_complete Clearing HCMD_ACTIVE for command TX_ANT_CONFIGURATION_CMD
[182628.612262] iwlwifi 0000:02:00.0: U iwl_pcie_send_hcmd_sync Attempting to send sync command BT_CONFIG
[182628.612266] iwlwifi 0000:02:00.0: U iwl_pcie_send_hcmd_sync Setting HCMD_ACTIVE for command BT_CONFIG
[182628.612629] iwlwifi 0000:02:00.0: I iwl_pcie_hcmd_complete Clearing HCMD_ACTIVE for command BT_CONFIG
[182628.612662] iwlwifi 0000:02:00.0: U iwl_send_phy_db_data Sending phy db data and configuration to runtime image
[182628.612671] iwlwifi 0000:02:00.0: U iwl_phy_db_get_section_data iwl_phy_db_get_section_data(373): [PHYDB] GET: Type 1 , Size: 2348
[182628.612676] iwlwifi 0000:02:00.0: U iwl_send_phy_db_cmd Sending PHY-DB hcmd of type 1, of length 2348
[182628.612680] iwlwifi 0000:02:00.0: U iwl_pcie_send_hcmd_sync Attempting to send sync command UNKNOWN
[182628.612684] iwlwifi 0000:02:00.0: U iwl_pcie_send_hcmd_sync Setting HCMD_ACTIVE for command UNKNOWN
[182628.613102] iwlwifi 0000:02:00.0: I iwl_pcie_hcmd_complete Clearing HCMD_ACTIVE for command UNKNOWN
[182628.613120] iwlwifi 0000:02:00.0: U iwl_phy_db_get_section_data iwl_phy_db_get_section_data(373): [PHYDB] GET: Type 2 , Size: 3416
[182628.613125] iwlwifi 0000:02:00.0: U iwl_send_phy_db_cmd Sending PHY-DB hcmd of type 2, of length 3416
[182628.613130] iwlwifi 0000:02:00.0: U iwl_pcie_send_hcmd_sync Attempting to send sync command UNKNOWN
[182628.613135] iwlwifi 0000:02:00.0: U iwl_pcie_send_hcmd_sync Setting HCMD_ACTIVE for command UNKNOWN
[182628.613648] iwlwifi 0000:02:00.0: I iwl_pcie_hcmd_complete Clearing HCMD_ACTIVE for command UNKNOWN
[182628.613675] iwlwifi 0000:02:00.0: U iwl_send_phy_db_cmd Sending PHY-DB hcmd of type 4, of length 2052
[182628.613678] iwlwifi 0000:02:00.0: U iwl_pcie_send_hcmd_sync Attempting to send sync command UNKNOWN
[182628.613681] iwlwifi 0000:02:00.0: U iwl_pcie_send_hcmd_sync Setting HCMD_ACTIVE for command UNKNOWN
[182628.614014] iwlwifi 0000:02:00.0: I iwl_pcie_hcmd_complete Clearing HCMD_ACTIVE for command UNKNOWN
[182628.614029] iwlwifi 0000:02:00.0: U iwl_phy_db_send_all_channel_groups Sent PHY_DB HCMD, type = 4 num = 0
[182628.614034] iwlwifi 0000:02:00.0: U iwl_send_phy_db_cmd Sending PHY-DB hcmd of type 4, of length 2052
[182628.614039] iwlwifi 0000:02:00.0: U iwl_pcie_send_hcmd_sync Attempting to send sync command UNKNOWN
[182628.614043] iwlwifi 0000:02:00.0: U iwl_pcie_send_hcmd_sync Setting HCMD_ACTIVE for command UNKNOWN
[182628.614546] iwlwifi 0000:02:00.0: I iwl_pcie_hcmd_complete Clearing HCMD_ACTIVE for command UNKNOWN
[182628.614561] iwlwifi 0000:02:00.0: U iwl_phy_db_send_all_channel_groups Sent PHY_DB HCMD, type = 4 num = 1
[182628.614565] iwlwifi 0000:02:00.0: U iwl_send_phy_db_cmd Sending PHY-DB hcmd of type 4, of length 2052
[182628.614569] iwlwifi 0000:02:00.0: U iwl_pcie_send_hcmd_sync Attempting to send sync command UNKNOWN
[182628.614573] iwlwifi 0000:02:00.0: U iwl_pcie_send_hcmd_sync Setting HCMD_ACTIVE for command UNKNOWN
[182628.615069] iwlwifi 0000:02:00.0: I iwl_pcie_hcmd_complete Clearing HCMD_ACTIVE for command UNKNOWN
[182628.615096] iwlwifi 0000:02:00.0: U iwl_phy_db_send_all_channel_groups Sent PHY_DB HCMD, type = 4 num = 2
[182628.615099] iwlwifi 0000:02:00.0: U iwl_send_phy_db_cmd Sending PHY-DB hcmd of type 4, of length 2052
[182628.615103] iwlwifi 0000:02:00.0: U iwl_pcie_send_hcmd_sync Attempting to send sync command UNKNOWN
[182628.615106] iwlwifi 0000:02:00.0: U iwl_pcie_send_hcmd_sync Setting HCMD_ACTIVE for command UNKNOWN
[182628.615487] iwlwifi 0000:02:00.0: I iwl_pcie_hcmd_complete Clearing HCMD_ACTIVE for command UNKNOWN
[182628.615513] iwlwifi 0000:02:00.0: U iwl_phy_db_send_all_channel_groups Sent PHY_DB HCMD, type = 4 num = 3
[182628.615518] iwlwifi 0000:02:00.0: U iwl_send_phy_db_cmd Sending PHY-DB hcmd of type 5, of length 36
[182628.615523] iwlwifi 0000:02:00.0: U iwl_pcie_send_hcmd_sync Attempting to send sync command UNKNOWN
[182628.615527] iwlwifi 0000:02:00.0: U iwl_pcie_send_hcmd_sync Setting HCMD_ACTIVE for command UNKNOWN
[182628.615778] iwlwifi 0000:02:00.0: I iwl_pcie_hcmd_complete Clearing HCMD_ACTIVE for command UNKNOWN
[182628.615816] iwlwifi 0000:02:00.0: U iwl_phy_db_send_all_channel_groups Sent PHY_DB HCMD, type = 5 num = 0
[182628.615822] iwlwifi 0000:02:00.0: U iwl_send_phy_db_cmd Sending PHY-DB hcmd of type 5, of length 36
[182628.615828] iwlwifi 0000:02:00.0: U iwl_pcie_send_hcmd_sync Attempting to send sync command UNKNOWN
[182628.615832] iwlwifi 0000:02:00.0: U iwl_pcie_send_hcmd_sync Setting HCMD_ACTIVE for command UNKNOWN
[182628.616057] iwlwifi 0000:02:00.0: I iwl_pcie_hcmd_complete Clearing HCMD_ACTIVE for command UNKNOWN
[182628.616070] iwlwifi 0000:02:00.0: U iwl_phy_db_send_all_channel_groups Sent PHY_DB HCMD, type = 5 num = 1
[182628.616074] iwlwifi 0000:02:00.0: U iwl_send_phy_db_cmd Sending PHY-DB hcmd of type 5, of length 36
[182628.616077] iwlwifi 0000:02:00.0: U iwl_pcie_send_hcmd_sync Attempting to send sync command UNKNOWN
[182628.616083] iwlwifi 0000:02:00.0: U iwl_pcie_send_hcmd_sync Setting HCMD_ACTIVE for command UNKNOWN
[182628.616338] iwlwifi 0000:02:00.0: I iwl_pcie_hcmd_complete Clearing HCMD_ACTIVE for command UNKNOWN
[182628.616353] iwlwifi 0000:02:00.0: U iwl_phy_db_send_all_channel_groups Sent PHY_DB HCMD, type = 5 num = 2
[182628.616358] iwlwifi 0000:02:00.0: U iwl_send_phy_db_cmd Sending PHY-DB hcmd of type 5, of length 36
[182628.616363] iwlwifi 0000:02:00.0: U iwl_pcie_send_hcmd_sync Attempting to send sync command UNKNOWN
[182628.616367] iwlwifi 0000:02:00.0: U iwl_pcie_send_hcmd_sync Setting HCMD_ACTIVE for command UNKNOWN
[182628.616615] iwlwifi 0000:02:00.0: I iwl_pcie_hcmd_complete Clearing HCMD_ACTIVE for command UNKNOWN
[182628.616628] iwlwifi 0000:02:00.0: U iwl_phy_db_send_all_channel_groups Sent PHY_DB HCMD, type = 5 num = 3
[182628.616633] iwlwifi 0000:02:00.0: U iwl_send_phy_db_cmd Sending PHY-DB hcmd of type 5, of length 36
[182628.616637] iwlwifi 0000:02:00.0: U iwl_pcie_send_hcmd_sync Attempting to send sync command UNKNOWN
[182628.616642] iwlwifi 0000:02:00.0: U iwl_pcie_send_hcmd_sync Setting HCMD_ACTIVE for command UNKNOWN
[182628.616893] iwlwifi 0000:02:00.0: I iwl_pcie_hcmd_complete Clearing HCMD_ACTIVE for command UNKNOWN
[182628.616903] iwlwifi 0000:02:00.0: U iwl_phy_db_send_all_channel_groups Sent PHY_DB HCMD, type = 5 num = 4
[182628.616906] iwlwifi 0000:02:00.0: U iwl_send_phy_db_cmd Sending PHY-DB hcmd of type 5, of length 36
[182628.616908] iwlwifi 0000:02:00.0: U iwl_pcie_send_hcmd_sync Attempting to send sync command UNKNOWN
[182628.616910] iwlwifi 0000:02:00.0: U iwl_pcie_send_hcmd_sync Setting HCMD_ACTIVE for command UNKNOWN
[182628.617178] iwlwifi 0000:02:00.0: I iwl_pcie_hcmd_complete Clearing HCMD_ACTIVE for command UNKNOWN
[182628.617268] iwlwifi 0000:02:00.0: U iwl_phy_db_send_all_channel_groups Sent PHY_DB HCMD, type = 5 num = 5
[182628.617271] iwlwifi 0000:02:00.0: U iwl_send_phy_db_cmd Sending PHY-DB hcmd of type 5, of length 36
[182628.617273] iwlwifi 0000:02:00.0: U iwl_pcie_send_hcmd_sync Attempting to send sync command UNKNOWN
[182628.617278] iwlwifi 0000:02:00.0: U iwl_pcie_send_hcmd_sync Setting HCMD_ACTIVE for command UNKNOWN
[182628.617452] iwlwifi 0000:02:00.0: I iwl_pcie_hcmd_complete Clearing HCMD_ACTIVE for command UNKNOWN
[182628.617462] iwlwifi 0000:02:00.0: U iwl_phy_db_send_all_channel_groups Sent PHY_DB HCMD, type = 5 num = 6
[182628.617465] iwlwifi 0000:02:00.0: U iwl_send_phy_db_cmd Sending PHY-DB hcmd of type 5, of length 36
[182628.617467] iwlwifi 0000:02:00.0: U iwl_pcie_send_hcmd_sync Attempting to send sync command UNKNOWN
[182628.617470] iwlwifi 0000:02:00.0: U iwl_pcie_send_hcmd_sync Setting HCMD_ACTIVE for command UNKNOWN
[182628.617644] iwlwifi 0000:02:00.0: I iwl_pcie_hcmd_complete Clearing HCMD_ACTIVE for command UNKNOWN
[182628.617655] iwlwifi 0000:02:00.0: U iwl_phy_db_send_all_channel_groups Sent PHY_DB HCMD, type = 5 num = 7
[182628.617658] iwlwifi 0000:02:00.0: U iwl_send_phy_db_cmd Sending PHY-DB hcmd of type 5, of length 36
[182628.617660] iwlwifi 0000:02:00.0: U iwl_pcie_send_hcmd_sync Attempting to send sync command UNKNOWN
[182628.617663] iwlwifi 0000:02:00.0: U iwl_pcie_send_hcmd_sync Setting HCMD_ACTIVE for command UNKNOWN
[182628.617920] iwlwifi 0000:02:00.0: I iwl_pcie_hcmd_complete Clearing HCMD_ACTIVE for command UNKNOWN
[182628.617931] iwlwifi 0000:02:00.0: U iwl_phy_db_send_all_channel_groups Sent PHY_DB HCMD, type = 5 num = 8
[182628.617933] iwlwifi 0000:02:00.0: U iwl_send_phy_db_data Finished sending phy db non channel data
[182628.617947] iwlwifi 0000:02:00.0: U iwl_send_phy_cfg_cmd Sending Phy CFG command: 0x330018
[182628.617948] iwlwifi 0000:02:00.0: U iwl_pcie_send_hcmd_sync Attempting to send sync command PHY_CONFIGURATION_CMD
[182628.617949] iwlwifi 0000:02:00.0: U iwl_pcie_send_hcmd_sync Setting HCMD_ACTIVE for command PHY_CONFIGURATION_CMD
[182628.619502] iwlwifi 0000:02:00.0: I iwl_pcie_hcmd_complete Clearing HCMD_ACTIVE for command PHY_CONFIGURATION_CMD
[182628.619565] iwlwifi 0000:02:00.0: U iwl_pcie_send_hcmd_sync Attempting to send sync command SCD_QUEUE_CFG
[182628.619566] iwlwifi 0000:02:00.0: U iwl_pcie_send_hcmd_sync Setting HCMD_ACTIVE for command SCD_QUEUE_CFG
[182628.619840] iwlwifi 0000:02:00.0: I iwl_pcie_hcmd_complete Clearing HCMD_ACTIVE for command SCD_QUEUE_CFG
[182628.619853] iwlwifi 0000:02:00.0: U iwl_pcie_send_hcmd_sync Attempting to send sync command ADD_STA
[182628.619854] iwlwifi 0000:02:00.0: U iwl_pcie_send_hcmd_sync Setting HCMD_ACTIVE for command ADD_STA
[182628.620340] iwlwifi 0000:02:00.0: I iwl_pcie_hcmd_complete Clearing HCMD_ACTIVE for command ADD_STA
[182628.620345] iwlwifi 0000:02:00.0: U iwl_mvm_add_int_sta_common Internal station added.
[182628.620348] iwlwifi 0000:02:00.0: U iwl_pcie_send_hcmd_sync Attempting to send sync command PHY_CONTEXT_CMD
[182628.620350] iwlwifi 0000:02:00.0: U iwl_pcie_send_hcmd_sync Setting HCMD_ACTIVE for command PHY_CONTEXT_CMD
[182628.620940] iwlwifi 0000:02:00.0: I iwl_pcie_hcmd_complete Clearing HCMD_ACTIVE for command PHY_CONTEXT_CMD
[182628.620968] iwlwifi 0000:02:00.0: U iwl_pcie_send_hcmd_sync Attempting to send sync command PHY_CONTEXT_CMD
[182628.620969] iwlwifi 0000:02:00.0: U iwl_pcie_send_hcmd_sync Setting HCMD_ACTIVE for command PHY_CONTEXT_CMD
[182628.621613] iwlwifi 0000:02:00.0: I iwl_pcie_hcmd_complete Clearing HCMD_ACTIVE for command PHY_CONTEXT_CMD
[182628.621619] iwlwifi 0000:02:00.0: U iwl_pcie_send_hcmd_sync Attempting to send sync command PHY_CONTEXT_CMD
[182628.621620] iwlwifi 0000:02:00.0: U iwl_pcie_send_hcmd_sync Setting HCMD_ACTIVE for command PHY_CONTEXT_CMD
[182628.621897] iwlwifi 0000:02:00.0: I iwl_pcie_hcmd_complete Clearing HCMD_ACTIVE for command PHY_CONTEXT_CMD
[182628.621901] iwlwifi 0000:02:00.0: U iwl_pcie_send_hcmd_sync Attempting to send sync command REPLY_THERMAL_MNG_BACKOFF
[182628.621902] iwlwifi 0000:02:00.0: U iwl_pcie_send_hcmd_sync Setting HCMD_ACTIVE for command REPLY_THERMAL_MNG_BACKOFF
[182628.622177] iwlwifi 0000:02:00.0: I iwl_pcie_hcmd_complete Clearing HCMD_ACTIVE for command REPLY_THERMAL_MNG_BACKOFF
[182628.622180] iwlwifi 0000:02:00.0: U iwl_pcie_send_hcmd_sync Attempting to send sync command LTR_CONFIG
[182628.622181] iwlwifi 0000:02:00.0: U iwl_pcie_send_hcmd_sync Setting HCMD_ACTIVE for command LTR_CONFIG
[182628.622451] iwlwifi 0000:02:00.0: I iwl_pcie_hcmd_complete Clearing HCMD_ACTIVE for command LTR_CONFIG
[182628.622455] iwlwifi 0000:02:00.0: U iwl_pcie_send_hcmd_sync Attempting to send sync command POWER_TABLE_CMD
[182628.622455] iwlwifi 0000:02:00.0: U iwl_pcie_send_hcmd_sync Setting HCMD_ACTIVE for command POWER_TABLE_CMD
[182628.622730] iwlwifi 0000:02:00.0: I iwl_pcie_hcmd_complete Clearing HCMD_ACTIVE for command POWER_TABLE_CMD
[182628.622736] iwlwifi 0000:02:00.0: U iwl_pcie_send_hcmd_sync Attempting to send sync command MCC_UPDATE_CMD
[182628.622737] iwlwifi 0000:02:00.0: U iwl_pcie_send_hcmd_sync Setting HCMD_ACTIVE for command MCC_UPDATE_CMD
[182628.623113] iwlwifi 0000:02:00.0: I iwl_pcie_hcmd_complete Clearing HCMD_ACTIVE for command MCC_UPDATE_CMD
[182628.623121] iwlwifi 0000:02:00.0: U iwl_pcie_send_hcmd_sync Attempting to send sync command MCC_UPDATE_CMD
[182628.623122] iwlwifi 0000:02:00.0: U iwl_pcie_send_hcmd_sync Setting HCMD_ACTIVE for command MCC_UPDATE_CMD
[182628.623501] iwlwifi 0000:02:00.0: I iwl_pcie_hcmd_complete Clearing HCMD_ACTIVE for command MCC_UPDATE_CMD
[182628.623510] iwlwifi 0000:02:00.0: U iwl_mvm_up RT uCode started.
[182628.623565] iwlwifi 0000:02:00.0: U iwl_pcie_send_hcmd_sync Attempting to send sync command SCD_QUEUE_CFG
[182628.623566] iwlwifi 0000:02:00.0: U iwl_pcie_send_hcmd_sync Setting HCMD_ACTIVE for command SCD_QUEUE_CFG
[182628.623743] iwlwifi 0000:02:00.0: I iwl_pcie_hcmd_complete Clearing HCMD_ACTIVE for command SCD_QUEUE_CFG
[182628.623807] iwlwifi 0000:02:00.0: U iwl_pcie_send_hcmd_sync Attempting to send sync command SCD_QUEUE_CFG
[182628.623808] iwlwifi 0000:02:00.0: U iwl_pcie_send_hcmd_sync Setting HCMD_ACTIVE for command SCD_QUEUE_CFG
[182628.624104] iwlwifi 0000:02:00.0: I iwl_pcie_hcmd_complete Clearing HCMD_ACTIVE for command SCD_QUEUE_CFG
[182628.624562] iwlwifi 0000:02:00.0: U iwl_pcie_send_hcmd_sync Attempting to send sync command SCD_QUEUE_CFG
[182628.624564] iwlwifi 0000:02:00.0: U iwl_pcie_send_hcmd_sync Setting HCMD_ACTIVE for command SCD_QUEUE_CFG
[182628.624741] iwlwifi 0000:02:00.0: I iwl_pcie_hcmd_complete Clearing HCMD_ACTIVE for command SCD_QUEUE_CFG
[182628.624805] iwlwifi 0000:02:00.0: U iwl_pcie_send_hcmd_sync Attempting to send sync command SCD_QUEUE_CFG
[182628.624806] iwlwifi 0000:02:00.0: U iwl_pcie_send_hcmd_sync Setting HCMD_ACTIVE for command SCD_QUEUE_CFG
[182628.625082] iwlwifi 0000:02:00.0: I iwl_pcie_hcmd_complete Clearing HCMD_ACTIVE for command SCD_QUEUE_CFG
[182628.625087] iwlwifi 0000:02:00.0: U iwl_pcie_send_hcmd_sync Attempting to send sync command SCD_QUEUE_CFG
[182628.625088] iwlwifi 0000:02:00.0: U iwl_pcie_send_hcmd_sync Setting HCMD_ACTIVE for command SCD_QUEUE_CFG
[182628.625362] iwlwifi 0000:02:00.0: I iwl_pcie_hcmd_complete Clearing HCMD_ACTIVE for command SCD_QUEUE_CFG
[182628.625365] iwlwifi 0000:02:00.0: U iwl_pcie_send_hcmd_sync Attempting to send sync command SCD_QUEUE_CFG
[182628.625366] iwlwifi 0000:02:00.0: U iwl_pcie_send_hcmd_sync Setting HCMD_ACTIVE for command SCD_QUEUE_CFG
[182628.625491] iwlwifi 0000:02:00.0: I iwl_pcie_hcmd_complete Clearing HCMD_ACTIVE for command SCD_QUEUE_CFG
[182628.625499] iwlwifi 0000:02:00.0: U iwl_pcie_send_hcmd_sync Attempting to send sync command SCD_QUEUE_CFG
[182628.625500] iwlwifi 0000:02:00.0: U iwl_pcie_send_hcmd_sync Setting HCMD_ACTIVE for command SCD_QUEUE_CFG
[182628.625676] iwlwifi 0000:02:00.0: I iwl_pcie_hcmd_complete Clearing HCMD_ACTIVE for command SCD_QUEUE_CFG
[182628.625681] iwlwifi 0000:02:00.0: U iwl_pcie_send_hcmd_sync Attempting to send sync command SCD_QUEUE_CFG
[182628.625681] iwlwifi 0000:02:00.0: U iwl_pcie_send_hcmd_sync Setting HCMD_ACTIVE for command SCD_QUEUE_CFG
[182628.625858] iwlwifi 0000:02:00.0: I iwl_pcie_hcmd_complete Clearing HCMD_ACTIVE for command SCD_QUEUE_CFG
[182628.625917] iwlwifi 0000:02:00.0: U _iwl_trans_pcie_stop_device DEVICE_ENABLED bit was set and is now cleared
[182628.626035] iwlwifi 0000:02:00.0: U iwl_pcie_apm_stop Stop card, put in low power state
[182628.626041] iwlwifi 0000:02:00.0: U iwl_pcie_apm_stop_master stop master
[182628.630380] iwlwifi 0000:02:00.0: U iwl_pcie_prepare_card_hw iwl_trans_prepare_card_hw enter
[182628.630440] iwlwifi 0000:02:00.0: U iwl_pcie_set_hw_ready hardware ready
Comment 7 Petr Bena 2016-10-11 09:35:38 UTC
Last kernel I have that doesn't have this bug is 4.5.0, so the bug for sure was committed sometime in between, I can try to download and compiled some newer kernel like 4.7 to figure out more specific timeframe
Comment 8 Petr Bena 2016-10-11 14:46:08 UTC
It seems that NetworkManager is not causing the disconnect of wi-fi as you can see here: https://forums.gentoo.org/viewtopic-t-1052820-start-0.html it shouldn't do that.

I think that the reason why it gets disconnected is simply because it doesn't allow to use wi-fi in same moment. This happens both when I put my laptop into docking station as well as when I plug a cable into ethernet.

While cable is plugged there is simply no way for me to turn wi-fi on and since this new kernel I can't start it even when I plug it off. Only solution is reboot.

I am now trying downgrading the kernel to find out the version where this bug was introduced.
Comment 9 Petr Bena 2016-10-11 14:48:38 UTC
This is what happen when I put my laptop into docking station

[ 2353.342031] acpi PNP0401:00: Already enumerated
[ 2353.342648] acpi PNP0501:00: Still not present
[ 2353.448315] usb 2-4: new high-speed USB device number 4 using xhci_hcd
[ 2353.617433] usb 2-4: New USB device found, idVendor=413c, idProduct=2513
[ 2353.617437] usb 2-4: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[ 2353.617841] hub 2-4:1.0: USB hub found
[ 2353.617869] hub 2-4:1.0: 3 ports detected
[ 2353.928356] usb 3-1: new SuperSpeed USB device number 2 using xhci_hcd
[ 2353.940677] usb 3-1: New USB device found, idVendor=413c, idProduct=5534
[ 2353.940683] usb 3-1: New USB device strings: Mfr=2, Product=3, SerialNumber=0
[ 2353.940685] usb 3-1: Product: USB5534
[ 2353.940688] usb 3-1: Manufacturer: SMSC
[ 2353.941511] hub 3-1:1.0: USB hub found
[ 2353.941982] hub 3-1:1.0: 3 ports detected
[ 2354.017334] usb 2-4.3: new low-speed USB device number 5 using xhci_hcd
[ 2354.110973] usb 2-4.3: New USB device found, idVendor=046d, idProduct=c31c
[ 2354.110978] usb 2-4.3: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 2354.110981] usb 2-4.3: Product: USB Keyboard
[ 2354.110984] usb 2-4.3: Manufacturer: Logitech
[ 2354.117358] input: Logitech USB Keyboard as /devices/pci0000:00/0000:00:14.0/usb2/2-4/2-4.3/2-4.3:1.0/0003:046D:C31C.0003/input/input18
[ 2354.171166] hid-generic 0003:046D:C31C.0003: input,hidraw2: USB HID v1.10 Keyboard [Logitech USB Keyboard] on usb-0000:00:14.0-4.3/input0
[ 2354.178706] input: Logitech USB Keyboard as /devices/pci0000:00/0000:00:14.0/usb2/2-4/2-4.3/2-4.3:1.1/0003:046D:C31C.0004/input/input19
[ 2354.230469] hid-generic 0003:046D:C31C.0004: input,hidraw3: USB HID v1.10 Device [Logitech USB Keyboard] on usb-0000:00:14.0-4.3/input1
[ 2354.261340] usb 2-1: new high-speed USB device number 6 using xhci_hcd
[ 2354.429648] usb 2-1: New USB device found, idVendor=413c, idProduct=2134
[ 2354.429651] usb 2-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 2354.429653] usb 2-1: Product: USB2134
[ 2354.429654] usb 2-1: Manufacturer: SMSC
[ 2354.430103] hub 2-1:1.0: USB hub found
[ 2354.430123] hub 2-1:1.0: 3 ports detected
[ 2358.015590] e1000e: eno1 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: None
[ 2358.015643] IPv6: ADDRCONF(NETDEV_CHANGE): eno1: link becomes ready
[ 2363.072435] iwlwifi 0000:02:00.0: RF_KILL bit toggled to disable radio.

You can see that last message is iwlwifi driver turning off the wi-fi for some reasons, so it indeed seems to be the driver that causes this.
Comment 10 Petr Bena 2016-10-11 14:56:03 UTC
I just tried with 4.7.7 same issue, this error in dmesg

[   68.696579] iwlwifi 0000:02:00.0: RF_KILL bit toggled to enable radio.
[   73.646383] iwlwifi 0000:02:00.0: L1 Enabled - LTR Enabled
[   73.646957] iwlwifi 0000:02:00.0: L1 Enabled - LTR Enabled
[   73.713708] iwlwifi 0000:02:00.0: L1 Enabled - LTR Enabled
[   73.714354] iwlwifi 0000:02:00.0: L1 Enabled - LTR Enabled
[   73.737300] ------------[ cut here ]------------
[   73.737308] WARNING: CPU: 1 PID: 4722 at drivers/net/wireless/intel/iwlwifi/mvm/mac-ctxt.c:1285 iwl_mvm_mac_ctxt_add+0xaf/0xc0 [iwlmvm]
[   73.737310] Adding active MAC 4e:e8:fa:00:f2:f1/2
[   73.737310] Modules linked in: ppdev uvcvideo qcserial videobuf2_vmalloc videobuf2_memops videobuf2_v4l2 cdc_mbim cdc_wdm usb_wwan videobuf2_core cdc_ncm usbserial usbnet iwlmvm joydev nvidiafb iwlwifi vgastate mei_me snd_hda_codec_hdmi mei parport_pc parport snd_soc_rt5640 snd_soc_rl6231 snd_soc_ssm4567 elan_i2c dell_smo8800 snd_soc_core snd_compress snd_pcm_dmaengine fjes snd_soc_sst_acpi snd_soc_sst_match gpio_lynxpoint i2c_designware_platform 8250_dw i2c_designware_core dell_rbtn intel_smartconnect algif_skcipher af_alg crc32_pclmul crc32c_intel ghash_clmulni_intel aesni_intel aes_x86_64 lrw glue_helper ablk_helper cryptd serio_raw nouveau sdhci_pci i2c_hid
[   73.737334] CPU: 1 PID: 4722 Comm: NetworkManager Not tainted 4.7.7hardened #1
[   73.737335] Hardware name: Dell Inc. Latitude E5550/0R6N9P, BIOS A11 11/18/2015
[   73.737336]  0000000000000000 ffff88041340b628 ffffffff8147f008 ffff88041340b678
[   73.737338]  0000000000000000 ffff88041340b668 ffffffff810a9d1c 000005051340b688
[   73.737340]  ffff880413dc93d0 ffff880412b1d560 ffff880412b1c720 0000000000000000
[   73.737342] Call Trace:
[   73.737345]  [<ffffffff8147f008>] dump_stack+0x4d/0x65
[   73.737347]  [<ffffffff810a9d1c>] __warn+0xcc/0xf0
[   73.737349]  [<ffffffff810a9d8a>] warn_slowpath_fmt+0x4a/0x50
[   73.737352]  [<ffffffffa045e37f>] iwl_mvm_mac_ctxt_add+0xaf/0xc0 [iwlmvm]
[   73.737355]  [<ffffffffa04587f1>] iwl_mvm_mac_add_interface+0xf1/0x270 [iwlmvm]
[   73.737358]  [<ffffffff81985d3f>] ? led_set_brightness_nopm+0xf/0x40
[   73.737361]  [<ffffffff81c28546>] drv_add_interface+0x46/0x140
[   73.737362]  [<ffffffff81c3cd36>] ieee80211_do_open+0x446/0x940
[   73.737364]  [<ffffffff81c3d27e>] ieee80211_open+0x4e/0x60
[   73.737366]  [<ffffffff81a7760a>] __dev_open+0xaa/0x120
[   73.737368]  [<ffffffff81a778e8>] __dev_change_flags+0x98/0x160
[   73.737369]  [<ffffffff81a779d4>] dev_change_flags+0x24/0x60
[   73.737372]  [<ffffffff8139ffb5>] ? extent_clear_unlock_delalloc+0x1d5/0x270
[   73.737374]  [<ffffffff81a84dc2>] do_setlink+0x602/0xad0
[   73.737376]  [<ffffffff811c3de3>] ? ___slab_alloc+0x1a3/0x4b0
[   73.737378]  [<ffffffff819674c5>] ? acpi_cpufreq_fast_switch+0x65/0x80
[   73.737380]  [<ffffffff8196211e>] ? cpufreq_driver_fast_switch+0x1e/0x20
[   73.737382]  [<ffffffff810d5b05>] ? update_curr+0xa5/0x150
[   73.737385]  [<ffffffff814ac022>] ? nla_parse+0x32/0x100
[   73.737386]  [<ffffffff81a86334>] rtnl_newlink+0x514/0x820
[   73.737389]  [<ffffffff81211afc>] ? ep_scan_ready_list+0x1ac/0x1c0
[   73.737391]  [<ffffffff81a845a3>] rtnetlink_rcv_msg+0x83/0x200
[   73.737392]  [<ffffffff811c7875>] ? __kmalloc_node_track_caller+0x135/0x250
[   73.737394]  [<ffffffff81a62b1e>] ? __alloc_skb+0x7e/0x1c0
[   73.737396]  [<ffffffff81a84520>] ? rtnetlink_rcv+0x30/0x30
[   73.737398]  [<ffffffff81aa4d12>] netlink_rcv_skb+0x92/0xb0
[   73.737399]  [<ffffffff81a84513>] rtnetlink_rcv+0x23/0x30
[   73.737401]  [<ffffffff81aa4752>] netlink_unicast+0x152/0x1e0
[   73.737403]  [<ffffffff81aa4ae6>] netlink_sendmsg+0x306/0x380
[   73.737405]  [<ffffffff81a5a7d3>] sock_sendmsg+0x33/0x40
[   73.737407]  [<ffffffff81a5b06d>] ___sys_sendmsg+0x23d/0x250
[   73.737409]  [<ffffffff81b2b379>] ? unix_dgram_sendmsg+0x479/0x650
[   73.737411]  [<ffffffff811e6bf3>] ? dput+0xb3/0x220
[   73.737413]  [<ffffffff811ef6cf>] ? mntput+0x1f/0x30
[   73.737415]  [<ffffffff811d20f8>] ? __fput+0x178/0x1e0
[   73.737416]  [<ffffffff811eca00>] ? __fget_light+0x20/0x60
[   73.737418]  [<ffffffff81a5b8d0>] __sys_sendmsg+0x40/0x70
[   73.737420]  [<ffffffff81a5b90d>] SyS_sendmsg+0xd/0x20
[   73.737423]  [<ffffffff81c9c2db>] entry_SYSCALL_64_fastpath+0x13/0x8f
[   73.737424] ---[ end trace fad3ac00b111468c ]---
Comment 11 Johannes Berg 2016-10-12 05:22:29 UTC
(In reply to Petr Bena from comment #9)

> [ 2363.072435] iwlwifi 0000:02:00.0: RF_KILL bit toggled to disable radio.
> 
> You can see that last message is iwlwifi driver turning off the wi-fi for
> some reasons, so it indeed seems to be the driver that causes this.

Ah, that's just iwlwifi telling you that the RF_KILL input on the hardware was toggled, and wifi is now disabled. This is actually a hardware input to the wifi device that the driver has no influence on (it's just reporting it), and thus this must be caused by your platform or similar.
Comment 12 Luca Coelho 2016-10-12 05:41:45 UTC
Yes, so as Johannes says, the platform seems to be toggling the HW rfkill line when you dock (or insert connect the ethernet cable), for some reason.  There's nothing we can do about that... The driver sees that the line is toggled and must comply (by shutting down).

Now, we indeed have a bug here, which shows up as the warning at drivers/net/wireless/intel/iwlwifi/mvm/mac-ctxt.c:1322.  It seems that in some situations we are not cleaning things up properly when the RF-kill is enabled.  Then, when disabling RF-kill we fail to recover.  We'll investigate that.
Comment 13 Petr Bena 2016-10-12 19:56:35 UTC
One more:

[80011.971647] ------------[ cut here ]------------
[80011.971654] WARNING: CPU: 1 PID: 4629 at drivers/net/wireless/intel/iwlwifi/mvm/mac-ctxt.c:1322 iwl_mvm_mac_ctxt_add+0xc3/0xd0 [iwlmvm]
[80011.971655] Adding active MAC 66:c0:e1:77:c2:77/2
[80011.971655] Modules linked in: xt_nat iptable_nat nf_nat_ipv4 nf_nat vboxpci(O) vboxnetadp(O) vboxnetflt(O) vboxdrv(O) ppdev uvcvideo videobuf2_vmalloc videobuf2_memops videobuf2_v4l2 videobuf2_core cdc_mbim cdc_wdm cdc_ncm qcserial usbnet usb_wwan usbserial joydev iwlmvm iwlwifi nvidiafb mei_me mei vgastate parport_pc parport dell_smo8800 elan_i2c snd_soc_rt5640 snd_soc_ssm4567 snd_soc_rl6231 snd_soc_core fjes snd_soc_sst_acpi snd_soc_sst_match snd_compress snd_pcm_dmaengine gpio_lynxpoint i2c_designware_platform 8250_dw i2c_designware_core intel_smartconnect dell_rbtn snd_hda_codec_hdmi algif_skcipher af_alg crc32_pclmul crc32c_intel ghash_clmulni_intel aesni_intel aes_x86_64 lrw glue_helper ablk_helper cryptd serio_raw nouveau sdhci_pci i2c_hid
[80011.971684] CPU: 1 PID: 4629 Comm: NetworkManager Tainted: G           O    4.8.0hardened #6
[80011.971684] Hardware name: Dell Inc. Latitude E5550/0R6N9P, BIOS A11 11/18/2015
[80011.971685]  0000000000000000 ffff880413887618 ffffffff8148b588 ffff880413887668
[80011.971687]  0000000000000000 ffff880413887658 ffffffff810aaadc 0000052a13887678
[80011.971688]  ffff88040dff54c8 ffff88040dff5380 ffff8804138c9588 ffff8804138c9580
[80011.971690] Call Trace:
[80011.971693]  [<ffffffff8148b588>] dump_stack+0x4d/0x65
[80011.971695]  [<ffffffff810aaadc>] __warn+0xcc/0xf0
[80011.971696]  [<ffffffff810aab4a>] warn_slowpath_fmt+0x4a/0x50
[80011.971699]  [<ffffffffa048fa53>] iwl_mvm_mac_ctxt_add+0xc3/0xd0 [iwlmvm]
[80011.971701]  [<ffffffffa0489b28>] iwl_mvm_mac_add_interface+0xf8/0x260 [iwlmvm]
[80011.971703]  [<ffffffff81c41fe6>] drv_add_interface+0x46/0x140
[80011.971704]  [<ffffffff81c56b36>] ieee80211_do_open+0x446/0x940
[80011.971705]  [<ffffffff81c5707e>] ieee80211_open+0x4e/0x60
[80011.971712]  [<ffffffff81a8ca5a>] __dev_open+0xaa/0x120
[80011.971713]  [<ffffffff81a8cd38>] __dev_change_flags+0x98/0x160
[80011.971714]  [<ffffffff81a8ce24>] dev_change_flags+0x24/0x60
[80011.971716]  [<ffffffff81a9badd>] do_setlink+0x2fd/0xb70
[80011.971717]  [<ffffffff81466d84>] ? alloc_request_struct+0x14/0x20
[80011.971718]  [<ffffffff81466d84>] ? alloc_request_struct+0x14/0x20
[80011.971720]  [<ffffffff81486439>] ? cfq_set_request+0x59/0x300
[80011.971721]  [<ffffffff819667d3>] ? kcryptd_io_read+0x53/0x60
[80011.971723]  [<ffffffff814b8822>] ? nla_parse+0x32/0x100
[80011.971724]  [<ffffffff81a9e9fd>] rtnl_newlink+0x50d/0x810
[80011.971725]  [<ffffffff81466aca>] ? part_round_stats+0x4a/0x60
[80011.971727]  [<ffffffff81218100>] ? ep_show_fdinfo+0x20/0x80
[80011.971729]  [<ffffffff81218a5c>] ? ep_scan_ready_list+0x1ac/0x1c0
[80011.971730]  [<ffffffff81a9ed83>] rtnetlink_rcv_msg+0x83/0x200
[80011.971732]  [<ffffffff811ccaf3>] ? __kmalloc_node_track_caller+0xa3/0x250
[80011.971733]  [<ffffffff81a77b1e>] ? __alloc_skb+0x7e/0x1c0
[80011.971734]  [<ffffffff81a9ed00>] ? rtnl_newlink+0x810/0x810
[80011.971736]  [<ffffffff81abadc2>] netlink_rcv_skb+0x92/0xb0
[80011.971737]  [<ffffffff81a99983>] rtnetlink_rcv+0x23/0x30
[80011.971738]  [<ffffffff81aba802>] netlink_unicast+0x152/0x1e0
[80011.971739]  [<ffffffff81abab96>] netlink_sendmsg+0x306/0x380
[80011.971740]  [<ffffffff81a6f253>] sock_sendmsg+0x33/0x40
[80011.971741]  [<ffffffff81a6faf1>] ___sys_sendmsg+0x241/0x250
[80011.971743]  [<ffffffff81b42249>] ? unix_dgram_sendmsg+0x479/0x650
[80011.971744]  [<ffffffff81a6f253>] ? sock_sendmsg+0x33/0x40
[80011.971745]  [<ffffffff81a6f6c9>] ? SYSC_sendto+0x139/0x170
[80011.971746]  [<ffffffff811f26c0>] ? __fget_light+0x20/0x60
[80011.971753]  [<ffffffff81a708d0>] __sys_sendmsg+0x40/0x70
[80011.971754]  [<ffffffff81a7090d>] SyS_sendmsg+0xd/0x20
[80011.971756]  [<ffffffff81cb94db>] entry_SYSCALL_64_fastpath+0x13/0x8f
[80011.971757] ---[ end trace 1968357a8afb42a7 ]---
Comment 14 Petr Bena 2016-10-12 20:08:17 UTC
I figured out that modprobe -r iwlmvm and modprobe iwlwifi fixes the problem as workaround
Comment 15 Luca Coelho 2016-11-29 08:12:37 UTC
I finally got the time to get back to this.  Reported the bug internally to go forward.
Comment 16 Luca Coelho 2016-11-29 08:32:46 UTC
*** Bug 175471 has been marked as a duplicate of this bug. ***
Comment 17 Luca Coelho 2017-01-15 11:19:48 UTC
We have made a lot of fixes in this area (RF-kill).  Could you try our Core releases, as explained in our wiki[1] to see if this solves the problem for you? Core24 is our latest officially maintained branch.

We are in the process of upstreaming the patches from that tree, so they soon should reach the mainline as well (probably on v4.11, but possibly also as fixes for 4.10-rc*).

[1] https://wireless.wiki.kernel.org/en/users/drivers/iwlwifi/core_release
Comment 18 Petr Bena 2017-01-22 22:34:40 UTC
I am compiling this now but it will need to wait until I connect laptop into docking station in my office to confirm whether it's fixed now
Comment 20 Luca Coelho 2017-01-26 05:50:38 UTC
Thanks.  Please let us know as soon as you have some (good?) news. :)
Comment 21 Petr Bena 2017-01-28 23:33:42 UTC
Sorry it's taking so long but I am having troubles with last kernels, 4.9.5 doesn't even load the firmware (no suitable firmware found) and 4.10-rc5 doesn't compile with my .config file with error:

security/apparmor/capability_names.h:41:1: error: missing terminating " character

which even seems to be like some error in source code... which makes me wonder howcome nobody noticed that?

When I disable apparmor entirely (I don't really need it) then it compiles, but right during boot it crashes with panic (even before it manages to load initramfs).

I will need to figure that out, once I manage to compile one of these kernels that support your last firmware I will test it.
Comment 22 Luca Coelho 2017-02-07 05:20:08 UTC
Could you try the Core24 release as I mentioned in comment 17? The new firmware we released (-27) is supported by that core, but will only be supported in v4.11, which is not out yet...
Comment 23 Petr Bena 2017-02-23 14:03:52 UTC
Hi,

I tried downloading 4.10.0 which boots unlike rc versions on my system, but it doesn't seem to be able to load that file:

petanb@localhost ~/Documents/linux $ ls -l /lib/firmware/iwlwifi-7265D-27.ucode
-rw-r--r-- 1 root root 1032452 Jan 22 23:26 /lib/firmware/iwlwifi-7265D-27.ucode
petanb@localhost ~/Documents/linux $ 
petanb@localhost ~/Documents/linux $ dmesg | grep iwl
[   13.566855] iwlwifi 0000:02:00.0: Direct firmware load for iwlwifi-7265D-26.ucode failed with error -2
[   13.566878] iwlwifi 0000:02:00.0: Direct firmware load for iwlwifi-7265D-25.ucode failed with error -2
[   13.566892] iwlwifi 0000:02:00.0: Direct firmware load for iwlwifi-7265D-24.ucode failed with error -2
[   13.566905] iwlwifi 0000:02:00.0: Direct firmware load for iwlwifi-7265D-23.ucode failed with error -2
[   13.566916] iwlwifi 0000:02:00.0: Direct firmware load for iwlwifi-7265D-22.ucode failed with error -2
[   13.566928] iwlwifi 0000:02:00.0: Direct firmware load for iwlwifi-7265D-21.ucode failed with error -2
[   13.566938] iwlwifi 0000:02:00.0: Direct firmware load for iwlwifi-7265D-20.ucode failed with error -2
[   13.566948] iwlwifi 0000:02:00.0: Direct firmware load for iwlwifi-7265D-19.ucode failed with error -2
[   13.566959] iwlwifi 0000:02:00.0: Direct firmware load for iwlwifi-7265D-18.ucode failed with error -2
[   13.566970] iwlwifi 0000:02:00.0: Direct firmware load for iwlwifi-7265D-17.ucode failed with error -2
[   13.566971] iwlwifi 0000:02:00.0: no suitable firmware found!

You said I need to try with 4.11 kernel, but where can I download it? This version is not even in git repository.
Comment 24 Petr Bena 2017-02-23 14:04:54 UTC
it seems that kernel 4.10.0 tried fw from 17 to 26 only. Right now I have 16 and 27 on my system
Comment 25 Luca Coelho 2017-03-18 19:18:09 UTC
As I said, the FW -27 only works with 4.11+.  It will *not* work with 4.10.  So, you could either update to 4.11-rc* or take our Core24 backport release and try it with -27.
Comment 26 Luca Coelho 2017-04-10 06:05:20 UTC
Ping? Petr, did you have the chance to try this with Core24 or 4.11-rc*?
Comment 27 Petr Bena 2017-04-11 09:27:46 UTC
I am now downloading 4.11-rc6 and I will try that
Comment 28 Petr Bena 2017-04-15 13:38:08 UTC
I have bad and good news.

Your bug with wi-fi is indeed solved with this patch, so we can close this ticket.

The bad one is that my trackpoint stopped working with this kernel version, so now I have to decide between wi-fi and trackpoint...

I am using linux for about 15 years and I still hope that one day there is going to be a kernel that would support 100% of my hardware, but it's still a long journey I guess.
Comment 29 Luca Coelho 2017-04-15 15:30:04 UTC
Good to hear that WiFi works for you now.  Hopefully a new version of 4.11 will fix your trackpoint problem.

Regarding the WiFi part, we usually mark the bugfixes we make in newer kernels with a "Fixes" tag, so they usually eventually get to the stable kernel releases.

Note You need to log in before you can comment on or make changes to this bug.