Lines Matching refs:tpnt
4248 struct scsi_tape *tpnt = NULL; in st_probe() local
4276 tpnt = kzalloc(sizeof(struct scsi_tape), GFP_KERNEL); in st_probe()
4277 if (tpnt == NULL) { in st_probe()
4282 kref_init(&tpnt->kref); in st_probe()
4284 tpnt->device = SDp; in st_probe()
4286 tpnt->tape_type = MT_ISSCSI1; in st_probe()
4288 tpnt->tape_type = MT_ISSCSI2; in st_probe()
4290 tpnt->buffer = buffer; in st_probe()
4291 tpnt->buffer->last_SRpnt = NULL; in st_probe()
4293 tpnt->inited = 0; in st_probe()
4294 tpnt->dirty = 0; in st_probe()
4295 tpnt->in_use = 0; in st_probe()
4296 tpnt->drv_buffer = 1; /* Try buffering if no mode sense */ in st_probe()
4297 tpnt->use_pf = (SDp->scsi_level >= SCSI_2); in st_probe()
4298 tpnt->density = 0; in st_probe()
4299 tpnt->do_auto_lock = ST_AUTO_LOCK; in st_probe()
4300 tpnt->can_bsr = (SDp->scsi_level > 2 ? 1 : ST_IN_FILE_POS); /* BSR mandatory in SCSI3 */ in st_probe()
4301 tpnt->can_partitions = 0; in st_probe()
4302 tpnt->two_fm = ST_TWO_FM; in st_probe()
4303 tpnt->fast_mteom = ST_FAST_MTEOM; in st_probe()
4304 tpnt->scsi2_logical = ST_SCSI2LOGICAL; in st_probe()
4305 tpnt->sili = ST_SILI; in st_probe()
4306 tpnt->immediate = ST_NOWAIT; in st_probe()
4307 tpnt->immediate_filemark = 0; in st_probe()
4308 tpnt->default_drvbuffer = 0xff; /* No forced buffering */ in st_probe()
4309 tpnt->partition = 0; in st_probe()
4310 tpnt->new_partition = 0; in st_probe()
4311 tpnt->nbr_partitions = 0; in st_probe()
4312 blk_queue_rq_timeout(tpnt->device->request_queue, ST_TIMEOUT); in st_probe()
4313 tpnt->long_timeout = ST_LONG_TIMEOUT; in st_probe()
4314 tpnt->try_dio = try_direct_io; in st_probe()
4317 STm = &(tpnt->modes[i]); in st_probe()
4327 STm->tape = tpnt; in st_probe()
4331 STps = &(tpnt->ps[i]); in st_probe()
4340 tpnt->current_mode = 0; in st_probe()
4341 tpnt->modes[0].defined = 1; in st_probe()
4343 tpnt->density_changed = tpnt->compression_changed = in st_probe()
4344 tpnt->blksize_changed = 0; in st_probe()
4345 mutex_init(&tpnt->lock); in st_probe()
4349 error = idr_alloc(&st_index_idr, tpnt, 0, ST_MAX_TAPES + 1, GFP_NOWAIT); in st_probe()
4356 tpnt->index = error; in st_probe()
4357 sprintf(tpnt->name, "st%d", tpnt->index); in st_probe()
4358 tpnt->stats = kzalloc(sizeof(struct scsi_tape_stats), GFP_KERNEL); in st_probe()
4359 if (tpnt->stats == NULL) { in st_probe()
4365 dev_set_drvdata(dev, tpnt); in st_probe()
4368 error = create_cdevs(tpnt); in st_probe()
4374 "Attached scsi tape %s\n", tpnt->name); in st_probe()
4376 tpnt->name, tpnt->try_dio ? "yes" : "no", in st_probe()
4382 remove_cdevs(tpnt); in st_probe()
4383 kfree(tpnt->stats); in st_probe()
4386 idr_remove(&st_index_idr, tpnt->index); in st_probe()
4389 kfree(tpnt); in st_probe()
4400 struct scsi_tape *tpnt = dev_get_drvdata(dev); in st_remove() local
4401 int index = tpnt->index; in st_remove()
4404 remove_cdevs(tpnt); in st_remove()
4407 kref_put(&tpnt->kref, scsi_tape_release); in st_remove()
4426 struct scsi_tape *tpnt = to_scsi_tape(kref); in scsi_tape_release() local
4428 tpnt->device = NULL; in scsi_tape_release()
4430 if (tpnt->buffer) { in scsi_tape_release()
4431 normalize_buffer(tpnt->buffer); in scsi_tape_release()
4432 kfree(tpnt->buffer->reserved_pages); in scsi_tape_release()
4433 kfree(tpnt->buffer); in scsi_tape_release()
4436 kfree(tpnt->stats); in scsi_tape_release()
4437 kfree(tpnt); in scsi_tape_release()