ata_atapi
int ata_atapi(device_t dev, int target);
reg40 |= (ata_atapi(dev, target) ? 0x04 : 0x00);
reg40 |= (ata_atapi(dev, target) ? 0x40 : 0x00);