Lines Matching refs:lstate
222 struct ahd_tmode_lstate *lstate,
5432 struct ahd_tmode_lstate* lstate; in ahd_parse_msg() local
5434 lstate = tstate->enabled_luns[devinfo->lun]; in ahd_parse_msg()
5435 if (lstate != NULL) { in ahd_parse_msg()
5436 ahd_queue_lstate_event(ahd, lstate, in ahd_parse_msg()
5440 ahd_send_lstate_events(ahd, lstate); in ahd_parse_msg()
5918 struct ahd_tmode_lstate* lstate; in ahd_handle_devreset() local
5920 lstate = tstate->enabled_luns[cur_lun]; in ahd_handle_devreset()
5921 if (lstate == NULL) in ahd_handle_devreset()
5924 ahd_queue_lstate_event(ahd, lstate, devinfo->our_scsiid, in ahd_handle_devreset()
5926 ahd_send_lstate_events(ahd, lstate); in ahd_handle_devreset()
6149 struct ahd_tmode_lstate *lstate; in ahd_free() local
6151 lstate = tstate->enabled_luns[j]; in ahd_free()
6152 if (lstate != NULL) { in ahd_free()
6153 xpt_free_path(lstate->path); in ahd_free()
6154 kfree(lstate); in ahd_free()
8741 struct ahd_tmode_lstate* lstate; in ahd_reset_channel() local
8743 lstate = tstate->enabled_luns[lun]; in ahd_reset_channel()
8744 if (lstate == NULL) in ahd_reset_channel()
8747 ahd_queue_lstate_event(ahd, lstate, CAM_TARGET_WILDCARD, in ahd_reset_channel()
8749 ahd_send_lstate_events(ahd, lstate); in ahd_reset_channel()
9147 ahd_queue_lstate_event(struct ahd_softc *ahd, struct ahd_tmode_lstate *lstate, in ahd_queue_lstate_event() argument
9153 xpt_freeze_devq(lstate->path, /*count*/1); in ahd_queue_lstate_event()
9154 if (lstate->event_w_idx >= lstate->event_r_idx) in ahd_queue_lstate_event()
9155 pending = lstate->event_w_idx - lstate->event_r_idx; in ahd_queue_lstate_event()
9158 - (lstate->event_r_idx - lstate->event_w_idx); in ahd_queue_lstate_event()
9168 lstate->event_r_idx = 0; in ahd_queue_lstate_event()
9169 lstate->event_w_idx = 0; in ahd_queue_lstate_event()
9170 xpt_release_devq(lstate->path, pending, /*runqueue*/FALSE); in ahd_queue_lstate_event()
9174 xpt_print_path(lstate->path); in ahd_queue_lstate_event()
9176 lstate->event_buffer[lstate->event_r_idx].event_type, in ahd_queue_lstate_event()
9177 lstate->event_buffer[lstate->event_r_idx].event_arg); in ahd_queue_lstate_event()
9178 lstate->event_r_idx++; in ahd_queue_lstate_event()
9179 if (lstate->event_r_idx == AHD_TMODE_EVENT_BUFFER_SIZE) in ahd_queue_lstate_event()
9180 lstate->event_r_idx = 0; in ahd_queue_lstate_event()
9181 xpt_release_devq(lstate->path, /*count*/1, /*runqueue*/FALSE); in ahd_queue_lstate_event()
9184 event = &lstate->event_buffer[lstate->event_w_idx]; in ahd_queue_lstate_event()
9188 lstate->event_w_idx++; in ahd_queue_lstate_event()
9189 if (lstate->event_w_idx == AHD_TMODE_EVENT_BUFFER_SIZE) in ahd_queue_lstate_event()
9190 lstate->event_w_idx = 0; in ahd_queue_lstate_event()
9198 ahd_send_lstate_events(struct ahd_softc *ahd, struct ahd_tmode_lstate *lstate) in ahd_send_lstate_events() argument
9203 while (lstate->event_r_idx != lstate->event_w_idx in ahd_send_lstate_events()
9204 && (ccbh = SLIST_FIRST(&lstate->immed_notifies)) != NULL) { in ahd_send_lstate_events()
9207 event = &lstate->event_buffer[lstate->event_r_idx]; in ahd_send_lstate_events()
9208 SLIST_REMOVE_HEAD(&lstate->immed_notifies, sim_links.sle); in ahd_send_lstate_events()
9223 lstate->event_r_idx++; in ahd_send_lstate_events()
9224 if (lstate->event_r_idx == AHD_TMODE_EVENT_BUFFER_SIZE) in ahd_send_lstate_events()
9225 lstate->event_r_idx = 0; in ahd_send_lstate_events()
10182 struct ahd_tmode_lstate **lstate, in ahd_find_tmode_devs() argument
10196 *lstate = ahd->black_hole; in ahd_find_tmode_devs()
10208 *lstate = NULL; in ahd_find_tmode_devs()
10210 *lstate = in ahd_find_tmode_devs()
10214 if (notfound_failure != 0 && *lstate == NULL) in ahd_find_tmode_devs()
10225 struct ahd_tmode_lstate *lstate; in ahd_handle_en_lun() local
10234 status = ahd_find_tmode_devs(ahd, sim, ccb, &tstate, &lstate, in ahd_handle_en_lun()
10311 if (lstate != NULL) { in ahd_handle_en_lun()
10342 lstate = kzalloc(sizeof(*lstate), GFP_ATOMIC); in ahd_handle_en_lun()
10343 if (lstate == NULL) { in ahd_handle_en_lun()
10349 status = xpt_create_path(&lstate->path, /*periph*/NULL, in ahd_handle_en_lun()
10354 kfree(lstate); in ahd_handle_en_lun()
10360 SLIST_INIT(&lstate->accept_tios); in ahd_handle_en_lun()
10361 SLIST_INIT(&lstate->immed_notifies); in ahd_handle_en_lun()
10365 tstate->enabled_luns[lun] = lstate; in ahd_handle_en_lun()
10410 ahd->black_hole = lstate; in ahd_handle_en_lun()
10429 if (lstate == NULL) { in ahd_handle_en_lun()
10450 if (SLIST_FIRST(&lstate->accept_tios) != NULL) { in ahd_handle_en_lun()
10455 if (SLIST_FIRST(&lstate->immed_notifies) != NULL) { in ahd_handle_en_lun()
10467 xpt_free_path(lstate->path); in ahd_handle_en_lun()
10468 kfree(lstate); in ahd_handle_en_lun()
10615 struct ahd_tmode_lstate *lstate; in ahd_handle_target_cmd() local
10628 lstate = NULL; in ahd_handle_target_cmd()
10630 lstate = tstate->enabled_luns[lun]; in ahd_handle_target_cmd()
10635 if (lstate == NULL) in ahd_handle_target_cmd()
10636 lstate = ahd->black_hole; in ahd_handle_target_cmd()
10638 atio = (struct ccb_accept_tio*)SLIST_FIRST(&lstate->accept_tios); in ahd_handle_target_cmd()
10651 lstate == ahd->black_hole ? "(Black Holed)" : ""); in ahd_handle_target_cmd()
10653 SLIST_REMOVE_HEAD(&lstate->accept_tios, sim_links.sle); in ahd_handle_target_cmd()
10655 if (lstate == ahd->black_hole) { in ahd_handle_target_cmd()
10716 ahd->pending_device = lstate; in ahd_handle_target_cmd()