Subject: Re: SCSI drivers & devices resources
To: Matthew Jacob <mjacob@feral.com>
From: Manuel Bouyer <bouyer@antioche.lip6.fr>
List: tech-kern
Date: 10/21/2000 21:46:21
--yrj/dFKFPuw6o+aM
Content-Type: text/plain; charset=us-ascii
Hi,
On Fri, Oct 13, 2000 at 10:22:52AM -0700, Matthew Jacob wrote:
> [About REPORT LUNS]
> It's a SCSI-3 command, but like a lot of commands that come in with a new
> version of the spec, devices claiming compliance with a lower level just
> support it.
Could you send me the specs of this commands (opcode, result format, etc) ?
For my needs I added a SC_ACCEL_NODEV flag to SCBUSACCEL, and an IOCTL is
done when a probe failed as well.
BTW, why do you call SCBUSACCEL only in the checkdtype case ?
I think it should also be called for a vendor-specific device-type qual.
--
Manuel Bouyer <bouyer@antioche.eu.org>
--
--yrj/dFKFPuw6o+aM
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename=diff
--- scsiconf.c.old Sat Oct 21 21:38:49 2000
+++ scsiconf.c Sat Oct 21 21:39:08 2000
@@ -840,24 +846,6 @@
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,
@@ -869,10 +857,39 @@
printf(" not configured\n");
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);
+ }
return (docontinue);
bad:
+ /*
+ * Tell the lower layer that there's no device here.
+ */
+ if (sc_link->adapter->scsipi_ioctl) {
+ struct scbusaccel_args s;
+ s.sa_target = target;
+ s.sa_lun = lun;
+ s.sa_flags = SC_ACCEL_NODEV;
+ (void) (*sc_link->adapter->scsipi_ioctl)
+ (sc_link, SCBUSACCEL, (caddr_t)&s, FWRITE, curproc);
+ }
free(sc_link, M_DEVBUF);
return (docontinue);
}
--yrj/dFKFPuw6o+aM--