From markfbsd@mark.alphadimensions.net  Wed Oct  1 06:20:17 2003
Return-Path: <markfbsd@mark.alphadimensions.net>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 6360D16A4B3
	for <FreeBSD-gnats-submit@freebsd.org>; Wed,  1 Oct 2003 06:20:17 -0700 (PDT)
Received: from annihilator.ath.cx (m084-069.nv.iinet.net.au [203.217.84.69])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 671F443FF2
	for <FreeBSD-gnats-submit@freebsd.org>; Wed,  1 Oct 2003 06:20:15 -0700 (PDT)
	(envelope-from markfbsd@mark.alphadimensions.net)
Received: from localhost (xlputer.xlserv.com [10.0.0.4])
	by annihilator.ath.cx (8.12.9p2/8.12.9) with SMTP id h91DK75K000751
	for <FreeBSD-gnats-submit@freebsd.org>; Wed, 1 Oct 2003 23:20:13 +1000 (EST)
	(envelope-from markfbsd@mark.alphadimensions.net)
Message-Id: <02llnv0q76gu2noo5gh55tf28od8bg008o@4ax.com>
Date: Wed, 01 Oct 2003 23:20:30 +1000
From: Mark Smith <markfbsd@mark.alphadimensions.net>
To: FreeBSD-gnats-submit@freebsd.org
Subject: if_kue hangs warm boot if firmware is loaded - affects 4.9-RC - fix included

>Number:         57453
>Category:       kern
>Synopsis:       [kue] [patch] if_kue hangs boot after warm boot if firmware is loaded
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Oct 01 06:30:14 PDT 2003
>Closed-Date:    Mon Nov 19 07:59:56 UTC 2007
>Last-Modified:  Mon Nov 19 07:59:56 UTC 2007
>Originator:     Mark Smith
>Release:        FreeBSD 4.9-RC i386
>Organization:
-
>Environment:
System: FreeBSD server 4.9-RC FreeBSD 4.9-RC #9: Wed Oct 1 22:41:36 EST =
2003 root@server:/usr/obj/usr/src/sys/XLSERV
i386

>Description:
When I warm boot my machine I get a hang if the if_kue firmware is loaded=
 already.
This is a hard lock up, and the system will not continue booting.  Big =
Problem in
my view.
>How-To-Repeat:
Umm, that might be kind of difficult, unless you have access to my NIC.
>Fix:
This quote from if_kue.c explains why:
-----------
/*
   * First, check if we even need to load the firmware.
   * If the device was still attached when the system was
   * rebooted, it may already have firmware loaded in it.
   * If this is the case, we don't need to do it again.
   * And in fact, if we try to load it again, we'll hang, <<<<<<<<<<<
   * so we have to avoid this condition if we don't want <<<<<<<<<<<<
   * to look stupid.
   *
   * We can test this quickly by checking the bcdRevision
   * code. The NIC will return a different revision code if
   * it's probed while the firmware is still loaded and
   * running.
   */
  if (hwrev =3D=3D 0x0202)
    return(0);
-----------

If I change this code to
  if ((hwrev & 0xfff0) =3D=3D 0x0200)
    return(0);

It fixes the problem (my card reports 0x0208 when firmware is loaded, not=
 0x0202!)

This affect 4.9-RC, and as such this should be put in as an urget fix (I =
think anyway).


>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->feedback 
State-Changed-By: kmacy 
State-Changed-When: Mon Nov 19 07:54:54 UTC 2007 
State-Changed-Why:  

Can you provide more details on the model number of your NIC? 

http://www.freebsd.org/cgi/query-pr.cgi?pr=57453 
State-Changed-From-To: feedback->closed 
State-Changed-By: kmacy 
State-Changed-When: Mon Nov 19 07:59:37 UTC 2007 
State-Changed-Why:  

Submitter mail bounces 

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