Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/rump/dev Split scsipi out of librumpdev_umass into libru...
details: https://anonhg.NetBSD.org/src/rev/89ffd09d5f56
branches: trunk
changeset: 757286:89ffd09d5f56
user: pooka <pooka%NetBSD.org@localhost>
date: Mon Aug 23 20:49:53 2010 +0000
description:
Split scsipi out of librumpdev_umass into librumpdev_scsipi. umass
still compile time depends on scsipi in the sense of "ifdef
NATAPIBLUES", but I'm not going to fix that now.
diffstat:
sys/rump/dev/Makefile.rumpdev | 4 +-
sys/rump/dev/lib/libscsipi/Makefile | 22 +++++++++++
sys/rump/dev/lib/libscsipi/SCSIPI.ioconf | 20 ++++++++++
sys/rump/dev/lib/libscsipi/component.c | 39 +++++++++++++++++++
sys/rump/dev/lib/libscsipi/opt/atapibus.h | 3 +
sys/rump/dev/lib/libscsipi/opt/opt_compat_freebsd.h | 1 +
sys/rump/dev/lib/libscsipi/opt/opt_scsi.h | 1 +
sys/rump/dev/lib/libscsipi/opt/scsibus.h | 3 +
sys/rump/dev/lib/libscsipi/opt/wd.h | 1 +
sys/rump/dev/lib/libscsipi/shlib_version | 4 ++
sys/rump/dev/lib/libumass/Makefile | 21 ++--------
sys/rump/dev/lib/libumass/UMASS.ioconf | 21 +----------
sys/rump/dev/lib/libumass/component.c | 19 +++++++++
sys/rump/dev/lib/libumass/opt/atapibus.h | 3 -
sys/rump/dev/lib/libumass/opt/opt_compat_freebsd.h | 1 -
sys/rump/dev/lib/libumass/opt/opt_scsi.h | 1 -
sys/rump/dev/lib/libumass/opt/scsibus.h | 3 -
sys/rump/dev/lib/libumass/opt/wd.h | 1 -
sys/rump/dev/lib/libumass/sd_at_scsibus_at_umass.c | 41 ---------------------
19 files changed, 120 insertions(+), 89 deletions(-)
diffs (truncated from 318 to 300 lines):
diff -r d1a6cb48625e -r 89ffd09d5f56 sys/rump/dev/Makefile.rumpdev
--- a/sys/rump/dev/Makefile.rumpdev Mon Aug 23 20:01:16 2010 +0000
+++ b/sys/rump/dev/Makefile.rumpdev Mon Aug 23 20:49:53 2010 +0000
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile.rumpdev,v 1.14 2010/06/30 16:14:18 pooka Exp $
+# $NetBSD: Makefile.rumpdev,v 1.15 2010/08/23 20:49:53 pooka Exp $
#
RUMPDEVLIST= audio bpf cgd disk dm fss netsmb pad putter raidframe \
- rnd sysmon ubt ucom ugenhc ulpt umass usb wscons
+ rnd scsipi sysmon ubt ucom ugenhc ulpt umass usb wscons
.for var in ${RUMPDEVLIST}
RUMPDEVLIBS+=lib${var}
diff -r d1a6cb48625e -r 89ffd09d5f56 sys/rump/dev/lib/libscsipi/Makefile
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/rump/dev/lib/libscsipi/Makefile Mon Aug 23 20:49:53 2010 +0000
@@ -0,0 +1,22 @@
+# $NetBSD: Makefile,v 1.1 2010/08/23 20:49:53 pooka Exp $
+#
+
+.PATH: ${.CURDIR}/../../../../dev/scsipi
+
+LIB= rumpdev_scsipi
+IOCONF= SCSIPI.ioconf
+
+SRCS+= scsipiconf.c scsipi_base.c scsipi_ioctl.c scsi_base.c scsiconf.c
+SRCS+= atapi_base.c atapiconf.c
+SRCS+= cd.c sd.c
+
+.if 1
+SRCS+= scsipi_verbose.c
+.endif
+
+SRCS+= component.c
+
+CPPFLAGS+= -I${.CURDIR}/opt -I${RUMPTOP}/librump/rumpvfs
+
+.include <bsd.lib.mk>
+.include <bsd.klinks.mk>
diff -r d1a6cb48625e -r 89ffd09d5f56 sys/rump/dev/lib/libscsipi/SCSIPI.ioconf
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/rump/dev/lib/libscsipi/SCSIPI.ioconf Mon Aug 23 20:49:53 2010 +0000
@@ -0,0 +1,20 @@
+# $NetBSD: SCSIPI.ioconf,v 1.1 2010/08/23 20:49:53 pooka Exp $
+#
+
+ioconf scsipi
+
+include "conf/files"
+include "dev/scsipi/files.scsipi"
+
+pseudo-root scsi*
+pseudo-root atapi*
+
+# SCSI support
+scsibus* at scsi?
+sd* at scsibus? target ? lun ?
+cd* at scsibus? target ? lun ?
+
+# ATAPI support
+atapibus* at atapi?
+sd* at atapibus? drive ? flags 0x0000
+cd* at atapibus? drive ? flags 0x0000
diff -r d1a6cb48625e -r 89ffd09d5f56 sys/rump/dev/lib/libscsipi/component.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/rump/dev/lib/libscsipi/component.c Mon Aug 23 20:49:53 2010 +0000
@@ -0,0 +1,39 @@
+/* $NetBSD: component.c,v 1.1 2010/08/23 20:49:53 pooka Exp $ */
+
+#include <sys/param.h>
+#include <sys/conf.h>
+#include <sys/device.h>
+#include <sys/kmem.h>
+#include <sys/stat.h>
+
+#include "ioconf.c"
+
+#include "rump_private.h"
+#include "rump_dev_private.h"
+#include "rump_vfs_private.h"
+
+RUMP_COMPONENT(RUMP_COMPONENT_DEV)
+{
+ extern struct bdevsw sd_bdevsw, cd_bdevsw;
+ extern struct cdevsw sd_cdevsw, cd_cdevsw;
+ devmajor_t bmaj, cmaj;
+
+ config_init_component(cfdriver_ioconf_scsipi,
+ cfattach_ioconf_scsipi, cfdata_ioconf_scsipi);
+
+ bmaj = cmaj = -1;
+ FLAWLESSCALL(devsw_attach("sd", &sd_bdevsw, &bmaj, &sd_cdevsw, &cmaj));
+
+ FLAWLESSCALL(rump_vfs_makedevnodes(S_IFBLK, "/dev/sd0", 'a',
+ bmaj, 0, 8));
+ FLAWLESSCALL(rump_vfs_makedevnodes(S_IFCHR, "/dev/rsd0", 'a',
+ cmaj, 0, 8));
+
+ bmaj = cmaj = -1;
+ FLAWLESSCALL(devsw_attach("cd", &cd_bdevsw, &bmaj, &cd_cdevsw, &cmaj));
+
+ FLAWLESSCALL(rump_vfs_makedevnodes(S_IFBLK, "/dev/cd0", 'a',
+ bmaj, 0, 8));
+ FLAWLESSCALL(rump_vfs_makedevnodes(S_IFCHR, "/dev/rcd0", 'a',
+ cmaj, 0, 8));
+}
diff -r d1a6cb48625e -r 89ffd09d5f56 sys/rump/dev/lib/libscsipi/opt/atapibus.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/rump/dev/lib/libscsipi/opt/atapibus.h Mon Aug 23 20:49:53 2010 +0000
@@ -0,0 +1,3 @@
+/* $NetBSD: atapibus.h,v 1.1 2010/08/23 20:49:53 pooka Exp $ */
+
+#define NATAPIBUS 1
diff -r d1a6cb48625e -r 89ffd09d5f56 sys/rump/dev/lib/libscsipi/opt/opt_compat_freebsd.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/rump/dev/lib/libscsipi/opt/opt_compat_freebsd.h Mon Aug 23 20:49:53 2010 +0000
@@ -0,0 +1,1 @@
+/* $NetBSD: opt_compat_freebsd.h,v 1.1 2010/08/23 20:49:54 pooka Exp $ */
diff -r d1a6cb48625e -r 89ffd09d5f56 sys/rump/dev/lib/libscsipi/opt/opt_scsi.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/rump/dev/lib/libscsipi/opt/opt_scsi.h Mon Aug 23 20:49:53 2010 +0000
@@ -0,0 +1,1 @@
+/* $NetBSD: opt_scsi.h,v 1.1 2010/08/23 20:49:54 pooka Exp $ */
diff -r d1a6cb48625e -r 89ffd09d5f56 sys/rump/dev/lib/libscsipi/opt/scsibus.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/rump/dev/lib/libscsipi/opt/scsibus.h Mon Aug 23 20:49:53 2010 +0000
@@ -0,0 +1,3 @@
+/* $NetBSD: scsibus.h,v 1.1 2010/08/23 20:49:54 pooka Exp $ */
+
+#define NSCSIBUS 1
diff -r d1a6cb48625e -r 89ffd09d5f56 sys/rump/dev/lib/libscsipi/opt/wd.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/rump/dev/lib/libscsipi/opt/wd.h Mon Aug 23 20:49:53 2010 +0000
@@ -0,0 +1,1 @@
+/* $NetBSD: wd.h,v 1.1 2010/08/23 20:49:54 pooka Exp $ */
diff -r d1a6cb48625e -r 89ffd09d5f56 sys/rump/dev/lib/libscsipi/shlib_version
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/rump/dev/lib/libscsipi/shlib_version Mon Aug 23 20:49:53 2010 +0000
@@ -0,0 +1,4 @@
+# $NetBSD: shlib_version,v 1.1 2010/08/23 20:49:53 pooka Exp $
+#
+major=0
+minor=0
diff -r d1a6cb48625e -r 89ffd09d5f56 sys/rump/dev/lib/libumass/Makefile
--- a/sys/rump/dev/lib/libumass/Makefile Mon Aug 23 20:01:16 2010 +0000
+++ b/sys/rump/dev/lib/libumass/Makefile Mon Aug 23 20:49:53 2010 +0000
@@ -1,33 +1,20 @@
-# $NetBSD: Makefile,v 1.5 2010/03/01 15:41:15 pooka Exp $
-#
-#
-# umass. includes scsibus+sd for simplicity due to the umass code
-# needing compile time knowledge of its presence. fixxxme
+# $NetBSD: Makefile,v 1.6 2010/08/23 20:49:53 pooka Exp $
#
-.PATH: ${.CURDIR}/../../../../dev/usb ${.CURDIR}/../../../../dev/scsipi
+.PATH: ${.CURDIR}/../../../../dev/usb
LIB= rumpdev_umass
IOCONF= UMASS.ioconf
.if ${MACHINE} == "i386"
SRCS= umass.c umass_isdata.c umass_quirks.c umass_scsipi.c
-SRCS+= scsipiconf.c scsipi_base.c scsipi_ioctl.c scsi_base.c scsiconf.c
-SRCS+= atapi_base.c atapiconf.c
-SRCS+= cd.c sd.c
-
-SRCS+= sd_at_scsibus_at_umass.c
+SRCS+= component.c
.else
SRCS= dummy.c
.endif
-CPPFLAGS+= -I${.CURDIR}/opt -I${RUMPTOP}/librump/rumpvfs
-
-.if 1
-SRCS+= scsipi_verbose.c
-CPPFLAGS+= -DSCSIVERBOSE
-.endif
+CPPFLAGS+= -I${.CURDIR}/../libscsipi/opt# -I${RUMPTOP}/librump/rumpvfs
.include <bsd.lib.mk>
.include <bsd.klinks.mk>
diff -r d1a6cb48625e -r 89ffd09d5f56 sys/rump/dev/lib/libumass/UMASS.ioconf
--- a/sys/rump/dev/lib/libumass/UMASS.ioconf Mon Aug 23 20:01:16 2010 +0000
+++ b/sys/rump/dev/lib/libumass/UMASS.ioconf Mon Aug 23 20:49:53 2010 +0000
@@ -1,31 +1,12 @@
-# $NetBSD: UMASS.ioconf,v 1.3 2010/03/08 10:24:37 pooka Exp $
-#
-
-#
-# Technically we should not have drive components (sd, cd) in here,
-# since in the future we might want to attach them via a completely
-# separate mechanism (say, with the scsi host controller in rump).
-# But, bundle them up for now.
+# $NetBSD: UMASS.ioconf,v 1.4 2010/08/23 20:49:53 pooka Exp $
#
ioconf umass
include "conf/files"
include "dev/usb/files.usb"
-include "dev/scsipi/files.scsipi"
-include "rump/dev/files.rump"
pseudo-root uhub*
# USB Mass Storage
umass* at uhub? port ? configuration ? interface ?
-
-# SCSI support
-scsibus* at scsi?
-sd* at scsibus? target ? lun ?
-cd* at scsibus? target ? lun ?
-
-# ATAPI support
-atapibus* at atapi?
-sd* at atapibus? drive ? flags 0x0000
-cd* at atapibus? drive ? flags 0x0000
diff -r d1a6cb48625e -r 89ffd09d5f56 sys/rump/dev/lib/libumass/component.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/rump/dev/lib/libumass/component.c Mon Aug 23 20:49:53 2010 +0000
@@ -0,0 +1,19 @@
+/* $NetBSD: component.c,v 1.1 2010/08/23 20:49:53 pooka Exp $ */
+
+#include <sys/param.h>
+#include <sys/conf.h>
+#include <sys/device.h>
+#include <sys/kmem.h>
+#include <sys/stat.h>
+
+#include "ioconf.c"
+
+#include "rump_private.h"
+#include "rump_dev_private.h"
+
+RUMP_COMPONENT(RUMP_COMPONENT_DEV)
+{
+
+ config_init_component(cfdriver_ioconf_umass,
+ cfattach_ioconf_umass, cfdata_ioconf_umass);
+}
diff -r d1a6cb48625e -r 89ffd09d5f56 sys/rump/dev/lib/libumass/opt/atapibus.h
--- a/sys/rump/dev/lib/libumass/opt/atapibus.h Mon Aug 23 20:01:16 2010 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,3 +0,0 @@
-/* $NetBSD: atapibus.h,v 1.1 2010/02/11 02:22:09 pooka Exp $ */
-
-#define NATAPIBUS 1
diff -r d1a6cb48625e -r 89ffd09d5f56 sys/rump/dev/lib/libumass/opt/opt_compat_freebsd.h
--- a/sys/rump/dev/lib/libumass/opt/opt_compat_freebsd.h Mon Aug 23 20:01:16 2010 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +0,0 @@
-/* $NetBSD: opt_compat_freebsd.h,v 1.1 2010/02/11 02:22:10 pooka Exp $ */
diff -r d1a6cb48625e -r 89ffd09d5f56 sys/rump/dev/lib/libumass/opt/opt_scsi.h
--- a/sys/rump/dev/lib/libumass/opt/opt_scsi.h Mon Aug 23 20:01:16 2010 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +0,0 @@
-/* $NetBSD: opt_scsi.h,v 1.1 2010/02/11 02:22:10 pooka Exp $ */
diff -r d1a6cb48625e -r 89ffd09d5f56 sys/rump/dev/lib/libumass/opt/scsibus.h
--- a/sys/rump/dev/lib/libumass/opt/scsibus.h Mon Aug 23 20:01:16 2010 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,3 +0,0 @@
-/* $NetBSD: scsibus.h,v 1.1 2010/02/11 02:22:10 pooka Exp $ */
-
-#define NSCSIBUS 1
diff -r d1a6cb48625e -r 89ffd09d5f56 sys/rump/dev/lib/libumass/opt/wd.h
--- a/sys/rump/dev/lib/libumass/opt/wd.h Mon Aug 23 20:01:16 2010 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +0,0 @@
-/* $NetBSD: wd.h,v 1.1 2010/02/11 02:22:10 pooka Exp $ */
diff -r d1a6cb48625e -r 89ffd09d5f56 sys/rump/dev/lib/libumass/sd_at_scsibus_at_umass.c
--- a/sys/rump/dev/lib/libumass/sd_at_scsibus_at_umass.c Mon Aug 23 20:01:16 2010 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,41 +0,0 @@
-/* $NetBSD: sd_at_scsibus_at_umass.c,v 1.5 2010/03/26 15:51:55 pooka Exp $ */
-
-#include <sys/param.h>
-#include <sys/conf.h>
-#include <sys/device.h>
-#include <sys/kmem.h>
-#include <sys/stat.h>
-
-#include "ioconf.c"
-
-#include "rump_private.h"
-#include "rump_dev_private.h"
-#include "rump_vfs_private.h"
-
-RUMP_COMPONENT(RUMP_COMPONENT_DEV)
-{
- extern struct cfattach umass_ca;
- extern struct cfattach scsibus_ca, atapibus_ca, sd_ca, cd_ca;
- extern struct bdevsw sd_bdevsw, cd_bdevsw;
- extern struct cdevsw sd_cdevsw, cd_cdevsw;
- devmajor_t bmaj, cmaj;
-
- config_init_component(cfdriver_ioconf_umass,
Home |
Main Index |
Thread Index |
Old Index