From ea6ecb4e52f87d3c46d35f55326b14ecf678c405 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20E=C3=9Fer?= Date: Thu, 2 Feb 1995 15:50:57 +0000 Subject: [PATCH] Disable disconnect after drive timeouts, since these may be the result of reselect following too fast for the driver to notice. Not the final solution, but the problem has been seen only with very few devices. Reviewed by: se Submitted by: wolf (Wolfgang Stanglmeier) --- sys/pci/ncr.c | 29 ++++++++++++++++++++--------- 1 file changed, 20 insertions(+), 9 deletions(-) diff --git a/sys/pci/ncr.c b/sys/pci/ncr.c index d21664c3761..f9cd370d2fb 100644 --- a/sys/pci/ncr.c +++ b/sys/pci/ncr.c @@ -1,6 +1,6 @@ /************************************************************************** ** -** $Id: ncr.c,v 1.15 1995/02/02 12:36:16 davidg Exp $ +** $Id: ncr.c,v 1.16 1995/02/02 13:12:15 davidg Exp $ ** ** Device driver for the NCR 53C810 PCI-SCSI-Controller. ** @@ -44,7 +44,7 @@ *************************************************************************** */ -#define NCR_PATCHLEVEL "pl4 95/01/27" +#define NCR_PATCHLEVEL "pl6 95/02/02" #define NCR_VERSION (2) #define MAX_UNITS (16) @@ -1073,6 +1073,11 @@ struct ncb { */ u_char maxwide; + /* + ** option for M_IDENTIFY message: enables disconnecting + */ + u_char disc; + /* ** lockout of execption handler call while starting command. */ @@ -1226,7 +1231,7 @@ static void ncr_attach (pcici_t tag, int unit); static char ident[] = - "\n$Id: ncr.c,v 1.15 1995/02/02 12:36:16 davidg Exp $\n"; + "\n$Id: ncr.c,v 1.16 1995/02/02 13:12:15 davidg Exp $\n"; u_long ncr_version = NCR_VERSION + (u_long) sizeof (struct ncb) @@ -3352,8 +3357,10 @@ static void ncr_attach (pcici_t config_id, int unit) /* ** process the reset exception, ** if interrupts are not enabled yet. + ** than enable disconnects. */ ncr_exception (np); + np->disc = 1; #ifdef ANCIENT printf ("%s: waiting for scsi devices to settle\n", @@ -3699,21 +3706,19 @@ static INT32 ncr_start (struct scsi_xfer * xp) **---------------------------------------------------- */ + idmsg = M_IDENTIFY | xp->LUN; #ifndef NCR_NO_DISCONNECT - idmsg = (cp==&np->ccb ? M_IDENTIFY : 0xc0) | xp->LUN; -#else /*--------------------------------------------------------------------- ** Some users have problems with this driver. ** I assume that the current problems relate to a conflict between ** a disconnect and an immediately following reconnect operation. - ** With this option you can prevent the driver from using disconnects. - ** If this removes the problems, I would know where to search further.. - ** Of course this is no solution. + ** With this option one can prevent the driver from using disconnects. ** Without disconnects the performance will be severely degraded. ** But it may help to trace down the core problem. **--------------------------------------------------------------------- */ - idmsg = M_IDENTIFY | xp->LUN; + if ((cp!=&np->ccb) && (np->disc)) + idmsg |= 0x40; #endif cp -> scsi_smsg [0] = idmsg; @@ -4381,6 +4386,12 @@ void ncr_init (ncb_p np, char * msg, u_long code) usrwide = (SCSI_NCR_MAX_WIDE); if (usrwide > np->maxwide) usrwide=np->maxwide; + /* + ** Disable disconnects. + */ + + np->disc = 0; + /* ** Fill in target structure. */