Sync with sys/i386/isa/fd.c revision 1.131.

This commit is contained in:
KATO Takenori 1999-01-16 11:40:02 +00:00
parent 485f69e3db
commit 21da8ffad1
2 changed files with 26 additions and 12 deletions

View File

@ -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,

View File

@ -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,