Ok, I think one should use device type 'sat' for smartmontools (ata over scsi,
or scsi attached ata). For this to be feasible, ATA_PASS_* have to be
implemented in our ahci driver.
Relevant snippet in ahci_cam.c:
case ATA_PASS_12:
case ATA_PASS_16:
/*
* XXX implement pass-through
*/
ccbh->status = CAM_FUNC_NOTAVAIL;
break;

The best place to get examples is probably ahci_cam.c... the probe code
runs a number of discrete ATA commands. It is fairly straightforward. I'm
not sure how ATAPI is distinguished from ATA w/ regards to the pass-thru
ioctls though.