Wifi card vanishing from the PCIe bus? Stop rebooting, make it self-heal
On a Toshiba CB35-3340 (Bay Trail Chromebook running MX Linux / Debian 13 on MrChromebox
firmware), the internal Intel Wireless 7260 disappears every few hours. The SSID list goes
empty, every scan fails with -EIO, and toggling wifi does nothing. Only a reboot brought
it back.
The giveaway is in the kernel log:
iwlwifi 0000:01:00.0: iwlwifi device memory mapped registers:
iwlwifi 0000:01:00.0: 00000000: ffffffff ffffffff ffffffff ffffffff
WARNING: ... __iwl_trans_pcie_grab_nic_access+0x14c/0x150 [iwlwifi]
iwlwifi 0000:01:00.0: Error sending STATISTICS_CMD: enqueue_hcmd failed: -5
MMIO reads returning all-ones means the device is off the bus, not merely confused.
That is why modprobe -r iwlwifi && modprobe iwlwifi fails with
Could not load the [0] uCode section — there is nothing there to load firmware into.
Two things fix the recovery path. First, let the driver admit the device is gone:
…more