368 LOCK_DEV_OPS(dmp);
369 for (inst = 0; inst <= MAXMIN32; inst++) {
370 for (tdip = devnamesp[childmaj].dn_head; tdip != NULL;
371 tdip = ddi_get_next(tdip)) {
372 /* is this the current node? */
373 if (tdip == child)
374 continue;
375 if (inst == ddi_get_instance(tdip)) {
376 break;
377 }
378 }
379 if (tdip == NULL) {
380 UNLOCK_DEV_OPS(dmp);
381 return (inst);
382 }
383 }
384 UNLOCK_DEV_OPS(dmp);
385 return (-1);
386 }
387
388 static int
389 pseudonex_fm_init(dev_info_t *dip, dev_info_t *tdip, int cap,
390 ddi_iblock_cookie_t *ibc)
391 {
392 pseudonex_state_t *pnx_state;
393
394 pnx_state = ddi_get_soft_state(pseudonex_state, ddi_get_instance(dip));
395 ASSERT(pnx_state != NULL);
396 ASSERT(ibc != NULL);
397 *ibc = pnx_state->pnx_fm_ibc;
398 return (pnx_state->pnx_fmcap & cap);
399 }
400
401 static int
402 pseudonex_ctl(dev_info_t *dip, dev_info_t *rdip, ddi_ctl_enum_t ctlop,
403 void *arg, void *result)
404 {
405 switch (ctlop) {
406 case DDI_CTLOPS_REPORTDEV:
407 if (rdip == NULL)
|
368 LOCK_DEV_OPS(dmp);
369 for (inst = 0; inst <= MAXMIN32; inst++) {
370 for (tdip = devnamesp[childmaj].dn_head; tdip != NULL;
371 tdip = ddi_get_next(tdip)) {
372 /* is this the current node? */
373 if (tdip == child)
374 continue;
375 if (inst == ddi_get_instance(tdip)) {
376 break;
377 }
378 }
379 if (tdip == NULL) {
380 UNLOCK_DEV_OPS(dmp);
381 return (inst);
382 }
383 }
384 UNLOCK_DEV_OPS(dmp);
385 return (-1);
386 }
387
388 /* ARGSUSED */
389 static int
390 pseudonex_fm_init(dev_info_t *dip, dev_info_t *tdip, int cap,
391 ddi_iblock_cookie_t *ibc)
392 {
393 pseudonex_state_t *pnx_state;
394
395 pnx_state = ddi_get_soft_state(pseudonex_state, ddi_get_instance(dip));
396 ASSERT(pnx_state != NULL);
397 ASSERT(ibc != NULL);
398 *ibc = pnx_state->pnx_fm_ibc;
399 return (pnx_state->pnx_fmcap & cap);
400 }
401
402 static int
403 pseudonex_ctl(dev_info_t *dip, dev_info_t *rdip, ddi_ctl_enum_t ctlop,
404 void *arg, void *result)
405 {
406 switch (ctlop) {
407 case DDI_CTLOPS_REPORTDEV:
408 if (rdip == NULL)
|