Lines Matching refs:lstate

230 					       struct ahc_tmode_lstate *lstate,
3962 struct ahc_tmode_lstate* lstate; in ahc_parse_msg() local
3964 lstate = tstate->enabled_luns[devinfo->lun]; in ahc_parse_msg()
3965 if (lstate != NULL) { in ahc_parse_msg()
3966 ahc_queue_lstate_event(ahc, lstate, in ahc_parse_msg()
3970 ahc_send_lstate_events(ahc, lstate); in ahc_parse_msg()
4343 struct ahc_tmode_lstate* lstate; in ahc_handle_devreset() local
4345 lstate = tstate->enabled_luns[lun]; in ahc_handle_devreset()
4346 if (lstate == NULL) in ahc_handle_devreset()
4349 ahc_queue_lstate_event(ahc, lstate, devinfo->our_scsiid, in ahc_handle_devreset()
4351 ahc_send_lstate_events(ahc, lstate); in ahc_handle_devreset()
4534 struct ahc_tmode_lstate *lstate; in ahc_free() local
4536 lstate = tstate->enabled_luns[j]; in ahc_free()
4537 if (lstate != NULL) { in ahc_free()
4538 xpt_free_path(lstate->path); in ahc_free()
4539 kfree(lstate); in ahc_free()
6603 struct ahc_tmode_lstate* lstate; in ahc_reset_channel() local
6605 lstate = tstate->enabled_luns[lun]; in ahc_reset_channel()
6606 if (lstate == NULL) in ahc_reset_channel()
6609 ahc_queue_lstate_event(ahc, lstate, CAM_TARGET_WILDCARD, in ahc_reset_channel()
6611 ahc_send_lstate_events(ahc, lstate); in ahc_reset_channel()
6742 ahc_queue_lstate_event(struct ahc_softc *ahc, struct ahc_tmode_lstate *lstate, in ahc_queue_lstate_event() argument
6748 xpt_freeze_devq(lstate->path, /*count*/1); in ahc_queue_lstate_event()
6749 if (lstate->event_w_idx >= lstate->event_r_idx) in ahc_queue_lstate_event()
6750 pending = lstate->event_w_idx - lstate->event_r_idx; in ahc_queue_lstate_event()
6753 - (lstate->event_r_idx - lstate->event_w_idx); in ahc_queue_lstate_event()
6763 lstate->event_r_idx = 0; in ahc_queue_lstate_event()
6764 lstate->event_w_idx = 0; in ahc_queue_lstate_event()
6765 xpt_release_devq(lstate->path, pending, /*runqueue*/FALSE); in ahc_queue_lstate_event()
6769 xpt_print_path(lstate->path); in ahc_queue_lstate_event()
6771 lstate->event_buffer[lstate->event_r_idx].event_type, in ahc_queue_lstate_event()
6772 lstate->event_buffer[lstate->event_r_idx].event_arg); in ahc_queue_lstate_event()
6773 lstate->event_r_idx++; in ahc_queue_lstate_event()
6774 if (lstate->event_r_idx == AHC_TMODE_EVENT_BUFFER_SIZE) in ahc_queue_lstate_event()
6775 lstate->event_r_idx = 0; in ahc_queue_lstate_event()
6776 xpt_release_devq(lstate->path, /*count*/1, /*runqueue*/FALSE); in ahc_queue_lstate_event()
6779 event = &lstate->event_buffer[lstate->event_w_idx]; in ahc_queue_lstate_event()
6783 lstate->event_w_idx++; in ahc_queue_lstate_event()
6784 if (lstate->event_w_idx == AHC_TMODE_EVENT_BUFFER_SIZE) in ahc_queue_lstate_event()
6785 lstate->event_w_idx = 0; in ahc_queue_lstate_event()
6793 ahc_send_lstate_events(struct ahc_softc *ahc, struct ahc_tmode_lstate *lstate) in ahc_send_lstate_events() argument
6798 while (lstate->event_r_idx != lstate->event_w_idx in ahc_send_lstate_events()
6799 && (ccbh = SLIST_FIRST(&lstate->immed_notifies)) != NULL) { in ahc_send_lstate_events()
6802 event = &lstate->event_buffer[lstate->event_r_idx]; in ahc_send_lstate_events()
6803 SLIST_REMOVE_HEAD(&lstate->immed_notifies, sim_links.sle); in ahc_send_lstate_events()
6818 lstate->event_r_idx++; in ahc_send_lstate_events()
6819 if (lstate->event_r_idx == AHC_TMODE_EVENT_BUFFER_SIZE) in ahc_send_lstate_events()
6820 lstate->event_r_idx = 0; in ahc_send_lstate_events()
7355 struct ahc_tmode_lstate **lstate, in ahc_find_tmode_devs() argument
7369 *lstate = ahc->black_hole; in ahc_find_tmode_devs()
7381 *lstate = NULL; in ahc_find_tmode_devs()
7383 *lstate = in ahc_find_tmode_devs()
7387 if (notfound_failure != 0 && *lstate == NULL) in ahc_find_tmode_devs()
7397 struct ahc_tmode_lstate *lstate; in ahc_handle_en_lun() local
7408 status = ahc_find_tmode_devs(ahc, sim, ccb, &tstate, &lstate, in ahc_handle_en_lun()
7529 if (lstate != NULL) { in ahc_handle_en_lun()
7560 lstate = kzalloc(sizeof(*lstate), GFP_ATOMIC); in ahc_handle_en_lun()
7561 if (lstate == NULL) { in ahc_handle_en_lun()
7567 status = xpt_create_path(&lstate->path, /*periph*/NULL, in ahc_handle_en_lun()
7572 kfree(lstate); in ahc_handle_en_lun()
7578 SLIST_INIT(&lstate->accept_tios); in ahc_handle_en_lun()
7579 SLIST_INIT(&lstate->immed_notifies); in ahc_handle_en_lun()
7583 tstate->enabled_luns[lun] = lstate; in ahc_handle_en_lun()
7635 ahc->black_hole = lstate; in ahc_handle_en_lun()
7654 if (lstate == NULL) { in ahc_handle_en_lun()
7675 if (SLIST_FIRST(&lstate->accept_tios) != NULL) { in ahc_handle_en_lun()
7680 if (SLIST_FIRST(&lstate->immed_notifies) != NULL) { in ahc_handle_en_lun()
7692 xpt_free_path(lstate->path); in ahc_handle_en_lun()
7693 kfree(lstate); in ahc_handle_en_lun()
7862 struct ahc_tmode_lstate *lstate; in ahc_handle_target_cmd() local
7875 lstate = NULL; in ahc_handle_target_cmd()
7877 lstate = tstate->enabled_luns[lun]; in ahc_handle_target_cmd()
7882 if (lstate == NULL) in ahc_handle_target_cmd()
7883 lstate = ahc->black_hole; in ahc_handle_target_cmd()
7885 atio = (struct ccb_accept_tio*)SLIST_FIRST(&lstate->accept_tios); in ahc_handle_target_cmd()
7899 lstate == ahc->black_hole ? "(Black Holed)" : ""); in ahc_handle_target_cmd()
7901 SLIST_REMOVE_HEAD(&lstate->accept_tios, sim_links.sle); in ahc_handle_target_cmd()
7903 if (lstate == ahc->black_hole) { in ahc_handle_target_cmd()
7963 ahc->pending_device = lstate; in ahc_handle_target_cmd()