Deleted Added
full compact
2c2
< * Copyright (c) 1998,1999,2000,2001 S�ren Schmidt <sos@FreeBSD.org>
---
> * Copyright (c) 1998,1999,2000,2001,2002 S�ren Schmidt <sos@FreeBSD.org>
28c28
< * $FreeBSD: head/sys/dev/ata/atapi-tape.c 86014 2001-11-04 09:09:41Z phk $
---
> * $FreeBSD: head/sys/dev/ata/atapi-tape.c 90215 2002-02-04 19:23:40Z sos $
88c88
< astattach(struct atapi_softc *atp)
---
> astattach(struct ata_device *atadev)
96c96
< ata_printf(atp->controller, atp->unit, "out of memory\n");
---
> ata_prtdev(atadev, "out of memory\n");
100c100
< stp->atp = atp;
---
> stp->device = atadev;
102c102
< ata_set_name(atp->controller, atp->unit, "ast", stp->lun);
---
> ata_set_name(atadev, "ast", stp->lun);
110,111c110
< if (!strcmp(ATA_PARAM(stp->atp->controller, stp->atp->unit)->model,
< "OnStream DI-30")) {
---
> if (!strcmp(atadev->param->model, "OnStream DI-30")) {
141,142c140
< stp->atp->flags |= ATAPI_F_MEDIA_CHANGED;
< stp->atp->driver = stp;
---
> stp->device->flags |= ATA_D_MEDIA_CHANGED;
143a142
> atadev->driver = stp;
147,148c146,147
< void
< astdetach(struct atapi_softc *atp)
---
> void
> astdetach(struct ata_device *atadev)
150c149
< struct ast_softc *stp = atp->driver;
---
> struct ast_softc *stp = atadev->driver;
153a153
> bioq_remove(&stp->queue, bp);
159c159
< ata_free_name(atp->controller, atp->unit);
---
> ata_free_name(atadev);
161a162
> atadev->driver = NULL;
196,203c197,201
< ata_printf(stp->atp->controller, stp->atp->unit,
< "<%.40s/%.8s> tape drive at ata%d as %s\n",
< ATA_PARAM(stp->atp->controller, stp->atp->unit)->model,
< ATA_PARAM(stp->atp->controller, stp->atp->unit)->revision,
< device_get_unit(stp->atp->controller->dev),
< (stp->atp->unit == ATA_MASTER) ? "master" : "slave");
< ata_printf(stp->atp->controller, stp->atp->unit, "%dKB/s, ",
< stp->cap.max_speed);
---
> ata_prtdev(stp->device, "<%.40s/%.8s> tape drive at ata%d as %s\n",
> stp->device->param->model, stp->device->param->revision,
> device_get_unit(stp->device->channel->dev),
> (stp->device->unit == ATA_MASTER) ? "master" : "slave");
> ata_prtdev(stp->device, "%dKB/s, ", stp->cap.max_speed);
207,209c205,206
< printf("%s\n", ata_mode2str(stp->atp->controller->mode[
< ATA_DEV(stp->atp->unit)]));
< ata_printf(stp->atp->controller, stp->atp->unit, "Medium: ");
---
> printf("%s\n", ata_mode2str(stp->device->mode));
> ata_prtdev(stp->device, "Medium: ");
239,245c236,240
< ata_printf(stp->atp->controller, stp->atp->unit,
< "TAPE <%.40s> at ata%d-%s %s\n",
< ATA_PARAM(stp->atp->controller, stp->atp->unit)->model,
< device_get_unit(stp->atp->controller->dev),
< (stp->atp->unit == ATA_MASTER) ? "master" : "slave",
< ata_mode2str(stp->atp->controller->
< mode[ATA_DEV(stp->atp->unit)]));
---
> ata_prtdev(stp->device, "TAPE <%.40s> at ata%d-%s %s\n",
> stp->device->param->model,
> device_get_unit(stp->device->channel->dev),
> (stp->device->unit == ATA_MASTER) ? "master" : "slave",
> ata_mode2str(stp->device->mode));
260c255
< atapi_test_ready(stp->atp);
---
> atapi_test_ready(stp->device);
266,267c261
< ata_printf(stp->atp->controller, stp->atp->unit,
< "sense media type failed\n");
---
> ata_prtdev(stp->device, "sense media type failed\n");
269c263
< stp->atp->flags &= ~ATAPI_F_MEDIA_CHANGED;
---
> stp->device->flags &= ~ATA_D_MEDIA_CHANGED;
298,299c292
< ata_printf(stp->atp->controller, stp->atp->unit,
< "%llu total bytes transferred\n", ast_total);
---
> ata_prtdev(stp->device, "%llu total bytes transferred\n", ast_total);
422c415
< if (stp->atp->flags & ATAPI_F_DETACHING) {
---
> if (stp->device->flags & ATA_D_DETACHING) {
440,441c433,434
< ata_printf(stp->atp->controller, stp->atp->unit,
< "bad request, must be multiple of %d\n", stp->blksize);
---
> ata_prtdev(stp->device, "transfers must be multiple of %d\n",
> stp->blksize);
447c440
< if (bp->bio_bcount > stp->blksize * stp->cap.ctl) {
---
> if (bp->bio_bcount > stp->blksize * stp->cap.ctl) {
449,450c442
< ata_printf(stp->atp->controller, stp->atp->unit,
< "WARNING: CTL exceeded %ld>%d\n",
---
> ata_prtdev(stp->device, "WARNING: CTL exceeded %ld>%d\n",
458c450
< ata_start(stp->atp->controller);
---
> ata_start(stp->device->channel);
463c455
< ast_start(struct atapi_softc *atp)
---
> ast_start(struct ata_device *atadev)
465c457
< struct ast_softc *stp = atp->driver;
---
> struct ast_softc *stp = atadev->driver;
490c482
< atapi_queue_cmd(stp->atp, ccb, bp->bio_data, blkcount * stp->blksize,
---
> atapi_queue_cmd(stp->device, ccb, bp->bio_data, blkcount * stp->blksize,
509c501
< ast_total += (bp->bio_bcount - bp->bio_resid);
---
> ast_total += (bp->bio_bcount - bp->bio_resid);
522,523c514,515
< error = atapi_queue_cmd(stp->atp, ccb, pagebuf, pagesize, ATPR_F_READ, 10,
< NULL, NULL);
---
> error = atapi_queue_cmd(stp->device, ccb, pagebuf, pagesize, ATPR_F_READ,
> 10, NULL, NULL);
537,538c529
< ata_printf(stp->atp->controller, stp->atp->unit,
< "modeselect pagesize=%d\n", pagesize);
---
> ata_prtdev(stp->device, "modeselect pagesize=%d\n", pagesize);
541,542c532,533
< return atapi_queue_cmd(stp->atp, ccb, pagebuf, pagesize, 0, 10,
< NULL, NULL);
---
> return atapi_queue_cmd(stp->device, ccb, pagebuf, pagesize, 0,
> 10, NULL, NULL);
562c553
< error = atapi_queue_cmd(stp->atp, ccb, NULL, 0, 0, 10, NULL, NULL);
---
> error = atapi_queue_cmd(stp->device, ccb, NULL, 0, 0, 10, NULL, NULL);
565c556
< return atapi_wait_dsc(stp->atp, 10*60);
---
> return atapi_wait_dsc(stp->device, 10*60);
576c567
< error = atapi_queue_cmd(stp->atp, ccb, (caddr_t)position,
---
> error = atapi_queue_cmd(stp->device, ccb, (caddr_t)position,
590c581
< return atapi_queue_cmd(stp->atp, ccb, NULL, 0, 0, 60*60, NULL, NULL);
---
> return atapi_queue_cmd(stp->device, ccb, NULL, 0, 0, 60*60, NULL, NULL);
601c592
< error = atapi_queue_cmd(stp->atp, ccb, NULL, 0, 0, 10, NULL, NULL);
---
> error = atapi_queue_cmd(stp->device, ccb, NULL, 0, 0, 10, NULL, NULL);
604c595
< return atapi_wait_dsc(stp->atp, 60*60);
---
> return atapi_wait_dsc(stp->device, 60*60);
613c604
< return atapi_queue_cmd(stp->atp, ccb, NULL, 0, 0,30, NULL, NULL);
---
> return atapi_queue_cmd(stp->device, ccb, NULL, 0, 0,30, NULL, NULL);
625c616
< error = atapi_queue_cmd(stp->atp, ccb, NULL, 0, 0, 10, NULL, NULL);
---
> error = atapi_queue_cmd(stp->device, ccb, NULL, 0, 0, 10, NULL, NULL);
631c622
< return atapi_wait_dsc(stp->atp, 60*60);
---
> return atapi_wait_dsc(stp->device, 60*60);
641c632
< error = atapi_queue_cmd(stp->atp, ccb, NULL, 0, 0, 10, NULL, NULL);
---
> error = atapi_queue_cmd(stp->device, ccb, NULL, 0, 0, 10, NULL, NULL);
644c635
< return atapi_wait_dsc(stp->atp, 60*60);
---
> return atapi_wait_dsc(stp->device, 60*60);
657c648
< return atapi_queue_cmd(stp->atp, ccb, NULL, 0, 0, 60*60, NULL, NULL);
---
> return atapi_queue_cmd(stp->device, ccb, NULL, 0, 0, 60*60, NULL, NULL);