Date: Mon, 10 May 2010 20:34:19 +0000 (UTC) From: Marius Strobl <marius@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org Subject: svn commit: r207893 - stable/7/sys/dev/isp Message-ID: <201005102034.o4AKYJwJ061401@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: marius Date: Mon May 10 20:34:19 2010 New Revision: 207893 URL: http://svn.freebsd.org/changeset/base/207893 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/7/sys/dev/isp/isp_pci.c stable/7/sys/dev/isp/isp_sbus.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/dev/isp/isp_pci.c ============================================================================== --- stable/7/sys/dev/isp/isp_pci.c Mon May 10 20:34:16 2010 (r207892) +++ stable/7/sys/dev/isp/isp_pci.c Mon May 10 20:34:19 2010 (r207893) @@ -46,6 +46,11 @@ __FBSDID("$FreeBSD$"); #include <sys/malloc.h> #include <sys/uio.h> +#ifdef __sparc64__ +#include <dev/ofw/openfirm.h> +#include <machine/ofw_machdep.h> +#endif + #include <dev/isp/isp_freebsd.h> 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/7/sys/dev/isp/isp_sbus.c ============================================================================== --- stable/7/sys/dev/isp/isp_sbus.c Mon May 10 20:34:16 2010 (r207892) +++ stable/7/sys/dev/isp/isp_sbus.c Mon May 10 20:34:19 2010 (r207893) @@ -41,8 +41,10 @@ __FBSDID("$FreeBSD$"); #include <sys/resource.h> #include <dev/ofw/ofw_bus.h> +#include <dev/ofw/openfirm.h> #include <machine/bus.h> +#include <machine/ofw_machdep.h> #include <machine/resource.h> #include <sys/rman.h> #include <sparc64/sbus/sbusvar.h> @@ -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;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201005102034.o4AKYJwJ061401>