Module Name: src Committed By: jakllsch Date: Sat Jan 24 00:23:37 UTC 2015
Modified Files: src/sys/arch/arm/broadcom: bcm2835_bsc.c Log Message: Catch NAKs from the device more often. Should fix PR#48855 and maybe PR#48932. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/sys/arch/arm/broadcom/bcm2835_bsc.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/arch/arm/broadcom/bcm2835_bsc.c diff -u src/sys/arch/arm/broadcom/bcm2835_bsc.c:1.3 src/sys/arch/arm/broadcom/bcm2835_bsc.c:1.4 --- src/sys/arch/arm/broadcom/bcm2835_bsc.c:1.3 Thu Sep 11 07:06:13 2014 +++ src/sys/arch/arm/broadcom/bcm2835_bsc.c Sat Jan 24 00:23:37 2015 @@ -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 @@ flood_again: 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 @@ done: bsciic_dump_regs(sc); + if (error == 0 && (s & (BSC_S_CLKT|BSC_S_ERR)) != 0) + error = EIO; + return error; }