From owner-svn-src-head@FreeBSD.ORG Mon Oct 13 01:11:29 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3C6D2106569A; Mon, 13 Oct 2008 01:11:29 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 298F38FC08; Mon, 13 Oct 2008 01:11:29 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9D1BS8j059952; Mon, 13 Oct 2008 01:11:28 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9D1BScB059950; Mon, 13 Oct 2008 01:11:28 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <200810130111.m9D1BScB059950@svn.freebsd.org> From: Pyun YongHyeon Date: Mon, 13 Oct 2008 01:11:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r183814 - head/sys/dev/jme X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Oct 2008 01:11:29 -0000 Author: yongari Date: Mon Oct 13 01:11:28 2008 New Revision: 183814 URL: http://svn.freebsd.org/changeset/base/183814 Log: Read PCI device id instead of PCI revision id. Also checks the read device id is JMC260 family. Previously it just verified the deivce is JMC260 Rev A0. This will make it easy for newer JMC2xx support. Pointed out by: bouyer at NetBSD Modified: head/sys/dev/jme/if_jme.c head/sys/dev/jme/if_jmereg.h Modified: head/sys/dev/jme/if_jme.c ============================================================================== --- head/sys/dev/jme/if_jme.c Sun Oct 12 23:47:06 2008 (r183813) +++ head/sys/dev/jme/if_jme.c Mon Oct 13 01:11:28 2008 (r183814) @@ -624,8 +624,8 @@ jme_attach(device_t dev) goto fail; } - sc->jme_rev = pci_get_revid(dev); - if (sc->jme_rev == DEVICEID_JMC260) { + sc->jme_rev = pci_get_device(dev); + if ((sc->jme_rev & DEVICEID_JMC2XX_MASK) == DEVICEID_JMC260) { sc->jme_flags |= JME_FLAG_FASTETH; sc->jme_flags |= JME_FLAG_NOJUMBO; } Modified: head/sys/dev/jme/if_jmereg.h ============================================================================== --- head/sys/dev/jme/if_jmereg.h Sun Oct 12 23:47:06 2008 (r183813) +++ head/sys/dev/jme/if_jmereg.h Mon Oct 13 01:11:28 2008 (r183814) @@ -48,6 +48,8 @@ #define DEVICEID_JMC260 0x0260 #define DEVICEREVID_JMC260_A0 0x00 +#define DEVICEID_JMC2XX_MASK 0x0FF0 + /* JMC250 PCI configuration register. */ #define JME_PCI_BAR0 0x10 /* 16KB memory window. */