From 69df0af073793d85e7e2708f777b8119c6df6d0e Mon Sep 17 00:00:00 2001 From: Alexander Motin Date: Sat, 21 Nov 2020 00:51:39 +0000 Subject: [PATCH] Fix stupid math mistake in r366922. MFC after: 3 days --- sys/dev/ahci/ahci.c | 2 +- sys/dev/siis/siis.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/dev/ahci/ahci.c b/sys/dev/ahci/ahci.c index 46747d7a2b67..5c194e905cdf 100644 --- a/sys/dev/ahci/ahci.c +++ b/sys/dev/ahci/ahci.c @@ -2580,7 +2580,7 @@ ahci_setup_fis(struct ahci_channel *ch, struct ahci_cmd_tab *ctp, union ccb *ccb fis[11] = ccb->ataio.cmd.features_exp; fis[12] = ccb->ataio.cmd.sector_count; if (ccb->ataio.cmd.flags & CAM_ATAIO_FPDMA) { - fis[12] &= 0xf8; + fis[12] &= 0x07; fis[12] |= tag << 3; } fis[13] = ccb->ataio.cmd.sector_count_exp; diff --git a/sys/dev/siis/siis.c b/sys/dev/siis/siis.c index 245ec22a94e1..c9d98527c783 100644 --- a/sys/dev/siis/siis.c +++ b/sys/dev/siis/siis.c @@ -1725,7 +1725,7 @@ siis_setup_fis(device_t dev, struct siis_cmd *ctp, union ccb *ccb, int tag) fis[11] = ccb->ataio.cmd.features_exp; fis[12] = ccb->ataio.cmd.sector_count; if (ccb->ataio.cmd.flags & CAM_ATAIO_FPDMA) { - fis[12] &= 0xf8; + fis[12] &= 0x03; fis[12] |= tag << 3; } fis[13] = ccb->ataio.cmd.sector_count_exp;