Lines Matching defs:ntarget

967 				struct sf_target *ntarget;
975 for (ntarget = target->sft_next_lun;
976 ntarget;
977 ntarget = ntarget->sft_next_lun) {
978 mutex_enter(&ntarget->sft_mutex);
979 if (!(ntarget->sft_state &
981 ntarget->sft_state |=
985 mutex_exit(&ntarget->sft_mutex);
1029 struct sf_target *ntarget;
1036 for (ntarget = target->sft_next_lun;
1037 ntarget;
1038 ntarget = ntarget->sft_next_lun) {
1039 mutex_enter(&ntarget->sft_mutex);
1040 if (!(ntarget->sft_state &
1042 ntarget->sft_state |=
1046 mutex_exit(&ntarget->sft_mutex);
3216 struct sf_target *target, *ntarget, *otarget, *ptarget;
3224 ntarget = kmem_zalloc(sizeof (struct sf_target), KM_NOSLEEP);
3228 if (ntarget != NULL)
3229 kmem_free(ntarget, sizeof (struct sf_target));
3247 if (ntarget != NULL)
3248 kmem_free(ntarget, sizeof (struct sf_target));
3258 if (ntarget != NULL)
3259 kmem_free(ntarget, sizeof (struct sf_target));
3276 if (ntarget != NULL)
3277 kmem_free(ntarget, sizeof (struct sf_target));
3281 if (ntarget == NULL) {
3287 (caddr_t)&ntarget->sft_node_wwn, sizeof (privp->node_wwn));
3289 (caddr_t)&ntarget->sft_port_wwn, sizeof (privp->port_wwn));
3290 ntarget->sft_lun.l = lun;
3292 ntarget->sft_lun.l = orig_lun;
3293 ntarget->sft_raid_lun = (uint_t)lun;
3295 mutex_init(&ntarget->sft_mutex, NULL, MUTEX_DRIVER, NULL);
3296 mutex_init(&ntarget->sft_pkt_mutex, NULL, MUTEX_DRIVER, NULL);
3298 mutex_enter(&ntarget->sft_mutex);
3299 mutex_enter(&ntarget->sft_pkt_mutex);
3302 ntarget->sft_next = sf->sf_wwn_lists[hash];
3303 sf->sf_wwn_lists[hash] = ntarget;
3305 ntarget->sft_lip_cnt = privp->lip_cnt;
3306 ntarget->sft_al_pa = (uchar_t)privp->dest_nport_id;
3307 ntarget->sft_hard_address = sf_switch_to_alpa[tnum];
3308 ntarget->sft_device_type = DTYPE_UNKNOWN;
3309 ntarget->sft_state = SF_TARGET_BUSY;
3310 ntarget->sft_pkt_head = (struct sf_pkt *)&ntarget->
3312 ntarget->sft_pkt_tail = (struct sf_pkt *)&ntarget->
3321 ntarget->sft_next_lun = target->sft_next_lun;
3322 target->sft_next_lun = ntarget;
3324 mutex_exit(&ntarget->sft_pkt_mutex);
3325 mutex_exit(&ntarget->sft_mutex);
3327 return (ntarget);
3336 if (ntarget != NULL) {
3337 kmem_free(ntarget, sizeof (struct sf_target));
3353 if (ntarget != NULL)
3354 kmem_free(ntarget, sizeof (struct sf_target));
3372 if (ntarget == NULL) {
3377 (caddr_t)&ntarget->sft_node_wwn, sizeof (privp->node_wwn));
3379 (caddr_t)&ntarget->sft_port_wwn, sizeof (privp->port_wwn));
3380 ntarget->sft_lun.l = lun;
3382 ntarget->sft_lun.l = orig_lun;
3383 ntarget->sft_raid_lun = (uint_t)lun;
3385 mutex_init(&ntarget->sft_mutex, NULL, MUTEX_DRIVER, NULL);
3386 mutex_init(&ntarget->sft_pkt_mutex, NULL, MUTEX_DRIVER, NULL);
3387 mutex_enter(&ntarget->sft_mutex);
3388 mutex_enter(&ntarget->sft_pkt_mutex);
3390 ntarget->sft_next = sf->sf_wwn_lists[hash];
3391 sf->sf_wwn_lists[hash] = ntarget;
3393 target = ntarget;
3404 mutex_exit(&ntarget->sft_mutex);
3405 mutex_exit(&ntarget->sft_pkt_mutex);
3416 if (ntarget != NULL)
3417 kmem_free(ntarget, sizeof (struct sf_target));
4766 struct sf_target *target = ADDR2TARGET(ap), *ntarget;
4798 for (ntarget = target->sft_next_lun;
4799 ntarget;
4800 ntarget = ntarget->sft_next_lun) {
4801 mutex_enter(&ntarget->sft_mutex);
4807 ntarget->sft_state |= SF_TARGET_BUSY;
4808 mutex_exit(&ntarget->sft_mutex);
4948 for (ntarget = target->sft_next_lun;
4949 ntarget;
4950 ntarget = ntarget->sft_next_lun) {
4951 mutex_enter(&ntarget->sft_mutex);
4952 ntarget->sft_state &= ~SF_TARGET_BUSY;
4953 mutex_exit(&ntarget->sft_mutex);
4990 struct sf_target *ntarget;
5006 ntarget = ADDR2TARGET(&cmd->cmd_pkt->
5008 if (ntarget == target) {