Lines Matching defs:oplmsu_uinst

161 uinst_t		*oplmsu_uinst = &oplmsu_uinst_local;
224 rw_init(&oplmsu_uinst->lock, "uinst rwlock", RW_DRIVER, NULL);
227 mutex_init(&oplmsu_uinst->u_lock, "upath lock", MUTEX_DRIVER, NULL);
230 mutex_init(&oplmsu_uinst->l_lock, "lpath lock", MUTEX_DRIVER, NULL);
233 mutex_init(&oplmsu_uinst->c_lock, "ctrl lock", MUTEX_DRIVER, NULL);
245 mutex_destroy(&oplmsu_uinst->c_lock);
246 mutex_destroy(&oplmsu_uinst->l_lock);
247 mutex_destroy(&oplmsu_uinst->u_lock);
248 rw_destroy(&oplmsu_uinst->lock);
262 mutex_destroy(&oplmsu_uinst->c_lock);
263 mutex_destroy(&oplmsu_uinst->l_lock);
264 mutex_destroy(&oplmsu_uinst->u_lock);
265 rw_destroy(&oplmsu_uinst->lock);
286 if (oplmsu_uinst->msu_dip == NULL) {
289 *resultp = oplmsu_uinst->msu_dip;
354 rw_enter(&oplmsu_uinst->lock, RW_WRITER);
364 oplmsu_uinst->inst_status = INST_STAT_UNCONFIGURED;
365 oplmsu_uinst->path_num = UNDEFINED;
366 oplmsu_uinst->msu_dip = dip;
367 (void) strcpy(oplmsu_uinst->abts, abt_ch_seq);
388 rw_exit(&oplmsu_uinst->lock);
406 rw_enter(&oplmsu_uinst->lock, RW_WRITER);
412 mutex_enter(&oplmsu_uinst->l_lock);
413 lpath = oplmsu_uinst->first_lpath;
414 oplmsu_uinst->first_lpath = NULL;
415 oplmsu_uinst->last_lpath = NULL;
416 mutex_exit(&oplmsu_uinst->l_lock);
433 rw_exit(&oplmsu_uinst->lock);
495 oplmsu_setup, (void *)oplmsu_uinst, 0, &p0, TS_RUN,
514 rw_enter(&oplmsu_uinst->lock, RW_WRITER);
525 rw_exit(&oplmsu_uinst->lock);
536 (oplmsu_uinst->inst_status != INST_STAT_ONLINE)) {
537 rw_exit(&oplmsu_uinst->lock);
559 mutex_enter(&oplmsu_uinst->c_lock);
563 oplmsu_uinst->user_ctrl = ctrl;
568 oplmsu_uinst->meta_ctrl = ctrl;
574 mutex_exit(&oplmsu_uinst->c_lock);
575 rw_exit(&oplmsu_uinst->lock);
594 rw_enter(&oplmsu_uinst->lock, RW_READER);
595 mutex_enter(&oplmsu_uinst->l_lock);
596 mutex_enter(&oplmsu_uinst->c_lock);
598 mutex_exit(&oplmsu_uinst->c_lock);
599 mutex_exit(&oplmsu_uinst->l_lock);
600 rw_exit(&oplmsu_uinst->lock);
612 mutex_exit(&oplmsu_uinst->c_lock);
613 mutex_exit(&oplmsu_uinst->l_lock);
614 rw_exit(&oplmsu_uinst->lock);
623 for (lpath = oplmsu_uinst->first_lpath; lpath; ) {
633 mutex_exit(&oplmsu_uinst->l_lock);
634 rw_exit(&oplmsu_uinst->lock);
639 cv_wait(&ctrl->cvp, &oplmsu_uinst->c_lock);
645 mutex_exit(&oplmsu_uinst->c_lock);
648 rw_enter(&oplmsu_uinst->lock, RW_WRITER);
651 oplmsu_uinst->user_ctrl = NULL;
656 oplmsu_uinst->meta_ctrl = NULL;
676 rw_exit(&oplmsu_uinst->lock);
711 rw_enter(&oplmsu_uinst->lock, RW_READER);
717 mutex_enter(&oplmsu_uinst->c_lock);
724 mutex_exit(&oplmsu_uinst->c_lock);
729 rw_exit(&oplmsu_uinst->lock);
747 rw_enter(&oplmsu_uinst->lock, RW_READER);
758 rw_exit(&oplmsu_uinst->lock);
762 rw_exit(&oplmsu_uinst->lock);
794 rw_enter(&oplmsu_uinst->lock, RW_READER);
797 rw_exit(&oplmsu_uinst->lock);
803 rw_enter(&oplmsu_uinst->lock, RW_READER);
806 rw_exit(&oplmsu_uinst->lock);
827 rw_enter(&oplmsu_uinst->lock, RW_READER);
830 rw_exit(&oplmsu_uinst->lock);
833 rw_enter(&oplmsu_uinst->lock, RW_READER);
839 rw_exit(&oplmsu_uinst->lock);
842 rw_enter(&oplmsu_uinst->lock, RW_READER);
849 mutex_enter(&oplmsu_uinst->l_lock);
856 mutex_exit(&oplmsu_uinst->l_lock);
857 rw_exit(&oplmsu_uinst->lock);
880 rw_enter(&oplmsu_uinst->lock, RW_READER);
882 rw_exit(&oplmsu_uinst->lock);
886 rw_enter(&oplmsu_uinst->lock, RW_READER);
887 mutex_enter(&oplmsu_uinst->l_lock);
894 mutex_exit(&oplmsu_uinst->l_lock);
895 rw_exit(&oplmsu_uinst->lock);
927 rw_enter(&oplmsu_uinst->lock, RW_READER);
929 (RD(oplmsu_uinst->lower_queue) == lrq)) {
933 mutex_enter(&oplmsu_uinst->l_lock);
942 = oplmsu_uinst->abts;
948 *oplmsu_uinst->abts) ?
949 oplmsu_uinst->abts + 1 :
950 oplmsu_uinst->abts;
954 mutex_exit(&oplmsu_uinst->l_lock);
956 rw_exit(&oplmsu_uinst->lock);
977 rw_enter(&oplmsu_uinst->lock, RW_READER);
980 rw_exit(&oplmsu_uinst->lock);
991 rw_enter(&oplmsu_uinst->lock, RW_READER);
993 (RD(oplmsu_uinst->lower_queue) == lrq)) {
996 rw_exit(&oplmsu_uinst->lock);
1003 rw_enter(&oplmsu_uinst->lock, RW_READER);
1005 rw_exit(&oplmsu_uinst->lock);
1024 rw_enter(&oplmsu_uinst->lock, RW_READER);
1031 rw_exit(&oplmsu_uinst->lock);
1035 rw_enter(&oplmsu_uinst->lock, RW_READER);
1036 mutex_enter(&oplmsu_uinst->l_lock);
1037 lpath = oplmsu_uinst->first_lpath;
1042 mutex_exit(&oplmsu_uinst->l_lock);
1045 mutex_enter(&oplmsu_uinst->c_lock);
1053 mutex_exit(&oplmsu_uinst->c_lock);
1061 rw_exit(&oplmsu_uinst->lock);
1064 rw_enter(&oplmsu_uinst->lock, RW_READER);
1071 mutex_enter(&oplmsu_uinst->c_lock);
1078 mutex_exit(&oplmsu_uinst->c_lock);
1079 rw_exit(&oplmsu_uinst->lock);
1170 rw_enter(&oplmsu_uinst->lock, RW_READER);
1171 mutex_enter(&oplmsu_uinst->l_lock);
1172 lpath = oplmsu_uinst->first_lpath;
1183 mutex_exit(&oplmsu_uinst->l_lock);
1184 rw_exit(&oplmsu_uinst->lock);
1207 rw_enter(&oplmsu_uinst->lock, RW_WRITER);
1208 mutex_enter(&oplmsu_uinst->u_lock);
1211 oplmsu_uinst->path_num = oplmsu_get_pathnum();
1214 upath = oplmsu_uinst->first_upath;
1221 mutex_exit(&oplmsu_uinst->u_lock);
1222 rw_exit(&oplmsu_uinst->lock);
1231 rval = oplmsu_open_msu(oplmsu_uinst->msu_dip, &msu_li, &msu_lh);
1323 rw_enter(&oplmsu_uinst->lock, RW_WRITER);
1324 mutex_enter(&oplmsu_uinst->u_lock);
1327 oplmsu_uinst->path_num = oplmsu_get_pathnum();
1332 upath = oplmsu_uinst->first_upath;
1342 mutex_exit(&oplmsu_uinst->u_lock);
1343 rw_exit(&oplmsu_uinst->lock);
1375 rw_enter(&oplmsu_uinst->lock, RW_READER);
1376 mutex_enter(&oplmsu_uinst->l_lock);
1377 lpath = oplmsu_uinst->first_lpath;
1384 mutex_exit(&oplmsu_uinst->l_lock);
1385 rw_exit(&oplmsu_uinst->lock);
1393 rval = oplmsu_open_msu(oplmsu_uinst->msu_dip, &msu_li, &msu_lh);
1727 mutex_enter(&oplmsu_uinst->l_lock);
1728 lpath = oplmsu_uinst->first_lpath;
1737 mutex_exit(&oplmsu_uinst->l_lock);
1756 mutex_exit(&oplmsu_uinst->l_lock);
1779 rw_enter(&oplmsu_uinst->lock, RW_WRITER);
1781 mutex_enter(&oplmsu_uinst->l_lock);
1783 mutex_exit(&oplmsu_uinst->l_lock);
1786 rw_exit(&oplmsu_uinst->lock);
1797 mutex_enter(&oplmsu_uinst->u_lock);
1799 if ((oplmsu_uinst->first_upath != NULL) ||
1800 (oplmsu_uinst->last_upath != NULL)) {
1801 mutex_exit(&oplmsu_uinst->u_lock);
1802 rw_exit(&oplmsu_uinst->lock);
1809 * if oplmsu_uinst->path_num isn't -1, this processing cannot be
1813 if (oplmsu_uinst->path_num != UNDEFINED) {
1814 mutex_exit(&oplmsu_uinst->u_lock);
1815 rw_exit(&oplmsu_uinst->lock);
1839 mutex_exit(&oplmsu_uinst->u_lock);
1840 rw_exit(&oplmsu_uinst->lock);
1853 oplmsu_uinst->inst_status = oplmsu_get_inst_status();
1854 oplmsu_uinst->path_num = mpath->num;
1855 oplmsu_uinst->lower_queue = NULL;
1856 mutex_exit(&oplmsu_uinst->u_lock);
1857 rw_exit(&oplmsu_uinst->lock);
1873 rw_enter(&oplmsu_uinst->lock, RW_WRITER);
1875 if (oplmsu_uinst->path_num == UNDEFINED) {
1876 rw_exit(&oplmsu_uinst->lock);
1882 mutex_enter(&oplmsu_uinst->u_lock);
1885 mutex_exit(&oplmsu_uinst->u_lock);
1886 rw_exit(&oplmsu_uinst->lock);
1894 mutex_exit(&oplmsu_uinst->u_lock);
1895 rw_exit(&oplmsu_uinst->lock);
1901 oplmsu_uinst->inst_status = oplmsu_get_inst_status();
1902 oplmsu_uinst->path_num = oplmsu_get_pathnum();
1903 mutex_exit(&oplmsu_uinst->u_lock);
1904 rw_exit(&oplmsu_uinst->lock);
1924 rw_enter(&oplmsu_uinst->lock, RW_WRITER);
1925 mutex_enter(&oplmsu_uinst->u_lock);
1962 mutex_enter(&oplmsu_uinst->l_lock);
1965 mutex_exit(&oplmsu_uinst->l_lock);
1978 mutex_exit(&oplmsu_uinst->l_lock);
1988 mutex_exit(&oplmsu_uinst->l_lock);
1995 oplmsu_uinst->inst_status = oplmsu_get_inst_status();
1996 oplmsu_uinst->path_num = oplmsu_get_pathnum();
1997 mutex_exit(&oplmsu_uinst->u_lock);
1998 rw_exit(&oplmsu_uinst->lock);
2025 rw_enter(&oplmsu_uinst->lock, RW_WRITER);
2026 mutex_enter(&oplmsu_uinst->u_lock);
2030 mutex_exit(&oplmsu_uinst->u_lock);
2031 rw_exit(&oplmsu_uinst->lock);
2039 mutex_exit(&oplmsu_uinst->u_lock);
2040 rw_exit(&oplmsu_uinst->lock);
2046 mutex_enter(&oplmsu_uinst->l_lock);
2051 mutex_exit(&oplmsu_uinst->l_lock);
2052 mutex_exit(&oplmsu_uinst->u_lock);
2053 rw_exit(&oplmsu_uinst->lock);
2061 mutex_exit(&oplmsu_uinst->l_lock);
2062 mutex_exit(&oplmsu_uinst->u_lock);
2063 rw_exit(&oplmsu_uinst->lock);
2068 mutex_exit(&oplmsu_uinst->l_lock);
2069 mutex_exit(&oplmsu_uinst->u_lock);
2070 rw_exit(&oplmsu_uinst->lock);
2080 oplmsu_uinst->inst_status = oplmsu_get_inst_status();
2081 mutex_exit(&oplmsu_uinst->l_lock);
2082 mutex_exit(&oplmsu_uinst->u_lock);
2083 rw_exit(&oplmsu_uinst->lock);
2092 mutex_exit(&oplmsu_uinst->l_lock);
2093 mutex_exit(&oplmsu_uinst->u_lock);
2094 rw_exit(&oplmsu_uinst->lock);
2100 mutex_exit(&oplmsu_uinst->l_lock);
2101 mutex_exit(&oplmsu_uinst->u_lock);
2102 rw_exit(&oplmsu_uinst->lock);
2109 mutex_exit(&oplmsu_uinst->l_lock);
2110 mutex_exit(&oplmsu_uinst->u_lock);
2111 rw_exit(&oplmsu_uinst->lock);
2120 mutex_exit(&oplmsu_uinst->l_lock);
2121 mutex_exit(&oplmsu_uinst->u_lock);
2122 rw_exit(&oplmsu_uinst->lock);
2139 oplmsu_uinst->lower_queue = NULL;
2141 ctrl = oplmsu_uinst->user_ctrl;
2143 mutex_enter(&oplmsu_uinst->c_lock);
2145 mutex_exit(&oplmsu_uinst->c_lock);
2159 altn_lpath->uinst = oplmsu_uinst;
2173 oplmsu_uinst->lower_queue = RD(dst_queue);
2174 ctrl = oplmsu_uinst->user_ctrl;
2180 mutex_enter(&oplmsu_uinst->c_lock);
2182 mutex_exit(&oplmsu_uinst->c_lock);
2188 mutex_exit(&oplmsu_uinst->l_lock);
2189 mutex_exit(&oplmsu_uinst->u_lock);
2191 mutex_enter(&oplmsu_uinst->u_lock);
2192 mutex_enter(&oplmsu_uinst->l_lock);
2204 oplmsu_uinst->inst_status = oplmsu_get_inst_status();
2205 mutex_exit(&oplmsu_uinst->l_lock);
2206 mutex_exit(&oplmsu_uinst->u_lock);
2207 rw_exit(&oplmsu_uinst->lock);
2220 oplmsu_uinst->lower_queue = NULL;
2222 ctrl = oplmsu_uinst->user_ctrl;
2224 mutex_enter(&oplmsu_uinst->c_lock);
2226 mutex_exit(&oplmsu_uinst->c_lock);
2231 mutex_exit(&oplmsu_uinst->l_lock);
2232 mutex_exit(&oplmsu_uinst->u_lock);
2233 rw_exit(&oplmsu_uinst->lock);
2238 mutex_enter(&oplmsu_uinst->l_lock);
2242 cv_wait(&lpath->sw_cv, &oplmsu_uinst->l_lock);
2244 mutex_exit(&oplmsu_uinst->l_lock);
2249 mutex_exit(&oplmsu_uinst->l_lock);
2250 mutex_exit(&oplmsu_uinst->u_lock);
2251 rw_exit(&oplmsu_uinst->lock);
2259 mutex_exit(&oplmsu_uinst->l_lock);
2260 mutex_exit(&oplmsu_uinst->u_lock);
2261 rw_exit(&oplmsu_uinst->lock);
2282 rw_enter(&oplmsu_uinst->lock, RW_WRITER);
2283 mutex_enter(&oplmsu_uinst->u_lock);
2286 mutex_exit(&oplmsu_uinst->u_lock);
2287 rw_exit(&oplmsu_uinst->lock);
2295 for (upath = oplmsu_uinst->first_upath; upath; ) {
2304 mutex_exit(&oplmsu_uinst->u_lock);
2305 rw_exit(&oplmsu_uinst->lock);
2314 mutex_enter(&oplmsu_uinst->l_lock);
2317 mutex_exit(&oplmsu_uinst->l_lock);
2318 mutex_exit(&oplmsu_uinst->u_lock);
2319 rw_exit(&oplmsu_uinst->lock);
2336 oplmsu_uinst->msu_dip, 0, MSU_TTY_PORT_PROP, -1);
2345 mutex_enter(&oplmsu_uinst->l_lock);
2350 lpath->uinst = oplmsu_uinst;
2351 mutex_exit(&oplmsu_uinst->l_lock);
2359 mutex_enter(&oplmsu_uinst->l_lock);
2362 mutex_exit(&oplmsu_uinst->l_lock);
2382 mutex_enter(&oplmsu_uinst->l_lock);
2387 altn_lpath->uinst = oplmsu_uinst;
2388 mutex_exit(&oplmsu_uinst->l_lock);
2403 mutex_enter(&oplmsu_uinst->l_lock);
2409 oplmsu_uinst->lower_queue = main_rq;
2410 oplmsu_uinst->inst_status = oplmsu_get_inst_status();
2411 mutex_exit(&oplmsu_uinst->l_lock);
2412 mutex_exit(&oplmsu_uinst->u_lock);
2413 rw_exit(&oplmsu_uinst->lock);
2428 rw_enter(&oplmsu_uinst->lock, RW_READER);
2429 mutex_enter(&oplmsu_uinst->u_lock);
2433 mutex_exit(&oplmsu_uinst->u_lock);
2434 rw_exit(&oplmsu_uinst->lock);
2442 mutex_exit(&oplmsu_uinst->u_lock);
2443 rw_exit(&oplmsu_uinst->lock);
2449 mutex_exit(&oplmsu_uinst->u_lock);
2450 rw_exit(&oplmsu_uinst->lock);
2458 mutex_exit(&oplmsu_uinst->u_lock);
2459 rw_exit(&oplmsu_uinst->lock);
2465 mutex_enter(&oplmsu_uinst->l_lock);
2470 mutex_exit(&oplmsu_uinst->l_lock);
2471 mutex_exit(&oplmsu_uinst->u_lock);
2472 rw_exit(&oplmsu_uinst->lock);
2482 mutex_exit(&oplmsu_uinst->l_lock);
2483 mutex_exit(&oplmsu_uinst->u_lock);
2484 rw_exit(&oplmsu_uinst->lock);