Lines Matching refs:tpnt
4246 struct scsi_tape *tpnt = NULL; in st_probe() local
4274 tpnt = kzalloc(sizeof(struct scsi_tape), GFP_KERNEL); in st_probe()
4275 if (tpnt == NULL) { in st_probe()
4280 kref_init(&tpnt->kref); in st_probe()
4282 tpnt->device = SDp; in st_probe()
4284 tpnt->tape_type = MT_ISSCSI1; in st_probe()
4286 tpnt->tape_type = MT_ISSCSI2; in st_probe()
4288 tpnt->buffer = buffer; in st_probe()
4289 tpnt->buffer->last_SRpnt = NULL; in st_probe()
4291 tpnt->inited = 0; in st_probe()
4292 tpnt->dirty = 0; in st_probe()
4293 tpnt->in_use = 0; in st_probe()
4294 tpnt->drv_buffer = 1; /* Try buffering if no mode sense */ in st_probe()
4295 tpnt->use_pf = (SDp->scsi_level >= SCSI_2); in st_probe()
4296 tpnt->density = 0; in st_probe()
4297 tpnt->do_auto_lock = ST_AUTO_LOCK; in st_probe()
4298 tpnt->can_bsr = (SDp->scsi_level > 2 ? 1 : ST_IN_FILE_POS); /* BSR mandatory in SCSI3 */ in st_probe()
4299 tpnt->can_partitions = 0; in st_probe()
4300 tpnt->two_fm = ST_TWO_FM; in st_probe()
4301 tpnt->fast_mteom = ST_FAST_MTEOM; in st_probe()
4302 tpnt->scsi2_logical = ST_SCSI2LOGICAL; in st_probe()
4303 tpnt->sili = ST_SILI; in st_probe()
4304 tpnt->immediate = ST_NOWAIT; in st_probe()
4305 tpnt->immediate_filemark = 0; in st_probe()
4306 tpnt->default_drvbuffer = 0xff; /* No forced buffering */ in st_probe()
4307 tpnt->partition = 0; in st_probe()
4308 tpnt->new_partition = 0; in st_probe()
4309 tpnt->nbr_partitions = 0; in st_probe()
4310 blk_queue_rq_timeout(tpnt->device->request_queue, ST_TIMEOUT); in st_probe()
4311 tpnt->long_timeout = ST_LONG_TIMEOUT; in st_probe()
4312 tpnt->try_dio = try_direct_io; in st_probe()
4315 STm = &(tpnt->modes[i]); in st_probe()
4325 STm->tape = tpnt; in st_probe()
4329 STps = &(tpnt->ps[i]); in st_probe()
4338 tpnt->current_mode = 0; in st_probe()
4339 tpnt->modes[0].defined = 1; in st_probe()
4341 tpnt->density_changed = tpnt->compression_changed = in st_probe()
4342 tpnt->blksize_changed = 0; in st_probe()
4343 mutex_init(&tpnt->lock); in st_probe()
4347 error = idr_alloc(&st_index_idr, tpnt, 0, ST_MAX_TAPES + 1, GFP_NOWAIT); in st_probe()
4354 tpnt->index = error; in st_probe()
4355 sprintf(tpnt->name, "st%d", tpnt->index); in st_probe()
4356 tpnt->stats = kzalloc(sizeof(struct scsi_tape_stats), GFP_KERNEL); in st_probe()
4357 if (tpnt->stats == NULL) { in st_probe()
4363 dev_set_drvdata(dev, tpnt); in st_probe()
4366 error = create_cdevs(tpnt); in st_probe()
4372 "Attached scsi tape %s\n", tpnt->name); in st_probe()
4374 tpnt->name, tpnt->try_dio ? "yes" : "no", in st_probe()
4380 remove_cdevs(tpnt); in st_probe()
4381 kfree(tpnt->stats); in st_probe()
4384 idr_remove(&st_index_idr, tpnt->index); in st_probe()
4387 kfree(tpnt); in st_probe()
4398 struct scsi_tape *tpnt = dev_get_drvdata(dev); in st_remove() local
4399 int index = tpnt->index; in st_remove()
4402 remove_cdevs(tpnt); in st_remove()
4405 kref_put(&tpnt->kref, scsi_tape_release); in st_remove()
4424 struct scsi_tape *tpnt = to_scsi_tape(kref); in scsi_tape_release() local
4426 tpnt->device = NULL; in scsi_tape_release()
4428 if (tpnt->buffer) { in scsi_tape_release()
4429 normalize_buffer(tpnt->buffer); in scsi_tape_release()
4430 kfree(tpnt->buffer->reserved_pages); in scsi_tape_release()
4431 kfree(tpnt->buffer); in scsi_tape_release()
4434 kfree(tpnt->stats); in scsi_tape_release()
4435 kfree(tpnt); in scsi_tape_release()