From f7cc5b8655c9095d9f23aa77c1baec172c8b4598 Mon Sep 17 00:00:00 2001 From: Kenneth R Westerback Date: Wed, 14 Jan 2004 02:00:42 +0000 Subject: Nuke SDEV_NOLUNS, SDEV_FORCELUNS, and PQUIRK_FORCELUNS quirks. Also moreluns field in scsi_link structure. Instead, treat an INQUIRY result that duplicates the INQUIRY result of LUN 0 as proof the LUN does not exist. Compensate for lack of SDEV_NOLUNS where necessary by setting sc_link->luns to 1, which has the same effect. From Marco Peereboom. Don't issue Test Unit Ready command before INQUIRY command - not necessary and potentially harmful to devices with ADEV_NOTUR quirk since quirks have not been set yet. From mycroft@NetBSD ok deraadt@, mvme* changes by miod@. --- sys/arch/mvme68k/dev/vs.c | 3 +-- sys/arch/mvme68k/dev/vsdma.c | 3 ++- sys/arch/mvme88k/dev/vs.c | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) (limited to 'sys/arch') diff --git a/sys/arch/mvme68k/dev/vs.c b/sys/arch/mvme68k/dev/vs.c index eaa6ba364a0..45388bfe98c 100644 --- a/sys/arch/mvme68k/dev/vs.c +++ b/sys/arch/mvme68k/dev/vs.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vs.c,v 1.12 2003/11/07 10:16:45 jmc Exp $ */ +/* $OpenBSD: vs.c,v 1.13 2004/01/14 02:00:41 krw Exp $ */ /* * Copyright (c) 1999 Steve Murphree, Jr. @@ -253,7 +253,6 @@ vs_scsicmd(xs) scsi_done(xs); } - slp->quirks |= SDEV_NOLUNS; flags = xs->flags; #ifdef SDEBUG printf("scsi_cmd() "); diff --git a/sys/arch/mvme68k/dev/vsdma.c b/sys/arch/mvme68k/dev/vsdma.c index 5769a128bdf..584b968abd1 100644 --- a/sys/arch/mvme68k/dev/vsdma.c +++ b/sys/arch/mvme68k/dev/vsdma.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vsdma.c,v 1.5 2002/04/27 23:21:05 miod Exp $ */ +/* $OpenBSD: vsdma.c,v 1.6 2004/01/14 02:00:41 krw Exp $ */ /* * Copyright (c) 1999 Steve Murphree, Jr. * All rights reserved. @@ -115,6 +115,7 @@ vsattach(parent, self, auxp) sc->sc_link.adapter_target = 7; sc->sc_link.adapter = &vs_scsiswitch; sc->sc_link.device = &vs_scsidev; + sc->sc_link.luns = 1; sc->sc_link.openings = 1; sc->sc_ih_n.ih_fn = vs_nintr; diff --git a/sys/arch/mvme88k/dev/vs.c b/sys/arch/mvme88k/dev/vs.c index c7db92bcbf8..6a4c97763bc 100644 --- a/sys/arch/mvme88k/dev/vs.c +++ b/sys/arch/mvme88k/dev/vs.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vs.c,v 1.25 2004/01/02 23:38:37 miod Exp $ */ +/* $OpenBSD: vs.c,v 1.26 2004/01/14 02:00:41 krw Exp $ */ /* * Copyright (c) 1999 Steve Murphree, Jr. @@ -136,6 +136,7 @@ vsattach(parent, self, auxp) sc->sc_link.adapter_target = 7; sc->sc_link.adapter = &vs_scsiswitch; sc->sc_link.device = &vs_scsidev; + sc->sc_link.luns = 1; sc->sc_link.openings = roundup(NUM_IOPB, 8) / 8; sc->sc_ih_n.ih_fn = vs_nintr; @@ -283,7 +284,6 @@ vs_scsicmd(xs) M328_IOPB *iopb; M328_CMD *m328_cmd; - slp->quirks |= SDEV_NOLUNS; flags = xs->flags; #ifdef SDEBUG -- cgit v1.2.3