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()
7354 struct ahc_tmode_lstate **lstate, in ahc_find_tmode_devs() argument
7368 *lstate = ahc->black_hole; in ahc_find_tmode_devs()
7380 *lstate = NULL; in ahc_find_tmode_devs()
7382 *lstate = in ahc_find_tmode_devs()
7386 if (notfound_failure != 0 && *lstate == NULL) in ahc_find_tmode_devs()
7396 struct ahc_tmode_lstate *lstate; in ahc_handle_en_lun() local
7407 status = ahc_find_tmode_devs(ahc, sim, ccb, &tstate, &lstate, in ahc_handle_en_lun()
7528 if (lstate != NULL) { in ahc_handle_en_lun()
7559 lstate = kzalloc(sizeof(*lstate), GFP_ATOMIC); in ahc_handle_en_lun()
7560 if (lstate == NULL) { in ahc_handle_en_lun()
7566 status = xpt_create_path(&lstate->path, /*periph*/NULL, in ahc_handle_en_lun()
7571 kfree(lstate); in ahc_handle_en_lun()
7577 SLIST_INIT(&lstate->accept_tios); in ahc_handle_en_lun()
7578 SLIST_INIT(&lstate->immed_notifies); in ahc_handle_en_lun()
7582 tstate->enabled_luns[lun] = lstate; in ahc_handle_en_lun()
7634 ahc->black_hole = lstate; in ahc_handle_en_lun()
7653 if (lstate == NULL) { in ahc_handle_en_lun()
7674 if (SLIST_FIRST(&lstate->accept_tios) != NULL) { in ahc_handle_en_lun()
7679 if (SLIST_FIRST(&lstate->immed_notifies) != NULL) { in ahc_handle_en_lun()
7691 xpt_free_path(lstate->path); in ahc_handle_en_lun()
7692 kfree(lstate); in ahc_handle_en_lun()
7861 struct ahc_tmode_lstate *lstate; in ahc_handle_target_cmd() local
7874 lstate = NULL; in ahc_handle_target_cmd()
7876 lstate = tstate->enabled_luns[lun]; in ahc_handle_target_cmd()
7881 if (lstate == NULL) in ahc_handle_target_cmd()
7882 lstate = ahc->black_hole; in ahc_handle_target_cmd()
7884 atio = (struct ccb_accept_tio*)SLIST_FIRST(&lstate->accept_tios); in ahc_handle_target_cmd()
7898 lstate == ahc->black_hole ? "(Black Holed)" : ""); in ahc_handle_target_cmd()
7900 SLIST_REMOVE_HEAD(&lstate->accept_tios, sim_links.sle); in ahc_handle_target_cmd()
7902 if (lstate == ahc->black_hole) { in ahc_handle_target_cmd()
7962 ahc->pending_device = lstate; in ahc_handle_target_cmd()