summaryrefslogtreecommitdiffstats
path: root/sys/dev/ida
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/ida')
-rw-r--r--sys/dev/ida/ida.c2
-rw-r--r--sys/dev/ida/ida_disk.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/ida/ida.c b/sys/dev/ida/ida.c
index c53f2c9..c9e924e 100644
--- a/sys/dev/ida/ida.c
+++ b/sys/dev/ida/ida.c
@@ -404,7 +404,7 @@ ida_construct_qcb(struct ida_softc *ida)
hwqcb->req.blkno = bp->b_pblkno;
hwqcb->req.bcount = howmany(bp->b_bcount, DEV_BSIZE);
- hwqcb->req.command = bp->b_flags & B_READ ? CMD_READ : CMD_WRITE;
+ hwqcb->req.command = bp->b_iocmd == BIO_READ ? CMD_READ : CMD_WRITE;
STAILQ_INSERT_TAIL(&ida->qcb_queue, qcb, link.stqe);
}
diff --git a/sys/dev/ida/ida_disk.c b/sys/dev/ida/ida_disk.c
index c0bf915..ee1c157 100644
--- a/sys/dev/ida/ida_disk.c
+++ b/sys/dev/ida/ida_disk.c
@@ -163,7 +163,7 @@ idstrategy(struct buf *bp)
/*
* software write protect check
*/
- if (drv->flags & DRV_WRITEPROT && (bp->b_flags & B_READ) == 0) {
+ if (drv->flags & DRV_WRITEPROT && (bp->b_iocmd == BIO_WRITE)) {
bp->b_error = EROFS;
goto bad;
}
OpenPOWER on IntegriCloud