summaryrefslogtreecommitdiffstats
path: root/sys/dev/ata/atapi-fd.c
diff options
context:
space:
mode:
authorsos <sos@FreeBSD.org>2000-03-13 12:04:58 +0000
committersos <sos@FreeBSD.org>2000-03-13 12:04:58 +0000
commit89d3e18adb263da48efeeeeb6c40f7e0ab34a39c (patch)
tree830423343cca949bf563ee1d4ef25d07509f60ec /sys/dev/ata/atapi-fd.c
parent88b8866bdd26b7ce811e987aa6d5cc52770dc9d9 (diff)
downloadFreeBSD-src-89d3e18adb263da48efeeeeb6c40f7e0ab34a39c.zip
FreeBSD-src-89d3e18adb263da48efeeeeb6c40f7e0ab34a39c.tar.gz
Enable disksort the right way both on ATA disks and ATAPI devices.
Diffstat (limited to 'sys/dev/ata/atapi-fd.c')
-rw-r--r--sys/dev/ata/atapi-fd.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/sys/dev/ata/atapi-fd.c b/sys/dev/ata/atapi-fd.c
index 3683854..822d010 100644
--- a/sys/dev/ata/atapi-fd.c
+++ b/sys/dev/ata/atapi-fd.c
@@ -67,11 +67,8 @@ static struct cdevsw afd_cdevsw = {
static struct cdevsw afddisk_cdevsw;
/* prototypes */
-int32_t afdattach(struct atapi_softc *);
-void afddetach(struct atapi_softc *);
static int32_t afd_sense(struct afd_softc *);
static void afd_describe(struct afd_softc *);
-static void afd_start(struct afd_softc *);
static int32_t afd_partial_done(struct atapi_request *);
static int32_t afd_done(struct atapi_request *);
static int32_t afd_eject(struct afd_softc *, int32_t);
@@ -290,14 +287,15 @@ afdstrategy(struct buf *bp)
}
s = splbio();
- bufq_insert_tail(&fdp->buf_queue, bp);
- afd_start(fdp);
+ bufqdisksort(&fdp->buf_queue, bp);
+ ata_start(fdp->atp->controller);
splx(s);
}
-static void
-afd_start(struct afd_softc *fdp)
+void
+afd_start(struct atapi_softc *atp)
{
+ struct afd_softc *fdp = atp->driver;
struct buf *bp = bufq_first(&fdp->buf_queue);
u_int32_t lba, count;
int8_t ccb[16];
@@ -386,7 +384,6 @@ afd_done(struct atapi_request *request)
bp->b_resid += (bp->b_bcount - request->donecount);
devstat_end_transaction_buf(&fdp->stats, bp);
biodone(bp);
- afd_start(fdp);
return 0;
}
OpenPOWER on IntegriCloud