From nobody Tue Mar 29 14:14:28 2022 X-Original-To: wireless@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 82AC81A43197 for ; Tue, 29 Mar 2022 14:14:32 +0000 (UTC) (envelope-from shuriku@shurik.kiev.ua) Received: from mail.flex-it.com.ua (mail.flex-it.com.ua [193.239.74.7]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4KSWlq67BXz3KKh for ; Tue, 29 Mar 2022 14:14:31 +0000 (UTC) (envelope-from shuriku@shurik.kiev.ua) Received: from [93.183.208.50] (helo=[192.168.200.124]) by mail.flex-it.com.ua with esmtpsa (TLS1.3) tls TLS_AES_128_GCM_SHA256 (Exim 4.95 (FreeBSD)) (envelope-from ) id 1nZCc8-000EW1-Mf; Tue, 29 Mar 2022 17:14:28 +0300 Content-Type: multipart/alternative; boundary="------------W0bIiv5QWS6zU4iCGfTHcrJw" Message-ID: <89fa7191-30aa-e550-0e5d-d061c985c5ab@shurik.kiev.ua> Date: Tue, 29 Mar 2022 17:14:28 +0300 List-Id: Discussions List-Archive: https://lists.freebsd.org/archives/freebsd-wireless List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-wireless@freebsd.org X-BeenThere: freebsd-wireless@freebsd.org MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:91.0) Gecko/20100101 Thunderbird/91.7.0 From: Oleksandr Kryvulia Subject: Re: iwlwifi failed to attach To: "Bjoern A. Zeeb" Cc: wireless@freebsd.org References: <85f3cdd5-9bcc-426b-55e8-f3964de87c52@shurik.kiev.ua> <87e39641-f6c2-3306-e89d-fe6ba5a8ff39@shurik.kiev.ua> Content-Language: ru In-Reply-To: X-Rspamd-Queue-Id: 4KSWlq67BXz3KKh X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of shuriku@shurik.kiev.ua designates 193.239.74.7 as permitted sender) smtp.mailfrom=shuriku@shurik.kiev.ua X-Spamd-Result: default: False [-3.30 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+mx:c]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; DMARC_NA(0.00)[shurik.kiev.ua]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; TO_MATCH_ENVRCPT_SOME(0.00)[]; NEURAL_HAM_SHORT(-1.00)[-1.000]; RCPT_COUNT_TWO(0.00)[2]; MLMMJ_DEST(0.00)[wireless]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; ASN(0.00)[asn:35297, ipnet:193.239.72.0/22, country:UA]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[] X-ThisMailContainsUnwantedMimeParts: N This is a multi-part message in MIME format. --------------W0bIiv5QWS6zU4iCGfTHcrJw Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit 29.03.22 16:31, Bjoern A. Zeeb пишет: > On Tue, 29 Mar 2022, Oleksandr Kryvulia wrote: > >> 29.03.22 16:02, Bjoern A. Zeeb пишет: >>> On Tue, 29 Mar 2022, Oleksandr Kryvulia wrote: >>> >>>> When attaching iwlwifi module according to [1] on CURRENT >>>> (main-n253905-31e076d70b5-dirty >>>> ) I get an error: >>>> >>>> Mar 29 15:10:31 thinkpad kernel: iwlwifi0: mem >>>> 0xdd638000-0xdd63bfff at device 20.3 on pci0 >>>> Mar 29 15:10:31 thinkpad kernel: iwlwifi0: HW_REV=0xFFFFFFFF, PCI >>>> issues? >>>> Mar 29 15:10:31 thinkpad kernel: device_attach: iwlwifi0 attach >>>> returned 5 >>> >>> Can you show a full pciconf -lBbcevV  of the device at this point? >> iwm0@pci0:0:20:3:       class=0x028000 rev=0x30 hdr=0x00 >> vendor=0x8086 device=0x9df0 subvendor=0x8086 subdevice=0x0034 > > That has iwm0 attached again.  Something else is going wrong then. > > >>    vendor     = 'Intel Corporation' >>    device     = 'Cannon Point-LP CNVi [Wireless-AC]' >>    class      = network >>    bar   [10] = type Memory, range 64, base 0xdd638000, size 16384, >> enabled >>    cap 01[c8] = powerspec 3  supports D0 D3  current D0 >>    cap 05[d0] = MSI supports 1 message, 64 bit enabled with 1 message >>    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 >> >> >>> >>> >>> Alternatively to try: >>> >>> What happens if you add if_iwm to devmatch_blocklist="" in rc.conf and >>> boot;  does iwlwifi attach fine then automatically during multi-user >>> boot >>> time? >>> >> Same error. I tried to remove if_iwm.ko from /boot/kernel and boot )) > > 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: 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 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: mem 0xdd638000-0xdd63bfff at device 20.3 on pci0 iwlwifi0: HW_REV=0xFFFFFFFF, PCI issues? device_attach: iwlwifi0 attach returned 5 --------------W0bIiv5QWS6zU4iCGfTHcrJw Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit 29.03.22 16:31, Bjoern A. Zeeb пишет:
On Tue, 29 Mar 2022, Oleksandr Kryvulia wrote:

29.03.22 16:02, Bjoern A. Zeeb пишет:
On Tue, 29 Mar 2022, Oleksandr Kryvulia wrote:

When attaching iwlwifi module according to [1] on CURRENT (main-n253905-31e076d70b5-dirty
) I get an error:

Mar 29 15:10:31 thinkpad kernel: iwlwifi0: <iwlwifi> mem 0xdd638000-0xdd63bfff at device 20.3 on pci0
Mar 29 15:10:31 thinkpad kernel: iwlwifi0: HW_REV=0xFFFFFFFF, PCI issues?
Mar 29 15:10:31 thinkpad kernel: device_attach: iwlwifi0 attach returned 5

Can you show a full pciconf -lBbcevV  of the device at this point?
iwm0@pci0:0:20:3:       class=0x028000 rev=0x30 hdr=0x00 vendor=0x8086 device=0x9df0 subvendor=0x8086 subdevice=0x0034

That has iwm0 attached again.  Something else is going wrong then.


   vendor     = 'Intel Corporation'
   device     = 'Cannon Point-LP CNVi [Wireless-AC]'
   class      = network
   bar   [10] = type Memory, range 64, base 0xdd638000, size 16384, enabled
   cap 01[c8] = powerspec 3  supports D0 D3  current D0
   cap 05[d0] = MSI supports 1 message, 64 bit enabled with 1 message
   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




Alternatively to try:

What happens if you add if_iwm to devmatch_blocklist="" in rc.conf and
boot;  does iwlwifi attach fine then automatically during multi-user boot
time?

Same error. I tried to remove if_iwm.ko from /boot/kernel and boot ))

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:

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

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


--------------W0bIiv5QWS6zU4iCGfTHcrJw--