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 Handle error when setting DMA transfer.
details: https://anonhg.NetBSD.org/src/rev/4a1d7ce53070
branches: trunk
changeset: 339775:4a1d7ce53070
user: mlelstv <mlelstv%NetBSD.org@localhost>
date: Sun Aug 09 13:03:10 2015 +0000
description:
Handle error when setting DMA transfer.
diffstat:
sys/arch/arm/broadcom/bcm2835_emmc.c | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
diffs (30 lines):
diff -r 0ccee4c70d99 -r 4a1d7ce53070 sys/arch/arm/broadcom/bcm2835_emmc.c
--- a/sys/arch/arm/broadcom/bcm2835_emmc.c Sun Aug 09 13:01:21 2015 +0000
+++ b/sys/arch/arm/broadcom/bcm2835_emmc.c Sun Aug 09 13:03:10 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: bcm2835_emmc.c,v 1.26 2015/08/03 10:27:32 jmcneill Exp $ */
+/* $NetBSD: bcm2835_emmc.c,v 1.27 2015/08/09 13:03:10 mlelstv Exp $ */
/*-
* Copyright (c) 2012 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: bcm2835_emmc.c,v 1.26 2015/08/03 10:27:32 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bcm2835_emmc.c,v 1.27 2015/08/09 13:03:10 mlelstv Exp $");
#include "bcmdmac.h"
@@ -309,7 +309,10 @@
sc->sc_state = EMMC_DMA_STATE_BUSY;
bcm_dmac_set_conblk_addr(sc->sc_dmac,
sc->sc_dmamap->dm_segs[0].ds_addr);
- bcm_dmac_transfer(sc->sc_dmac);
+ error = bcm_dmac_transfer(sc->sc_dmac);
+ if (error)
+ return error;
+
while (sc->sc_state == EMMC_DMA_STATE_BUSY) {
error = cv_timedwait(&sc->sc_cv, plock, hz * 10);
if (error == EWOULDBLOCK) {
Home |
Main Index |
Thread Index |
Old Index