Module Name: src
Committed By: jakllsch
Date: Tue Jan 3 01:30:16 UTC 2017
Modified Files:
src/sys/dev/ic: siisata.c
Log Message:
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.
To generate a diff of this commit:
cvs rdiff -u -r1.29 -r1.30 src/sys/dev/ic/siisata.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/dev/ic/siisata.c
diff -u src/sys/dev/ic/siisata.c:1.29 src/sys/dev/ic/siisata.c:1.30
--- src/sys/dev/ic/siisata.c:1.29 Mon Sep 19 19:07:53 2016
+++ src/sys/dev/ic/siisata.c Tue Jan 3 01:30:15 2017
@@ -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 @@ siisata_cmd_start(struct ata_channel *ch
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,