In places where we've already called scsipi_make_xs(), call scsipi_execute_xs()
directly rather than going through scsipi_command().
This commit is contained in:
parent
006eb65868
commit
cdc20e6ce8
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: cd.c,v 1.206 2004/09/17 23:10:50 mycroft Exp $ */
|
||||
/* $NetBSD: cd.c,v 1.207 2004/09/17 23:35:13 mycroft Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1998, 2001, 2003, 2004 The NetBSD Foundation, Inc.
|
||||
|
@ -54,7 +54,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: cd.c,v 1.206 2004/09/17 23:10:50 mycroft Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: cd.c,v 1.207 2004/09/17 23:35:13 mycroft Exp $");
|
||||
|
||||
#include "rnd.h"
|
||||
|
||||
|
@ -859,9 +859,7 @@ cdstart(struct scsipi_periph *periph)
|
|||
#else
|
||||
BUFQ_GET(&cd->buf_queue);
|
||||
#endif
|
||||
error = scsipi_command(periph, xs, cmdp, cmdlen,
|
||||
(u_char *)bp->b_data, bp->b_bcount,
|
||||
CDRETRIES, 30000, bp, flags);
|
||||
error = scsipi_execute_xs(xs);
|
||||
/* with a scsipi_xfer preallocated, scsipi_command can't fail */
|
||||
KASSERT(error == 0);
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: sd.c,v 1.224 2004/09/17 23:10:51 mycroft Exp $ */
|
||||
/* $NetBSD: sd.c,v 1.225 2004/09/17 23:35:13 mycroft Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1998, 2003, 2004 The NetBSD Foundation, Inc.
|
||||
|
@ -54,7 +54,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: sd.c,v 1.224 2004/09/17 23:10:51 mycroft Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: sd.c,v 1.225 2004/09/17 23:35:13 mycroft Exp $");
|
||||
|
||||
#include "opt_scsi.h"
|
||||
#include "rnd.h"
|
||||
|
@ -892,9 +892,7 @@ sdstart(struct scsipi_periph *periph)
|
|||
#else
|
||||
BUFQ_GET(&sd->buf_queue);
|
||||
#endif
|
||||
error = scsipi_command(periph, xs, cmdp, cmdlen,
|
||||
(u_char *)bp->b_data, bp->b_bcount,
|
||||
SDRETRIES, SD_IO_TIMEOUT, bp, flags);
|
||||
error = scsipi_execute_xs(xs);
|
||||
/* with a scsipi_xfer preallocated, scsipi_command can't fail */
|
||||
KASSERT(error == 0);
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: ss_mustek.c,v 1.21 2004/09/09 19:35:33 bouyer Exp $ */
|
||||
/* $NetBSD: ss_mustek.c,v 1.22 2004/09/17 23:35:13 mycroft Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1995 Joachim Koenig-Baltes. All rights reserved.
|
||||
|
@ -46,7 +46,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: ss_mustek.c,v 1.21 2004/09/09 19:35:33 bouyer Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: ss_mustek.c,v 1.22 2004/09/17 23:35:13 mycroft Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/kernel.h>
|
||||
|
@ -501,10 +501,7 @@ mustek_read(struct ss_softc *ss, struct buf *bp)
|
|||
#else
|
||||
BUFQ_GET(&ss->buf_queue);
|
||||
#endif
|
||||
error = scsipi_command(periph, xs,
|
||||
(struct scsipi_generic *) &cmd, sizeof(cmd),
|
||||
(u_char *) bp->b_data, bp->b_bcount, MUSTEK_RETRIES, 10000, bp,
|
||||
XS_CTL_NOSLEEP | XS_CTL_ASYNC | XS_CTL_DATA_IN);
|
||||
error = scsipi_execute_xs(xs);
|
||||
/* with a scsipi_xfer preallocated, scsipi_command can't fail */
|
||||
KASSERT(error == 0);
|
||||
ss->sio.scan_lines -= lines_to_read;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: ss_scanjet.c,v 1.32 2004/09/09 19:35:33 bouyer Exp $ */
|
||||
/* $NetBSD: ss_scanjet.c,v 1.33 2004/09/17 23:35:13 mycroft Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1995 Kenneth Stailey. All rights reserved.
|
||||
|
@ -34,7 +34,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: ss_scanjet.c,v 1.32 2004/09/09 19:35:33 bouyer Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: ss_scanjet.c,v 1.33 2004/09/17 23:35:13 mycroft Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
|
@ -300,10 +300,7 @@ scanjet_read(struct ss_softc *ss, struct buf *bp)
|
|||
#else
|
||||
BUFQ_GET(&ss->buf_queue);
|
||||
#endif
|
||||
error = scsipi_command(periph, xs,
|
||||
(struct scsipi_generic *) &cmd, sizeof(cmd),
|
||||
(u_char *) bp->b_data, bp->b_bcount, SCANJET_RETRIES, 100000, bp,
|
||||
XS_CTL_NOSLEEP | XS_CTL_ASYNC | XS_CTL_DATA_IN);
|
||||
error = scsipi_execute_xs(xs);
|
||||
/* with a scsipi_xfer preallocated, scsipi_command can't fail */
|
||||
KASSERT(error == 0);
|
||||
ss->sio.scan_window_size -= bp->b_bcount;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: st.c,v 1.167 2004/09/17 23:10:53 mycroft Exp $ */
|
||||
/* $NetBSD: st.c,v 1.168 2004/09/17 23:35:13 mycroft Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1998, 2004 The NetBSD Foundation, Inc.
|
||||
|
@ -57,7 +57,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: st.c,v 1.167 2004/09/17 23:10:53 mycroft Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: st.c,v 1.168 2004/09/17 23:35:13 mycroft Exp $");
|
||||
|
||||
#include "opt_scsi.h"
|
||||
|
||||
|
@ -1307,10 +1307,7 @@ ststart(struct scsipi_periph *periph)
|
|||
#else
|
||||
BUFQ_GET(&st->buf_queue);
|
||||
#endif
|
||||
error = scsipi_command(periph, xs,
|
||||
(struct scsipi_generic *)&cmd, sizeof(cmd),
|
||||
(u_char *)bp->b_data, bp->b_bcount,
|
||||
0, ST_IO_TIME, bp, flags);
|
||||
error = scsipi_execute_xs(xs);
|
||||
/* with a scsipi_xfer preallocated, scsipi_command can't fail */
|
||||
KASSERT(error == 0);
|
||||
} /* go back and see if we can cram more work in.. */
|
||||
|
|
Loading…
Reference in New Issue