From 295864adef3aceae27a8df207e651c031105b145 Mon Sep 17 00:00:00 2001 From: mjacob Date: Tue, 8 Aug 2000 22:46:03 +0000 Subject: [PATCH] During probe, use SCBUSACCEL ioctl to adapters that support it to enable fast/wide/tagged. --- sys/dev/scsipi/scsiconf.c | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/sys/dev/scsipi/scsiconf.c b/sys/dev/scsipi/scsiconf.c index 5ec5efedc108..122d85f23b5f 100644 --- a/sys/dev/scsipi/scsiconf.c +++ b/sys/dev/scsipi/scsiconf.c @@ -1,4 +1,4 @@ -/* $NetBSD: scsiconf.c,v 1.148 2000/08/03 12:36:08 bouyer Exp $ */ +/* $NetBSD: scsiconf.c,v 1.149 2000/08/08 22:46:03 mjacob Exp $ */ /*- * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -817,7 +817,7 @@ scsi_probedev(scsi, target, lun) default: break; } - if (checkdtype) + if (checkdtype) { switch (inqbuf.device & SID_TYPE) { case T_DIRECT: case T_SEQUENTIAL: @@ -841,6 +841,25 @@ scsi_probedev(scsi, target, lun) case T_NODEVICE: goto bad; } + /* + * At this point we can also tell the adapter that it + * may negotiate things as appropriate. + */ + if (sc_link->adapter->scsipi_ioctl) { + struct scbusaccel_args s; + s.sa_target = target; + s.sa_lun = lun; + s.sa_flags = 0; + if ((sc_link->quirks & SDEV_NOTAG) == 0) + s.sa_flags |= SC_ACCEL_TAGS; + if ((sc_link->quirks & SDEV_NOSYNC) == 0) + s.sa_flags |= SC_ACCEL_SYNC; + if ((sc_link->quirks & SDEV_NOWIDE) == 0) + s.sa_flags |= SC_ACCEL_WIDE; + (void) (*sc_link->adapter->scsipi_ioctl) + (sc_link, SCBUSACCEL, (caddr_t)&s, FWRITE, curproc); + } + } if ((cf = config_search(scsibussubmatch, (struct device *)scsi, &sa)) != NULL) {