Source-Changes-HG archive

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

[src/trunk]: src/sys/external/bsd/drm2/ttm Restore unpopulated state on fail1...



details:   https://anonhg.NetBSD.org/src/rev/6bc60c317fe1
branches:  trunk
changeset: 822242:6bc60c317fe1
user:      maya <maya%NetBSD.org@localhost>
date:      Thu Mar 09 07:55:23 2017 +0000

description:
Restore unpopulated state on fail1 error path. I shouldn't have committed
it separately.

from riastradh@

diffstat:

 sys/external/bsd/drm2/ttm/ttm_bus_dma.c |  8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diffs (29 lines):

diff -r b2dbc6fa55bb -r 6bc60c317fe1 sys/external/bsd/drm2/ttm/ttm_bus_dma.c
--- a/sys/external/bsd/drm2/ttm/ttm_bus_dma.c   Thu Mar 09 07:50:50 2017 +0000
+++ b/sys/external/bsd/drm2/ttm/ttm_bus_dma.c   Thu Mar 09 07:55:23 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ttm_bus_dma.c,v 1.4 2017/03/09 07:50:50 maya Exp $     */
+/*     $NetBSD: ttm_bus_dma.c,v 1.5 2017/03/09 07:55:23 maya Exp $     */
 
 /*-
  * Copyright (c) 2014 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ttm_bus_dma.c,v 1.4 2017/03/09 07:50:50 maya Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ttm_bus_dma.c,v 1.5 2017/03/09 07:55:23 maya Exp $");
 
 #include <sys/bus.h>
 
@@ -86,7 +86,9 @@
 
 fail2: __unused
        bus_dmamap_unload(ttm_dma->ttm.bdev->dmat, ttm_dma->dma_address);
-fail1: ttm_tt_unwire(&ttm_dma->ttm);
+fail1: KASSERT(ttm->state == tt_unbound);
+       ttm_tt_unwire(&ttm_dma->ttm);
+       ttm->state = tt_unpopulated;
 fail0: KASSERT(ret);
        return ret;
 }



Home | Main Index | Thread Index | Old Index