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).
This commit is contained in:
bouyer 2002-05-04 18:11:06 +00:00
parent 56aff7332d
commit 3dc7dba078
3 changed files with 24 additions and 6 deletions

View File

@ -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 @@ siop_common_reset(sc)
/* reset SCNTL4 */
bus_space_write_1(sc->sc_rt, sc->sc_rh, SIOP_SCNTL4, 0);
}
sc->sc_reset(sc);
}
@ -251,6 +250,17 @@ siop_setuptables(siop_cmd)
/* 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 @@ siop_update_xfer_mode(sc, target)
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) {

View File

@ -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 @@ struct siop_common_softc {
#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 */

View File

@ -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 @@ const struct siop_product_desc siop_products[] = {
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 @@ const struct siop_product_desc siop_products[] = {
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
},