diff options
author | KATO Takenori <kato@FreeBSD.org> | 1999-01-16 11:40:02 +0000 |
---|---|---|
committer | KATO Takenori <kato@FreeBSD.org> | 1999-01-16 11:40:02 +0000 |
commit | 21da8ffad1c572091ba49c3b417982b7d62f39e2 (patch) | |
tree | a2a26b58684824edfceb5dc04b4419e28415694a /sys/pc98/cbus/fdc.c | |
parent | 485f69e3dbb1dceeeef9bb1e3edc77a1ec9b5b07 (diff) | |
download | src-21da8ffad1c572091ba49c3b417982b7d62f39e2.tar.gz src-21da8ffad1c572091ba49c3b417982b7d62f39e2.zip |
Sync with sys/i386/isa/fd.c revision 1.131.
Notes
Notes:
svn path=/head/; revision=42725
Diffstat (limited to 'sys/pc98/cbus/fdc.c')
-rw-r--r-- | sys/pc98/cbus/fdc.c | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/sys/pc98/cbus/fdc.c b/sys/pc98/cbus/fdc.c index 186dc197e8b5..0b288c308c40 100644 --- a/sys/pc98/cbus/fdc.c +++ b/sys/pc98/cbus/fdc.c @@ -47,7 +47,7 @@ * SUCH DAMAGE. * * from: @(#)fd.c 7.4 (Berkeley) 5/25/91 - * $Id: fd.c,v 1.47 1998/12/17 08:40:36 kato Exp $ + * $Id: fd.c,v 1.48 1998/12/30 08:06:41 kato Exp $ * */ @@ -1860,8 +1860,15 @@ fdstate(fdcu_t fdcu, fdc_p fdc) struct fd_formb *finfo = NULL; size_t fdblk; - bp = bufq_first(&fdc->head); - if(!bp) { + bp = fdc->bp; + if (bp == NULL) { + bp = bufq_first(&fdc->head); + if (bp != NULL) { + bufq_remove(&fdc->head, bp); + fdc->bp = bp; + } + } + if (bp == NULL) { /***********************************************\ * nothing left for this controller to do * * Force into the IDLE state, * @@ -2323,7 +2330,7 @@ fdstate(fdcu_t fdcu, fdc_p fdc) { /* ALL DONE */ fd->skip = 0; - bufq_remove(&fdc->head, bp); + fdc->bp = NULL; /* Tell devstat we have finished with the transaction */ devstat_end_transaction(&fd->device_stats, bp->b_bcount - bp->b_resid, @@ -2455,7 +2462,7 @@ retrier(fdcu) fdc_p fdc = fdc_data + fdcu; register struct buf *bp; - bp = bufq_first(&fdc->head); + bp = fdc->bp; if(fd_data[FDUNIT(minor(bp->b_dev))].options & FDOPT_NORETRY) goto fail; @@ -2499,7 +2506,7 @@ retrier(fdcu) bp->b_flags |= B_ERROR; bp->b_error = EIO; bp->b_resid += bp->b_bcount - fdc->fd->skip; - bufq_remove(&fdc->head, bp); + fdc->bp = NULL; /* Tell devstat we have finished with the transaction */ devstat_end_transaction(&fdc->fd->device_stats, |