Date: Sun, 20 Jan 2019 15:06:18 +0800 From: Wen-Chun KUO <blockk2000@gmail.com> To: freebsd-wireless@freebsd.org Subject: failed to initialize Intel 9560 wifi driver Message-ID: <CAFotSmimcu06CfUztxZhaXCW3B2V09-3Unzfv_wPvuXGCqCiEg@mail.gmail.com>
next in thread | raw e-mail | index | archive | help
lwhsu and I are trying to add intel 9560 to iwm(4), the preliminary patch adds 9000 series firmware module and skeleton is here: See the raw diff file : https://gist.github.com/lwhsu/ d741b6d5aad582375b1c469753d28c14#file-iwm-9560-diff But, the driver seems not working. The first error message we saw is: `api flags index 1 larger than supported by driver` We thought that is just a version problem so we bumped the version to avoid to hit the case. Still, there are other error messages: ``` iwm0: <Intel(R) Dual Band Wireless AC 9560> mem 0x604c110000-0x604c113fff at device 20.3 on pci0 iwm0: timeout waiting for clock stabilization iwm0: apm init error 60 iwm0: could not initialize hardware ``` Tracing the code, it means the driver doesn's receive interrupts to set "wait_entry->triggered = 1", so the driver fails due to time out. We checked IRQ and found the IRQ information does not display "iwm0" Intel 9560: % vmstat -i interrupt total rate irq9: acpi0 1 0 cpu0:timer 3314518 12 cpu1:timer 1617788 6 cpu2:timer 1560000 6 cpu3:timer 1539914 6 cpu4:timer 1560190 6 cpu5:timer 1548846 6 cpu6:timer 1602733 6 cpu7:timer 1693147 6 irq128: xhci0 91387 0 irq129: ahci0 306623 1 irq133: hdac0 36 0 irq134: em0:irq0 557434 2 Total 15392617 5 Comparing to Intel 8265 (good example): > vmstat -i interrupt total rate irq1: atkbd0 49983 2 irq9: acpi0 50686 2 irq12: psm0 227864 11 irq16: vgapci0 743067 36 cpu0:timer 2052123 101 cpu1:timer 1431203 70 cpu2:timer 1482806 73 cpu3:timer 1450326 71 cpu4:timer 1493074 73 cpu5:timer 1451673 71 cpu6:timer 1548006 76 cpu7:timer 1439006 71 irq128: xhci0 37743 2 irq129: iwm0 451303 22 <---- successfully registered irq130: nvme0 44 0 irq131: nvme0 130357 6 irq132: nvme0 125464 6 irq133: nvme0 128783 6 irq134: nvme0 124244 6 irq135: nvme0 129532 6 irq136: nvme0 126176 6 irq137: nvme0 130928 6 irq138: nvme0 127506 6 irq143: hdac0 17308 1 irq144: em0:irq0 49017 2 Total 14998222 735 Some items we want to clear first 1. We suspect the problem is related to the IRQ that not properly shared between PCI driver and Intel wireless driver However, it works in Intel wireless 8265 with similar code. This idea is still questionable. 2. The Intel wireless contains 2 kernel modules: "iwm9000fw" and "iwm". "iwm9000fw" is a binary release from Intel and "iwm" is an interface driver, which registers the IRQ. We are not sure how they co-work. Maybe the binary iwm9080fw is not correctly installed so the interrupt handler is not triggered? (The weird thing is the IRQ registering doesn't complain, but the IRQ information doesn't show the driver) Another question is, if 2 drivers share an IRQ, what would "vmstat -i" look like? These drivers would use the same IRQ value? 3. We are looking at the difference between 8000 and 9000 firmware initialization in Linux. We also curious about the precedence in "irq register" and "firmware"
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAFotSmimcu06CfUztxZhaXCW3B2V09-3Unzfv_wPvuXGCqCiEg>