Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/arm/broadcom Catch NAKs from the device more often.



details:   https://anonhg.NetBSD.org/src/rev/5ec0bc138f5a
branches:  trunk
changeset: 805936:5ec0bc138f5a
user:      jakllsch <jakllsch%NetBSD.org@localhost>
date:      Sat Jan 24 00:23:37 2015 +0000

description:
Catch NAKs from the device more often.

Should fix PR#48855 and maybe PR#48932.

diffstat:

 sys/arch/arm/broadcom/bcm2835_bsc.c |  10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)

diffs (37 lines):

diff -r 90782ce9e2e1 -r 5ec0bc138f5a sys/arch/arm/broadcom/bcm2835_bsc.c
--- a/sys/arch/arm/broadcom/bcm2835_bsc.c       Fri Jan 23 23:28:45 2015 +0000
+++ b/sys/arch/arm/broadcom/bcm2835_bsc.c       Sat Jan 24 00:23:37 2015 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: bcm2835_bsc.c,v 1.3 2014/09/11 07:06:13 skrll Exp $    */
+/*     $NetBSD: bcm2835_bsc.c,v 1.4 2015/01/24 00:23:37 jakllsch Exp $ */
 
 /*
  * Copyright (c) 2012 Jonathan A. Kollasch
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: bcm2835_bsc.c,v 1.3 2014/09/11 07:06:13 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bcm2835_bsc.c,v 1.4 2015/01/24 00:23:37 jakllsch Exp $");
 
 #include <sys/param.h>
 #include <sys/bus.h>
@@ -295,6 +295,9 @@
        if (s != 0)
                bus_space_write_4(sc->sc_iot, sc->sc_ioh, BSC_S, s);
 
+       if (error == 0 && (s & (BSC_S_CLKT|BSC_S_ERR)) != 0)
+               error = EIO;
+
        if (!isread)
                goto done;
 
@@ -369,5 +372,8 @@
 
        bsciic_dump_regs(sc);
 
+       if (error == 0 && (s & (BSC_S_CLKT|BSC_S_ERR)) != 0)
+               error = EIO;
+
        return error;
 }



Home | Main Index | Thread Index | Old Index