Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-8]: src/sys/dev/pci Pull up following revision(s) (requested by n...
details: https://anonhg.NetBSD.org/src/rev/93d984113ead
branches: netbsd-8
changeset: 434154:93d984113ead
user: snj <snj%NetBSD.org@localhost>
date: Tue Jul 25 02:12:35 2017 +0000
description:
Pull up following revision(s) (requested by nakayama in ticket #153):
sys/dev/pci/aceride.c: revision 1.37
sys/dev/pci/pciide_acer_reg.h: revision 1.13
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 d929fb1d1ebe -r 93d984113ead sys/dev/pci/aceride.c
--- a/sys/dev/pci/aceride.c Tue Jul 25 02:11:13 2017 +0000
+++ b/sys/dev/pci/aceride.c Tue Jul 25 02:12:35 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.36.22.1 2017/07/25 02:12:35 snj 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.36.22.1 2017/07/25 02:12:35 snj 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 d929fb1d1ebe -r 93d984113ead sys/dev/pci/pciide_acer_reg.h
--- a/sys/dev/pci/pciide_acer_reg.h Tue Jul 25 02:11:13 2017 +0000
+++ b/sys/dev/pci/pciide_acer_reg.h Tue Jul 25 02:12:35 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.12.56.1 2017/07/25 02:12:35 snj 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