Index: dev/ic/mpt.c =================================================================== RCS file: /cvsroot/src/sys/dev/ic/mpt.c,v retrieving revision 1.14 diff -p -r1.14 mpt.c *** dev/ic/mpt.c 28 Apr 2010 22:45:27 -0000 1.14 --- dev/ic/mpt.c 23 May 2011 19:14:26 -0000 *************** mpt_init(mpt_softc_t *mpt, u_int32_t who *** 1131,1137 **** int try; MSG_IOC_FACTS_REPLY facts; MSG_PORT_FACTS_REPLY pfp; ! u_int32_t pptr; int val; /* Put all request buffers (back) on the free list */ --- 1131,1139 ---- int try; MSG_IOC_FACTS_REPLY facts; MSG_PORT_FACTS_REPLY pfp; ! prop_dictionary_t dict; ! uint32_t ini_id; ! uint32_t pptr; int val; /* Put all request buffers (back) on the free list */ *************** mpt_init(mpt_softc_t *mpt, u_int32_t who *** 1151,1156 **** --- 1153,1160 ---- if (mpt_hw_init(mpt) != 0) return (EIO); + dict = device_properties(&mpt->sc_dev); + for (try = 0; try < MPT_MAX_TRYS; try++) { /* * No need to reset if the IOC is already in the READY state. *************** mpt_init(mpt_softc_t *mpt, u_int32_t who *** 1209,1215 **** return (ENXIO); } ! mpt->mpt_ini_id = pfp.PortSCSIID; if (mpt_send_ioc_init(mpt, who) != MPT_OK) { mpt_prt(mpt, "mpt_send_ioc_init failed"); --- 1213,1223 ---- return (ENXIO); } ! if (!mpt->is_sas && !mpt->is_fc && ! prop_dictionary_get_uint32(dict, "scsi-initiator-id", &ini_id)) ! mpt->mpt_ini_id = ini_id; ! else ! mpt->mpt_ini_id = pfp.PortSCSIID; if (mpt_send_ioc_init(mpt, who) != MPT_OK) { mpt_prt(mpt, "mpt_send_ioc_init failed"); Index: arch/sparc64/sparc64/autoconf.c =================================================================== RCS file: /cvsroot/src/sys/arch/sparc64/sparc64/autoconf.c,v retrieving revision 1.177 diff -p -r1.177 autoconf.c *** arch/sparc64/sparc64/autoconf.c 12 May 2011 05:42:22 -0000 1.177 --- arch/sparc64/sparc64/autoconf.c 23 May 2011 19:14:26 -0000 *************** device_register(struct device *dev, void *** 938,947 **** --- 938,950 ---- if (ofnode != 0) { uint8_t eaddr[ETHER_ADDR_LEN]; char tmpstr[32]; + int node; + uint32_t id = 0; uint64_t nwwn = 0, pwwn = 0; prop_dictionary_t dict; prop_data_t blob; prop_number_t pwwnd = NULL, nwwnd = NULL; + prop_number_t idd = NULL; device_setofnode(dev, ofnode); dev_path_exact_match(dev, ofnode); *************** noether: *** 1001,1006 **** --- 1004,1027 ---- prop_object_release(nwwnd); } } + + /* is this an mpt? look for scsi-initiator-id */ + if (device_is_a(dev, "mpt")) { + + dict = device_properties(dev); + + for (node = ofnode; node != 0; node = OF_parent(node)) { + if (OF_getprop(node, "scsi-initiator-id", &id, + sizeof(id)) <= 0) + continue; + + idd = prop_number_create_unsigned_integer(id); + prop_dictionary_set(dict, + "scsi-initiator-id", idd); + prop_object_release(idd); + break; + } + } } /*