Module Name: src
Committed By: chs
Date: Sun Sep 23 01:13:21 UTC 2012
Modified Files:
src/sys/dev/ic: mpt_netbsd.c
Log Message:
set chan_bustype correctly.
To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/sys/dev/ic/mpt_netbsd.c
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/mpt_netbsd.c
diff -u src/sys/dev/ic/mpt_netbsd.c:1.18 src/sys/dev/ic/mpt_netbsd.c:1.19
--- src/sys/dev/ic/mpt_netbsd.c:1.18 Sun Mar 18 21:05:21 2012
+++ src/sys/dev/ic/mpt_netbsd.c Sun Sep 23 01:13:21 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: mpt_netbsd.c,v 1.18 2012/03/18 21:05:21 martin Exp $ */
+/* $NetBSD: mpt_netbsd.c,v 1.19 2012/09/23 01:13:21 chs Exp $ */
/*
* Copyright (c) 2003 Wasabi Systems, Inc.
@@ -77,7 +77,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: mpt_netbsd.c,v 1.18 2012/03/18 21:05:21 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mpt_netbsd.c,v 1.19 2012/09/23 01:13:21 chs Exp $");
#include <dev/ic/mpt.h> /* pulls in all headers */
@@ -125,7 +125,13 @@ mpt_scsipi_attach(mpt_softc_t *mpt)
/* Fill in the scsipi_channel. */
memset(chan, 0, sizeof(*chan));
chan->chan_adapter = adapt;
- chan->chan_bustype = &scsi_bustype;
+ if (mpt->is_sas) {
+ chan->chan_bustype = &scsi_sas_bustype;
+ } else if (mpt->is_fc) {
+ chan->chan_bustype = &scsi_fc_bustype;
+ } else {
+ chan->chan_bustype = &scsi_bustype;
+ }
chan->chan_channel = 0;
chan->chan_flags = 0;
chan->chan_nluns = 8;