]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/commit
MFC r266981:
authormav <mav@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Wed, 2 Jul 2014 10:16:12 +0000 (10:16 +0000)
committermav <mav@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Wed, 2 Jul 2014 10:16:12 +0000 (10:16 +0000)
commit89aaebab60ca7eceaac74ff1b2200566073c8c70
tree09e7599c2534a64015e00045f4f1f3d425ecbdde
parent1275cc67cb4a42dbb9a943fd13e68315c64b6005
MFC r266981:
Overhaul CAM SG driver IOCTL interfaces.

Make it really work for native FreeBSD programs.  Before this it was broken
for years due to different number of pointer dereferences in Linux and
FreeBSD IOCTL paths, permanently returning errors to FreeBSD programs.
This change breaks the driver FreeBSD IOCTL ABI, making it more strict,
but since it was not working any way -- who bother.

Add shims for 32-bit programs on 64-bit host, translating the argument
of the SG_IO IOCTL for both FreeBSD and Linux ABIs.

With this change I was able to run 32-bit Linux sg3_utils tools and simple
32 and 64-bit FreeBSD test tools on both 32 and 64-bit FreeBSD systems.

git-svn-id: svn://svn.freebsd.org/base/stable/10@268139 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
sys/cam/scsi/scsi_sg.c
sys/cam/scsi/scsi_sg.h
sys/compat/freebsd32/freebsd32_ioctl.c
sys/compat/freebsd32/freebsd32_ioctl.h
sys/compat/linux/linux_ioctl.c