kern/143868: allow Atheros watchdog timeout to be tunable

Graham Menhennitt graham at menhennitt.com.au
Sat Feb 13 08:00:15 UTC 2010


>Number:         143868
>Category:       kern
>Synopsis:       allow Atheros watchdog timeout to be tunable
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sat Feb 13 08:00:14 UTC 2010
>Closed-Date:
>Last-Modified:
>Originator:     Graham Menhennitt
>Release:        FreeBSD 8.0-STABLE i386
>Organization:
>Environment:
System: FreeBSD maxwell.mencon.com.au 8.0-STABLE FreeBSD 8.0-STABLE #24: Sun Feb 14 00:56:04 EST 2010 root at chief-freebsd.mencon.com.au:/usr/obj/usr/src/sys/maxwell i386

ath0: <Atheros 5413> mem 0xa0010000-0xa001ffff irq 15 at device 17.0 on pci0
ath0: [ITHREAD]
ath0: AR5413 mac 10.5 RF5413 phy 6.1

>Description:
The Atheros wireless driver uses a hard-coded value for the watchdog timer. This value is too low on slow hardware (e.g. Soekris net5501). The attached patch allows the timer threshold to be tuned via sysctl.
>How-To-Repeat:
>Fix:

*** if_ath.c	Sat Feb 13 13:47:37 2010
--- if_ath.c_save	Tue Sep  8 02:41:18 2009
***************
*** 286,295 ****
  SYSCTL_INT(_hw_ath, OID_AUTO, bstuck, CTLFLAG_RW, &ath_bstuck_threshold,
  	    0, "max missed beacon xmits before chip reset");
  
- static	int ath_wd_timer_threshold = 5;		/* watchdog timer threshold */
- SYSCTL_INT(_hw_ath, OID_AUTO, wd_timer_threshold, CTLFLAG_RW, &ath_wd_timer_threshold,
- 	    0, "watchdog timer threshold");
- 
  #ifdef ATH_DEBUG
  enum {
  	ATH_DEBUG_XMIT		= 0x00000001,	/* basic xmit operation */
--- 286,291 ----
***************
*** 1894,1900 ****
  			goto nextfrag;
  		}
  
! 		sc->sc_wd_timer = ath_wd_timer_threshold;
  	}
  }
  
--- 1890,1896 ----
  			goto nextfrag;
  		}
  
! 		sc->sc_wd_timer = 5;
  	}
  }
  
***************
*** 6906,6912 ****
  			goto bad2;
  		}
  	}
! 	sc->sc_wd_timer = ath_wd_timer_threshold;
  	ifp->if_opackets++;
  	sc->sc_stats.ast_tx_raw++;
  
--- 6902,6908 ----
  			goto bad2;
  		}
  	}
! 	sc->sc_wd_timer = 5;
  	ifp->if_opackets++;
  	sc->sc_stats.ast_tx_raw++;
  
>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the freebsd-bugs mailing list