NetBSD Problem Report #58105

From www@netbsd.org  Tue Apr  2 18:56:42 2024
Return-Path: <www@netbsd.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))
	(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 9CE191A9239
	for <gnats-bugs@gnats.NetBSD.org>; Tue,  2 Apr 2024 18:56:42 +0000 (UTC)
Message-Id: <20240402185611.3D10F1A923B@mollari.NetBSD.org>
Date: Tue,  2 Apr 2024 18:56:11 +0000 (UTC)
From: wandrien.dev@gmail.com
Reply-To: wandrien.dev@gmail.com
To: gnats-bugs@NetBSD.org
Subject: Make use of correct firmware for Intel Centrino N 130
X-Send-Pr-Version: www-1.0

>Number:         58105
>Category:       kern
>Synopsis:       Make use of correct firmware for Intel Centrino N 130
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    gutteridge
>State:          closed
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Tue Apr 02 19:00:00 +0000 2024
>Closed-Date:    Wed Apr 17 18:47:45 +0000 2024
>Last-Modified:  Wed Apr 17 18:47:45 +0000 2024
>Originator:     Vadim
>Release:        10.0
>Organization:
>Environment:
NetBSD nora 10.0 NetBSD 10.0 (NORA) #3: Wed Apr  3 00:53:15 +07 2024  vadim@nora:/usr/src/sys/arch/amd64/compile/NORA amd64
>Description:
I have a laptop with Intel Centrino N 130 wifi device:

$ lspci -nn | grep Centr
01:00.0 Network controller [0280]: Intel Corporation Centrino Wireless-N 130 [8086:0896] (rev 34)

WiFi doesn't work under NetBSD with the following repeating error:

[     7.100458] iwn0: autoconfiguration error: fatal firmware error
[     7.100458] autoconfiguration error: firmware error log:
[     7.100458] autoconfiguration error:   error type      = "UNKNOWN" (0x00001999)
[     7.100458] autoconfiguration error:   program counter = 0x00014130
[     7.100458] autoconfiguration error:   source line     = 0x00000136
[     7.100458] autoconfiguration error:   error data      = 0x00000001000000A4
[     7.100458] autoconfiguration error:   branch link     = 0x0001410200014102
[     7.100458] autoconfiguration error:   interrupt link  = 0x0000C71E00000000
[     7.100458] autoconfiguration error:   time            = 26817
[     7.100458] autoconfiguration error: driver status:
[     7.100458] autoconfiguration error:   tx ring  0: qid=0  cur=0   queued=0  
[     7.100458] autoconfiguration error:   tx ring  1: qid=1  cur=0   queued=0  
[     7.100458] autoconfiguration error:   tx ring  2: qid=2  cur=0   queued=0  
[     7.100458] autoconfiguration error:   tx ring  3: qid=3  cur=0   queued=0  
[     7.100458] autoconfiguration error:   tx ring  4: qid=4  cur=2   queued=0  
[     7.100458] autoconfiguration error:   tx ring  5: qid=5  cur=0   queued=0  
[     7.100458] autoconfiguration error:   tx ring  6: qid=6  cur=0   queued=0  
[     7.100458] autoconfiguration error:   tx ring  7: qid=7  cur=0   queued=0  
[     7.100458] autoconfiguration error:   tx ring  8: qid=8  cur=0   queued=0  
[     7.100458] autoconfiguration error:   tx ring  9: qid=9  cur=0   queued=0  
[     7.100458] autoconfiguration error:   tx ring 10: qid=10 cur=0   queued=0  
[     7.100458] autoconfiguration error:   tx ring 11: qid=11 cur=0   queued=0  
[     7.100458] autoconfiguration error:   tx ring 12: qid=12 cur=0   queued=0  
[     7.100458] autoconfiguration error:   tx ring 13: qid=13 cur=0   queued=0  
[     7.100458] autoconfiguration error:   tx ring 14: qid=14 cur=0   queued=0  
[     7.100458] autoconfiguration error:   tx ring 15: qid=15 cur=0   queued=0  
[     7.100458] autoconfiguration error:   tx ring 16: qid=16 cur=0   queued=0  
[     7.100458] autoconfiguration error:   tx ring 17: qid=17 cur=0   queued=0  
[     7.100458] autoconfiguration error:   tx ring 18: qid=18 cur=0   queued=0  
[     7.100458] autoconfiguration error:   tx ring 19: qid=19 cur=0   queued=0  
[     7.100458] autoconfiguration error:   rx ring: cur=2
[     7.100458] autoconfiguration error:   802.11 state 0
[     8.090453] iwn0: autoconfiguration error: crystal calibration failed
[     8.090453] iwn0: autoconfiguration error: could not initialize hardware
[     8.190451] iwn0: cannot assign link-local address

>How-To-Repeat:

>Fix:
I checked the Linux dmesg log, and Linux seems loading file iwlwifi-6000g2b-6.ucode for that device.
NetBSD tries loading iwlwifi-6000g2a-6.ucode.

I added the missing device ID in the following condition and that fixed the problem:

--- if_iwn.c.orig	2022-04-25 09:29:14.000000000 +0700
+++ if_iwn.c	2024-04-03 01:36:50.586725197 +0700
@@ -844,7 +844,8 @@
 	case IWN_HW_REV_TYPE_6005:
 		sc->limits = &iwn6000_sensitivity_limits;
 		/* Type 6030 cards return IWN_HW_REV_TYPE_6005 */
-		if (pid == PCI_PRODUCT_INTEL_WIFI_LINK_1030_1 ||
+		if (pid == PCI_PRODUCT_INTEL_WIFI_LINK_130_1  ||
+		    pid == PCI_PRODUCT_INTEL_WIFI_LINK_1030_1 ||
 		    pid == PCI_PRODUCT_INTEL_WIFI_LINK_1030_2 ||
 		    pid == PCI_PRODUCT_INTEL_WIFI_LINK_6230_1 ||
 		    pid == PCI_PRODUCT_INTEL_WIFI_LINK_6230_2 ||

PCI_PRODUCT_INTEL_WIFI_LINK_130_2 should probably also be added, but I have no device with that ID to be able to check it works.

>Release-Note:

>Audit-Trail:

Responsible-Changed-From-To: kern-bug-people->gutteridge
Responsible-Changed-By: gutteridge@NetBSD.org
Responsible-Changed-When: Wed, 03 Apr 2024 01:02:12 +0000
Responsible-Changed-Why:
I'll look at this.

From: "David H. Gutteridge" <gutteridge@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/58105 CVS commit: src/sys/dev/pci
Date: Wed, 3 Apr 2024 01:13:41 +0000

 Module Name:	src
 Committed By:	gutteridge
 Date:		Wed Apr  3 01:13:41 UTC 2024

 Modified Files:
 	src/sys/dev/pci: if_iwn.c

 Log Message:
 if_iwn.c: pick up proper firmware for Centrino Wireless-N 130

 Both variants should use iwlwifi-6000g2b-6 not iwlwifi-6000g2a-6. (It
 seems only two specific product variants use iwlwifi-6000g2a-6. We
 could simplify by reversing the sense of the test, as OpenBSD does, but
 it doesn't seem to matter much, as what we now match seems to be the
 full gamut possible, so the simpler diff was chosen here.)

 Addresses PR kern/58105 from wandrien.dev@gmail.com, with the
 PCI_PRODUCT_INTEL_WIFI_LINK_130_1 match tested by the reporter. Code
 inspection of the FreeBSD driver indicates we should safely be able to
 match PCI_PRODUCT_INTEL_WIFI_LINK_130_2 also.


 To generate a diff of this commit:
 cvs rdiff -u -r1.99 -r1.100 src/sys/dev/pci/if_iwn.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

State-Changed-From-To: open->needs-pullups
State-Changed-By: gutteridge@NetBSD.org
State-Changed-When: Wed, 03 Apr 2024 01:19:03 +0000
State-Changed-Why:
Driver adjusted, needs pullups submitted, TBD.

State-Changed-From-To: needs-pullups->pending-pullups
State-Changed-By: riastradh@NetBSD.org
State-Changed-When: Thu, 04 Apr 2024 18:47:07 +0000
State-Changed-Why:
pullup-10 #653
pullup-9 #1825
pullup-8 #1953


From: "Martin Husemann" <martin@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/58105 CVS commit: [netbsd-10] src/sys/dev/pci
Date: Wed, 17 Apr 2024 16:23:08 +0000

 Module Name:	src
 Committed By:	martin
 Date:		Wed Apr 17 16:23:08 UTC 2024

 Modified Files:
 	src/sys/dev/pci [netbsd-10]: if_iwn.c

 Log Message:
 Pull up following revision(s) (requested by riastradh in ticket #653):

 	sys/dev/pci/if_iwn.c: revision 1.100

 if_iwn.c: pick up proper firmware for Centrino Wireless-N 130

 Both variants should use iwlwifi-6000g2b-6 not iwlwifi-6000g2a-6. (It
 seems only two specific product variants use iwlwifi-6000g2a-6. We
 could simplify by reversing the sense of the test, as OpenBSD does, but
 it doesn't seem to matter much, as what we now match seems to be the
 full gamut possible, so the simpler diff was chosen here.)

 Addresses PR kern/58105 from wandrien.dev%gmail.com@localhost, with the
 PCI_PRODUCT_INTEL_WIFI_LINK_130_1 match tested by the reporter. Code
 inspection of the FreeBSD driver indicates we should safely be able to
 match PCI_PRODUCT_INTEL_WIFI_LINK_130_2 also.


 To generate a diff of this commit:
 cvs rdiff -u -r1.99 -r1.99.4.1 src/sys/dev/pci/if_iwn.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

From: "Martin Husemann" <martin@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/58105 CVS commit: [netbsd-9] src/sys/dev/pci
Date: Wed, 17 Apr 2024 16:24:26 +0000

 Module Name:	src
 Committed By:	martin
 Date:		Wed Apr 17 16:24:26 UTC 2024

 Modified Files:
 	src/sys/dev/pci [netbsd-9]: if_iwn.c

 Log Message:
 Pull up following revision(s) (requested by riastradh in ticket #1825):

 	sys/dev/pci/if_iwn.c: revision 1.100

 if_iwn.c: pick up proper firmware for Centrino Wireless-N 130

 Both variants should use iwlwifi-6000g2b-6 not iwlwifi-6000g2a-6. (It
 seems only two specific product variants use iwlwifi-6000g2a-6. We
 could simplify by reversing the sense of the test, as OpenBSD does, but
 it doesn't seem to matter much, as what we now match seems to be the
 full gamut possible, so the simpler diff was chosen here.)

 Addresses PR kern/58105 from wandrien.dev%gmail.com@localhost, with the
 PCI_PRODUCT_INTEL_WIFI_LINK_130_1 match tested by the reporter. Code
 inspection of the FreeBSD driver indicates we should safely be able to
 match PCI_PRODUCT_INTEL_WIFI_LINK_130_2 also.


 To generate a diff of this commit:
 cvs rdiff -u -r1.91 -r1.91.4.1 src/sys/dev/pci/if_iwn.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

From: "Martin Husemann" <martin@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/58105 CVS commit: [netbsd-8] src/sys/dev/pci
Date: Wed, 17 Apr 2024 16:26:10 +0000

 Module Name:	src
 Committed By:	martin
 Date:		Wed Apr 17 16:26:10 UTC 2024

 Modified Files:
 	src/sys/dev/pci [netbsd-8]: if_iwn.c

 Log Message:
 Pull up following revision(s) (requested by riastradh in ticket #1953):

 	sys/dev/pci/if_iwn.c: revision 1.100

 if_iwn.c: pick up proper firmware for Centrino Wireless-N 130

 Both variants should use iwlwifi-6000g2b-6 not iwlwifi-6000g2a-6. (It
 seems only two specific product variants use iwlwifi-6000g2a-6. We
 could simplify by reversing the sense of the test, as OpenBSD does, but
 it doesn't seem to matter much, as what we now match seems to be the
 full gamut possible, so the simpler diff was chosen here.)

 Addresses PR kern/58105 from wandrien.dev%gmail.com@localhost, with the
 PCI_PRODUCT_INTEL_WIFI_LINK_130_1 match tested by the reporter. Code
 inspection of the FreeBSD driver indicates we should safely be able to
 match PCI_PRODUCT_INTEL_WIFI_LINK_130_2 also.


 To generate a diff of this commit:
 cvs rdiff -u -r1.84.6.2 -r1.84.6.3 src/sys/dev/pci/if_iwn.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

State-Changed-From-To: pending-pullups->closed
State-Changed-By: riastradh@NetBSD.org
State-Changed-When: Wed, 17 Apr 2024 18:47:45 +0000
State-Changed-Why:
fixed in HEAD, pulled up to 10, 9, and 8


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.47 2022/09/11 19:34:41 kim Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2024 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.