1217 * In practice this should never happen so we put
1218 * the code near the bottom of the implementation list.
1219 */
1220 SRPT_DPRINTF_L0("ioc_repost_recv_iu, error RX IU (%d)",
1221 status);
1222 ASSERT(0);
1223 } else if (ch != NULL) {
1224 atomic_inc_32(&ch->ch_req_lim_delta);
1225 }
1226 }
1227
1228 /*
1229 * srpt_ioc_init_profile()
1230 *
1231 * SRP I/O Controller serialization lock must be held when this
1232 * routine is invoked.
1233 */
1234 void
1235 srpt_ioc_init_profile(srpt_ioc_t *ioc)
1236 {
1237 srpt_ioc_opcap_mask_t capmask = {0};
1238
1239 ASSERT(ioc != NULL);
1240
1241 ioc->ioc_profile.ioc_guid = h2b64(ioc->ioc_guid);
1242 (void) memcpy(ioc->ioc_profile.ioc_id_string,
1243 "Solaris SRP Target 0.9a", 23);
1244
1245 /*
1246 * Note vendor ID and subsystem ID are 24 bit values. Low order
1247 * 8 bits in vendor ID field is slot and is initialized to zero.
1248 * Low order 8 bits of subsystem ID is a reserved field and
1249 * initialized to zero.
1250 */
1251 ioc->ioc_profile.ioc_vendorid =
1252 h2b32((uint32_t)(ioc->ioc_attr.hca_vendor_id << 8));
1253 ioc->ioc_profile.ioc_deviceid =
1254 h2b32((uint32_t)ioc->ioc_attr.hca_device_id);
1255 ioc->ioc_profile.ioc_device_ver =
1256 h2b16((uint16_t)ioc->ioc_attr.hca_version_id);
1257 ioc->ioc_profile.ioc_subsys_vendorid =
|
1217 * In practice this should never happen so we put
1218 * the code near the bottom of the implementation list.
1219 */
1220 SRPT_DPRINTF_L0("ioc_repost_recv_iu, error RX IU (%d)",
1221 status);
1222 ASSERT(0);
1223 } else if (ch != NULL) {
1224 atomic_inc_32(&ch->ch_req_lim_delta);
1225 }
1226 }
1227
1228 /*
1229 * srpt_ioc_init_profile()
1230 *
1231 * SRP I/O Controller serialization lock must be held when this
1232 * routine is invoked.
1233 */
1234 void
1235 srpt_ioc_init_profile(srpt_ioc_t *ioc)
1236 {
1237 srpt_ioc_opcap_mask_t capmask = {{0}};
1238
1239 ASSERT(ioc != NULL);
1240
1241 ioc->ioc_profile.ioc_guid = h2b64(ioc->ioc_guid);
1242 (void) memcpy(ioc->ioc_profile.ioc_id_string,
1243 "Solaris SRP Target 0.9a", 23);
1244
1245 /*
1246 * Note vendor ID and subsystem ID are 24 bit values. Low order
1247 * 8 bits in vendor ID field is slot and is initialized to zero.
1248 * Low order 8 bits of subsystem ID is a reserved field and
1249 * initialized to zero.
1250 */
1251 ioc->ioc_profile.ioc_vendorid =
1252 h2b32((uint32_t)(ioc->ioc_attr.hca_vendor_id << 8));
1253 ioc->ioc_profile.ioc_deviceid =
1254 h2b32((uint32_t)ioc->ioc_attr.hca_device_id);
1255 ioc->ioc_profile.ioc_device_ver =
1256 h2b16((uint16_t)ioc->ioc_attr.hca_version_id);
1257 ioc->ioc_profile.ioc_subsys_vendorid =
|