aboutsummaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorBruce Evans <bde@FreeBSD.org>1999-01-15 09:15:27 +0000
committerBruce Evans <bde@FreeBSD.org>1999-01-15 09:15:27 +0000
commite93e63cb392cb4f63235265bd3cdd5e49a41bbc7 (patch)
tree203ad844fd889ad2fb7ecf231d38fd377687f139 /sys/dev
parentd75398b55ee05a325444105f95d96270665eef0b (diff)
Notes
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/fdc/fdc.c19
1 files changed, 13 insertions, 6 deletions
diff --git a/sys/dev/fdc/fdc.c b/sys/dev/fdc/fdc.c
index 5380d54151d4..c8e35a5ae07d 100644
--- a/sys/dev/fdc/fdc.c
+++ b/sys/dev/fdc/fdc.c
@@ -47,7 +47,7 @@
* SUCH DAMAGE.
*
* from: @(#)fd.c 7.4 (Berkeley) 5/25/91
- * $Id: fd.c,v 1.129 1998/12/14 16:29:58 bde Exp $
+ * $Id: fd.c,v 1.130 1998/12/27 13:40:56 phk Exp $
*
*/
@@ -1530,8 +1530,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, *
@@ -1903,7 +1910,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,
@@ -2026,7 +2033,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;
@@ -2070,7 +2077,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,