Source-Changes-HG archive

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

[src/netbsd-1-5]: src/sys/dev/scsipi Pull up revision 1.150 (via patch, reque...



details:   https://anonhg.NetBSD.org/src/rev/ed21eeccabc2
branches:  netbsd-1-5
changeset: 493153:ed21eeccabc2
user:      he <he%NetBSD.org@localhost>
date:      Wed Jun 26 17:03:15 2002 +0000

description:
Pull up revision 1.150 (via patch, requested by dillo):
  Make DVD ioctls use the right size CDB (16 instead of 12).  Fixes
  PR#12991.

diffstat:

 sys/dev/scsipi/cd.c |  28 ++++++++++++++--------------
 1 files changed, 14 insertions(+), 14 deletions(-)

diffs (126 lines):

diff -r 5528969aa872 -r ed21eeccabc2 sys/dev/scsipi/cd.c
--- a/sys/dev/scsipi/cd.c       Wed Jun 26 16:55:02 2002 +0000
+++ b/sys/dev/scsipi/cd.c       Wed Jun 26 17:03:15 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cd.c,v 1.141.2.2 2001/05/06 20:49:00 he Exp $  */
+/*     $NetBSD: cd.c,v 1.141.2.3 2002/06/26 17:03:15 he Exp $  */
 
 /*-
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -1544,7 +1544,7 @@
                cmd.opcode = GPCMD_REPORT_KEY;
                cmd.bytes[8] = 8;
                cmd.bytes[9] = 0 | (0 << 6);
-               error = scsipi_command(cd->sc_link, &cmd, 16, buf, 8,
+               error = scsipi_command(cd->sc_link, &cmd, 12, buf, 8,
                    CDRETRIES, 30000, NULL,
                    XS_CTL_DATA_IN|XS_CTL_DATA_ONSTACK);
                if (error)
@@ -1556,7 +1556,7 @@
                cmd.opcode = GPCMD_REPORT_KEY;
                cmd.bytes[8] = 16;
                cmd.bytes[9] = 1 | (a->lsc.agid << 6);
-               error = scsipi_command(cd->sc_link, &cmd, 16, buf, 16,
+               error = scsipi_command(cd->sc_link, &cmd, 12, buf, 16,
                    CDRETRIES, 30000, NULL,
                    XS_CTL_DATA_IN|XS_CTL_DATA_ONSTACK);
                if (error)
@@ -1568,7 +1568,7 @@
                cmd.opcode = GPCMD_REPORT_KEY;
                cmd.bytes[8] = 12;
                cmd.bytes[9] = 2 | (a->lsk.agid << 6);
-               error = scsipi_command(cd->sc_link, &cmd, 16, buf, 12,
+               error = scsipi_command(cd->sc_link, &cmd, 12, buf, 12,
                    CDRETRIES, 30000, NULL,
                    XS_CTL_DATA_IN|XS_CTL_DATA_ONSTACK);
                if (error)
@@ -1581,7 +1581,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_link, &cmd, 16, buf, 12,
+               error = scsipi_command(cd->sc_link, &cmd, 12, buf, 12,
                    CDRETRIES, 30000, NULL,
                    XS_CTL_DATA_IN|XS_CTL_DATA_ONSTACK);
                if (error)
@@ -1596,7 +1596,7 @@
                cmd.opcode = GPCMD_REPORT_KEY;
                cmd.bytes[8] = 8;
                cmd.bytes[9] = 5 | (a->lsasf.agid << 6);
-               error = scsipi_command(cd->sc_link, &cmd, 16, buf, 8,
+               error = scsipi_command(cd->sc_link, &cmd, 12, buf, 8,
                    CDRETRIES, 30000, NULL,
                    XS_CTL_DATA_IN|XS_CTL_DATA_ONSTACK);
                if (error)
@@ -1610,7 +1610,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_link, &cmd, 16, buf, 16,
+               error = scsipi_command(cd->sc_link, &cmd, 12, buf, 16,
                    CDRETRIES, 30000, NULL,
                    XS_CTL_DATA_OUT|XS_CTL_DATA_IN|XS_CTL_DATA_ONSTACK);
                if (error)
@@ -1624,7 +1624,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_link, &cmd, 16, buf, 12,
+               error = scsipi_command(cd->sc_link, &cmd, 12, buf, 12,
                    CDRETRIES, 30000, NULL,
                    XS_CTL_DATA_OUT|XS_CTL_DATA_IN|XS_CTL_DATA_ONSTACK);
                if (error) {
@@ -1637,7 +1637,7 @@
        case DVD_INVALIDATE_AGID:
                cmd.opcode = GPCMD_REPORT_KEY;
                cmd.bytes[9] = 0x3f | (a->lsa.agid << 6);
-               error = scsipi_command(cd->sc_link, &cmd, 16, buf, 16,
+               error = scsipi_command(cd->sc_link, &cmd, 12, buf, 16,
                    CDRETRIES, 30000, NULL, 0);
                if (error)
                        return (error);
@@ -1666,7 +1666,7 @@
        _lto2b(sizeof(buf), &cmd.bytes[7]);
 
        cmd.bytes[5] = s->physical.layer_num;
-       error = scsipi_command(cd->sc_link, &cmd, 16, buf, sizeof(buf),
+       error = scsipi_command(cd->sc_link, &cmd, 12, buf, sizeof(buf),
            CDRETRIES, 30000, NULL, XS_CTL_DATA_IN|XS_CTL_DATA_ONSTACK);
        if (error)
                return (error);
@@ -1706,7 +1706,7 @@
        _lto2b(sizeof(buf), &cmd.bytes[7]);
 
        cmd.bytes[5] = s->copyright.layer_num;
-       error = scsipi_command(cd->sc_link, &cmd, 16, buf, sizeof(buf),
+       error = scsipi_command(cd->sc_link, &cmd, 12, buf, sizeof(buf),
            CDRETRIES, 30000, NULL, XS_CTL_DATA_IN|XS_CTL_DATA_ONSTACK);
        if (error)
                return (error);
@@ -1731,7 +1731,7 @@
        _lto2b(sizeof(buf), &cmd.bytes[7]);
 
        cmd.bytes[9] = s->disckey.agid << 6;
-       error = scsipi_command(cd->sc_link, &cmd, 16, buf, sizeof(buf),
+       error = scsipi_command(cd->sc_link, &cmd, 12, buf, sizeof(buf),
            CDRETRIES, 30000, NULL, XS_CTL_DATA_IN|XS_CTL_DATA_ONSTACK);
        if (error)
                return (error);
@@ -1754,7 +1754,7 @@
        cmd.bytes[6] = s->type;
        _lto2b(sizeof(buf), &cmd.bytes[7]);
 
-       error = scsipi_command(cd->sc_link, &cmd, 16, buf, sizeof(buf),
+       error = scsipi_command(cd->sc_link, &cmd, 12, buf, sizeof(buf),
            CDRETRIES, 30000, NULL, XS_CTL_DATA_IN|XS_CTL_DATA_ONSTACK);
        if (error)
                return (error);
@@ -1780,7 +1780,7 @@
        cmd.bytes[6] = s->type;
        _lto2b(sizeof(buf), &cmd.bytes[7]);
 
-       error = scsipi_command(cd->sc_link, &cmd, 16, buf, sizeof(buf),
+       error = scsipi_command(cd->sc_link, &cmd, 12, buf, sizeof(buf),
            CDRETRIES, 30000, NULL, XS_CTL_DATA_IN|XS_CTL_DATA_ONSTACK);
        if (error)
                return (error);



Home | Main Index | Thread Index | Old Index