Re: AX211 wifi firmware load issue

2023-12-29 Thread Miguel Landaeta
On Fri, Nov 24, 2023 at 03:57:04PM +, Stefan Sperling wrote:
> 
> Anyway, the best way to figure out which firmware is needed is to run
> a version of the Linux driver that supports your device.
> If your Linux distro is not bleeding-edge enough, try building the driver
> from the backport-iwlwifi repository which is generally newer than mainline
> Linux:
> https://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/backport-iwlwifi.git/
> 

I have the same hardware and I got this device working with a
small change that I posted in 
https://marc.info/?l=openbsd-tech=170387720918314=2



Re: AX211 wifi firmware load issue

2023-11-24 Thread Stefan Sperling
On Thu, Nov 23, 2023 at 08:26:32PM +, Stuart Henderson wrote:
> On 2023/11/23 19:38, Stefan Sperling wrote:
> > It is possible that our driver is trying to use an incompatible
> > firmware image on this particular device. Which firmware file name
> > is loaded by the iwlwifi driver on a recent Linux distribution?
> > Are we loading the same one?
> 
> Seems the first liveusb image that I picked up (Debian 12.2.0) isn't
> bleeding edge enough. Apparently it is actually an AX101.

Unfortunately, product names like AX101 don't mean anything in terms of
mapping a firmware image to a device. This is the collection of variables
used in the device lookup table:

struct iwx_dev_info {
uint16_t device;
uint16_t subdevice;
uint16_t mac_type;
uint16_t rf_type;
uint8_t mac_step;
uint8_t rf_id;
uint8_t no_160;
uint8_t cores;
uint8_t cdb;
uint8_t jacket;
const struct iwx_device_cfg *cfg;
};

Given all this info, a partial or complete match will eventually
result in a decision about which firmware image to load.
I suppose you can now see why it is easy to miscategorize a device
by accident. I don't know why Intel is doing it this way. Perhaps
they are running out of PCI product IDs.

Anyway, the best way to figure out which firmware is needed is to run
a version of the Linux driver that supports your device.
If your Linux distro is not bleeding-edge enough, try building the driver
from the backport-iwlwifi repository which is generally newer than mainline
Linux:
https://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/backport-iwlwifi.git/

If the device is very new it is possible that further driver-side changes
will be required to get it to work.



Re: AX211 wifi firmware load issue

2023-11-23 Thread Stuart Henderson
On 2023/11/23 19:38, Stefan Sperling wrote:
> It is possible that our driver is trying to use an incompatible
> firmware image on this particular device. Which firmware file name
> is loaded by the iwlwifi driver on a recent Linux distribution?
> Are we loading the same one?

Seems the first liveusb image that I picked up (Debian 12.2.0) isn't
bleeding edge enough. Apparently it is actually an AX101.



Re: AX211 wifi firmware load issue

2023-11-23 Thread Stefan Sperling
On Thu, Nov 23, 2023 at 12:46:24PM +, Stuart Henderson wrote:
> and here are kernel messages with IWX_DEBUG defined
> 
> iwx0: L1 Disabled - LTR Enabled
> iwx0: ucode type 0 section 0
> iwx0: ucode type 0 section 1
> iwx0: ucode type 0 section 2
> iwx0: ucode type 0 section 3
> iwx0: ucode type 0 section 4
> iwx0: ucode type 0 section 5
> iwx0: ucode type 0 section 6
> iwx0: ucode type 0 section 7
> iwx0: ucode type 0 section 8
> iwx0: ucode type 0 section 9
> iwx0: ucode type 0 section 10
> iwx0: ucode type 0 section 11
> iwx0: ucode type 0 section 12
> iwx0: ucode type 0 section 13
> iwx0: ucode type 0 section 14
> iwx0: ucode type 0 section 15
> iwx0: ucode type 0 section 16
> iwx0: ucode type 0 section 17
> iwx0: ucode type 0 section 18
> iwx0: ucode type 0 section 19
> iwx0: ucode type 0 section 20
> iwx0: ucode type 0 section 21
> iwx0: ucode type 0 section 22
> iwx0: ucode type 0 section 23
> iwx0: ucode type 0 section 24
> iwx0: ucode type 0 section 25
> iwx0: ucode type 0 section 26
> iwx0: ucode type 0 section 27
> iwx0: ucode type 0 section 28
> iwx0: ucode type 0 section 29
> iwx0: ucode type 0 section 30
> iwx0: ucode type 0 section 31
> iwx0: ucode type 0 section 32
> iwx0: ucode type 0 section 33
> iwx0: ucode type 0 section 34
> iwx0: ucode type 0 section 35
> iwx0: ucode type 0 section 36
> iwx0: ucode type 0 section 37
> iwx0: ucode type 0 section 38
> iwx0: ucode type 0 section 39
> iwx0: ucode type 0 section 40
> iwx0: ucode type 0 section 41
> iwx0: ucode type 0 section 42
> iwx0: ucode type 0 section 43
> iwx0: ucode type 0 section 44
> iwx0: ucode type 0 section 45
> iwx0: ucode type 0 section 46
> iwx0: ucode type 0 section 47
> iwx0: ucode type 0 section 48
> iwx0: ucode type 0 section 49
> iwx0: ucode type 0 section 50
> iwx0: ucode type 0 section 51
> iwx0: ucode type 0 section 52
> iwx0: ucode type 0 section 53
> iwx0: ucode type 0 section 54
> iwx0: ucode type 0 section 55
> iwx0: ucode type 0 section 56
> iwx0: L1 Disabled - LTR Enabled
> iwx_init_fw_sec: firmware LMAC section 0 at 0x40335000 size 1656
> iwx_init_fw_sec: firmware LMAC section 1 at 0x40777000 size 32768
> iwx_init_fw_sec: firmware LMAC section 2 at 0x4077f000 size 32768
> iwx_init_fw_sec: firmware LMAC section 3 at 0x40787000 size 32768
> iwx_init_fw_sec: firmware LMAC section 4 at 0x4078f000 size 32760
> iwx_init_fw_sec: firmware LMAC section 5 at 0x40797000 size 32768
> iwx_init_fw_sec: firmware LMAC section 6 at 0x4079f000 size 32768
> iwx_init_fw_sec: firmware LMAC section 7 at 0x407a7000 size 32768
> iwx_init_fw_sec: firmware LMAC section 8 at 0x407af000 size 32768
> iwx_init_fw_sec: firmware LMAC section 9 at 0x407b7000 size 32768
> iwx_init_fw_sec: firmware LMAC section 10 at 0x407bf000 size 32768
> iwx_init_fw_sec: firmware LMAC section 11 at 0x407c7000 size 32768
> iwx_init_fw_sec: firmware LMAC section 12 at 0x407cf000 size 32768
> iwx_init_fw_sec: firmware LMAC section 13 at 0x40334000 size 560
> iwx_init_fw_sec: firmware LMAC section 14 at 0x407d7000 size 21696
> iwx_init_fw_sec: firmware UMAC section 0 at 0x40333000 size 1656
> iwx_init_fw_sec: firmware UMAC section 1 at 0x407dd000 size 32768
> iwx_init_fw_sec: firmware UMAC section 2 at 0x407e5000 size 32768
> iwx_init_fw_sec: firmware UMAC section 3 at 0x407ed000 size 32768
> iwx_init_fw_sec: firmware UMAC section 4 at 0x407f5000 size 32768
> iwx_init_fw_sec: firmware UMAC section 5 at 0x407fd000 size 32768
> iwx_init_fw_sec: firmware UMAC section 6 at 0x40805000 size 32768
> iwx_init_fw_sec: firmware UMAC section 7 at 0x4080d000 size 32768
> iwx_init_fw_sec: firmware UMAC section 8 at 0x40815000 size 32768
> iwx_init_fw_sec: firmware UMAC section 9 at 0x4081d000 size 32768
> iwx_init_fw_sec: firmware UMAC section 10 at 0x40825000 size 32768
> iwx_init_fw_sec: firmware UMAC section 11 at 0x4082d000 size 32768
> iwx_init_fw_sec: firmware UMAC section 12 at 0x40835000 size 32768
> iwx_init_fw_sec: firmware UMAC section 13 at 0x4083d000 size 14408
> iwx_init_fw_sec: firmware UMAC section 14 at 0x40841000 size 4616
> iwx_init_fw_sec: firmware UMAC section 15 at 0x40843000 size 24756
> iwx_init_fw_sec: firmware paging section 0 at 0x40332000 size 1656
> iwx_init_fw_sec: firmware paging section 1 at 0x4084a000 size 32768
> iwx_init_fw_sec: firmware paging section 2 at 0x40852000 size 32768
> iwx_init_fw_sec: firmware paging section 3 at 0x4085a000 size 32768
> iwx_init_fw_sec: firmware paging section 4 at 0x40862000 size 32768
> iwx_init_fw_sec: firmware paging section 5 at 0x4086a000 size 32768
> iwx_init_fw_sec: firmware paging section 6 at 0x40872000 size 32768
> iwx_init_fw_sec: firmware paging section 7 at 0x4087a000 size 32768
> iwx_init_fw_sec: firmware paging section 8 at 0x40882000 size 32768
> iwx_init_fw_sec: firmware paging section 9 at 0x4088a000 size 32768
> iwx_init_fw_sec: firmware paging section 10 at 0x40892000 size 32768
> iwx_init_fw_sec: firmware paging section 11 at 0x4089a000 size 32768
> iwx_init_fw_sec: firmware paging 

Re: AX211 wifi firmware load issue

2023-11-23 Thread Stuart Henderson
and here are kernel messages with IWX_DEBUG defined

iwx0: L1 Disabled - LTR Enabled
iwx0: ucode type 0 section 0
iwx0: ucode type 0 section 1
iwx0: ucode type 0 section 2
iwx0: ucode type 0 section 3
iwx0: ucode type 0 section 4
iwx0: ucode type 0 section 5
iwx0: ucode type 0 section 6
iwx0: ucode type 0 section 7
iwx0: ucode type 0 section 8
iwx0: ucode type 0 section 9
iwx0: ucode type 0 section 10
iwx0: ucode type 0 section 11
iwx0: ucode type 0 section 12
iwx0: ucode type 0 section 13
iwx0: ucode type 0 section 14
iwx0: ucode type 0 section 15
iwx0: ucode type 0 section 16
iwx0: ucode type 0 section 17
iwx0: ucode type 0 section 18
iwx0: ucode type 0 section 19
iwx0: ucode type 0 section 20
iwx0: ucode type 0 section 21
iwx0: ucode type 0 section 22
iwx0: ucode type 0 section 23
iwx0: ucode type 0 section 24
iwx0: ucode type 0 section 25
iwx0: ucode type 0 section 26
iwx0: ucode type 0 section 27
iwx0: ucode type 0 section 28
iwx0: ucode type 0 section 29
iwx0: ucode type 0 section 30
iwx0: ucode type 0 section 31
iwx0: ucode type 0 section 32
iwx0: ucode type 0 section 33
iwx0: ucode type 0 section 34
iwx0: ucode type 0 section 35
iwx0: ucode type 0 section 36
iwx0: ucode type 0 section 37
iwx0: ucode type 0 section 38
iwx0: ucode type 0 section 39
iwx0: ucode type 0 section 40
iwx0: ucode type 0 section 41
iwx0: ucode type 0 section 42
iwx0: ucode type 0 section 43
iwx0: ucode type 0 section 44
iwx0: ucode type 0 section 45
iwx0: ucode type 0 section 46
iwx0: ucode type 0 section 47
iwx0: ucode type 0 section 48
iwx0: ucode type 0 section 49
iwx0: ucode type 0 section 50
iwx0: ucode type 0 section 51
iwx0: ucode type 0 section 52
iwx0: ucode type 0 section 53
iwx0: ucode type 0 section 54
iwx0: ucode type 0 section 55
iwx0: ucode type 0 section 56
iwx0: L1 Disabled - LTR Enabled
iwx_init_fw_sec: firmware LMAC section 0 at 0x40335000 size 1656
iwx_init_fw_sec: firmware LMAC section 1 at 0x40777000 size 32768
iwx_init_fw_sec: firmware LMAC section 2 at 0x4077f000 size 32768
iwx_init_fw_sec: firmware LMAC section 3 at 0x40787000 size 32768
iwx_init_fw_sec: firmware LMAC section 4 at 0x4078f000 size 32760
iwx_init_fw_sec: firmware LMAC section 5 at 0x40797000 size 32768
iwx_init_fw_sec: firmware LMAC section 6 at 0x4079f000 size 32768
iwx_init_fw_sec: firmware LMAC section 7 at 0x407a7000 size 32768
iwx_init_fw_sec: firmware LMAC section 8 at 0x407af000 size 32768
iwx_init_fw_sec: firmware LMAC section 9 at 0x407b7000 size 32768
iwx_init_fw_sec: firmware LMAC section 10 at 0x407bf000 size 32768
iwx_init_fw_sec: firmware LMAC section 11 at 0x407c7000 size 32768
iwx_init_fw_sec: firmware LMAC section 12 at 0x407cf000 size 32768
iwx_init_fw_sec: firmware LMAC section 13 at 0x40334000 size 560
iwx_init_fw_sec: firmware LMAC section 14 at 0x407d7000 size 21696
iwx_init_fw_sec: firmware UMAC section 0 at 0x40333000 size 1656
iwx_init_fw_sec: firmware UMAC section 1 at 0x407dd000 size 32768
iwx_init_fw_sec: firmware UMAC section 2 at 0x407e5000 size 32768
iwx_init_fw_sec: firmware UMAC section 3 at 0x407ed000 size 32768
iwx_init_fw_sec: firmware UMAC section 4 at 0x407f5000 size 32768
iwx_init_fw_sec: firmware UMAC section 5 at 0x407fd000 size 32768
iwx_init_fw_sec: firmware UMAC section 6 at 0x40805000 size 32768
iwx_init_fw_sec: firmware UMAC section 7 at 0x4080d000 size 32768
iwx_init_fw_sec: firmware UMAC section 8 at 0x40815000 size 32768
iwx_init_fw_sec: firmware UMAC section 9 at 0x4081d000 size 32768
iwx_init_fw_sec: firmware UMAC section 10 at 0x40825000 size 32768
iwx_init_fw_sec: firmware UMAC section 11 at 0x4082d000 size 32768
iwx_init_fw_sec: firmware UMAC section 12 at 0x40835000 size 32768
iwx_init_fw_sec: firmware UMAC section 13 at 0x4083d000 size 14408
iwx_init_fw_sec: firmware UMAC section 14 at 0x40841000 size 4616
iwx_init_fw_sec: firmware UMAC section 15 at 0x40843000 size 24756
iwx_init_fw_sec: firmware paging section 0 at 0x40332000 size 1656
iwx_init_fw_sec: firmware paging section 1 at 0x4084a000 size 32768
iwx_init_fw_sec: firmware paging section 2 at 0x40852000 size 32768
iwx_init_fw_sec: firmware paging section 3 at 0x4085a000 size 32768
iwx_init_fw_sec: firmware paging section 4 at 0x40862000 size 32768
iwx_init_fw_sec: firmware paging section 5 at 0x4086a000 size 32768
iwx_init_fw_sec: firmware paging section 6 at 0x40872000 size 32768
iwx_init_fw_sec: firmware paging section 7 at 0x4087a000 size 32768
iwx_init_fw_sec: firmware paging section 8 at 0x40882000 size 32768
iwx_init_fw_sec: firmware paging section 9 at 0x4088a000 size 32768
iwx_init_fw_sec: firmware paging section 10 at 0x40892000 size 32768
iwx_init_fw_sec: firmware paging section 11 at 0x4089a000 size 32768
iwx_init_fw_sec: firmware paging section 12 at 0x408a2000 size 32768
iwx_init_fw_sec: firmware paging section 13 at 0x408aa000 size 32768
iwx_init_fw_sec: firmware paging section 14 at 0x408b2000 size 32768
iwx_init_fw_sec: firmware paging section 15 at 0x408ba000 size 32768
iwx_init_fw_sec: firmware paging 

Re: AX211 wifi firmware load issue

2023-11-23 Thread Jonathan Gray
On Thu, Nov 23, 2023 at 11:20:27AM +, Stuart Henderson wrote:
> On 2023/11/22 19:37, Gireesh wrote:
> > blinkopenbsd$ dmesg | grep iwx0
> > iwx0 at pci0 dev 20 function 3 "Intel Wi-Fi 6 AX211" rev 0x00, msix
> > iwx0: could not load firmware, 35
> > iwx0: failed to load init firmware
> > 
> > pcidump -v
> > 
> > 0:20:3: Intel Wi-Fi 6 AX211
> [..snip..]
> > 0x0164: Enhanced Capability 0x0b: Vendor-Specific
> > 0x0080: Capability 0x11: Extended Message Signalled Interrupts (MSI-X)
> > Enabled: yes; table size 16 (BAR 0:8192)
> > 
> > Computer in question
> > 
> > https://www.amazon.com/Beelink-Desktop-Computer-Support-Ethernet/dp/B0BVLS7ZHP
> 
> You really should include all the information when reporting a problem
> rather than just the bits which you think might be useful.
> 
> As luck would have it, I have one of those machines. Here's a real dmesg
> and full pcidump/acpidump as generated by sendbug -P.

Diff to add and match on some of those.  Based on tables in:

Intel Processor and Intel Core i3 N-Series
Datasheet, Volume 1 of 2, Doc. No.: 759603, Rev.: 001

Index: sys/dev/pci/pcidevs
===
RCS file: /cvs/src/sys/dev/pci/pcidevs,v
diff -u -p -r1.2054 pcidevs
--- sys/dev/pci/pcidevs 23 Nov 2023 05:08:56 -  1.2054
+++ sys/dev/pci/pcidevs 23 Nov 2023 12:38:17 -
@@ -5602,8 +5602,11 @@ product INTEL ADL_U9_HB_20x460a  Core 12
 product INTEL ADL_S_PCIE_1 0x460d  Core 12G PCIE
 product INTEL ADL_XDCI 0x460e  Core 12G xDCI
 product INTEL ADL_S_HB_6   0x4610  Core 12G Host
+product INTEL ADL_N_HB_1   0x4617  ADL-N Host
 product INTEL ADL_U15_HB_2 0x4619  Core 12G Host
 product INTEL ADL_U9_HB_3  0x461a  Core 12G Host
+product INTEL ADL_N_HB_2   0x461b  N200 Host
+product INTEL ADL_N_HB_3   0x461c  N100 Host
 product INTEL ADL_S_DTT0x461d  Core 12G DTT
 product INTEL ADL_XHCI 0x461e  Core 12G xHCI
 product INTEL ADL_TBT_PCIE30x461f  Core 12G PCIE
@@ -5896,7 +5899,48 @@ product INTEL 600SERIES_LP_ISH   0x51fc  60
 product INTEL 600SERIES_LP_UFS 0x51ff  600 Series UFS
 product INTEL 80960RD  0x5200  i960 RD
 product INTEL PRO_100_SERVER   0x5201  PRO 100 Server
+product INTEL ADL_N_ESPI   0x5481  ADL-N eSPI
+product INTEL ADL_N_P2SB   0x54a0  ADL-N P2SB
+product INTEL ADL_N_PMC0x54a1  ADL-N PMC
+product INTEL ADL_N_SMB0x54a3  ADL-N SMBus
+product INTEL ADL_N_SPI0x54a4  ADL-N SPI
+product INTEL ADL_N_TH 0x54a6  ADL-N TH
+product INTEL ADL_N_UART_0 0x54a8  ADL-N UART
+product INTEL ADL_N_UART_1 0x54a9  ADL-N UART
+product INTEL ADL_N_GSPI_0 0x54aa  ADL-N GSPI
+product INTEL ADL_N_GSPI_1 0x54ab  ADL-N GSPI
+product INTEL ADL_N_PCIE_9 0x54b0  ADL-N PCIE
+product INTEL ADL_N_PCIE_100x54b1  ADL-N PCIE
+product INTEL ADL_N_PCIE_110x54b2  ADL-N PCIE
+product INTEL ADL_N_PCIE_120x54b3  ADL-N PCIE
+product INTEL ADL_N_PCIE_1 0x54b8  ADL-N PCIE
+product INTEL ADL_N_PCIE_2 0x54b9  ADL-N PCIE
+product INTEL ADL_N_PCIE_3 0x54ba  ADL-N PCIE
+product INTEL ADL_N_PCIE_4 0x54bb  ADL-N PCIE
+product INTEL ADL_N_PCIE_7 0x54be  ADL-N PCIE
+product INTEL ADL_N_EMMC   0x54c4  ADL-N eMMC
+product INTEL ADL_N_I2C_4  0x54c5  ADL-N I2C
+product INTEL ADL_N_I2C_5  0x54c6  ADL-N I2C
+product INTEL ADL_N_UART_2 0x54c7  ADL-N UART
+product INTEL ADL_N_HDA0x54c8  ADL-N HDA
+product INTEL ADL_N_THC_0  0x54d0  ADL-N THC
+product INTEL ADL_N_THC_1  0x54d1  ADL-N THC
+product INTEL ADL_N_AHCI   0x54d3  ADL-N AHCI
+product INTEL ADL_N_UART_3 0x54da  ADL-N UART
+product INTEL ADL_N_HECI_1 0x54e0  ADL-N HECI
+product INTEL ADL_N_HECI_2 0x54e1  ADL-N HECI
+product INTEL ADL_N_HECI_3 0x54e4  ADL-N HECI
+product INTEL ADL_N_HECI_4 0x54e5  ADL-N HECI
+product INTEL ADL_N_I2C_0  0x54e8  ADL-N I2C
+product INTEL ADL_N_I2C_1  0x54e9  ADL-N I2C
+product INTEL ADL_N_I2C_2  0x54ea  ADL-N I2C
+product INTEL ADL_N_I2C_3  0x54eb  ADL-N I2C
+product INTEL ADL_N_XHCI   0x54ed  ADL-N xHCI
+product INTEL ADL_N_XDCI   0x54ee  ADL-N xDCI
+product INTEL ADL_N_SRAM   0x54ef  ADL-N SRAM
 product INTEL WL_22500_16  0x54f0  Wi-Fi 6 AX211
+product INTEL ADL_N_GSPI_2 0x54fb  ADL-N GSPI
+product INTEL ADL_N_UFS0x54ff  ADL-N UFS
 product INTEL I225_LMVP0x5502  I225-LMvP
 product INTEL I226_K   0x5504  I226-K
 product INTEL I219_LM180x550a  I219-LM
Index: sys/dev/pci/ichiic.c
===
RCS file: /cvs/src/sys/dev/pci/ichiic.c,v
diff -u -p -r1.51 ichiic.c
--- sys/dev/pci/ichiic.c5 Feb 2023 02:26:02 -   1.51
+++ sys/dev/pci/ichiic.c23 Nov 2023 12:38:18 -
@@ -139,6 +139,7 @@ const struct pci_matchid ichiic_ids[] = 
{ PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_700SERIES_SMB },