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.
This commit is contained in:
pooka 2010-08-23 20:49:53 +00:00
parent f1ac9b979d
commit 4d40787853
18 changed files with 84 additions and 53 deletions

View File

@ -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}

View File

@ -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>

View File

@ -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

View File

@ -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 <sys/param.h>
#include <sys/conf.h>
@ -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));

View File

@ -0,0 +1,3 @@
/* $NetBSD: atapibus.h,v 1.1 2010/08/23 20:49:53 pooka Exp $ */
#define NATAPIBUS 1

View File

@ -0,0 +1 @@
/* $NetBSD: opt_compat_freebsd.h,v 1.1 2010/08/23 20:49:54 pooka Exp $ */

View File

@ -0,0 +1 @@
/* $NetBSD: opt_scsi.h,v 1.1 2010/08/23 20:49:54 pooka Exp $ */

View File

@ -0,0 +1,3 @@
/* $NetBSD: scsibus.h,v 1.1 2010/08/23 20:49:54 pooka Exp $ */
#define NSCSIBUS 1

View File

@ -0,0 +1 @@
/* $NetBSD: wd.h,v 1.1 2010/08/23 20:49:54 pooka Exp $ */

View File

@ -0,0 +1,4 @@
# $NetBSD: shlib_version,v 1.1 2010/08/23 20:49:53 pooka Exp $
#
major=0
minor=0

View File

@ -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>

View File

@ -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

View File

@ -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);
}

View File

@ -1,3 +0,0 @@
/* $NetBSD: atapibus.h,v 1.1 2010/02/11 02:22:09 pooka Exp $ */
#define NATAPIBUS 1

View File

@ -1 +0,0 @@
/* $NetBSD: opt_compat_freebsd.h,v 1.1 2010/02/11 02:22:10 pooka Exp $ */

View File

@ -1 +0,0 @@
/* $NetBSD: opt_scsi.h,v 1.1 2010/02/11 02:22:10 pooka Exp $ */

View File

@ -1,3 +0,0 @@
/* $NetBSD: scsibus.h,v 1.1 2010/02/11 02:22:10 pooka Exp $ */
#define NSCSIBUS 1

View File

@ -1 +0,0 @@
/* $NetBSD: wd.h,v 1.1 2010/02/11 02:22:10 pooka Exp $ */