From owner-svn-src-all@FreeBSD.ORG Mon May 10 20:34:17 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 2FA391065674; Mon, 10 May 2010 20:34:17 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 1EBA48FC16; Mon, 10 May 2010 20:34:17 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o4AKYHxJ061372; Mon, 10 May 2010 20:34:17 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4AKYGGc061369; Mon, 10 May 2010 20:34:16 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201005102034.o4AKYGGc061369@svn.freebsd.org> From: Marius Strobl Date: Mon, 10 May 2010 20:34:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r207892 - stable/8/sys/dev/isp X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 May 2010 20:34:17 -0000 Author: marius Date: Mon May 10 20:34:16 2010 New Revision: 207892 URL: http://svn.freebsd.org/changeset/base/207892 Log: MFC: r207570 On sparc64 obtain the initiator ID from the Open Firmware device tree in order to match what the PROM built-in driver uses. Modified: stable/8/sys/dev/isp/isp_pci.c stable/8/sys/dev/isp/isp_sbus.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/geom/sched/ (props changed) Modified: stable/8/sys/dev/isp/isp_pci.c ============================================================================== --- stable/8/sys/dev/isp/isp_pci.c Mon May 10 20:25:51 2010 (r207891) +++ stable/8/sys/dev/isp/isp_pci.c Mon May 10 20:34:16 2010 (r207892) @@ -46,6 +46,11 @@ __FBSDID("$FreeBSD$"); #include #include +#ifdef __sparc64__ +#include +#include +#endif + #include static uint32_t isp_pci_rd_reg(ispsoftc_t *, int); @@ -517,7 +522,11 @@ isp_get_specific_options(device_t dev, i if (IS_FC(isp)) { ISP_FC_PC(isp, chan)->default_id = 109 - chan; } else { +#ifdef __sparc64__ + ISP_SPI_PC(isp, chan)->iid = OF_getscsinitid(dev); +#else ISP_SPI_PC(isp, chan)->iid = 7; +#endif } } else { if (IS_FC(isp)) { Modified: stable/8/sys/dev/isp/isp_sbus.c ============================================================================== --- stable/8/sys/dev/isp/isp_sbus.c Mon May 10 20:25:51 2010 (r207891) +++ stable/8/sys/dev/isp/isp_sbus.c Mon May 10 20:34:16 2010 (r207892) @@ -41,8 +41,10 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include +#include #include #include #include @@ -264,11 +266,7 @@ isp_sbus_attach(device_t dev) isp->isp_confopts |= ISP_CFG_OWNLOOPID; } if (default_id == -1) { - /* - * XXX: should be a way to get properties w/o having - * XXX: to call OF_xxx functions - */ - default_id = 7; + default_id = OF_getscsinitid(dev); } ISP_SPI_PC(isp, 0)->iid = default_id;