summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsos <sos@FreeBSD.org>2000-03-18 22:42:45 +0000
committersos <sos@FreeBSD.org>2000-03-18 22:42:45 +0000
commit2ae861c731493eb8c65c09b3a14ec37795b3cf77 (patch)
tree3d0bd8f8de4c97583ddfe22a192e782a5c23398c
parentc35fe5e157e0fecca6519476bd5cc22300f50a5d (diff)
downloadFreeBSD-src-2ae861c731493eb8c65c09b3a14ec37795b3cf77.zip
FreeBSD-src-2ae861c731493eb8c65c09b3a14ec37795b3cf77.tar.gz
Remove the old DSC code, it doesn't work anymore.
-rw-r--r--sys/dev/ata/ata-all.c35
-rw-r--r--sys/dev/ata/atapi-all.c7
-rw-r--r--sys/dev/ata/atapi-all.h3
-rw-r--r--sys/dev/ata/atapi-tape.c12
4 files changed, 5 insertions, 52 deletions
diff --git a/sys/dev/ata/ata-all.c b/sys/dev/ata/ata-all.c
index 63ace7c..fe87b76 100644
--- a/sys/dev/ata/ata-all.c
+++ b/sys/dev/ata/ata-all.c
@@ -1188,13 +1188,7 @@ ata_start(struct ata_softc *scp)
}
#endif
#if NATAPICD > 0 || NATAPIFD > 0 || NATAPIST > 0
- /*
- * find & call the responsible driver if anything on the ATAPI queue.
- * check for device busy by polling the DSC bit, if busy, check
- * for requests to the other device on the channel (if any).
- * if the other device is an ATA disk it already had its chance above.
- * if no request can be served, timeout a call to ata_start.
- */
+ /* find & call the responsible driver if anything on the ATAPI queue */
if (TAILQ_EMPTY(&scp->atapi_queue)) {
if (scp->devices & (ATA_ATAPI_MASTER) && scp->dev_softc[0])
atapi_start((struct atapi_softc *)scp->dev_softc[0]);
@@ -1202,33 +1196,6 @@ ata_start(struct ata_softc *scp)
atapi_start((struct atapi_softc *)scp->dev_softc[1]);
}
if ((atapi_request = TAILQ_FIRST(&scp->atapi_queue))) {
- struct atapi_softc *atp = atapi_request->device;
- static int32_t interval = 1;
-
- if (atp->flags & ATAPI_F_DSC_USED) {
- outb(atp->controller->ioaddr + ATA_DRIVE, ATA_D_IBM | atp->unit);
- DELAY(1);
- if (!(inb(atp->controller->ioaddr + ATA_STATUS) & ATA_S_DSC)) {
- while ((atapi_request = TAILQ_NEXT(atapi_request, chain))) {
- if (atapi_request->device->unit != atp->unit) {
- struct atapi_softc *tmp = atapi_request->device;
-
- outb(tmp->controller->ioaddr + ATA_DRIVE,
- ATA_D_IBM | tmp->unit);
- DELAY(1);
- if (!inb(tmp->controller->ioaddr+ATA_STATUS)&ATA_S_DSC)
- atapi_request = NULL;
- break;
- }
- }
- }
- if (!atapi_request) {
- timeout((timeout_t *)ata_start, atp->controller, interval++);
- return;
- }
- else
- interval = 1;
- }
TAILQ_REMOVE(&scp->atapi_queue, atapi_request, chain);
scp->active = ATA_ACTIVE_ATAPI;
scp->running = atapi_request;
diff --git a/sys/dev/ata/atapi-all.c b/sys/dev/ata/atapi-all.c
index 56103cf..075081d 100644
--- a/sys/dev/ata/atapi-all.c
+++ b/sys/dev/ata/atapi-all.c
@@ -237,13 +237,6 @@ atapi_transfer(struct atapi_request *request)
if (request->ccb[0] != ATAPI_REQUEST_SENSE)
atp->cmd = request->ccb[0];
- /* flag if we can trust the DSC bit */
- if (request->ccb[0] == ATAPI_READ || request->ccb[0] == ATAPI_READ_BIG ||
- request->ccb[0] == ATAPI_WRITE || request->ccb[0] == ATAPI_WRITE_BIG)
- atp->flags |= ATAPI_F_DSC_USED;
- else
- atp->flags &= ~ATAPI_F_DSC_USED;
-
/* if DMA enabled setup DMA hardware */
request->flags &= ~ATPR_F_DMA_USED;
if ((atp->controller->mode[ATA_DEV(atp->unit)] >= ATA_DMA) &&
diff --git a/sys/dev/ata/atapi-all.h b/sys/dev/ata/atapi-all.h
index 6e5bc5a..b3e5091 100644
--- a/sys/dev/ata/atapi-all.h
+++ b/sys/dev/ata/atapi-all.h
@@ -148,8 +148,7 @@ struct atapi_softc {
int8_t *devname; /* this devices name */
int8_t cmd; /* last cmd executed */
u_int32_t flags; /* drive flags */
-#define ATAPI_F_DSC_USED 0x0001
-#define ATAPI_F_MEDIA_CHANGED 0x0002
+#define ATAPI_F_MEDIA_CHANGED 0x0001
};
diff --git a/sys/dev/ata/atapi-tape.c b/sys/dev/ata/atapi-tape.c
index 53b546e..2f737c4 100644
--- a/sys/dev/ata/atapi-tape.c
+++ b/sys/dev/ata/atapi-tape.c
@@ -466,16 +466,10 @@ ast_start(struct atapi_softc *atp)
bzero(ccb, sizeof(ccb));
- if (bp->b_flags & B_READ) {
+ if (bp->b_flags & B_READ)
ccb[0] = ATAPI_READ;
- if (!(stp->flags & ATAPI_F_DSC_USED))
- atapi_queue_cmd(stp->atp, ccb, NULL, 0, 0, 2*60, NULL, NULL);
- }
- else {
+ else
ccb[0] = ATAPI_WRITE;
- if (!(stp->flags & ATAPI_F_DSC_USED))
- atapi_queue_cmd(stp->atp, ccb, NULL, 0, 0, 2*60, NULL, NULL);
- }
bufq_remove(&stp->buf_queue, bp);
blkcount = bp->b_bcount / stp->blksize;
@@ -488,7 +482,7 @@ ast_start(struct atapi_softc *atp)
devstat_start_transaction(&stp->stats);
atapi_queue_cmd(stp->atp, ccb, bp->b_data, blkcount * stp->blksize,
- bp->b_flags&B_READ ? ATPR_F_READ : 0, 60, ast_done, bp);
+ bp->b_flags & B_READ ? ATPR_F_READ : 0, 60, ast_done, bp);
}
static int32_t
OpenPOWER on IntegriCloud