Lines Matching defs:instance

409  * Given the device number return the devinfo pointer or instance
415 int instance = SF_MINOR2INST(getminor((dev_t)arg));
420 sf = ddi_get_soft_state(sf_state, instance);
430 *result = (void *)(uintptr_t)instance;
444 int instance;
466 instance = ddi_get_instance(dip);
468 sf = ddi_get_soft_state(sf_state, instance);
470 "sf_attach: DDI_RESUME for sf%d\n", instance));
472 cmn_err(CE_WARN, "sf%d: bad soft state", instance);
521 * this instance attaching for the first time
524 instance = ddi_get_instance(dip);
526 if (ddi_soft_state_zalloc(sf_state, instance) !=
529 instance);
533 sf = ddi_get_soft_state(sf_state, instance);
535 "sf_attach: DDI_ATTACH for sf%d\n", instance));
538 cmn_err(CE_WARN, "sf%d: bad soft state", instance);
550 instance);
562 /* create a command/response buffer pool for this instance */
566 instance);
570 /* create a a cache for this instance */
571 (void) sprintf(buf, "sf%d_cache", instance);
579 instance);
589 instance);
599 instance);
616 instance);
643 SF_INST2DEVCTL_MINOR(instance),
646 " for devctl", instance);
652 SF_INST2FC_MINOR(instance), DDI_NT_FC_ATTACHMENT_POINT,
655 " for fc", instance);
664 instance);
733 instance);
738 if ((sf->sf_ksp = kstat_create("sf", instance, "statistics",
742 instance);
760 /* add this soft state instance to the head of the list */
841 cmn_err(CE_WARN, "sf%d: failed to attach", instance);
888 * kill off the watchdog if we are the last instance
898 ddi_soft_state_free(sf_state, instance);
914 int instance;
923 instance = ddi_get_instance(dip);
925 if ((sf = ddi_get_soft_state(sf_state, instance)) == NULL) {
926 cmn_err(CE_WARN, "sf_detach, sf%d: bad soft state", instance);
934 * suspend our instance
938 "sf_detach: DDI_SUSPEND for sf%d\n", instance));
994 * kill off the watchdog if we are the last instance
1008 * detach this instance
1012 "sf_detach: DDI_DETACH for sf%d\n", instance));
1058 * kill off the watchdog if we are the last instance
1090 /* detach this instance of the HBA driver */
1115 "sf_detach: sf_crpool_free() for instance 0x%x\n",
1116 instance));
1151 "sf_detach: ddi_soft_state_free() for instance 0x%x\n",
1152 instance));
1153 ddi_soft_state_free(sf_state, instance);
1158 instance, (int)cmd));
1165 * sf_softstate_unlink() - remove an sf instance from the list of softstates
1189 /* remove our instance from the global list */
1296 /* find the target structure for this instance */
1826 * add to the command/response buffer pool for this sf instance
2031 /* somebody already allocating for this instance */
3424 * find the target for a given sf instance
5812 * start throttling for this instance
6807 cmn_err(CE_WARN, "sf%d: trying to close unopened instance",
7054 /* can't find instance for this device */
7077 /* can't find instance for this device */
7097 /* can't find instance for this device */
7125 /* no sf instance for this device */
7157 * the sf hotplug daemon, one thread per sf instance