Lines Matching refs:tpnt
4242 struct scsi_tape *tpnt = NULL; in st_probe() local
4271 tpnt = kzalloc(sizeof(struct scsi_tape), GFP_KERNEL); in st_probe()
4272 if (tpnt == NULL) { in st_probe()
4277 kref_init(&tpnt->kref); in st_probe()
4278 tpnt->driver = &st_template; in st_probe()
4280 tpnt->device = SDp; in st_probe()
4282 tpnt->tape_type = MT_ISSCSI1; in st_probe()
4284 tpnt->tape_type = MT_ISSCSI2; in st_probe()
4286 tpnt->buffer = buffer; in st_probe()
4287 tpnt->buffer->last_SRpnt = NULL; in st_probe()
4289 tpnt->inited = 0; in st_probe()
4290 tpnt->dirty = 0; in st_probe()
4291 tpnt->in_use = 0; in st_probe()
4292 tpnt->drv_buffer = 1; /* Try buffering if no mode sense */ in st_probe()
4293 tpnt->use_pf = (SDp->scsi_level >= SCSI_2); in st_probe()
4294 tpnt->density = 0; in st_probe()
4295 tpnt->do_auto_lock = ST_AUTO_LOCK; in st_probe()
4296 tpnt->can_bsr = (SDp->scsi_level > 2 ? 1 : ST_IN_FILE_POS); /* BSR mandatory in SCSI3 */ in st_probe()
4297 tpnt->can_partitions = 0; in st_probe()
4298 tpnt->two_fm = ST_TWO_FM; in st_probe()
4299 tpnt->fast_mteom = ST_FAST_MTEOM; in st_probe()
4300 tpnt->scsi2_logical = ST_SCSI2LOGICAL; in st_probe()
4301 tpnt->sili = ST_SILI; in st_probe()
4302 tpnt->immediate = ST_NOWAIT; in st_probe()
4303 tpnt->immediate_filemark = 0; in st_probe()
4304 tpnt->default_drvbuffer = 0xff; /* No forced buffering */ in st_probe()
4305 tpnt->partition = 0; in st_probe()
4306 tpnt->new_partition = 0; in st_probe()
4307 tpnt->nbr_partitions = 0; in st_probe()
4308 blk_queue_rq_timeout(tpnt->device->request_queue, ST_TIMEOUT); in st_probe()
4309 tpnt->long_timeout = ST_LONG_TIMEOUT; in st_probe()
4310 tpnt->try_dio = try_direct_io; in st_probe()
4313 STm = &(tpnt->modes[i]); in st_probe()
4323 STm->tape = tpnt; in st_probe()
4327 STps = &(tpnt->ps[i]); in st_probe()
4336 tpnt->current_mode = 0; in st_probe()
4337 tpnt->modes[0].defined = 1; in st_probe()
4339 tpnt->density_changed = tpnt->compression_changed = in st_probe()
4340 tpnt->blksize_changed = 0; in st_probe()
4341 mutex_init(&tpnt->lock); in st_probe()
4345 error = idr_alloc(&st_index_idr, tpnt, 0, ST_MAX_TAPES + 1, GFP_NOWAIT); in st_probe()
4352 tpnt->index = error; in st_probe()
4353 sprintf(tpnt->name, "st%d", tpnt->index); in st_probe()
4354 tpnt->stats = kzalloc(sizeof(struct scsi_tape_stats), GFP_KERNEL); in st_probe()
4355 if (tpnt->stats == NULL) { in st_probe()
4361 dev_set_drvdata(dev, tpnt); in st_probe()
4364 error = create_cdevs(tpnt); in st_probe()
4370 "Attached scsi tape %s\n", tpnt->name); in st_probe()
4372 tpnt->name, tpnt->try_dio ? "yes" : "no", in st_probe()
4378 remove_cdevs(tpnt); in st_probe()
4379 kfree(tpnt->stats); in st_probe()
4382 idr_remove(&st_index_idr, tpnt->index); in st_probe()
4385 kfree(tpnt); in st_probe()
4396 struct scsi_tape *tpnt = dev_get_drvdata(dev); in st_remove() local
4397 int index = tpnt->index; in st_remove()
4400 remove_cdevs(tpnt); in st_remove()
4403 kref_put(&tpnt->kref, scsi_tape_release); in st_remove()
4422 struct scsi_tape *tpnt = to_scsi_tape(kref); in scsi_tape_release() local
4424 tpnt->device = NULL; in scsi_tape_release()
4426 if (tpnt->buffer) { in scsi_tape_release()
4427 normalize_buffer(tpnt->buffer); in scsi_tape_release()
4428 kfree(tpnt->buffer->reserved_pages); in scsi_tape_release()
4429 kfree(tpnt->buffer); in scsi_tape_release()
4432 kfree(tpnt->stats); in scsi_tape_release()
4433 kfree(tpnt); in scsi_tape_release()