summaryrefslogtreecommitdiffstats
path: root/sys/dev/ata/atapi-fd.c
diff options
context:
space:
mode:
authorsos <sos@FreeBSD.org>2000-01-28 21:03:25 +0000
committersos <sos@FreeBSD.org>2000-01-28 21:03:25 +0000
commitfcb7935df13747eb6b7eb29b464a2bfc6529307f (patch)
treeab40b1cafe11ebc64e394c563aa619c04c5aea5a /sys/dev/ata/atapi-fd.c
parent1232f6e99e1f4342957e573f1efcc970982d46a7 (diff)
downloadFreeBSD-src-fcb7935df13747eb6b7eb29b464a2bfc6529307f.zip
FreeBSD-src-fcb7935df13747eb6b7eb29b464a2bfc6529307f.tar.gz
Get the MEDIA_CHANGED status right.
Diffstat (limited to 'sys/dev/ata/atapi-fd.c')
-rw-r--r--sys/dev/ata/atapi-fd.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/dev/ata/atapi-fd.c b/sys/dev/ata/atapi-fd.c
index bb2b24e..5dbe8f3 100644
--- a/sys/dev/ata/atapi-fd.c
+++ b/sys/dev/ata/atapi-fd.c
@@ -213,11 +213,12 @@ afdopen(dev_t dev, int32_t flags, int32_t fmt, struct proc *p)
struct afd_softc *fdp = dev->si_drv1;
struct disklabel *label;
- fdp->atp->flags &= ~ATAPI_F_MEDIA_CHANGED;
+ atapi_wait_ready(fdp->atp, 10);
afd_prevent_allow(fdp, 1);
if (afd_sense(fdp))
printf("afd%d: sense media type failed\n", fdp->lun);
+ fdp->atp->flags &= ~ATAPI_F_MEDIA_CHANGED;
label = &fdp->disk.d_label;
bzero(label, sizeof *label);
label->d_secsize = fdp->cap.sector_size;
OpenPOWER on IntegriCloud