Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/pci Apply workaround from FreeBSD to fix read data c...
details: https://anonhg.NetBSD.org/src/rev/c246960acbce
branches: trunk
changeset: 355260:c246960acbce
user: nakayama <nakayama%NetBSD.org@localhost>
date: Fri Jul 21 21:01:13 2017 +0000
description:
Apply workaround from FreeBSD to fix read data corruption observed
on Fire V100 and mSATA-SSD with mSATA to IDE adapter.
The patch is from port-sparc64@.
diffstat:
sys/dev/pci/aceride.c | 11 ++++++++---
sys/dev/pci/pciide_acer_reg.h | 4 +++-
2 files changed, 11 insertions(+), 4 deletions(-)
diffs (51 lines):
diff -r 99395567c992 -r c246960acbce sys/dev/pci/aceride.c
--- a/sys/dev/pci/aceride.c Fri Jul 21 20:58:44 2017 +0000
+++ b/sys/dev/pci/aceride.c Fri Jul 21 21:01:13 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: aceride.c,v 1.36 2013/10/07 19:51:55 jakllsch Exp $ */
+/* $NetBSD: aceride.c,v 1.37 2017/07/21 21:01:13 nakayama Exp $ */
/*
* Copyright (c) 1999, 2000, 2001 Manuel Bouyer.
@@ -25,7 +25,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: aceride.c,v 1.36 2013/10/07 19:51:55 jakllsch Exp $");
+__KERNEL_RCSID(0, "$NetBSD: aceride.c,v 1.37 2017/07/21 21:01:13 nakayama Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -194,8 +194,13 @@
interface = PCI_INTERFACE(pci_conf_read(sc->sc_pc, sc->sc_tag,
PCI_CLASS_REG));
- /* From linux: enable "Cable Detection" */
if (rev >= 0xC2) {
+ /* From FreeBSD: use device interrupt as byte count end */
+ pciide_pci_write(sc->sc_pc, sc->sc_tag, ACER_0x4A,
+ pciide_pci_read(sc->sc_pc, sc->sc_tag, ACER_0x4A)
+ | ACER_0x4A_BCEINT);
+
+ /* From linux: enable "Cable Detection" */
pciide_pci_write(sc->sc_pc, sc->sc_tag, ACER_0x4B,
pciide_pci_read(sc->sc_pc, sc->sc_tag, ACER_0x4B)
| ACER_0x4B_CDETECT);
diff -r 99395567c992 -r c246960acbce sys/dev/pci/pciide_acer_reg.h
--- a/sys/dev/pci/pciide_acer_reg.h Fri Jul 21 20:58:44 2017 +0000
+++ b/sys/dev/pci/pciide_acer_reg.h Fri Jul 21 21:01:13 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pciide_acer_reg.h,v 1.12 2009/10/19 18:41:15 bouyer Exp $ */
+/* $NetBSD: pciide_acer_reg.h,v 1.13 2017/07/21 21:01:13 nakayama Exp $ */
/*
* Copyright (c) 1999 Manuel Bouyer.
@@ -37,6 +37,8 @@
* bit 1 is 0 -> secondary has 80 pin cable
*/
#define ACER_0x4A_80PIN(chan) (0x1 << (chan))
+/* From FreeBSD, use device interrupt as byte count end */
+#define ACER_0x4A_BCEINT 0x20
/* From FreeBSD, for UDMA mode > 2 */
#define ACER_0x4B 0x4b
Home |
Main Index |
Thread Index |
Old Index