Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/ic The SiI3124 was implemented at a time when the AT...
details: https://anonhg.NetBSD.org/src/rev/52e387a9d32c
branches: trunk
changeset: 350063:52e387a9d32c
user: jakllsch <jakllsch%NetBSD.org@localhost>
date: Tue Jan 03 01:30:15 2017 +0000
description:
The SiI3124 was implemented at a time when the ATA/ACS2
DATA SET MANAGEMENT/TRIM command did not exist. As such, the (presumably
immutable) lookup table in the chip does not know that this command
indicates a data write to follow. Use the PRB Protocol Override
functionality to tell the chip the protocol we need for this command.
For PR kern/51756.
diffstat:
sys/dev/ic/siisata.c | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
diffs (30 lines):
diff -r 10ac7440ed98 -r 52e387a9d32c sys/dev/ic/siisata.c
--- a/sys/dev/ic/siisata.c Tue Jan 03 01:29:49 2017 +0000
+++ b/sys/dev/ic/siisata.c Tue Jan 03 01:30:15 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: siisata.c,v 1.29 2016/09/19 19:07:53 jakllsch Exp $ */
+/* $NetBSD: siisata.c,v 1.30 2017/01/03 01:30:15 jakllsch Exp $ */
/* from ahcisata_core.c */
@@ -79,7 +79,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: siisata.c,v 1.29 2016/09/19 19:07:53 jakllsch Exp $");
+__KERNEL_RCSID(0, "$NetBSD: siisata.c,v 1.30 2017/01/03 01:30:15 jakllsch Exp $");
#include <sys/types.h>
#include <sys/malloc.h>
@@ -846,6 +846,11 @@
memset(prb->prb_atapi, 0, sizeof(prb->prb_atapi));
+ if (ata_c->r_command == ATA_DATA_SET_MANAGEMENT) {
+ prb->prb_control |= htole16(PRB_CF_PROTOCOL_OVERRIDE);
+ prb->prb_protocol_override |= htole16(PRB_PO_WRITE);
+ }
+
if (siisata_dma_setup(chp, slot,
(ata_c->flags & (AT_READ | AT_WRITE)) ? ata_c->data : NULL,
ata_c->bcount,
Home |
Main Index |
Thread Index |
Old Index