Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/scsipi Remove the "xfer" argument to scsipi_command().



details:   https://anonhg.NetBSD.org/src/rev/afa765181c79
branches:  trunk
changeset: 570025:afa765181c79
user:      mycroft <mycroft%NetBSD.org@localhost>
date:      Fri Sep 17 23:43:17 2004 +0000

description:
Remove the "xfer" argument to scsipi_command().

diffstat:

 sys/dev/scsipi/cd.c           |  50 +++++++++++++++++++++---------------------
 sys/dev/scsipi/ch.c           |  18 +++++++-------
 sys/dev/scsipi/if_se.c        |   6 ++--
 sys/dev/scsipi/scsi_base.c    |   6 ++--
 sys/dev/scsipi/scsipi_base.c  |  26 +++++++++++-----------
 sys/dev/scsipi/scsipi_ioctl.c |   8 +++---
 sys/dev/scsipi/scsipiconf.c   |  22 ++++++++----------
 sys/dev/scsipi/scsipiconf.h   |   7 ++---
 sys/dev/scsipi/sd.c           |   8 +++---
 sys/dev/scsipi/ses.c          |   6 ++--
 sys/dev/scsipi/ss_mustek.c    |  14 ++++++------
 sys/dev/scsipi/ss_scanjet.c   |   8 +++---
 sys/dev/scsipi/st.c           |  20 ++++++++--------
 sys/dev/scsipi/st_scsi.c      |   8 +++---
 14 files changed, 102 insertions(+), 105 deletions(-)

diffs (truncated from 850 to 300 lines):

diff -r 304ccb163545 -r afa765181c79 sys/dev/scsipi/cd.c
--- a/sys/dev/scsipi/cd.c       Fri Sep 17 23:35:13 2004 +0000
+++ b/sys/dev/scsipi/cd.c       Fri Sep 17 23:43:17 2004 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cd.c,v 1.207 2004/09/17 23:35:13 mycroft Exp $ */
+/*     $NetBSD: cd.c,v 1.208 2004/09/17 23:43:17 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.207 2004/09/17 23:35:13 mycroft Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cd.c,v 1.208 2004/09/17 23:43:17 mycroft Exp $");
 
 #include "rnd.h"
 
@@ -1600,7 +1600,7 @@
         * If the command works, interpret the result as a 4 byte
         * number of blocks and a blocksize
         */
-       if (scsipi_command(cd->sc_periph, NULL,
+       if (scsipi_command(cd->sc_periph,
            (struct scsipi_generic *)&scsipi_cmd, sizeof(scsipi_cmd),
            (u_char *)&rdcap, sizeof(rdcap), CDRETRIES, 30000, NULL,
            flags | XS_CTL_DATA_IN | XS_CTL_DATA_ONSTACK) != 0)
@@ -1638,7 +1638,7 @@
        scsipi_cmd.opcode = PLAY;
        _lto4b(blkno, scsipi_cmd.blk_addr);
        _lto2b(nblks, scsipi_cmd.xfer_len);
-       return (scsipi_command(cd->sc_periph, NULL,
+       return (scsipi_command(cd->sc_periph,
            (struct scsipi_generic *)&scsipi_cmd, sizeof(scsipi_cmd),
            0, 0, CDRETRIES, 30000, NULL, 0));
 }
@@ -1694,7 +1694,7 @@
        scsipi_cmd.end_m = endm;
        scsipi_cmd.end_s = ends;
        scsipi_cmd.end_f = endf;
-       return (scsipi_command(cd->sc_periph, NULL,
+       return (scsipi_command(cd->sc_periph,
            (struct scsipi_generic *)&scsipi_cmd, sizeof(scsipi_cmd),
            0, 0, CDRETRIES, 30000, NULL, 0));
 }
@@ -1710,7 +1710,7 @@
        memset(&scsipi_cmd, 0, sizeof(scsipi_cmd));
        scsipi_cmd.opcode = PAUSE;
        scsipi_cmd.resume = go & 0xff;
-       return (scsipi_command(cd->sc_periph, NULL,
+       return (scsipi_command(cd->sc_periph,
            (struct scsipi_generic *)&scsipi_cmd, sizeof(scsipi_cmd),
            0, 0, CDRETRIES, 30000, NULL, 0));
 }
@@ -1722,7 +1722,7 @@
 cd_reset(struct cd_softc *cd)
 {
 
-       return (scsipi_command(cd->sc_periph, NULL, 0, 0, 0, 0,
+       return (scsipi_command(cd->sc_periph, 0, 0, 0, 0,
            CDRETRIES, 30000, NULL, XS_CTL_RESET));
 }
 
@@ -1743,7 +1743,7 @@
        scsipi_cmd.subchan_format = format;
        scsipi_cmd.track = track;
        _lto2b(len, scsipi_cmd.data_len);
-       return (scsipi_command(cd->sc_periph, NULL,
+       return (scsipi_command(cd->sc_periph,
            (struct scsipi_generic *)&scsipi_cmd,
            sizeof(struct scsipi_read_subchannel), (u_char *)data, len,
            CDRETRIES, 30000, NULL, flags | XS_CTL_DATA_IN | XS_CTL_SILENT));
@@ -1773,7 +1773,7 @@
        scsipi_cmd.from_track = start;
        _lto2b(ntoc, scsipi_cmd.data_len);
        scsipi_cmd.control = control;
-       return (scsipi_command(cd->sc_periph, NULL,
+       return (scsipi_command(cd->sc_periph,
            (struct scsipi_generic *)&scsipi_cmd,
            sizeof(struct scsipi_read_toc), (u_char *)data, len, CDRETRIES,
            30000, NULL, flags | XS_CTL_DATA_IN));
@@ -1848,7 +1848,7 @@
                cmd.opcode = GPCMD_REPORT_KEY;
                cmd.bytes[8] = 8;
                cmd.bytes[9] = 0 | (0 << 6);
-               error = scsipi_command(cd->sc_periph, NULL, &cmd, 12, buf, 8,
+               error = scsipi_command(cd->sc_periph, &cmd, 12, buf, 8,
                    CDRETRIES, 30000, NULL,
                    XS_CTL_DATA_IN|XS_CTL_DATA_ONSTACK);
                if (error)
@@ -1860,7 +1860,7 @@
                cmd.opcode = GPCMD_REPORT_KEY;
                cmd.bytes[8] = 16;
                cmd.bytes[9] = 1 | (a->lsc.agid << 6);
-               error = scsipi_command(cd->sc_periph, NULL, &cmd, 12, buf, 16,
+               error = scsipi_command(cd->sc_periph, &cmd, 12, buf, 16,
                    CDRETRIES, 30000, NULL,
                    XS_CTL_DATA_IN|XS_CTL_DATA_ONSTACK);
                if (error)
@@ -1872,7 +1872,7 @@
                cmd.opcode = GPCMD_REPORT_KEY;
                cmd.bytes[8] = 12;
                cmd.bytes[9] = 2 | (a->lsk.agid << 6);
-               error = scsipi_command(cd->sc_periph, NULL, &cmd, 12, buf, 12,
+               error = scsipi_command(cd->sc_periph, &cmd, 12, buf, 12,
                    CDRETRIES, 30000, NULL,
                    XS_CTL_DATA_IN|XS_CTL_DATA_ONSTACK);
                if (error)
@@ -1885,7 +1885,7 @@
                _lto4b(a->lstk.lba, &cmd.bytes[1]);
                cmd.bytes[8] = 12;
                cmd.bytes[9] = 4 | (a->lstk.agid << 6);
-               error = scsipi_command(cd->sc_periph, NULL, &cmd, 12, buf, 12,
+               error = scsipi_command(cd->sc_periph, &cmd, 12, buf, 12,
                    CDRETRIES, 30000, NULL,
                    XS_CTL_DATA_IN|XS_CTL_DATA_ONSTACK);
                if (error)
@@ -1900,7 +1900,7 @@
                cmd.opcode = GPCMD_REPORT_KEY;
                cmd.bytes[8] = 8;
                cmd.bytes[9] = 5 | (a->lsasf.agid << 6);
-               error = scsipi_command(cd->sc_periph, NULL, &cmd, 12, buf, 8,
+               error = scsipi_command(cd->sc_periph, &cmd, 12, buf, 8,
                    CDRETRIES, 30000, NULL,
                    XS_CTL_DATA_IN|XS_CTL_DATA_ONSTACK);
                if (error)
@@ -1914,7 +1914,7 @@
                cmd.bytes[9] = 1 | (a->hsc.agid << 6);
                buf[1] = 14;
                dvd_copy_challenge(&buf[4], a->hsc.chal);
-               error = scsipi_command(cd->sc_periph, NULL, &cmd, 12, buf, 16,
+               error = scsipi_command(cd->sc_periph, &cmd, 12, buf, 16,
                    CDRETRIES, 30000, NULL,
                    XS_CTL_DATA_OUT|XS_CTL_DATA_ONSTACK);
                if (error)
@@ -1928,7 +1928,7 @@
                cmd.bytes[9] = 3 | (a->hsk.agid << 6);
                buf[1] = 10;
                dvd_copy_key(&buf[4], a->hsk.key);
-               error = scsipi_command(cd->sc_periph, NULL, &cmd, 12, buf, 12,
+               error = scsipi_command(cd->sc_periph, &cmd, 12, buf, 12,
                    CDRETRIES, 30000, NULL,
                    XS_CTL_DATA_OUT|XS_CTL_DATA_ONSTACK);
                if (error) {
@@ -1941,7 +1941,7 @@
        case DVD_INVALIDATE_AGID:
                cmd.opcode = GPCMD_REPORT_KEY;
                cmd.bytes[9] = 0x3f | (a->lsa.agid << 6);
-               error = scsipi_command(cd->sc_periph, NULL, &cmd, 12, buf, 16,
+               error = scsipi_command(cd->sc_periph, &cmd, 12, buf, 16,
                    CDRETRIES, 30000, NULL, 0);
                if (error)
                        return (error);
@@ -1951,7 +1951,7 @@
                cmd.opcode = GPCMD_REPORT_KEY;
                cmd.bytes[8] = 8;
                cmd.bytes[9] = 8 | (0 << 6);
-               error = scsipi_command(cd->sc_periph, NULL, &cmd, 12, buf, 8,
+               error = scsipi_command(cd->sc_periph, &cmd, 12, buf, 8,
                    CDRETRIES, 30000, NULL,
                    XS_CTL_DATA_IN|XS_CTL_DATA_ONSTACK);
                if (error)
@@ -1969,7 +1969,7 @@
                cmd.bytes[9] = 6 | (0 << 6);
                buf[1] = 6;
                buf[4] = a->hrpcs.pdrc;
-               error = scsipi_command(cd->sc_periph, NULL, &cmd, 12, buf, 8,
+               error = scsipi_command(cd->sc_periph, &cmd, 12, buf, 8,
                    CDRETRIES, 30000, NULL,
                    XS_CTL_DATA_OUT|XS_CTL_DATA_ONSTACK);
                if (error)
@@ -1997,7 +1997,7 @@
        _lto2b(sizeof(buf), &cmd.bytes[7]);
 
        cmd.bytes[5] = s->physical.layer_num;
-       error = scsipi_command(cd->sc_periph, NULL, &cmd, 12, buf, sizeof(buf),
+       error = scsipi_command(cd->sc_periph, &cmd, 12, buf, sizeof(buf),
            CDRETRIES, 30000, NULL, XS_CTL_DATA_IN|XS_CTL_DATA_ONSTACK);
        if (error)
                return (error);
@@ -2035,7 +2035,7 @@
        _lto2b(sizeof(buf), &cmd.bytes[7]);
 
        cmd.bytes[5] = s->copyright.layer_num;
-       error = scsipi_command(cd->sc_periph, NULL, &cmd, 12, buf, sizeof(buf),
+       error = scsipi_command(cd->sc_periph, &cmd, 12, buf, sizeof(buf),
            CDRETRIES, 30000, NULL, XS_CTL_DATA_IN|XS_CTL_DATA_ONSTACK);
        if (error)
                return (error);
@@ -2060,7 +2060,7 @@
        _lto2b(4 + 2048, &cmd.bytes[7]);
 
        cmd.bytes[9] = s->disckey.agid << 6;
-       error = scsipi_command(cd->sc_periph, NULL, &cmd, 12, buf, 4 + 2048,
+       error = scsipi_command(cd->sc_periph, &cmd, 12, buf, 4 + 2048,
            CDRETRIES, 30000, NULL, XS_CTL_DATA_IN|XS_CTL_DATA_ONSTACK);
        if (error == 0)
                memcpy(s->disckey.value, &buf[4], 2048);
@@ -2081,7 +2081,7 @@
        cmd.bytes[6] = s->type;
        _lto2b(sizeof(buf), &cmd.bytes[7]);
 
-       error = scsipi_command(cd->sc_periph, NULL, &cmd, 12, buf, sizeof(buf),
+       error = scsipi_command(cd->sc_periph, &cmd, 12, buf, sizeof(buf),
            CDRETRIES, 30000, NULL, XS_CTL_DATA_IN|XS_CTL_DATA_ONSTACK);
        if (error)
                return (error);
@@ -2107,7 +2107,7 @@
        cmd.bytes[6] = s->type;
        _lto2b(4 + 2048, &cmd.bytes[7]);
 
-       error = scsipi_command(cd->sc_periph, NULL, &cmd, 12, buf, 4 + 2048,
+       error = scsipi_command(cd->sc_periph, &cmd, 12, buf, 4 + 2048,
            CDRETRIES, 30000, NULL, XS_CTL_DATA_IN|XS_CTL_DATA_ONSTACK);
        if (error == 0) {
                s->manufact.len = _2btol(&buf[0]);
@@ -2383,7 +2383,7 @@
        scsipi_cmd.options = args->options;    /* ioctl uses MMC values */
        scsipi_cmd.slot = args->slot;
 
-       return (scsipi_command(cd->sc_periph, NULL,
+       return (scsipi_command(cd->sc_periph,
            (struct scsipi_generic *)&scsipi_cmd, sizeof(scsipi_cmd),
            0, 0, CDRETRIES, 200000, NULL, 0));
 }
diff -r 304ccb163545 -r afa765181c79 sys/dev/scsipi/ch.c
--- a/sys/dev/scsipi/ch.c       Fri Sep 17 23:35:13 2004 +0000
+++ b/sys/dev/scsipi/ch.c       Fri Sep 17 23:43:17 2004 +0000
@@ -1,7 +1,7 @@
-/*     $NetBSD: ch.c,v 1.62 2004/09/09 19:35:30 bouyer Exp $   */
+/*     $NetBSD: ch.c,v 1.63 2004/09/17 23:43:17 mycroft Exp $  */
 
 /*-
- * Copyright (c) 1996, 1997, 1998, 1999 The NetBSD Foundation, Inc.
+ * Copyright (c) 1996, 1997, 1998, 1999, 2004 The NetBSD Foundation, Inc.
  * All rights reserved.
  *
  * This code is derived from software contributed to The NetBSD Foundation
@@ -38,7 +38,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ch.c,v 1.62 2004/09/09 19:35:30 bouyer Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ch.c,v 1.63 2004/09/17 23:43:17 mycroft Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -615,7 +615,7 @@
        /*
         * Send command to changer.
         */
-       return (scsipi_command(sc->sc_periph, NULL,
+       return (scsipi_command(sc->sc_periph,
            (struct scsipi_generic *)&cmd, sizeof(cmd), NULL, 0, CHRETRIES,
            100000, NULL, 0));
 }
@@ -670,7 +670,7 @@
        /*
         * Send command to changer.
         */
-       return (scsipi_command(sc->sc_periph, NULL,
+       return (scsipi_command(sc->sc_periph,
            (struct scsipi_generic *)&cmd, sizeof(cmd), NULL, 0, CHRETRIES,
            100000, NULL, 0));
 }
@@ -707,7 +707,7 @@
        /*
         * Send command to changer.
         */
-       return (scsipi_command(sc->sc_periph, NULL,
+       return (scsipi_command(sc->sc_periph,
            (struct scsipi_generic *)&cmd, sizeof(cmd), NULL, 0, CHRETRIES,
            100000, NULL, 0));
 }
@@ -1047,7 +1047,7 @@
        /*
         * Send command to changer.
         */
-       return (scsipi_command(sc->sc_periph, NULL,
+       return (scsipi_command(sc->sc_periph,
            (struct scsipi_generic *)&cmd, sizeof(cmd),
            (u_char *)data, datalen, CHRETRIES, 100000, NULL,
            scsiflags | XS_CTL_DATA_IN));
@@ -1113,7 +1113,7 @@
        /*
         * Send command to changer.
         */
-       return (scsipi_command(sc->sc_periph, NULL,
+       return (scsipi_command(sc->sc_periph,
            (struct scsipi_generic *)&cmd, sizeof(cmd),
            (u_char *)data, datalen, CHRETRIES, 100000, NULL,
            datalen ? XS_CTL_DATA_OUT | XS_CTL_DATA_ONSTACK : 0));
@@ -1150,7 +1150,7 @@
        tmo *= 5 * 60 * 1000;
        tmo += (10 * 60 * 1000);
 
-       return (scsipi_command(sc->sc_periph, NULL,
+       return (scsipi_command(sc->sc_periph,
            (struct scsipi_generic *)&cmd, sizeof(cmd),
            NULL, 0, CHRETRIES, tmo, NULL, XS_CTL_IGNORE_ILLEGAL_REQUEST));



Home | Main Index | Thread Index | Old Index