Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/scsipi In places where we've already called scsipi_m...



details:   https://anonhg.NetBSD.org/src/rev/304ccb163545
branches:  trunk
changeset: 570024:304ccb163545
user:      mycroft <mycroft%NetBSD.org@localhost>
date:      Fri Sep 17 23:35:13 2004 +0000

description:
In places where we've already called scsipi_make_xs(), call scsipi_execute_xs()
directly rather than going through scsipi_command().

diffstat:

 sys/dev/scsipi/cd.c         |  8 +++-----
 sys/dev/scsipi/sd.c         |  8 +++-----
 sys/dev/scsipi/ss_mustek.c  |  9 +++------
 sys/dev/scsipi/ss_scanjet.c |  9 +++------
 sys/dev/scsipi/st.c         |  9 +++------
 5 files changed, 15 insertions(+), 28 deletions(-)

diffs (148 lines):

diff -r 6df9312b5f9b -r 304ccb163545 sys/dev/scsipi/cd.c
--- a/sys/dev/scsipi/cd.c       Fri Sep 17 23:32:09 2004 +0000
+++ b/sys/dev/scsipi/cd.c       Fri Sep 17 23:35:13 2004 +0000
@@ -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 @@
 #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);
        }
diff -r 6df9312b5f9b -r 304ccb163545 sys/dev/scsipi/sd.c
--- a/sys/dev/scsipi/sd.c       Fri Sep 17 23:32:09 2004 +0000
+++ b/sys/dev/scsipi/sd.c       Fri Sep 17 23:35:13 2004 +0000
@@ -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 @@
 #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);
        }
diff -r 6df9312b5f9b -r 304ccb163545 sys/dev/scsipi/ss_mustek.c
--- a/sys/dev/scsipi/ss_mustek.c        Fri Sep 17 23:32:09 2004 +0000
+++ b/sys/dev/scsipi/ss_mustek.c        Fri Sep 17 23:35:13 2004 +0000
@@ -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 @@
 #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;
diff -r 6df9312b5f9b -r 304ccb163545 sys/dev/scsipi/ss_scanjet.c
--- a/sys/dev/scsipi/ss_scanjet.c       Fri Sep 17 23:32:09 2004 +0000
+++ b/sys/dev/scsipi/ss_scanjet.c       Fri Sep 17 23:35:13 2004 +0000
@@ -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 @@
 #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;
diff -r 6df9312b5f9b -r 304ccb163545 sys/dev/scsipi/st.c
--- a/sys/dev/scsipi/st.c       Fri Sep 17 23:32:09 2004 +0000
+++ b/sys/dev/scsipi/st.c       Fri Sep 17 23:35:13 2004 +0000
@@ -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 @@
 #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.. */



Home | Main Index | Thread Index | Old Index