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/c65b19efc43e
branches:  trunk
changeset: 820205:c65b19efc43e
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 fdde2227fdf5 -r c65b19efc43e 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