Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-1-4]: src/sys/dev/scsipi Apply patch (requested by ad):
details: https://anonhg.NetBSD.org/src/rev/8bafdb88a4bd
branches: netbsd-1-4
changeset: 470065:8bafdb88a4bd
user: he <he%NetBSD.org@localhost>
date: Sun Jan 16 17:47:56 2000 +0000
description:
Apply patch (requested by ad):
When probing a SCSI target, do not report an error if the target
indicates that LUNs are not supported.
diffstat:
sys/dev/scsipi/scsiconf.c | 4 ++--
sys/dev/scsipi/scsipi_base.c | 10 +++++++++-
sys/dev/scsipi/scsipiconf.h | 5 +++--
3 files changed, 14 insertions(+), 5 deletions(-)
diffs (61 lines):
diff -r e7419d555ea3 -r 8bafdb88a4bd sys/dev/scsipi/scsiconf.c
--- a/sys/dev/scsipi/scsiconf.c Sun Jan 16 17:40:28 2000 +0000
+++ b/sys/dev/scsipi/scsiconf.c Sun Jan 16 17:47:56 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: scsiconf.c,v 1.122.2.2 1999/11/27 15:11:28 he Exp $ */
+/* $NetBSD: scsiconf.c,v 1.122.2.3 2000/01/16 17:47:56 he Exp $ */
/*-
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -634,7 +634,7 @@
/* Now go ask the device all about itself. */
bzero(&inqbuf, sizeof(inqbuf));
- if (scsipi_inquire(sc_link, &inqbuf, SCSI_AUTOCONF) != 0)
+ if (scsipi_inquire(sc_link, &inqbuf, SCSI_AUTOCONF | SCSI_PROBE) != 0)
goto bad;
{
diff -r e7419d555ea3 -r 8bafdb88a4bd sys/dev/scsipi/scsipi_base.c
--- a/sys/dev/scsipi/scsipi_base.c Sun Jan 16 17:40:28 2000 +0000
+++ b/sys/dev/scsipi/scsipi_base.c Sun Jan 16 17:47:56 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: scsipi_base.c,v 1.20.2.2 1999/06/24 16:17:11 perry Exp $ */
+/* $NetBSD: scsipi_base.c,v 1.20.2.3 2000/01/16 17:49:42 he Exp $ */
/*-
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -300,6 +300,14 @@
return (0);
if ((xs->flags & SCSI_SILENT) != 0)
return (EIO);
+ /*
+ * If we're probing and the device indicates LUNs
+ * aren't supported, shut up about it.
+ */
+ if ((xs->flags & SCSI_PROBE) != 0 &&
+ sense->add_sense_code == 0x25 &&
+ sense->add_sense_code_qual == 0x00)
+ return (EINVAL);
error = EINVAL;
break;
case SKEY_UNIT_ATTENTION:
diff -r e7419d555ea3 -r 8bafdb88a4bd sys/dev/scsipi/scsipiconf.h
--- a/sys/dev/scsipi/scsipiconf.h Sun Jan 16 17:40:28 2000 +0000
+++ b/sys/dev/scsipi/scsipiconf.h Sun Jan 16 17:47:56 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: scsipiconf.h,v 1.29.2.1 1999/04/08 15:52:43 bouyer Exp $ */
+/* $NetBSD: scsipiconf.h,v 1.29.2.2 2000/01/16 17:50:15 he Exp $ */
/*-
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -304,7 +304,8 @@
#define SCSI_TARGET 0x2000 /* This defines a TARGET mode op. */
#define SCSI_ESCAPE 0x4000 /* Escape operation */
#define SCSI_URGENT 0x8000 /* Urgent operation (e.g., HTAG) */
- /* 0x00ff0000 reserved for ATAPI. */
+#define SCSI_PROBE 0x1000000 /* We are probing the target */
+ /* 0x00ff0000 reserved for ATAPI. */
/*
* Error values an adapter driver may return
Home |
Main Index |
Thread Index |
Old Index