From nobody@FreeBSD.org  Wed Nov 20 18:30:46 2013
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115])
	(using TLSv1 with cipher ADH-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by hub.freebsd.org (Postfix) with ESMTPS id A9410B57
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 20 Nov 2013 18:30:46 +0000 (UTC)
Received: from oldred.freebsd.org (oldred.freebsd.org [8.8.178.121])
	(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 980312FAE
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 20 Nov 2013 18:30:46 +0000 (UTC)
Received: from oldred.freebsd.org ([127.0.1.6])
	by oldred.freebsd.org (8.14.5/8.14.7) with ESMTP id rAKIUkBc056597
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 20 Nov 2013 18:30:46 GMT
	(envelope-from nobody@oldred.freebsd.org)
Received: (from nobody@localhost)
	by oldred.freebsd.org (8.14.5/8.14.5/Submit) id rAKIUk4k056465;
	Wed, 20 Nov 2013 18:30:46 GMT
	(envelope-from nobody)
Message-Id: <201311201830.rAKIUk4k056465@oldred.freebsd.org>
Date: Wed, 20 Nov 2013 18:30:46 GMT
From: Mikael Urankar <mikael.urankar@gmail.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: [run] r257955 breaks if_run
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         184122
>Category:       kern
>Synopsis:       [run] r257955 breaks if_run
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Nov 20 18:40:03 UTC 2013
>Closed-Date:    Fri Nov 29 17:35:38 UTC 2013
>Last-Modified:  Fri Nov 29 17:35:38 UTC 2013
>Originator:     Mikael Urankar
>Release:        current
>Organization:
>Environment:
FreeBSD acheron.homeunix.org 11.0-CURRENT FreeBSD 11.0-CURRENT #1 r258178M: Sat Nov 16 10:12:23 CET 2013     miki@acheron.homeunix.org:/usr/obj/usr/src/sys/ACHERON  amd64
>Description:
since r257955 my run device is unable to scan
the network, associate to an AP etc.

I've also tried with the following revision of if_run.c, if_runreg.h, if_runvar.h but the problem is still there. (258082, 258083, 257955)

The attached patch fixes the problem for my card.

Details of my card :
run0: <1.0> on usbus3
run0: MAC/BBP RT2872 (rev 0x0202), RF RT2750 (MIMO 1T2R), address xx:xx:xx:xx:xx:xx
run0: firmware RT2870 ver. 0.33 loaded

>How-To-Repeat:

>Fix:


Patch attached with submission follows:

Index: if_runreg.h
===================================================================
--- if_runreg.h	(révision 257955)
+++ if_runreg.h	(copie de travail)
@@ -1052,67 +1052,60 @@
 /*
  * Default settings for RF registers; values derived from the reference driver.
  */
-#define RT2860_RF2850							\
-	{   1, 0x98402ecc, 0x984c0786, 0x9816b455, 0x9800510b },	\
-	{   2, 0x98402ecc, 0x984c0786, 0x98168a55, 0x9800519f },	\
-	{   3, 0x98402ecc, 0x984c078a, 0x98168a55, 0x9800518b },	\
-	{   4, 0x98402ecc, 0x984c078a, 0x98168a55, 0x9800519f },	\
-	{   5, 0x98402ecc, 0x984c078e, 0x98168a55, 0x9800518b },	\
-	{   6, 0x98402ecc, 0x984c078e, 0x98168a55, 0x9800519f },	\
-	{   7, 0x98402ecc, 0x984c0792, 0x98168a55, 0x9800518b },	\
-	{   8, 0x98402ecc, 0x984c0792, 0x98168a55, 0x9800519f },	\
-	{   9, 0x98402ecc, 0x984c0796, 0x98168a55, 0x9800518b },	\
-	{  10, 0x98402ecc, 0x984c0796, 0x98168a55, 0x9800519f },	\
-	{  11, 0x98402ecc, 0x984c079a, 0x98168a55, 0x9800518b },	\
-	{  12, 0x98402ecc, 0x984c079a, 0x98168a55, 0x9800519f },	\
-	{  13, 0x98402ecc, 0x984c079e, 0x98168a55, 0x9800518b },	\
-	{  14, 0x98402ecc, 0x984c07a2, 0x98168a55, 0x98005193 },	\
-	{  36, 0x98402ecc, 0x984c099a, 0x98158a55, 0x980ed1a3 },	\
-	{  38, 0x98402ecc, 0x984c099e, 0x98158a55, 0x980ed193 },	\
-	{  40, 0x98402ec8, 0x984c0682, 0x98158a55, 0x980ed183 },	\
-	{  44, 0x98402ec8, 0x984c0682, 0x98158a55, 0x980ed1a3 },	\
-	{  46, 0x98402ec8, 0x984c0686, 0x98158a55, 0x980ed18b },	\
-	{  48, 0x98402ec8, 0x984c0686, 0x98158a55, 0x980ed19b },	\
-	{  52, 0x98402ec8, 0x984c068a, 0x98158a55, 0x980ed193 },	\
-	{  54, 0x98402ec8, 0x984c068a, 0x98158a55, 0x980ed1a3 },	\
-	{  56, 0x98402ec8, 0x984c068e, 0x98158a55, 0x980ed18b },	\
-	{  60, 0x98402ec8, 0x984c0692, 0x98158a55, 0x980ed183 },	\
-	{  62, 0x98402ec8, 0x984c0692, 0x98158a55, 0x980ed193 },	\
-	{  64, 0x98402ec8, 0x984c0692, 0x98158a55, 0x980ed1a3 },	\
-	{ 100, 0x98402ec8, 0x984c06b2, 0x98178a55, 0x980ed783 },	\
-	{ 102, 0x98402ec8, 0x985c06b2, 0x98578a55, 0x980ed793 },	\
-	{ 104, 0x98402ec8, 0x985c06b2, 0x98578a55, 0x980ed1a3 },	\
-	{ 108, 0x98402ecc, 0x985c0a32, 0x98578a55, 0x980ed193 },	\
-	{ 110, 0x98402ecc, 0x984c0a36, 0x98178a55, 0x980ed183 },	\
-	{ 112, 0x98402ecc, 0x984c0a36, 0x98178a55, 0x980ed19b },	\
-	{ 116, 0x98402ecc, 0x984c0a3a, 0x98178a55, 0x980ed1a3 },	\
-	{ 118, 0x98402ecc, 0x984c0a3e, 0x98178a55, 0x980ed193 },	\
-	{ 120, 0x98402ec4, 0x984c0382, 0x98178a55, 0x980ed183 },	\
-	{ 124, 0x98402ec4, 0x984c0382, 0x98178a55, 0x980ed193 },	\
-	{ 126, 0x98402ec4, 0x984c0382, 0x98178a55, 0x980ed15b },	\
-	{ 128, 0x98402ec4, 0x984c0382, 0x98178a55, 0x980ed1a3 },	\
-	{ 132, 0x98402ec4, 0x984c0386, 0x98178a55, 0x980ed18b },	\
-	{ 134, 0x98402ec4, 0x984c0386, 0x98178a55, 0x980ed193 },	\
-	{ 136, 0x98402ec4, 0x984c0386, 0x98178a55, 0x980ed19b },	\
-	{ 140, 0x98402ec4, 0x984c038a, 0x98178a55, 0x980ed183 },	\
-	{ 149, 0x98402ec4, 0x984c038a, 0x98178a55, 0x980ed1a7 },	\
-	{ 151, 0x98402ec4, 0x984c038e, 0x98178a55, 0x980ed187 },	\
-	{ 153, 0x98402ec4, 0x984c038e, 0x98178a55, 0x980ed18f },	\
-	{ 157, 0x98402ec4, 0x984c038e, 0x98178a55, 0x980ed19f },	\
-	{ 159, 0x98402ec4, 0x984c038e, 0x98178a55, 0x980ed1a7 },	\
-	{ 161, 0x98402ec4, 0x984c0392, 0x98178a55, 0x980ed187 },	\
-	{ 165, 0x98402ec4, 0x984c0392, 0x98178a55, 0x980ed197 },	\
-	{ 167, 0x98402ec4, 0x984c03d2, 0x98179855, 0x9815531f },	\
-	{ 169, 0x98402ec4, 0x984c03d2, 0x98179855, 0x98155327 },	\
-	{ 171, 0x98402ec4, 0x984c03d6, 0x98179855, 0x98155307 },	\
-	{ 173, 0x98402ec4, 0x984c03d6, 0x98179855, 0x9815530f },	\
-	{ 184, 0x95002ccc, 0x9500491e, 0x9509be55, 0x950c0a0b },	\
-	{ 188, 0x95002ccc, 0x95004922, 0x9509be55, 0x950c0a13 },	\
-	{ 192, 0x95002ccc, 0x95004926, 0x9509be55, 0x950c0a1b },	\
-	{ 196, 0x95002ccc, 0x9500492a, 0x9509be55, 0x950c0a23 },	\
-	{ 208, 0x95002ccc, 0x9500493a, 0x9509be55, 0x950c0a13 },	\
-	{ 212, 0x95002ccc, 0x9500493e, 0x9509be55, 0x950c0a1b },	\
-	{ 216, 0x95002ccc, 0x95004982, 0x9509be55, 0x950c0a23 }
+#define RT2860_RF2850						\
+	{   1, 0x100bb3, 0x1301e1, 0x05a014, 0x001402 },	\
+	{   2, 0x100bb3, 0x1301e1, 0x05a014, 0x001407 },	\
+	{   3, 0x100bb3, 0x1301e2, 0x05a014, 0x001402 },	\
+	{   4, 0x100bb3, 0x1301e2, 0x05a014, 0x001407 },	\
+	{   5, 0x100bb3, 0x1301e3, 0x05a014, 0x001402 },	\
+	{   6, 0x100bb3, 0x1301e3, 0x05a014, 0x001407 },	\
+	{   7, 0x100bb3, 0x1301e4, 0x05a014, 0x001402 },	\
+	{   8, 0x100bb3, 0x1301e4, 0x05a014, 0x001407 },	\
+	{   9, 0x100bb3, 0x1301e5, 0x05a014, 0x001402 },	\
+	{  10, 0x100bb3, 0x1301e5, 0x05a014, 0x001407 },	\
+	{  11, 0x100bb3, 0x1301e6, 0x05a014, 0x001402 },	\
+	{  12, 0x100bb3, 0x1301e6, 0x05a014, 0x001407 },	\
+	{  13, 0x100bb3, 0x1301e7, 0x05a014, 0x001402 },	\
+	{  14, 0x100bb3, 0x1301e8, 0x05a014, 0x001404 },	\
+	{  36, 0x100bb3, 0x130266, 0x056014, 0x001408 },	\
+	{  38, 0x100bb3, 0x130267, 0x056014, 0x001404 },	\
+	{  40, 0x100bb2, 0x1301a0, 0x056014, 0x001400 },	\
+	{  44, 0x100bb2, 0x1301a0, 0x056014, 0x001408 },	\
+	{  46, 0x100bb2, 0x1301a1, 0x056014, 0x001402 },	\
+	{  48, 0x100bb2, 0x1301a1, 0x056014, 0x001406 },	\
+	{  52, 0x100bb2, 0x1301a2, 0x056014, 0x001404 },	\
+	{  54, 0x100bb2, 0x1301a2, 0x056014, 0x001408 },	\
+	{  56, 0x100bb2, 0x1301a3, 0x056014, 0x001402 },	\
+	{  60, 0x100bb2, 0x1301a4, 0x056014, 0x001400 },	\
+	{  62, 0x100bb2, 0x1301a4, 0x056014, 0x001404 },	\
+	{  64, 0x100bb2, 0x1301a4, 0x056014, 0x001408 },	\
+	{ 100, 0x100bb2, 0x1301ac, 0x05e014, 0x001400 },	\
+	{ 102, 0x100bb2, 0x1701ac, 0x15e014, 0x001404 },	\
+	{ 104, 0x100bb2, 0x1701ac, 0x15e014, 0x001408 },	\
+	{ 108, 0x100bb3, 0x17028c, 0x15e014, 0x001404 },	\
+	{ 110, 0x100bb3, 0x13028d, 0x05e014, 0x001400 },	\
+	{ 112, 0x100bb3, 0x13028d, 0x05e014, 0x001406 },	\
+	{ 116, 0x100bb3, 0x13028e, 0x05e014, 0x001408 },	\
+	{ 118, 0x100bb3, 0x13028f, 0x05e014, 0x001404 },	\
+	{ 120, 0x100bb1, 0x1300e0, 0x05e014, 0x001400 },	\
+	{ 124, 0x100bb1, 0x1300e0, 0x05e014, 0x001404 },	\
+	{ 126, 0x100bb1, 0x1300e0, 0x05e014, 0x001406 },	\
+	{ 128, 0x100bb1, 0x1300e0, 0x05e014, 0x001408 },	\
+	{ 132, 0x100bb1, 0x1300e1, 0x05e014, 0x001402 },	\
+	{ 134, 0x100bb1, 0x1300e1, 0x05e014, 0x001404 },	\
+	{ 136, 0x100bb1, 0x1300e1, 0x05e014, 0x001406 },	\
+	{ 140, 0x100bb1, 0x1300e2, 0x05e014, 0x001400 },	\
+	{ 149, 0x100bb1, 0x1300e2, 0x05e014, 0x001409 },	\
+	{ 151, 0x100bb1, 0x1300e3, 0x05e014, 0x001401 },	\
+	{ 153, 0x100bb1, 0x1300e3, 0x05e014, 0x001403 },	\
+	{ 157, 0x100bb1, 0x1300e3, 0x05e014, 0x001407 },	\
+	{ 159, 0x100bb1, 0x1300e3, 0x05e014, 0x001409 },	\
+	{ 161, 0x100bb1, 0x1300e4, 0x05e014, 0x001401 },	\
+	{ 165, 0x100bb1, 0x1300e4, 0x05e014, 0x001405 },	\
+	{ 167, 0x100bb1, 0x1300f4, 0x05e014, 0x001407 },	\
+	{ 169, 0x100bb1, 0x1300f4, 0x05e014, 0x001409 },	\
+	{ 171, 0x100bb1, 0x1300f5, 0x05e014, 0x001401 },	\
+	{ 173, 0x100bb1, 0x1300f5, 0x05e014, 0x001403 }
 
 #define RT3070_RF3052		\
 	{ 0xf1, 2,  2 },	\


>Release-Note:
>Audit-Trail:

From: =?UTF-8?Q?Mika=C3=ABl_Urankar?= <mikael.urankar@gmail.com>
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: kern/184122: [run] r257955 breaks if_run
Date: Fri, 29 Nov 2013 17:38:09 +0100

 r258732 fixes the problem.
 
 This PR can be closed.
 
 Thanks
State-Changed-From-To: open->closed 
State-Changed-By: kevlo 
State-Changed-When: Fri Nov 29 17:34:59 UTC 2013 
State-Changed-Why:  
Fixed in -HEAD - r258732. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=184122 
>Unformatted:
