Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/scsipi Oops...I forgot that the GEM-2 chip is so lam...



details:   https://anonhg.NetBSD.org/src/rev/0a965c599d7d
branches:  trunk
changeset: 482741:0a965c599d7d
user:      mjacob <mjacob%NetBSD.org@localhost>
date:      Sun Feb 20 21:30:44 2000 +0000

description:
Oops...I forgot that the GEM-2 chip is so lame that if you don't tell
it exactly the right amount of data to transfer for WRITE BUFFER/Global
it will stay stuck in command phase (causing a command phase overrun).

diffstat:

 sys/dev/scsipi/ses.c |  11 +++++------
 1 files changed, 5 insertions(+), 6 deletions(-)

diffs (43 lines):

diff -r e4068533d56e -r 0a965c599d7d sys/dev/scsipi/ses.c
--- a/sys/dev/scsipi/ses.c      Sun Feb 20 20:34:57 2000 +0000
+++ b/sys/dev/scsipi/ses.c      Sun Feb 20 21:30:44 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ses.c,v 1.3 2000/01/21 21:19:57 mjacob Exp $ */
+/*     $NetBSD: ses.c,v 1.4 2000/02/20 21:30:44 mjacob Exp $ */
 /*
  * Copyright (C) 2000 National Aeronautics & Space Administration
  * All rights reserved.
@@ -540,7 +540,6 @@
 #ifndef        SCSIDEBUG
        flg |= XS_CTL_SILENT;
 #endif
-
        error = scsipi_command(ssc->sc_link, &sgen, cdbl,
            (u_char *) dptr, dl, SCSIPIRETRIES, 30000, NULL, flg);
 
@@ -1586,21 +1585,21 @@
 {
        int err, amt;
        char *sdata;
-       static char cdb0[10] = { SEND_DIAGNOSTIC };
+       static char cdb0[6] = { SEND_DIAGNOSTIC };
        static char cdb[10] =
-           { WRITE_BUFFER , 1, 0, 0, 0, 0, 0, 0, SAFT_SCRATCH, 0 };
+           { WRITE_BUFFER, 1, 0, 0, 0, 0, 0, 0, 16, 0 };
 
        sdata = SES_MALLOC(SAFT_SCRATCH);
        if (sdata == NULL)
                return (ENOMEM);
 
-       err = ses_runcmd(ssc, cdb0, 10, NULL, 0);
+       err = ses_runcmd(ssc, cdb0, 6, NULL, 0);
        if (err) {
                SES_FREE(sdata, SAFT_SCRATCH);
                return (err);
        }
        sdata[0] = SAFTE_WT_GLOBAL;
-       MEMZERO(&sdata[1], SAFT_SCRATCH - 1);
+       MEMZERO(&sdata[1], 15);
        amt = -SAFT_SCRATCH;
        err = ses_runcmd(ssc, cdb, 10, sdata, &amt);
        SES_FREE(sdata, SAFT_SCRATCH);



Home | Main Index | Thread Index | Old Index