Module Name: src
Committed By: bouyer
Date: Fri Apr 20 20:23:21 UTC 2012
Modified Files:
src/sys/dev/ic: ahcisata_core.c mvsata.c siisata.c
src/sys/dev/scsipi: atapi_wdc.c scsi_base.c scsiconf.c scsiconf.h
scsipi_base.c scsipiconf.h
src/sys/dev/usb: umass_scsipi.c
src/sys/sys: param.h
Log Message:
Add a bustype_async_event_xfer_mode() callback to scsipi_bustype (which can
be NULL), so that transport-specific details of transfer mode setting/printing
can be handled more easily.
Move scsipi_async_event_xfer_mode() and scsipi_print_xfer_mode() to
scsi_base.c and split in parallel scsi and FC/SAS parts.
size of struct scsipi_bustype has changed, welcome to 6.99.5
To generate a diff of this commit:
cvs rdiff -u -r1.33 -r1.34 src/sys/dev/ic/ahcisata_core.c
cvs rdiff -u -r1.15 -r1.16 src/sys/dev/ic/mvsata.c src/sys/dev/ic/siisata.c
cvs rdiff -u -r1.112 -r1.113 src/sys/dev/scsipi/atapi_wdc.c
cvs rdiff -u -r1.89 -r1.90 src/sys/dev/scsipi/scsi_base.c
cvs rdiff -u -r1.266 -r1.267 src/sys/dev/scsipi/scsiconf.c
cvs rdiff -u -r1.57 -r1.58 src/sys/dev/scsipi/scsiconf.h
cvs rdiff -u -r1.158 -r1.159 src/sys/dev/scsipi/scsipi_base.c
cvs rdiff -u -r1.120 -r1.121 src/sys/dev/scsipi/scsipiconf.h
cvs rdiff -u -r1.44 -r1.45 src/sys/dev/usb/umass_scsipi.c
cvs rdiff -u -r1.412 -r1.413 src/sys/sys/param.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/dev/ic/ahcisata_core.c
diff -u src/sys/dev/ic/ahcisata_core.c:1.33 src/sys/dev/ic/ahcisata_core.c:1.34
--- src/sys/dev/ic/ahcisata_core.c:1.33 Tue Jan 10 01:43:05 2012
+++ src/sys/dev/ic/ahcisata_core.c Fri Apr 20 20:23:20 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: ahcisata_core.c,v 1.33 2012/01/10 01:43:05 jakllsch Exp $ */
+/* $NetBSD: ahcisata_core.c,v 1.34 2012/04/20 20:23:20 bouyer Exp $ */
/*
* Copyright (c) 2006 Manuel Bouyer.
@@ -26,7 +26,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ahcisata_core.c,v 1.33 2012/01/10 01:43:05 jakllsch Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ahcisata_core.c,v 1.34 2012/04/20 20:23:20 bouyer Exp $");
#include <sys/types.h>
#include <sys/malloc.h>
@@ -92,6 +92,7 @@ static const struct scsipi_bustype ahci_
atapi_interpret_sense,
atapi_print_addr,
ahci_atapi_kill_pending,
+ NULL,
};
#endif /* NATAPIBUS */
Index: src/sys/dev/ic/mvsata.c
diff -u src/sys/dev/ic/mvsata.c:1.15 src/sys/dev/ic/mvsata.c:1.16
--- src/sys/dev/ic/mvsata.c:1.15 Tue Jan 24 20:04:08 2012
+++ src/sys/dev/ic/mvsata.c Fri Apr 20 20:23:20 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: mvsata.c,v 1.15 2012/01/24 20:04:08 jakllsch Exp $ */
+/* $NetBSD: mvsata.c,v 1.16 2012/04/20 20:23:20 bouyer Exp $ */
/*
* Copyright (c) 2008 KIYOHARA Takashi
* All rights reserved.
@@ -26,7 +26,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: mvsata.c,v 1.15 2012/01/24 20:04:08 jakllsch Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mvsata.c,v 1.16 2012/04/20 20:23:20 bouyer Exp $");
#include "opt_mvsata.h"
@@ -220,6 +220,7 @@ static const struct scsipi_bustype mvsat
atapi_interpret_sense,
atapi_print_addr,
mvsata_atapi_kill_pending,
+ NULL,
};
#endif /* NATAPIBUS */
#endif
Index: src/sys/dev/ic/siisata.c
diff -u src/sys/dev/ic/siisata.c:1.15 src/sys/dev/ic/siisata.c:1.16
--- src/sys/dev/ic/siisata.c:1.15 Tue Sep 27 01:02:38 2011
+++ src/sys/dev/ic/siisata.c Fri Apr 20 20:23:20 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: siisata.c,v 1.15 2011/09/27 01:02:38 jym Exp $ */
+/* $NetBSD: siisata.c,v 1.16 2012/04/20 20:23:20 bouyer Exp $ */
/* from ahcisata_core.c */
@@ -79,7 +79,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: siisata.c,v 1.15 2011/09/27 01:02:38 jym Exp $");
+__KERNEL_RCSID(0, "$NetBSD: siisata.c,v 1.16 2012/04/20 20:23:20 bouyer Exp $");
#include <sys/types.h>
#include <sys/malloc.h>
@@ -172,7 +172,8 @@ static const struct scsipi_bustype siisa
atapi_scsipi_cmd,
atapi_interpret_sense,
atapi_print_addr,
- siisata_atapi_kill_pending
+ siisata_atapi_kill_pending,
+ NULL,
};
#endif /* NATAPIBUS */
Index: src/sys/dev/scsipi/atapi_wdc.c
diff -u src/sys/dev/scsipi/atapi_wdc.c:1.112 src/sys/dev/scsipi/atapi_wdc.c:1.113
--- src/sys/dev/scsipi/atapi_wdc.c:1.112 Tue May 24 16:35:26 2011
+++ src/sys/dev/scsipi/atapi_wdc.c Fri Apr 20 20:23:21 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: atapi_wdc.c,v 1.112 2011/05/24 16:35:26 joerg Exp $ */
+/* $NetBSD: atapi_wdc.c,v 1.113 2012/04/20 20:23:21 bouyer Exp $ */
/*
* Copyright (c) 1998, 2001 Manuel Bouyer.
@@ -25,7 +25,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: atapi_wdc.c,v 1.112 2011/05/24 16:35:26 joerg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: atapi_wdc.c,v 1.113 2012/04/20 20:23:21 bouyer Exp $");
#ifndef ATADEBUG
#define ATADEBUG
@@ -102,6 +102,7 @@ static const struct scsipi_bustype wdc_a
atapi_interpret_sense,
atapi_print_addr,
wdc_atapi_kill_pending,
+ NULL,
};
void
Index: src/sys/dev/scsipi/scsi_base.c
diff -u src/sys/dev/scsipi/scsi_base.c:1.89 src/sys/dev/scsipi/scsi_base.c:1.90
--- src/sys/dev/scsipi/scsi_base.c:1.89 Mon Apr 28 20:23:57 2008
+++ src/sys/dev/scsipi/scsi_base.c Fri Apr 20 20:23:21 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: scsi_base.c,v 1.89 2008/04/28 20:23:57 martin Exp $ */
+/* $NetBSD: scsi_base.c,v 1.90 2012/04/20 20:23:21 bouyer Exp $ */
/*-
* Copyright (c) 1998, 2004 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: scsi_base.c,v 1.89 2008/04/28 20:23:57 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: scsi_base.c,v 1.90 2012/04/20 20:23:21 bouyer Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -48,6 +48,7 @@ __KERNEL_RCSID(0, "$NetBSD: scsi_base.c,
#include <dev/scsipi/scsiconf.h>
#include <dev/scsipi/scsipi_base.h>
+static void scsi_print_xfer_mode(struct scsipi_periph *);
/*
* Do a scsi operation, asking a device to run as SCSI-II if it can.
*/
@@ -116,3 +117,145 @@ void
scsi_kill_pending(struct scsipi_periph *periph)
{
}
+
+/*
+ * scsi_print_xfer_mode:
+ *
+ * Print a parallel SCSI periph's capabilities.
+ */
+static void
+scsi_print_xfer_mode(struct scsipi_periph *periph)
+{
+ int period, freq, speed, mbs;
+
+ aprint_normal_dev(periph->periph_dev, "");
+ if (periph->periph_mode & (PERIPH_CAP_SYNC | PERIPH_CAP_DT)) {
+ period = scsipi_sync_factor_to_period(periph->periph_period);
+ aprint_normal("sync (%d.%02dns offset %d)",
+ period / 100, period % 100, periph->periph_offset);
+ } else
+ aprint_normal("async");
+
+ if (periph->periph_mode & PERIPH_CAP_WIDE32)
+ aprint_normal(", 32-bit");
+ else if (periph->periph_mode & (PERIPH_CAP_WIDE16 | PERIPH_CAP_DT))
+ aprint_normal(", 16-bit");
+ else
+ aprint_normal(", 8-bit");
+
+ if (periph->periph_mode & (PERIPH_CAP_SYNC | PERIPH_CAP_DT)) {
+ freq = scsipi_sync_factor_to_freq(periph->periph_period);
+ speed = freq;
+ if (periph->periph_mode & PERIPH_CAP_WIDE32)
+ speed *= 4;
+ else if (periph->periph_mode &
+ (PERIPH_CAP_WIDE16 | PERIPH_CAP_DT))
+ speed *= 2;
+ mbs = speed / 1000;
+ if (mbs > 0) {
+ aprint_normal(" (%d.%03dMB/s)", mbs,
+ speed % 1000);
+ } else
+ aprint_normal(" (%dKB/s)", speed % 1000);
+ }
+
+ aprint_normal(" transfers");
+
+ if (periph->periph_mode & PERIPH_CAP_TQING)
+ aprint_normal(", tagged queueing");
+
+ aprint_normal("\n");
+}
+
+/*
+ * scsi_async_event_xfer_mode:
+ *
+ * Update the xfer mode for all parallel SCSI periphs sharing the
+ * specified I_T Nexus.
+ */
+void
+scsi_async_event_xfer_mode(struct scsipi_channel *chan, void *arg)
+{
+ struct scsipi_xfer_mode *xm = arg;
+ struct scsipi_periph *periph;
+ int lun, announce, mode, period, offset;
+
+ for (lun = 0; lun < chan->chan_nluns; lun++) {
+ periph = scsipi_lookup_periph(chan, xm->xm_target, lun);
+ if (periph == NULL)
+ continue;
+ announce = 0;
+
+ /*
+ * Clamp the xfer mode down to this periph's capabilities.
+ */
+ mode = xm->xm_mode & periph->periph_cap;
+ if (mode & PERIPH_CAP_SYNC) {
+ period = xm->xm_period;
+ offset = xm->xm_offset;
+ } else {
+ period = 0;
+ offset = 0;
+ }
+
+ /*
+ * If we do not have a valid xfer mode yet, or the parameters
+ * are different, announce them.
+ */
+ if ((periph->periph_flags & PERIPH_MODE_VALID) == 0 ||
+ periph->periph_mode != mode ||
+ periph->periph_period != period ||
+ periph->periph_offset != offset)
+ announce = 1;
+
+ periph->periph_mode = mode;
+ periph->periph_period = period;
+ periph->periph_offset = offset;
+ periph->periph_flags |= PERIPH_MODE_VALID;
+
+ if (announce)
+ scsi_print_xfer_mode(periph);
+ }
+}
+
+/*
+ * scsipi_async_event_xfer_mode:
+ *
+ * Update the xfer mode for all SAS/FC periphs sharing the
+ * specified I_T Nexus.
+ */
+void
+scsi_fc_sas_async_event_xfer_mode(struct scsipi_channel *chan, void *arg)
+{
+ struct scsipi_xfer_mode *xm = arg;
+ struct scsipi_periph *periph;
+ int lun, announce, mode;
+
+ for (lun = 0; lun < chan->chan_nluns; lun++) {
+ periph = scsipi_lookup_periph(chan, xm->xm_target, lun);
+ if (periph == NULL)
+ continue;
+ announce = 0;
+
+ /*
+ * Clamp the xfer mode down to this periph's capabilities.
+ */
+ mode = xm->xm_mode & periph->periph_cap;
+ /*
+ * If we do not have a valid xfer mode yet, or the parameters
+ * are different, announce them.
+ */
+ if ((periph->periph_flags & PERIPH_MODE_VALID) == 0 ||
+ periph->periph_mode != mode)
+ announce = 1;
+
+ periph->periph_mode = mode;
+ periph->periph_flags |= PERIPH_MODE_VALID;
+
+ if (announce &&
+ (periph->periph_mode & PERIPH_CAP_TQING) != 0) {
+ aprint_normal_dev(periph->periph_dev,
+ "tagged queueing\n");
+ }
+ }
+}
Index: src/sys/dev/scsipi/scsiconf.c
diff -u src/sys/dev/scsipi/scsiconf.c:1.266 src/sys/dev/scsipi/scsiconf.c:1.267
--- src/sys/dev/scsipi/scsiconf.c:1.266 Thu Apr 19 17:45:20 2012
+++ src/sys/dev/scsipi/scsiconf.c Fri Apr 20 20:23:21 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: scsiconf.c,v 1.266 2012/04/19 17:45:20 bouyer Exp $ */
+/* $NetBSD: scsiconf.c,v 1.267 2012/04/20 20:23:21 bouyer Exp $ */
/*-
* Copyright (c) 1998, 1999, 2004 The NetBSD Foundation, Inc.
@@ -48,7 +48,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: scsiconf.c,v 1.266 2012/04/19 17:45:20 bouyer Exp $");
+__KERNEL_RCSID(0, "$NetBSD: scsiconf.c,v 1.267 2012/04/20 20:23:21 bouyer Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -119,6 +119,7 @@ const struct scsipi_bustype scsi_bustype
scsipi_interpret_sense,
scsi_print_addr,
scsi_kill_pending,
+ scsi_async_event_xfer_mode,
};
const struct scsipi_bustype scsi_fc_bustype = {
@@ -127,6 +128,7 @@ const struct scsipi_bustype scsi_fc_bust
scsipi_interpret_sense,
scsi_print_addr,
scsi_kill_pending,
+ scsi_fc_sas_async_event_xfer_mode,
};
const struct scsipi_bustype scsi_sas_bustype = {
@@ -135,6 +137,7 @@ const struct scsipi_bustype scsi_sas_bus
scsipi_interpret_sense,
scsi_print_addr,
scsi_kill_pending,
+ scsi_fc_sas_async_event_xfer_mode,
};
const struct scsipi_bustype scsi_usb_bustype = {
@@ -143,6 +146,7 @@ const struct scsipi_bustype scsi_usb_bus
scsipi_interpret_sense,
scsi_print_addr,
scsi_kill_pending,
+ NULL,
};
static int
Index: src/sys/dev/scsipi/scsiconf.h
diff -u src/sys/dev/scsipi/scsiconf.h:1.57 src/sys/dev/scsipi/scsiconf.h:1.58
--- src/sys/dev/scsipi/scsiconf.h:1.57 Thu Apr 19 17:45:20 2012
+++ src/sys/dev/scsipi/scsiconf.h Fri Apr 20 20:23:21 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: scsiconf.h,v 1.57 2012/04/19 17:45:20 bouyer Exp $ */
+/* $NetBSD: scsiconf.h,v 1.58 2012/04/20 20:23:21 bouyer Exp $ */
/*-
* Copyright (c) 1998, 1999, 2004 The NetBSD Foundation, Inc.
@@ -63,6 +63,12 @@ struct scsibus_softc {
/* sc_flags */
#define SCSIBUSF_OPEN 0x00000001 /* bus is open */
+/* SCSI subtypes for struct scsipi_bustype */
+#define SCSIPI_BUSTYPE_SCSI_PSCSI 0 /* parallel SCSI */
+#define SCSIPI_BUSTYPE_SCSI_FC 1 /* Fiber channel */
+#define SCSIPI_BUSTYPE_SCSI_SAS 2 /* SAS */
+#define SCSIPI_BUSTYPE_SCSI_USB 3 /* USB */
+
extern const struct scsipi_bustype scsi_bustype;
extern const struct scsipi_bustype scsi_fc_bustype;
extern const struct scsipi_bustype scsi_sas_bustype;
@@ -73,5 +79,7 @@ void scsi_kill_pending(struct scsipi_per
void scsi_print_addr(struct scsipi_periph *);
int scsi_probe_bus(struct scsibus_softc *, int, int);
void scsi_scsipi_cmd(struct scsipi_xfer *);
+void scsi_async_event_xfer_mode(struct scsipi_channel *, void *);
+void scsi_fc_sas_async_event_xfer_mode(struct scsipi_channel *, void *);
#endif /* _DEV_SCSIPI_SCSICONF_H_ */
Index: src/sys/dev/scsipi/scsipi_base.c
diff -u src/sys/dev/scsipi/scsipi_base.c:1.158 src/sys/dev/scsipi/scsipi_base.c:1.159
--- src/sys/dev/scsipi/scsipi_base.c:1.158 Thu Apr 19 17:45:20 2012
+++ src/sys/dev/scsipi/scsipi_base.c Fri Apr 20 20:23:21 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: scsipi_base.c,v 1.158 2012/04/19 17:45:20 bouyer Exp $ */
+/* $NetBSD: scsipi_base.c,v 1.159 2012/04/20 20:23:21 bouyer Exp $ */
/*-
* Copyright (c) 1998, 1999, 2000, 2002, 2003, 2004 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: scsipi_base.c,v 1.158 2012/04/19 17:45:20 bouyer Exp $");
+__KERNEL_RCSID(0, "$NetBSD: scsipi_base.c,v 1.159 2012/04/20 20:23:21 bouyer Exp $");
#include "opt_scsi.h"
@@ -74,8 +74,6 @@ static void scsipi_put_resource(struct s
static void scsipi_async_event_max_openings(struct scsipi_channel *,
struct scsipi_max_openings *);
-static void scsipi_async_event_xfer_mode(struct scsipi_channel *,
- struct scsipi_xfer_mode *);
static void scsipi_async_event_channel_reset(struct scsipi_channel *);
static struct pool scsipi_xfer_pool;
@@ -2158,8 +2156,10 @@ scsipi_async_event(struct scsipi_channel
break;
case ASYNC_EVENT_XFER_MODE:
- scsipi_async_event_xfer_mode(chan,
- (struct scsipi_xfer_mode *)arg);
+ if (chan->chan_bustype->bustype_async_event_xfer_mode) {
+ chan->chan_bustype->bustype_async_event_xfer_mode(
+ chan, arg);
+ }
break;
case ASYNC_EVENT_RESET:
scsipi_async_event_channel_reset(chan);
@@ -2169,78 +2169,6 @@ scsipi_async_event(struct scsipi_channel
}
/*
- * scsipi_print_xfer_mode:
- *
- * Print a periph's capabilities.
- */
-void
-scsipi_print_xfer_mode(struct scsipi_periph *periph)
-{
- int period, freq, speed, mbs;
-
- if ((periph->periph_flags & PERIPH_MODE_VALID) == 0)
- return;
-
- switch(scsipi_periph_bustype(periph)) {
- case SCSIPI_BUSTYPE_BUSTYPE(
- SCSIPI_BUSTYPE_SCSI, SCSIPI_BUSTYPE_SCSI_PSCSI):
- aprint_normal_dev(periph->periph_dev, "");
- if (periph->periph_mode & (PERIPH_CAP_SYNC | PERIPH_CAP_DT)) {
- period =
- scsipi_sync_factor_to_period(periph->periph_period);
- aprint_normal("sync (%d.%02dns offset %d)",
- period / 100, period % 100, periph->periph_offset);
- } else
- aprint_normal("async");
-
- if (periph->periph_mode & PERIPH_CAP_WIDE32)
- aprint_normal(", 32-bit");
- else if (
- periph->periph_mode & (PERIPH_CAP_WIDE16 | PERIPH_CAP_DT))
- aprint_normal(", 16-bit");
- else
- aprint_normal(", 8-bit");
-
- if (periph->periph_mode & (PERIPH_CAP_SYNC | PERIPH_CAP_DT)) {
- freq =
- scsipi_sync_factor_to_freq(periph->periph_period);
- speed = freq;
- if (periph->periph_mode & PERIPH_CAP_WIDE32)
- speed *= 4;
- else if (periph->periph_mode &
- (PERIPH_CAP_WIDE16 | PERIPH_CAP_DT))
- speed *= 2;
- mbs = speed / 1000;
- if (mbs > 0) {
- aprint_normal(" (%d.%03dMB/s)", mbs,
- speed % 1000);
- } else
- aprint_normal(" (%dKB/s)", speed % 1000);
- }
-
- aprint_normal(" transfers");
-
- if (periph->periph_mode & PERIPH_CAP_TQING)
- aprint_normal(", tagged queueing");
-
- aprint_normal("\n");
- break;
- case SCSIPI_BUSTYPE_BUSTYPE(
- SCSIPI_BUSTYPE_SCSI, SCSIPI_BUSTYPE_SCSI_FC):
- case SCSIPI_BUSTYPE_BUSTYPE(
- SCSIPI_BUSTYPE_SCSI, SCSIPI_BUSTYPE_SCSI_SAS):
- if (periph->periph_mode & PERIPH_CAP_TQING) {
- aprint_normal_dev(periph->periph_dev,
- "tagged queueing\n");
- }
- break;
- default:
- /* nothing */
- break;
- }
-}
-
-/*
* scsipi_async_event_max_openings:
*
* Update the maximum number of outstanding commands a
@@ -2277,57 +2205,6 @@ scsipi_async_event_max_openings(struct s
}
/*
- * scsipi_async_event_xfer_mode:
- *
- * Update the xfer mode for all periphs sharing the
- * specified I_T Nexus.
- */
-static void
-scsipi_async_event_xfer_mode(struct scsipi_channel *chan,
- struct scsipi_xfer_mode *xm)
-{
- struct scsipi_periph *periph;
- int lun, announce, mode, period, offset;
-
- for (lun = 0; lun < chan->chan_nluns; lun++) {
- periph = scsipi_lookup_periph(chan, xm->xm_target, lun);
- if (periph == NULL)
- continue;
- announce = 0;
-
- /*
- * Clamp the xfer mode down to this periph's capabilities.
- */
- mode = xm->xm_mode & periph->periph_cap;
- if (mode & PERIPH_CAP_SYNC) {
- period = xm->xm_period;
- offset = xm->xm_offset;
- } else {
- period = 0;
- offset = 0;
- }
-
- /*
- * If we do not have a valid xfer mode yet, or the parameters
- * are different, announce them.
- */
- if ((periph->periph_flags & PERIPH_MODE_VALID) == 0 ||
- periph->periph_mode != mode ||
- periph->periph_period != period ||
- periph->periph_offset != offset)
- announce = 1;
-
- periph->periph_mode = mode;
- periph->periph_period = period;
- periph->periph_offset = offset;
- periph->periph_flags |= PERIPH_MODE_VALID;
-
- if (announce)
- scsipi_print_xfer_mode(periph);
- }
-}
-
-/*
* scsipi_set_xfer_mode:
*
* Set the xfer mode for the specified I_T Nexus.
Index: src/sys/dev/scsipi/scsipiconf.h
diff -u src/sys/dev/scsipi/scsipiconf.h:1.120 src/sys/dev/scsipi/scsipiconf.h:1.121
--- src/sys/dev/scsipi/scsipiconf.h:1.120 Thu Apr 19 17:45:20 2012
+++ src/sys/dev/scsipi/scsipiconf.h Fri Apr 20 20:23:21 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: scsipiconf.h,v 1.120 2012/04/19 17:45:20 bouyer Exp $ */
+/* $NetBSD: scsipiconf.h,v 1.121 2012/04/20 20:23:21 bouyer Exp $ */
/*-
* Copyright (c) 1998, 1999, 2000, 2004 The NetBSD Foundation, Inc.
@@ -236,6 +236,8 @@ struct scsipi_bustype {
int (*bustype_interpret_sense)(struct scsipi_xfer *);
void (*bustype_printaddr)(struct scsipi_periph *);
void (*bustype_kill_pending)(struct scsipi_periph *);
+ void (*bustype_async_event_xfer_mode)(struct scsipi_channel *,
+ void *);
};
/* bustype_type */
@@ -252,12 +254,6 @@ struct scsipi_bustype {
#define SCSIPI_BUSTYPE_BUSTYPE(t, s) \
((t) << SCSIPI_BUSTYPE_TYPE_SHIFT | (s) << SCSIPI_BUSTYPE_SUBTYPE_SHIFT)
/* subtypes are defined in each bus type headers */
-/* XXX this should be in scsiconf.h but is used in scsipi_base.c */
-/* SCSI subtypes */
-#define SCSIPI_BUSTYPE_SCSI_PSCSI 0 /* parallel SCSI */
-#define SCSIPI_BUSTYPE_SCSI_FC 1 /* Fiber channel */
-#define SCSIPI_BUSTYPE_SCSI_SAS 2 /* SAS */
-#define SCSIPI_BUSTYPE_SCSI_USB 3 /* USB */
/*
* scsipi_channel:
@@ -686,7 +682,6 @@ void scsipi_async_event(struct scsipi_ch
int scsipi_do_ioctl(struct scsipi_periph *, dev_t, u_long, void *,
int, struct lwp *);
-void scsipi_print_xfer_mode(struct scsipi_periph *);
void scsipi_set_xfer_mode(struct scsipi_channel *, int, int);
int scsipi_channel_init(struct scsipi_channel *);
Index: src/sys/dev/usb/umass_scsipi.c
diff -u src/sys/dev/usb/umass_scsipi.c:1.44 src/sys/dev/usb/umass_scsipi.c:1.45
--- src/sys/dev/usb/umass_scsipi.c:1.44 Thu Apr 19 17:45:21 2012
+++ src/sys/dev/usb/umass_scsipi.c Fri Apr 20 20:23:21 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: umass_scsipi.c,v 1.44 2012/04/19 17:45:21 bouyer Exp $ */
+/* $NetBSD: umass_scsipi.c,v 1.45 2012/04/20 20:23:21 bouyer Exp $ */
/*
* Copyright (c) 2001, 2003, 2012 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: umass_scsipi.c,v 1.44 2012/04/19 17:45:21 bouyer Exp $");
+__KERNEL_RCSID(0, "$NetBSD: umass_scsipi.c,v 1.45 2012/04/20 20:23:21 bouyer Exp $");
#ifdef _KERNEL_OPT
#include "opt_umass.h"
@@ -115,6 +115,7 @@ const struct scsipi_bustype umass_atapi_
atapi_interpret_sense,
atapi_print_addr,
scsi_kill_pending,
+ NULL,
};
#endif
Index: src/sys/sys/param.h
diff -u src/sys/sys/param.h:1.412 src/sys/sys/param.h:1.413
--- src/sys/sys/param.h:1.412 Tue Mar 13 18:50:41 2012
+++ src/sys/sys/param.h Fri Apr 20 20:23:21 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: param.h,v 1.412 2012/03/13 18:50:41 elad Exp $ */
+/* $NetBSD: param.h,v 1.413 2012/04/20 20:23:21 bouyer Exp $ */
/*-
* Copyright (c) 1982, 1986, 1989, 1993
@@ -63,7 +63,7 @@
* 2.99.9 (299000900)
*/
-#define __NetBSD_Version__ 699000400 /* NetBSD 6.99.4 */
+#define __NetBSD_Version__ 699000500 /* NetBSD 6.99.5 */
#define __NetBSD_Prereq__(M,m,p) (((((M) * 100000000) + \
(m) * 1000000) + (p) * 100) <= __NetBSD_Version__)