diff --git a/sys/cam/cam_ccb.h b/sys/cam/cam_ccb.h index 5fe6422ecc70..221b24a7c187 100644 --- a/sys/cam/cam_ccb.h +++ b/sys/cam/cam_ccb.h @@ -786,6 +786,8 @@ struct ccb_ataio { u_int32_t resid; /* Transfer residual length: 2's comp */ u_int8_t ata_flags; /* Flags for the rest of the buffer */ #define ATA_FLAG_AUX 0x1 +#define ATA_FLAG_ICC 0x2 + uint8_t icc; /* Isochronous Command Completion */ uint32_t aux; uint32_t unused; }; diff --git a/sys/dev/ahci/ahci.c b/sys/dev/ahci/ahci.c index 91c28b46f286..46747d7a2b67 100644 --- a/sys/dev/ahci/ahci.c +++ b/sys/dev/ahci/ahci.c @@ -2584,16 +2584,18 @@ ahci_setup_fis(struct ahci_channel *ch, struct ahci_cmd_tab *ctp, union ccb *ccb fis[12] |= tag << 3; } fis[13] = ccb->ataio.cmd.sector_count_exp; + if (ccb->ataio.ata_flags & ATA_FLAG_ICC) + fis[14] = ccb->ataio.icc; fis[15] = ATA_A_4BIT; + if (ccb->ataio.ata_flags & ATA_FLAG_AUX) { + fis[16] = ccb->ataio.aux & 0xff; + fis[17] = (ccb->ataio.aux >> 8) & 0xff; + fis[18] = (ccb->ataio.aux >> 16) & 0xff; + fis[19] = (ccb->ataio.aux >> 24) & 0xff; + } } else { fis[15] = ccb->ataio.cmd.control; } - if (ccb->ataio.ata_flags & ATA_FLAG_AUX) { - fis[16] = ccb->ataio.aux & 0xff; - fis[17] = (ccb->ataio.aux >> 8) & 0xff; - fis[18] = (ccb->ataio.aux >> 16) & 0xff; - fis[19] = (ccb->ataio.aux >> 24) & 0xff; - } return (20); } diff --git a/sys/dev/siis/siis.c b/sys/dev/siis/siis.c index f853412b5b24..245ec22a94e1 100644 --- a/sys/dev/siis/siis.c +++ b/sys/dev/siis/siis.c @@ -1729,6 +1729,8 @@ siis_setup_fis(device_t dev, struct siis_cmd *ctp, union ccb *ccb, int tag) fis[12] |= tag << 3; } fis[13] = ccb->ataio.cmd.sector_count_exp; + if (ccb->ataio.ata_flags & ATA_FLAG_ICC) + fis[14] = ccb->ataio.icc; fis[15] = ATA_A_4BIT; if (ccb->ataio.ata_flags & ATA_FLAG_AUX) { fis[16] = ccb->ataio.aux & 0xff;