1eba4c7948
Linux SCSI SG passthrough device API. The intention is to allow for both running of Linux apps that want to talk to /dev/sg* nodes, and to facilitate porting of apps from Linux to FreeBSD. As such, both native and linuxolator entry points and definitions are provided. Caveats: - This does not support the procfs and sysfs nodes that the Linux SG driver provides. Some Linux apps may rely on these for operation, others may only use them for informational purposes. - More ioctls need to be implemented. - Linux uses a naming scheme of "sg[a-z]" for devices, while FreeBSD uses a scheme of "sg[0-9]". Devfs aliasis (symlinks) are automatically created to link the two together. However, tools like camcontrol only see the native names. - Some operations were originally designed to return byte counts or other data directly as the syscall return value. The linuxolator doesn't appear to support this well, so this driver just punts for these cases. Now that the driver is in place, others are welcome to add missing functionality. Thanks to Roman Divacky for pushing this work along.
36 lines
683 B
Makefile
36 lines
683 B
Makefile
# $FreeBSD$
|
|
|
|
S= ${.CURDIR}/../..
|
|
|
|
.PATH: $S/cam $S/cam/scsi
|
|
|
|
KMOD= cam
|
|
|
|
# See sys/conf/options for the flags that go into the different opt_*.h files.
|
|
SRCS= opt_cam.h
|
|
SRCS+= opt_scsi.h
|
|
SRCS+= opt_cd.h
|
|
SRCS+= opt_pt.h
|
|
SRCS+= opt_sa.h
|
|
SRCS+= opt_ses.h
|
|
SRCS+= device_if.h bus_if.h vnode_if.h
|
|
SRCS+= cam.c cam_periph.c cam_queue.c
|
|
SRCS+= cam_sim.c cam_xpt.c
|
|
SRCS+= scsi_all.c scsi_cd.c scsi_ch.c
|
|
SRCS+= scsi_da.c
|
|
SRCS+= scsi_pass.c
|
|
SRCS+= scsi_pt.c
|
|
SRCS+= scsi_sa.c
|
|
SRCS+= scsi_ses.c
|
|
SRCS+= scsi_sg.c
|
|
SRCS+= scsi_targ_bh.c scsi_target.c
|
|
|
|
EXPORT_SYMS= YES # XXX evaluate
|
|
|
|
.if !defined(KERNBUILDDIR)
|
|
opt_scsi.h:
|
|
echo "#define SCSI_DELAY 15000" > ${.TARGET}
|
|
.endif
|
|
|
|
.include <bsd.kmod.mk>
|