Lines Matching refs:tpnt

4244 	struct scsi_tape *tpnt = NULL;  in st_probe()  local
4273 tpnt = kzalloc(sizeof(struct scsi_tape), GFP_KERNEL); in st_probe()
4274 if (tpnt == NULL) { in st_probe()
4279 kref_init(&tpnt->kref); in st_probe()
4281 tpnt->device = SDp; in st_probe()
4283 tpnt->tape_type = MT_ISSCSI1; in st_probe()
4285 tpnt->tape_type = MT_ISSCSI2; in st_probe()
4287 tpnt->buffer = buffer; in st_probe()
4288 tpnt->buffer->last_SRpnt = NULL; in st_probe()
4290 tpnt->inited = 0; in st_probe()
4291 tpnt->dirty = 0; in st_probe()
4292 tpnt->in_use = 0; in st_probe()
4293 tpnt->drv_buffer = 1; /* Try buffering if no mode sense */ in st_probe()
4294 tpnt->use_pf = (SDp->scsi_level >= SCSI_2); in st_probe()
4295 tpnt->density = 0; in st_probe()
4296 tpnt->do_auto_lock = ST_AUTO_LOCK; in st_probe()
4297 tpnt->can_bsr = (SDp->scsi_level > 2 ? 1 : ST_IN_FILE_POS); /* BSR mandatory in SCSI3 */ in st_probe()
4298 tpnt->can_partitions = 0; in st_probe()
4299 tpnt->two_fm = ST_TWO_FM; in st_probe()
4300 tpnt->fast_mteom = ST_FAST_MTEOM; in st_probe()
4301 tpnt->scsi2_logical = ST_SCSI2LOGICAL; in st_probe()
4302 tpnt->sili = ST_SILI; in st_probe()
4303 tpnt->immediate = ST_NOWAIT; in st_probe()
4304 tpnt->immediate_filemark = 0; in st_probe()
4305 tpnt->default_drvbuffer = 0xff; /* No forced buffering */ in st_probe()
4306 tpnt->partition = 0; in st_probe()
4307 tpnt->new_partition = 0; in st_probe()
4308 tpnt->nbr_partitions = 0; in st_probe()
4309 blk_queue_rq_timeout(tpnt->device->request_queue, ST_TIMEOUT); in st_probe()
4310 tpnt->long_timeout = ST_LONG_TIMEOUT; in st_probe()
4311 tpnt->try_dio = try_direct_io; in st_probe()
4314 STm = &(tpnt->modes[i]); in st_probe()
4324 STm->tape = tpnt; in st_probe()
4328 STps = &(tpnt->ps[i]); in st_probe()
4337 tpnt->current_mode = 0; in st_probe()
4338 tpnt->modes[0].defined = 1; in st_probe()
4340 tpnt->density_changed = tpnt->compression_changed = in st_probe()
4341 tpnt->blksize_changed = 0; in st_probe()
4342 mutex_init(&tpnt->lock); in st_probe()
4346 error = idr_alloc(&st_index_idr, tpnt, 0, ST_MAX_TAPES + 1, GFP_NOWAIT); in st_probe()
4353 tpnt->index = error; in st_probe()
4354 sprintf(tpnt->name, "st%d", tpnt->index); in st_probe()
4355 tpnt->stats = kzalloc(sizeof(struct scsi_tape_stats), GFP_KERNEL); in st_probe()
4356 if (tpnt->stats == NULL) { in st_probe()
4362 dev_set_drvdata(dev, tpnt); in st_probe()
4365 error = create_cdevs(tpnt); in st_probe()
4371 "Attached scsi tape %s\n", tpnt->name); in st_probe()
4373 tpnt->name, tpnt->try_dio ? "yes" : "no", in st_probe()
4379 remove_cdevs(tpnt); in st_probe()
4380 kfree(tpnt->stats); in st_probe()
4383 idr_remove(&st_index_idr, tpnt->index); in st_probe()
4386 kfree(tpnt); in st_probe()
4397 struct scsi_tape *tpnt = dev_get_drvdata(dev); in st_remove() local
4398 int index = tpnt->index; in st_remove()
4401 remove_cdevs(tpnt); in st_remove()
4404 kref_put(&tpnt->kref, scsi_tape_release); in st_remove()
4423 struct scsi_tape *tpnt = to_scsi_tape(kref); in scsi_tape_release() local
4425 tpnt->device = NULL; in scsi_tape_release()
4427 if (tpnt->buffer) { in scsi_tape_release()
4428 normalize_buffer(tpnt->buffer); in scsi_tape_release()
4429 kfree(tpnt->buffer->reserved_pages); in scsi_tape_release()
4430 kfree(tpnt->buffer); in scsi_tape_release()
4433 kfree(tpnt->stats); in scsi_tape_release()
4434 kfree(tpnt); in scsi_tape_release()