From ryanb@goddamnbastard.org  Mon Jan 27 00:37:08 2003
Return-Path: <ryanb@goddamnbastard.org>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 0A02137B401
	for <freebsd-gnats-submit@freebsd.org>; Mon, 27 Jan 2003 00:37:08 -0800 (PST)
Received: from mx01.goddamnbastard.org (12-249-234-146.client.attbi.com [12.249.234.146])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 805F843ED8
	for <freebsd-gnats-submit@freebsd.org>; Mon, 27 Jan 2003 00:37:02 -0800 (PST)
	(envelope-from ryanb@goddamnbastard.org)
Received: by mx01.goddamnbastard.org (Postfix, from userid 1000)
	id A2ADE155C6; Mon, 27 Jan 2003 02:37:01 -0600 (CST)
Message-Id: <20030127083701.GK49658@goddamnbastard.org>
Date: Mon, 27 Jan 2003 02:37:01 -0600
From: ryan beasley <ryanb@goddamnbastard.org>
To: freebsd-gnats-submit@freebsd.org
Cc: Warner Losh <imp@village.org>
Subject: Re: dc(4) assigns incorrect link address with Davicom DM9102A chipsets

>Number:         47537
>Category:       kern
>Synopsis:       Re: dc(4) assigns incorrect link address with Davicom DM9102A chipsets
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    gnats-admin
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Jan 27 00:40:06 PST 2003
>Closed-Date:    Fri Jan 31 19:44:26 PST 2003
>Last-Modified:  Fri Jan 31 19:44:26 PST 2003
>Originator:     
>Release:        
>Organization:
>Environment:
>Description:
 --xtx0sNU5lZ46KfgK
 Content-Type: multipart/mixed; boundary="iAzLNm1y1mIRgolD"
 Content-Disposition: inline
 
 
 --iAzLNm1y1mIRgolD
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: inline
 Content-Transfer-Encoding: quoted-printable
 
     As it turns out, everything but the first chunk of the if_dc.c patch is
     bogus.  It is necessary to perform the SROM read as dc_romwidth is
     referenced later on in dc_eeprom_putbyte.  The attached patch is just a
     trimmed version of the first one submitted, and it seems to do the job.
 
     I'm cc'ng Warner since he committed the dynamically sized srom code.
 
 --=20
 ryan beasley				<ryanb@goddamnbastard.org>
 GPG ID: 0x16EFBD48
 
 --iAzLNm1y1mIRgolD
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: attachment; filename="if_dc.c.patch"
 
 Index: src/sys/pci/if_dc.c
 --- sys/pci/if_dc.c.orig	Mon Jan 27 02:15:04 2003
 +++ sys/pci/if_dc.c	Mon Jan 27 02:12:33 2003
 @@ -1979,6 +1983,8 @@
  		command &= 0xFFFF00FF;
  		command |= 0x00008000;
  		pci_write_config(dev, DC_PCI_CFLT, command, 4);
 +		dc_eeprom_width(sc);
 +		dc_read_srom(sc, sc->dc_romwidth);
  		break;
  	case DC_DEVICEID_AL981:
  		sc->dc_type = DC_TYPE_AL981;
 
 --iAzLNm1y1mIRgolD--
 
 --xtx0sNU5lZ46KfgK
 Content-Type: application/pgp-signature
 Content-Disposition: inline
 
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.0.7 (FreeBSD)
 
 iD8DBQE+NO+tskfdOxbvvUgRAgaqAKCRZFudySNRcyph7szN9DHQEBowFQCgoEax
 sDRkmljewjWhoUC8ttNlI6I=
 =+WL/
 -----END PGP SIGNATURE-----
 
 --xtx0sNU5lZ46KfgK--
>How-To-Repeat:
>Fix:
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: keramida 
State-Changed-When: Fri Jan 31 19:43:56 PST 2003 
State-Changed-Why:  
Followup to kern/44092, misfiled as a new PR. 

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