Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 1 Apr 2022 14:34:16 +0300
From:      Oleksandr Kryvulia <shuriku@shurik.kiev.ua>
To:        wireless@freebsd.org
Subject:   Re: iwlwifi failed to attach
Message-ID:  <2c64cf74-ec67-5e6d-e36d-df1bb2c5a402@shurik.kiev.ua>
In-Reply-To: <alpine.BSF.2.00.2204010044480.68830@ai.fobar.qr>
References:  <85f3cdd5-9bcc-426b-55e8-f3964de87c52@shurik.kiev.ua> <alpine.BSF.2.00.2203291300170.68830@ai.fobar.qr> <87e39641-f6c2-3306-e89d-fe6ba5a8ff39@shurik.kiev.ua> <alpine.BSF.2.00.2203291324050.68830@ai.fobar.qr> <89fa7191-30aa-e550-0e5d-d061c985c5ab@shurik.kiev.ua> <alpine.BSF.2.00.2204010044480.68830@ai.fobar.qr>

next in thread | previous in thread | raw e-mail | index | archive | help
01.04.22 03:59, Bjoern A. Zeeb пишет:
> On Tue, 29 Mar 2022, Oleksandr Kryvulia wrote:
>
>>> iwm(4) is likely compiled into the kernel... forgive me.  You can 
>>> proabbly
>>> try
>>> hint.iwm.disabled="1"
>>> or
>>> hint.iwm.0.disabled="1"
>>>
>>> in loader.conf and see if that helps or compile a kernel without iwm
>>> and iwmfw to test.
>> Ok, boot with iwm disabled:
>>
>> root@thinkpad:/ # kldstat -v | grep -e 'iw[ml]'
>> 26    1 0xffffffff83b3f000    88070 if_iwlwifi.ko 
>> (/boot/kernel/if_iwlwifi.ko)
>>                526 pci/lkpi_iwl_hw_card_ids
>>
>> pciconf -lBbcevV:
>
> what's the reason iwlwifi did not auto-attach if iwm is not avail?
>
>> none3@pci0:0:20:3:      class=0x028000 rev=0x30 hdr=0x00 
>> vendor=0x8086 device=0x9df0 subvendor=0x8086 subdevice=0x0034
>>    vendor     = 'Intel Corporation'
>>    device     = 'Cannon Point-LP CNVi [Wireless-AC]'
>>    class      = network
>>    bar   [10] = type Memory, range 64, base 0xdd638000, size 16384, 
>> disabled
>
> why is the bar disabled?  That should not be the case I believe on a
> normal FreeBSD boot.  Even if no driver is attached or supported
> pci(4) will still enable resources on boot.
I have hw.pci.do_power_nodriver=3 in loader.conf, but changing it to 0 
make no difference.
>
>
>>    cap 01[c8] = powerspec 3  supports D0 D3  current D3
>>    cap 05[d0] = MSI supports 1 message, 64 bit
>>    cap 10[40] = PCI-Express 2 root endpoint max data 128(128) FLR RO NS
>>                 max read 128
>>    cap 11[80] = MSI-X supports 16 messages
>>                 Table in map 0x10[0x2000], PBA in map 0x10[0x3000]
>>    ecap 0000[100] = unknown 0
>>    ecap 0018[14c] = LTR 1
>>    ecap 000b[164] = Vendor [1] ID 0010 Rev 0 Length 20
>>
>> Attach iwlwifi:
>>
>> root@thinkpad:/ # devctl set driver pci0:0:20:3 iwlwifi
>> devctl: Failed to set pci0:0:20:3 driver to iwlwifi: Input/output error
>>
>> dmesg -a:
>>
>> iwlwifi0: <iwlwifi> mem 0xdd638000-0xdd63bfff at device 20.3 on pci0
>> iwlwifi0: HW_REV=0xFFFFFFFF, PCI issues?
>> device_attach: iwlwifi0 attach returned 5
>
> That's EIO from the failure in iwl_trans_pcie_alloc().
>
> Sorry, I think I have to roll this back.
>
> I assume you are on GENERIC?
Yes, GENERIC-NODEBUG.
>
> I assume iwm(4) normally is loaded as a module along with firmware
> and works fine?
Yes, iwm(4) works fine, I'm sending this message over it.
>
> Ignoring the above hint.iwm... if you move if_iwm.ko out of
> /boot/kernel temporary and run kldxref /boot/kernel and reboot
> on a recent main or stable/13, what happens without you doing any
> devctl?  Is iwlfiwi auto-loaded?  does pciconf show the BAR enabled
> then?

# mv /boot/kernel/if_iwm.ko /home/o.kryvulia/
# kldxref /boot/kernel
# shutdown -p now

Power on and boot:

Autoloading module: if_iwlwifi
Intel(R) Wireless WiFi based driver for FreeBSD
Autoloading module: ig4
Autoloading module: pchtherm
pchtherm0: <CannonLake-LP Thermal Subsystem> mem 0xdd643000-0xdd643fff 
at device 18.0 on pci0
iwlwifi0: <iwlwifi> mem 0xdd638000-0xdd63bfff at device 20.3 on pci0
iwlwifi0: HW_REV=0xFFFFFFFF, PCI issues?
device_attach: iwlwifi0 attach returned 5

pciconf shows the same:

none3@pci0:0:20:3:      class=0x028000 rev=0x30 hdr=0x00 vendor=0x8086 
device=0x9df0 subvendor=0x8086 subdevice=0x0034
    vendor     = 'Intel Corporation'
    device     = 'Cannon Point-LP CNVi [Wireless-AC]'
    class      = network
    bar   [10] = type Memory, range 64, base 0xdd638000, size 16384, 
disabled
    cap 01[c8] = powerspec 3  supports D0 D3  current D3
    cap 05[d0] = MSI supports 1 message, 64 bit
    cap 10[40] = PCI-Express 2 root endpoint max data 128(128) FLR RO NS
                 max read 128
    cap 11[80] = MSI-X supports 16 messages
                 Table in map 0x10[0x2000], PBA in map 0x10[0x3000]
    ecap 0000[100] = unknown 0
    ecap 0018[14c] = LTR 1
    ecap 000b[164] = Vendor [1] ID 0010 Rev 0 Length 20



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?2c64cf74-ec67-5e6d-e36d-df1bb2c5a402>