sizeof(union ccb) changed when ATA support was added to the CAM framework in the 8.x branch. However, the CAMIOCOMMAND ioctl request, used by many userland utilities that send direct SCSI commands, takes a "union ccb" as its argument; this encodes sizeof(union ccb) into the ioctl number and breaks binary compatibility between 7.x and 8.x for these tools, even when COMPAT_FREEBSD7 is defined in the kernel configuration. This may be the same problem was originally reported in misc/138622, which does not appear to have garnered any responses. Fix: It's not clear to me whether there's a good fix here. The best fix would be to define a (private) "union occb" and OCAMIOCOMMAND ioctl which is compatible with 7.x, but I'm not sure if that's actually safe to do when there are ATA devices actually in use. Possibly just recognizing the generic form of CAMIOCOMMAND and logging a "CAMIOCOMMAND used with wrong size CCB" to the console would be a stopgap if it's not practical to implement full compatability. How-To-Repeat: Try to run any 7.x program which uses CAMIOCOMMAND to send SCSI commands directly to devices (e.g., smartctl) and watch it fail mysteriously when ioctl returns [ENOTTY].
The main problem is not just in union ccb size change. Problem is that elements newly added to several structures were added not to the ends, and in some places there are arrays of structures used. As result providing compatibility layer would required to repack all requests and responses, reordering their fields. I am not sure that supporting it now (1.5 years after 8.0 release) worth polluting code. Speaking about smartctl -- the best way is to rebuild it, as new version also supports CAM ATA. -- Alexander Motin