Do WIDE negotiation before sync. transfer speed negotiation,

if a drive supports both features.
Pointed out by Gerard Goudier, who knew section 5.6.23 of
the SCSI-2 standard requires this order of actions ...
This commit is contained in:
se 1996-03-11 19:25:58 +00:00
parent 11e7fe7590
commit a36c754d0f

View File

@ -1,6 +1,6 @@
/**************************************************************************
**
** $Id: ncr.c,v 1.64 1996/02/19 00:03:50 se Exp $
** $Id: ncr.c,v 1.65 1996/03/10 07:12:49 gibbs Exp $
**
** Device driver for the NCR 53C810 PCI-SCSI-Controller.
**
@ -120,7 +120,9 @@
** one lun, so take 1 as the default.
*/
#ifndef MAX_LUN
#define MAX_LUN (8)
#endif /* MAX_LUN */
/*
** The maximum number of jobs scheduled for starting.
@ -1245,7 +1247,7 @@ static void ncr_attach (pcici_t tag, int unit);
static char ident[] =
"\n$Id: ncr.c,v 1.64 1996/02/19 00:03:50 se Exp $\n";
"\n$Id: ncr.c,v 1.65 1996/03/10 07:12:49 gibbs Exp $\n";
static u_long ncr_version = NCR_VERSION * 11
+ (u_long) sizeof (struct ncb) * 7
@ -3686,13 +3688,24 @@ static int32_t ncr_start (struct scsi_xfer * xp)
nego = 0;
if (tp->inqdata[7]) {
/*
** negotiate wide transfers ?
*/
if (!tp->widedone) {
if (tp->inqdata[7] & INQ7_WIDE16) {
nego = NS_WIDE;
} else
tp->widedone=1;
};
/*
** negotiate synchronous transfers?
*/
if (!tp->period) {
if (!nego && !tp->period) {
if (SCSI_NCR_MAX_SYNC
#if defined (CDROM_ASYNC) || defined (GENERIC) || defined (BOOTMFS)
#if defined (CDROM_ASYNC)
&& ((tp->inqdata[0] & 0x1f) != 5)
#endif
&& (tp->inqdata[7] & INQ7_SYNC)) {
@ -3704,17 +3717,6 @@ static int32_t ncr_start (struct scsi_xfer * xp)
printf ("asynchronous.\n");
};
};
/*
** negotiate wide transfers ?
*/
if (!tp->widedone) {
if (tp->inqdata[7] & INQ7_WIDE16) {
if (!nego) nego = NS_WIDE;
} else
tp->widedone=1;
};
};
/*---------------------------------------------------