diff --git a/sys/rump/dev/Makefile.rumpdev b/sys/rump/dev/Makefile.rumpdev index 8b846836d15b..d0ffc5f3ce23 100644 --- a/sys/rump/dev/Makefile.rumpdev +++ b/sys/rump/dev/Makefile.rumpdev @@ -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 --git a/sys/rump/dev/lib/libscsipi/Makefile b/sys/rump/dev/lib/libscsipi/Makefile new file mode 100644 index 000000000000..0f084d84c031 --- /dev/null +++ b/sys/rump/dev/lib/libscsipi/Makefile @@ -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 +.include diff --git a/sys/rump/dev/lib/libscsipi/SCSIPI.ioconf b/sys/rump/dev/lib/libscsipi/SCSIPI.ioconf new file mode 100644 index 000000000000..777267b5d20a --- /dev/null +++ b/sys/rump/dev/lib/libscsipi/SCSIPI.ioconf @@ -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 --git a/sys/rump/dev/lib/libumass/sd_at_scsibus_at_umass.c b/sys/rump/dev/lib/libscsipi/component.c similarity index 76% rename from sys/rump/dev/lib/libumass/sd_at_scsibus_at_umass.c rename to sys/rump/dev/lib/libscsipi/component.c index bd1ccf7b039e..af49bf98d5a9 100644 --- a/sys/rump/dev/lib/libumass/sd_at_scsibus_at_umass.c +++ b/sys/rump/dev/lib/libscsipi/component.c @@ -1,4 +1,4 @@ -/* $NetBSD: sd_at_scsibus_at_umass.c,v 1.5 2010/03/26 15:51:55 pooka Exp $ */ +/* $NetBSD: component.c,v 1.1 2010/08/23 20:49:53 pooka Exp $ */ #include #include @@ -14,14 +14,12 @@ 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, - cfattach_ioconf_umass, cfdata_ioconf_umass); + 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)); diff --git a/sys/rump/dev/lib/libscsipi/opt/atapibus.h b/sys/rump/dev/lib/libscsipi/opt/atapibus.h new file mode 100644 index 000000000000..c19943991da9 --- /dev/null +++ b/sys/rump/dev/lib/libscsipi/opt/atapibus.h @@ -0,0 +1,3 @@ +/* $NetBSD: atapibus.h,v 1.1 2010/08/23 20:49:53 pooka Exp $ */ + +#define NATAPIBUS 1 diff --git a/sys/rump/dev/lib/libscsipi/opt/opt_compat_freebsd.h b/sys/rump/dev/lib/libscsipi/opt/opt_compat_freebsd.h new file mode 100644 index 000000000000..5e516d83426b --- /dev/null +++ b/sys/rump/dev/lib/libscsipi/opt/opt_compat_freebsd.h @@ -0,0 +1 @@ +/* $NetBSD: opt_compat_freebsd.h,v 1.1 2010/08/23 20:49:54 pooka Exp $ */ diff --git a/sys/rump/dev/lib/libscsipi/opt/opt_scsi.h b/sys/rump/dev/lib/libscsipi/opt/opt_scsi.h new file mode 100644 index 000000000000..c575b9950ef0 --- /dev/null +++ b/sys/rump/dev/lib/libscsipi/opt/opt_scsi.h @@ -0,0 +1 @@ +/* $NetBSD: opt_scsi.h,v 1.1 2010/08/23 20:49:54 pooka Exp $ */ diff --git a/sys/rump/dev/lib/libscsipi/opt/scsibus.h b/sys/rump/dev/lib/libscsipi/opt/scsibus.h new file mode 100644 index 000000000000..113372fd08d3 --- /dev/null +++ b/sys/rump/dev/lib/libscsipi/opt/scsibus.h @@ -0,0 +1,3 @@ +/* $NetBSD: scsibus.h,v 1.1 2010/08/23 20:49:54 pooka Exp $ */ + +#define NSCSIBUS 1 diff --git a/sys/rump/dev/lib/libscsipi/opt/wd.h b/sys/rump/dev/lib/libscsipi/opt/wd.h new file mode 100644 index 000000000000..fd5e8356d958 --- /dev/null +++ b/sys/rump/dev/lib/libscsipi/opt/wd.h @@ -0,0 +1 @@ +/* $NetBSD: wd.h,v 1.1 2010/08/23 20:49:54 pooka Exp $ */ diff --git a/sys/rump/dev/lib/libscsipi/shlib_version b/sys/rump/dev/lib/libscsipi/shlib_version new file mode 100644 index 000000000000..ac79857712b8 --- /dev/null +++ b/sys/rump/dev/lib/libscsipi/shlib_version @@ -0,0 +1,4 @@ +# $NetBSD: shlib_version,v 1.1 2010/08/23 20:49:53 pooka Exp $ +# +major=0 +minor=0 diff --git a/sys/rump/dev/lib/libumass/Makefile b/sys/rump/dev/lib/libumass/Makefile index 090498bd9261..b8fd39ec40a9 100644 --- a/sys/rump/dev/lib/libumass/Makefile +++ b/sys/rump/dev/lib/libumass/Makefile @@ -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 .include diff --git a/sys/rump/dev/lib/libumass/UMASS.ioconf b/sys/rump/dev/lib/libumass/UMASS.ioconf index 1c337f0286b3..39c787a812f3 100644 --- a/sys/rump/dev/lib/libumass/UMASS.ioconf +++ b/sys/rump/dev/lib/libumass/UMASS.ioconf @@ -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 --git a/sys/rump/dev/lib/libumass/component.c b/sys/rump/dev/lib/libumass/component.c new file mode 100644 index 000000000000..c857614d3407 --- /dev/null +++ b/sys/rump/dev/lib/libumass/component.c @@ -0,0 +1,19 @@ +/* $NetBSD: component.c,v 1.1 2010/08/23 20:49:53 pooka Exp $ */ + +#include +#include +#include +#include +#include + +#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 --git a/sys/rump/dev/lib/libumass/opt/atapibus.h b/sys/rump/dev/lib/libumass/opt/atapibus.h deleted file mode 100644 index 52ec0a314195..000000000000 --- a/sys/rump/dev/lib/libumass/opt/atapibus.h +++ /dev/null @@ -1,3 +0,0 @@ -/* $NetBSD: atapibus.h,v 1.1 2010/02/11 02:22:09 pooka Exp $ */ - -#define NATAPIBUS 1 diff --git a/sys/rump/dev/lib/libumass/opt/opt_compat_freebsd.h b/sys/rump/dev/lib/libumass/opt/opt_compat_freebsd.h deleted file mode 100644 index 70edce44230e..000000000000 --- a/sys/rump/dev/lib/libumass/opt/opt_compat_freebsd.h +++ /dev/null @@ -1 +0,0 @@ -/* $NetBSD: opt_compat_freebsd.h,v 1.1 2010/02/11 02:22:10 pooka Exp $ */ diff --git a/sys/rump/dev/lib/libumass/opt/opt_scsi.h b/sys/rump/dev/lib/libumass/opt/opt_scsi.h deleted file mode 100644 index bde57a0c52f6..000000000000 --- a/sys/rump/dev/lib/libumass/opt/opt_scsi.h +++ /dev/null @@ -1 +0,0 @@ -/* $NetBSD: opt_scsi.h,v 1.1 2010/02/11 02:22:10 pooka Exp $ */ diff --git a/sys/rump/dev/lib/libumass/opt/scsibus.h b/sys/rump/dev/lib/libumass/opt/scsibus.h deleted file mode 100644 index 2105983c4775..000000000000 --- a/sys/rump/dev/lib/libumass/opt/scsibus.h +++ /dev/null @@ -1,3 +0,0 @@ -/* $NetBSD: scsibus.h,v 1.1 2010/02/11 02:22:10 pooka Exp $ */ - -#define NSCSIBUS 1 diff --git a/sys/rump/dev/lib/libumass/opt/wd.h b/sys/rump/dev/lib/libumass/opt/wd.h deleted file mode 100644 index 0dde79ed1347..000000000000 --- a/sys/rump/dev/lib/libumass/opt/wd.h +++ /dev/null @@ -1 +0,0 @@ -/* $NetBSD: wd.h,v 1.1 2010/02/11 02:22:10 pooka Exp $ */