Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-6]: src/sys/dev/pci Pull up following revision(s) (requested by n...
details: https://anonhg.NetBSD.org/src/rev/3fc9177d2515
branches: netbsd-6
changeset: 777194:3fc9177d2515
user: snj <snj%NetBSD.org@localhost>
date: Sun Jul 23 14:27:24 2017 +0000
description:
Pull up following revision(s) (requested by nakayama in ticket #1463):
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 6516df082580 -r 3fc9177d2515 sys/dev/pci/aceride.c
--- a/sys/dev/pci/aceride.c Sun Jul 23 14:25:46 2017 +0000
+++ b/sys/dev/pci/aceride.c Sun Jul 23 14:27:24 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: aceride.c,v 1.30 2011/04/04 20:37:56 dyoung Exp $ */
+/* $NetBSD: aceride.c,v 1.30.10.1 2017/07/23 14:27:24 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.30 2011/04/04 20:37:56 dyoung Exp $");
+__KERNEL_RCSID(0, "$NetBSD: aceride.c,v 1.30.10.1 2017/07/23 14:27:24 snj Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -193,8 +193,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 6516df082580 -r 3fc9177d2515 sys/dev/pci/pciide_acer_reg.h
--- a/sys/dev/pci/pciide_acer_reg.h Sun Jul 23 14:25:46 2017 +0000
+++ b/sys/dev/pci/pciide_acer_reg.h Sun Jul 23 14:27:24 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.18.1 2017/07/23 14:27:24 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