From owner-cvs-src@FreeBSD.ORG Fri Jul 6 00:05:33 2007 Return-Path: X-Original-To: cvs-src@FreeBSD.org Delivered-To: cvs-src@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 5A45016A400; Fri, 6 Jul 2007 00:05:33 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [69.147.83.41]) by mx1.freebsd.org (Postfix) with ESMTP id 7AED913C447; Fri, 6 Jul 2007 00:05:32 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.8/8.13.8) with ESMTP id l6605CgB065580; Fri, 6 Jul 2007 00:05:12 GMT (envelope-from yongari@repoman.freebsd.org) Received: (from yongari@localhost) by repoman.freebsd.org (8.13.8/8.13.8/Submit) id l6605CWl065579; Fri, 6 Jul 2007 00:05:12 GMT (envelope-from yongari) Message-Id: <200707060005.l6605CWl065579@repoman.freebsd.org> From: Pyun YongHyeon Date: Fri, 6 Jul 2007 00:05:12 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Cc: Subject: cvs commit: src/sys/dev/re if_re.c src/sys/pci if_rlreg.h X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Jul 2007 00:05:33 -0000 yongari 2007-07-06 00:05:12 UTC FreeBSD src repository Modified files: sys/dev/re if_re.c sys/pci if_rlreg.h Log: re(4) devices requires an external EEPROM. Depending on models it would be 93C46(1Kbit) or 93C56(2Kbit). One of differences between them is number of address lines required to access the EEPROM. For example, 93C56 EEPROM needs 8 address lines to read/write data. If 93C56 recevied premature end of required number of serial clock(CLK) to set OP code/address of EEPROM, the result would be unexpected behavior. Previously it tried to detect 93C46, which requires 6 address lines, and then assumed it would be 93C56 if read data was not expected value. However, this approach didn't work in some models/situations as 93C56 requries 8 address lines to access its data. In order to fix it, change EEPROM probing order such that 93C56 is detected reliably. While I'm here change hard-coded address line numbers with defined constant to enhance readability. PR: 112710 Approved by: re (mux) Revision Changes Path 1.91 +2 -2 src/sys/dev/re/if_re.c 1.66 +2 -0 src/sys/pci/if_rlreg.h