Source-Changes-HG archive

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

[src/trunk]: src/sys/dev It seems that the 1010-33 has a bug: it sometimes ge...



details:   https://anonhg.NetBSD.org/src/rev/4a9824e0eb9c
branches:  trunk
changeset: 526491:4a9824e0eb9c
user:      bouyer <bouyer%NetBSD.org@localhost>
date:      Sat May 04 18:11:06 2002 +0000

description:
It seems that the 1010-33 has a bug: it sometimes generate spurious SCSI gross
errors for narrow transfers after a reselect. FreeBSD sym driver has a comment
about this, but their workaround (disable SCSI gross error reports) doesn't
work for me. Instead dissallow disconnect if the target is not wide
(FreeBSD doens't allow disconnect until the target has been fully probed, which
is why they may not have noticed my problem).

diffstat:

 sys/dev/ic/siop_common.c      |  21 ++++++++++++++++++---
 sys/dev/ic/siopvar_common.h   |   3 ++-
 sys/dev/pci/siop_pci_common.c |   6 ++++--
 3 files changed, 24 insertions(+), 6 deletions(-)

diffs (107 lines):

diff -r fd41df22733c -r 4a9824e0eb9c sys/dev/ic/siop_common.c
--- a/sys/dev/ic/siop_common.c  Sat May 04 17:51:52 2002 +0000
+++ b/sys/dev/ic/siop_common.c  Sat May 04 18:11:06 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: siop_common.c,v 1.25 2002/04/29 15:45:05 bouyer Exp $  */
+/*     $NetBSD: siop_common.c,v 1.26 2002/05/04 18:11:06 bouyer Exp $  */
 
 /*
  * Copyright (c) 2000, 2002 Manuel Bouyer.
@@ -33,7 +33,7 @@
 /* SYM53c7/8xx PCI-SCSI I/O Processors driver */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: siop_common.c,v 1.25 2002/04/29 15:45:05 bouyer Exp $");
+__KERNEL_RCSID(0, "$NetBSD: siop_common.c,v 1.26 2002/05/04 18:11:06 bouyer Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -229,7 +229,6 @@
                /* reset SCNTL4 */
                bus_space_write_1(sc->sc_rt, sc->sc_rh, SIOP_SCNTL4, 0);
        }
-               
        sc->sc_reset(sc);
 }
 
@@ -251,6 +250,17 @@
        /* request sense doesn't disconnect */
        if (xs->xs_control & XS_CTL_REQSENSE)
                siop_cmd->siop_tables->msg_out[0] = MSG_IDENTIFY(lun, 0);
+       else if ((sc->features & SF_CHIP_GEBUG) &&
+           (sc->targets[target]->flags & TARF_ISWIDE) == 0)
+               /*
+                * 1010 bug: it seems that the 1010 has problems with reselect
+                * when not in wide mode (generate false SCSI gross error).
+                * The FreeBSD sym driver has comments about it but their
+                * workaround (disable SCSI gross error reporting) doesn't
+                * work with my adapter. So disable disconnect when not
+                * wide.
+                */
+               siop_cmd->siop_tables->msg_out[0] = MSG_IDENTIFY(lun, 0);
        else
                siop_cmd->siop_tables->msg_out[0] = MSG_IDENTIFY(lun, 1);
        if (xs->xs_tag_type != 0) {
@@ -878,6 +888,11 @@
        xm.xm_period = 0;
        xm.xm_offset = 0;
 
+       /* 1010 workaround: can't do disconnect if not wide, so can't do tag */
+       if ((sc->features & SF_CHIP_GEBUG) &&
+           (sc->targets[target]->flags & TARF_ISWIDE) == 0)
+               siop_target->flags &= ~TARF_TAG;
+
        if (siop_target->flags & TARF_ISWIDE)
                xm.xm_mode |= PERIPH_CAP_WIDE16;
        if (siop_target->period) {
diff -r fd41df22733c -r 4a9824e0eb9c sys/dev/ic/siopvar_common.h
--- a/sys/dev/ic/siopvar_common.h       Sat May 04 17:51:52 2002 +0000
+++ b/sys/dev/ic/siopvar_common.h       Sat May 04 18:11:06 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: siopvar_common.h,v 1.19 2002/04/23 20:41:16 bouyer Exp $       */
+/*     $NetBSD: siopvar_common.h,v 1.20 2002/05/04 18:11:06 bouyer Exp $       */
 
 /*
  * Copyright (c) 2000 Manuel Bouyer.
@@ -170,6 +170,7 @@
 #define SF_CHIP_10REGS 0x00010000 /* 10 scratch registers */
 #define SF_CHIP_DFBC   0x00020000 /* Use DFBC register */
 #define SF_CHIP_DT     0x00040000 /* DT clocking */
+#define SF_CHIP_GEBUG  0x00080000 /* SCSI gross error bug */
 
 #define SF_PCI_RL      0x01000000 /* PCI read line */
 #define SF_PCI_RM      0x02000000 /* PCI read multiple */
diff -r fd41df22733c -r 4a9824e0eb9c sys/dev/pci/siop_pci_common.c
--- a/sys/dev/pci/siop_pci_common.c     Sat May 04 17:51:52 2002 +0000
+++ b/sys/dev/pci/siop_pci_common.c     Sat May 04 18:11:06 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: siop_pci_common.c,v 1.16 2002/04/26 19:44:52 thorpej Exp $     */
+/*     $NetBSD: siop_pci_common.c,v 1.17 2002/05/04 18:11:06 bouyer Exp $      */
 
 /*
  * Copyright (c) 2000 Manuel Bouyer.
@@ -32,7 +32,7 @@
 /* SYM53c8xx PCI-SCSI I/O Processors driver: PCI front-end */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: siop_pci_common.c,v 1.16 2002/04/26 19:44:52 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: siop_pci_common.c,v 1.17 2002/05/04 18:11:06 bouyer Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -170,6 +170,7 @@
        SF_PCI_RL | SF_PCI_CLS | SF_PCI_WRI | SF_PCI_RM |
        SF_CHIP_LEDC | SF_CHIP_FIFO | SF_CHIP_PF | SF_CHIP_RAM |
        SF_CHIP_LS | SF_CHIP_10REGS | SF_CHIP_DFBC | SF_CHIP_DBLR |
+       SF_CHIP_GEBUG |
        SF_BUS_ULTRA3 | SF_BUS_WIDE,
        7, 31, 0, 62, 8192
        },
@@ -179,6 +180,7 @@
        SF_PCI_RL | SF_PCI_CLS | SF_PCI_WRI | SF_PCI_RM |
        SF_CHIP_LEDC | SF_CHIP_FIFO | SF_CHIP_PF | SF_CHIP_RAM |
        SF_CHIP_LS | SF_CHIP_10REGS | SF_CHIP_DFBC | SF_CHIP_DBLR | SF_CHIP_DT |
+       SF_CHIP_GEBUG |
        SF_BUS_ULTRA3 | SF_BUS_WIDE,
        7, 62, 0, 62, 8192
        },



Home | Main Index | Thread Index | Old Index