From nobody@FreeBSD.org  Tue Nov 11 21:17:59 2008
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 76F891065672
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 11 Nov 2008 21:17:59 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21])
	by mx1.freebsd.org (Postfix) with ESMTP id 4402F8FC27
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 11 Nov 2008 21:17:59 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.14.3/8.14.3) with ESMTP id mABLHwVC075996
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 11 Nov 2008 21:17:58 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.14.3/8.14.3/Submit) id mABLHwSA075995;
	Tue, 11 Nov 2008 21:17:58 GMT
	(envelope-from nobody)
Message-Id: <200811112117.mABLHwSA075995@www.freebsd.org>
Date: Tue, 11 Nov 2008 21:17:58 GMT
From: Adam Morrison <adamx@tau.ac.il>
To: freebsd-gnats-submit@FreeBSD.org
Subject: Bug in if_bce.c:bce_get_media()
X-Send-Pr-Version: www-3.1
X-GNATS-Notify: d@delphij.net

>Number:         128801
>Category:       kern
>Synopsis:       [bce] [patch] Bug in if_bce.c:bce_get_media()
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    delphij
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Nov 11 21:20:01 UTC 2008
>Closed-Date:    Thu May 28 21:55:37 UTC 2009
>Last-Modified:  Thu May 28 21:55:37 UTC 2009
>Originator:     Adam Morrison
>Release:        HEAD
>Organization:
>Environment:
>Description:
There is a bug in if_bce.c:bce_get_media() when checking for SerDes:

	if (sc->bce_phy_flags && BCE_PHY_SERDES_FLAG) {

Note "&&" instead of "&".

The way the code is structured everything works out fine because
->bce_phys_flags will be true iff BCE_PHY_SERDES_FLAG is set.
Still, this is confusing and is a potential error waiting to happen.


>How-To-Repeat:

>Fix:
"&&" -> "&"


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->davidch 
Responsible-Changed-By: delphij 
Responsible-Changed-When: Tue Nov 11 21:51:30 UTC 2008 
Responsible-Changed-Why:  
Over to maintainer (a patch was sent for review). 

http://www.freebsd.org/cgi/query-pr.cgi?pr=128801 
State-Changed-From-To: open->patched 
State-Changed-By: delphij 
State-Changed-When: Wed Nov 19 03:27:58 UTC 2008 
State-Changed-Why:  
I've committed a patch. 


Responsible-Changed-From-To: davidch->delphij 
Responsible-Changed-By: delphij 
Responsible-Changed-When: Wed Nov 19 03:27:58 UTC 2008 
Responsible-Changed-Why:  
Take so I can get reminder. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=128801 
State-Changed-From-To: patched->closed 
State-Changed-By: delphij 
State-Changed-When: Thu May 28 21:54:56 UTC 2009 
State-Changed-Why:  
This patch has been MFC'ed against RELENG_7 before 7.1-RELEASE 
so I think it's safe to close it.  Thanks for your submission! 

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