From 2719fbb4b603fb9251dbc32978a303b82c4b3218 Mon Sep 17 00:00:00 2001 From: joerg Date: Wed, 21 May 1997 19:35:11 +0000 Subject: Initialize the buf_queue of the pt(4) driver. PR: kern/3629: /sys/scsi/pt.c doesn't... Submitted by: simokawa@sat.t.u-tokyo.ac.jp (Hidetoshi Shimokawa) Add a catch-all record for removable SCSI devices to default them to only one LUN. PR: kern/3580: Bad LUN probes on Xyratex... --- sys/scsi/pt.c | 13 +++++++++++-- sys/scsi/scsiconf.c | 6 +++++- 2 files changed, 16 insertions(+), 3 deletions(-) (limited to 'sys/scsi') diff --git a/sys/scsi/pt.c b/sys/scsi/pt.c index 7aa5015..1791aa4 100644 --- a/sys/scsi/pt.c +++ b/sys/scsi/pt.c @@ -37,7 +37,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: pt.c,v 1.20 1997/02/22 09:44:26 peter Exp $ + * $Id: pt.c,v 1.21 1997/03/23 06:33:45 bde Exp $ */ #include "opt_bounce.h" @@ -88,7 +88,7 @@ static struct scsi_device pt_switch = 0, {0, 0}, SDEV_ONCE_ONLY, /* Only one open allowed */ - 0, + ptattach, "Processor", ptopen, sizeof(struct scsi_data), @@ -101,6 +101,15 @@ static struct scsi_device pt_switch = pt_strategy, }; +static errval +ptattach(struct scsi_link *sc_link) +{ + struct scsi_data *pt = sc_link->sd; + + TAILQ_INIT(&pt->buf_queue); + return 0; +} + /* * ptstart looks to see if there is a buf waiting for the device * and that the device is not already busy. If both are true, diff --git a/sys/scsi/scsiconf.c b/sys/scsi/scsiconf.c index b1b882d..ac9c306 100644 --- a/sys/scsi/scsiconf.c +++ b/sys/scsi/scsiconf.c @@ -16,7 +16,7 @@ * * New configuration setup: dufault@hda.com * - * $Id: scsiconf.c,v 1.85 1997/05/03 22:23:13 joerg Exp $ + * $Id: scsiconf.c,v 1.86 1997/05/19 17:32:07 jmz Exp $ */ #include "opt_scsi.h" @@ -441,6 +441,10 @@ static struct scsidevs knowndevs[] = T_DIRECT, T_DIRECT, T_FIXED, "*", "*", "*", "sd", SC_ONE_LU }, + { + T_DIRECT, T_DIRECT, T_REMOV, "*", "*", "*", + "sd", SC_ONE_LU + }, #endif /* NSD */ #if NST > 0 { -- cgit v1.1