aboutsummaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorAlexander Motin <mav@FreeBSD.org>2020-11-02 01:01:41 +0000
committerAlexander Motin <mav@FreeBSD.org>2020-11-02 01:01:41 +0000
commit06c888ecb92bf32192f91076e70dbfdfab2b70e2 (patch)
tree3a1ab4745b26fe58ccc682cb9763be5a80d4c6bf /sys
parenta257740767f61b292bedcc689a68e3335b1f9e65 (diff)
Notes
Diffstat (limited to 'sys')
-rw-r--r--sys/cam/cam_ccb.h2
-rw-r--r--sys/dev/ahci/ahci.c14
-rw-r--r--sys/dev/siis/siis.c2
3 files changed, 12 insertions, 6 deletions
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;