summaryrefslogtreecommitdiff
path: root/sys/dev/pci
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/pci')
-rw-r--r--sys/dev/pci/isp_pci.c24
1 files changed, 23 insertions, 1 deletions
diff --git a/sys/dev/pci/isp_pci.c b/sys/dev/pci/isp_pci.c
index 4524d4c3ef5..5c74cddab84 100644
--- a/sys/dev/pci/isp_pci.c
+++ b/sys/dev/pci/isp_pci.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: isp_pci.c,v 1.43 2008/05/28 18:46:56 kettenis Exp $ */
+/* $OpenBSD: isp_pci.c,v 1.44 2008/06/01 15:49:25 kettenis Exp $ */
/*
* PCI specific probe and attach routines for QLogic ISP SCSI adapters.
*
@@ -404,6 +404,28 @@ isp_pci_attach(struct device *parent, struct device *self, void *aux)
int ioh_valid, memh_valid;
bus_size_t iosize, msize;
u_int32_t confopts = 0;
+#ifdef __sparc64__
+ int node, iid;
+#endif
+
+ DEFAULT_IID(isp) = 7;
+#ifdef __sparc64__
+ /*
+ * Walk up the Open Firmware device tree until we find a
+ * "scsi-initiator-id" property.
+ */
+ node = PCITAG_NODE(pa->pa_tag);
+ while (node) {
+ if (OF_getprop(node, "scsi-initiator-id",
+ &iid, sizeof(iid)) == sizeof(iid)) {
+ DEFAULT_IID(isp) = iid;
+ confopts |= ISP_CFG_OWNLOOPID;
+ break;
+ }
+
+ node = OF_parent(node);
+ }
+#endif
ioh_valid = memh_valid = 0;