summaryrefslogtreecommitdiffstats
path: root/sys/dev/fdc/fdc.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/fdc/fdc.c')
-rw-r--r--sys/dev/fdc/fdc.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/sys/dev/fdc/fdc.c b/sys/dev/fdc/fdc.c
index 7c96092..4048c7f 100644
--- a/sys/dev/fdc/fdc.c
+++ b/sys/dev/fdc/fdc.c
@@ -1620,7 +1620,7 @@ static int fdcpio(fdc_p fdc, long flags, caddr_t addr, u_int count)
{
u_char *cptr = (u_char *)addr;
- if (flags & B_READ) {
+ if (flags == BIO_READ) {
if (fdc->state != PIOREAD) {
fdc->state = PIOREAD;
return(0);
@@ -1679,7 +1679,7 @@ fdstate(fdc_p fdc)
fdblk = 128 << fd->ft->secsize;
if (fdc->fd && (fd != fdc->fd))
device_printf(fd->dev, "confused fd pointers\n");
- read = bp->b_flags & B_READ;
+ read = bp->b_iocmd == BIO_READ;
format = bp->b_flags & B_FORMAT;
if (format) {
finfo = (struct fd_formb *)bp->b_data;
@@ -1885,7 +1885,7 @@ fdstate(fdc_p fdc)
*/
SET_BCDR(fdc, 1, bp->b_bcount, 0);
- (void)fdcpio(fdc,bp->b_flags,
+ (void)fdcpio(fdc,bp->b_iocmd,
bp->b_data+fd->skip,
bp->b_bcount);
@@ -1918,7 +1918,7 @@ fdstate(fdc_p fdc)
* the WRITE command is sent
*/
if (!read)
- (void)fdcpio(fdc,bp->b_flags,
+ (void)fdcpio(fdc,bp->b_iocmd,
bp->b_data+fd->skip,
fdblk);
}
@@ -1948,7 +1948,7 @@ fdstate(fdc_p fdc)
* if this is a read, then simply await interrupt
* before performing PIO
*/
- if (read && !fdcpio(fdc,bp->b_flags,
+ if (read && !fdcpio(fdc,bp->b_iocmd,
bp->b_data+fd->skip,fdblk)) {
fd->tohandle = timeout(fd_iotimeout, fdc, hz);
return(0); /* will return later */
@@ -1966,7 +1966,7 @@ fdstate(fdc_p fdc)
* actually perform the PIO read. The IOCOMPLETE case
* removes the timeout for us.
*/
- (void)fdcpio(fdc,bp->b_flags,bp->b_data+fd->skip,fdblk);
+ (void)fdcpio(fdc,bp->b_iocmd,bp->b_data+fd->skip,fdblk);
fdc->state = IOCOMPLETE;
/* FALLTHROUGH */
case IOCOMPLETE: /* IO DONE, post-analyze */
OpenPOWER on IntegriCloud