Lines Matching refs:tstate
564 u_int remote_id, struct ahd_tmode_tstate **tstate) in ahd_fetch_transinfo() argument
574 *tstate = ahd->enabled_targets[our_id]; in ahd_fetch_transinfo()
575 return (&(*tstate)->transinfo[remote_id]); in ahd_fetch_transinfo()
3104 struct ahd_tmode_tstate *tstate; in ahd_handle_nonpkt_busfree() local
3122 devinfo.target, &tstate); in ahd_handle_nonpkt_busfree()
3391 struct ahd_tmode_tstate *tstate; in ahd_force_renegotiation() local
3403 &tstate); in ahd_force_renegotiation()
3404 ahd_update_neg_request(ahd, devinfo, tstate, in ahd_force_renegotiation()
3599 struct ahd_tmode_tstate *tstate; in ahd_alloc_tstate() local
3607 tstate = kmalloc(sizeof(*tstate), GFP_ATOMIC); in ahd_alloc_tstate()
3608 if (tstate == NULL) in ahd_alloc_tstate()
3618 memcpy(tstate, master_tstate, sizeof(*tstate)); in ahd_alloc_tstate()
3619 memset(tstate->enabled_luns, 0, sizeof(tstate->enabled_luns)); in ahd_alloc_tstate()
3621 memset(&tstate->transinfo[i].curr, 0, in ahd_alloc_tstate()
3622 sizeof(tstate->transinfo[i].curr)); in ahd_alloc_tstate()
3623 memset(&tstate->transinfo[i].goal, 0, in ahd_alloc_tstate()
3624 sizeof(tstate->transinfo[i].goal)); in ahd_alloc_tstate()
3627 memset(tstate, 0, sizeof(*tstate)); in ahd_alloc_tstate()
3628 ahd->enabled_targets[scsi_id] = tstate; in ahd_alloc_tstate()
3629 return (tstate); in ahd_alloc_tstate()
3640 struct ahd_tmode_tstate *tstate; in ahd_free_tstate() local
3650 tstate = ahd->enabled_targets[scsi_id]; in ahd_free_tstate()
3651 kfree(tstate); in ahd_free_tstate()
3813 struct ahd_tmode_tstate *tstate, in ahd_update_neg_request() argument
3818 auto_negotiate_orig = tstate->auto_negotiate; in ahd_update_neg_request()
3839 tstate->auto_negotiate |= devinfo->target_mask; in ahd_update_neg_request()
3841 tstate->auto_negotiate &= ~devinfo->target_mask; in ahd_update_neg_request()
3843 return (auto_negotiate_orig != tstate->auto_negotiate); in ahd_update_neg_request()
3860 struct ahd_tmode_tstate *tstate; in ahd_set_syncrate() local
3876 devinfo->target, &tstate); in ahd_set_syncrate()
3985 update_needed += ahd_update_neg_request(ahd, devinfo, tstate, in ahd_set_syncrate()
4005 struct ahd_tmode_tstate *tstate; in ahd_set_width() local
4013 devinfo->target, &tstate); in ahd_set_width()
4044 update_needed += ahd_update_neg_request(ahd, devinfo, tstate, in ahd_set_width()
4207 struct ahd_tmode_tstate *tstate; in ahd_update_pending_scbs() local
4211 devinfo.target, &tstate); in ahd_update_pending_scbs()
4212 if ((tstate->auto_negotiate & devinfo.target_mask) == 0 in ahd_update_pending_scbs()
4494 struct ahd_tmode_tstate *tstate; in ahd_build_transfer_msg() local
4503 devinfo->target, &tstate); in ahd_build_transfer_msg()
5069 struct ahd_tmode_tstate *tstate; in ahd_parse_msg() local
5078 devinfo->target, &tstate); in ahd_parse_msg()
5267 ahd_update_neg_request(ahd, devinfo, tstate, in ahd_parse_msg()
5430 tstate = ahd->enabled_targets[devinfo->our_scsiid]; in ahd_parse_msg()
5431 if (tstate != NULL) { in ahd_parse_msg()
5434 lstate = tstate->enabled_luns[devinfo->lun]; in ahd_parse_msg()
5494 struct ahd_tmode_tstate *tstate; in ahd_handle_msg_reject() local
5503 devinfo->target, &tstate); in ahd_handle_msg_reject()
5892 struct ahd_tmode_tstate* tstate; in ahd_handle_devreset() local
5905 tstate = ahd->enabled_targets[devinfo->our_scsiid]; in ahd_handle_devreset()
5906 if (tstate != NULL) { in ahd_handle_devreset()
5920 lstate = tstate->enabled_luns[cur_lun]; in ahd_handle_devreset()
6141 struct ahd_tmode_tstate *tstate; in ahd_free() local
6143 tstate = ahd->enabled_targets[i]; in ahd_free()
6144 if (tstate != NULL) { in ahd_free()
6151 lstate = tstate->enabled_luns[j]; in ahd_free()
6158 kfree(tstate); in ahd_free()
7378 struct ahd_tmode_tstate *tstate; in ahd_chip_init() local
7381 target, &tstate); in ahd_chip_init()
7560 struct ahd_tmode_tstate *tstate; in ahd_default_config() local
7564 targ, &tstate); in ahd_default_config()
7573 tstate->discenable |= target_mask; in ahd_default_config()
7603 tstate->tagenable &= ~target_mask; in ahd_default_config()
7640 struct ahd_tmode_tstate *tstate; in ahd_parse_cfgdata() local
7644 targ, &tstate); in ahd_parse_cfgdata()
7655 tstate->discenable &= ~target_mask; in ahd_parse_cfgdata()
7658 tstate->discenable |= target_mask; in ahd_parse_cfgdata()
7709 tstate->tagenable &= ~target_mask; in ahd_parse_cfgdata()
8734 struct ahd_tmode_tstate* tstate; in ahd_reset_channel() local
8737 tstate = ahd->enabled_targets[target]; in ahd_reset_channel()
8738 if (tstate == NULL) in ahd_reset_channel()
8743 lstate = tstate->enabled_luns[lun]; in ahd_reset_channel()
8935 struct ahd_tmode_tstate *tstate; in ahd_handle_scsi_status() local
8957 &tstate); in ahd_handle_scsi_status()
9004 tstate, targ_info, in ahd_handle_scsi_status()
9007 if (tstate->auto_negotiate & devinfo.target_mask) { in ahd_handle_scsi_status()
10181 struct ahd_tmode_tstate **tstate, in ahd_find_tmode_devs() argument
10195 *tstate = NULL; in ahd_find_tmode_devs()
10207 *tstate = ahd->enabled_targets[ccb->ccb_h.target_id]; in ahd_find_tmode_devs()
10209 if (*tstate != NULL) in ahd_find_tmode_devs()
10211 (*tstate)->enabled_luns[ccb->ccb_h.target_lun]; in ahd_find_tmode_devs()
10224 struct ahd_tmode_tstate *tstate; in ahd_handle_en_lun() local
10234 status = ahd_find_tmode_devs(ahd, sim, ccb, &tstate, &lstate, in ahd_handle_en_lun()
10333 if (target != CAM_TARGET_WILDCARD && tstate == NULL) { in ahd_handle_en_lun()
10334 tstate = ahd_alloc_tstate(ahd, target, channel); in ahd_handle_en_lun()
10335 if (tstate == NULL) { in ahd_handle_en_lun()
10365 tstate->enabled_luns[lun] = lstate; in ahd_handle_en_lun()
10473 tstate->enabled_luns[lun] = NULL; in ahd_handle_en_lun()
10476 if (tstate->enabled_luns[i] != NULL) { in ahd_handle_en_lun()
10614 struct ahd_tmode_tstate *tstate; in ahd_handle_target_cmd() local
10627 tstate = ahd->enabled_targets[target]; in ahd_handle_target_cmd()
10629 if (tstate != NULL) in ahd_handle_target_cmd()
10630 lstate = tstate->enabled_luns[lun]; in ahd_handle_target_cmd()