Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-3]: src/sys/arch/alpha/common Pull up revision 1.59 (requested by...
details: https://anonhg.NetBSD.org/src/rev/f8d7971d9da2
branches: netbsd-3
changeset: 576842:f8d7971d9da2
user: tron <tron%NetBSD.org@localhost>
date: Thu Aug 04 18:22:35 2005 +0000
description:
Pull up revision 1.59 (requested by thorpej in ticket #635):
Check for stale flags in the DMA map. This was causing crashes on an
ES40
with more than 1GB of memory due to a bug in one of the drivers. From
Jason Thorpe.
diffstat:
sys/arch/alpha/common/bus_dma.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diffs (50 lines):
diff -r ad7830add49a -r f8d7971d9da2 sys/arch/alpha/common/bus_dma.c
--- a/sys/arch/alpha/common/bus_dma.c Thu Aug 04 18:22:29 2005 +0000
+++ b/sys/arch/alpha/common/bus_dma.c Thu Aug 04 18:22:35 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: bus_dma.c,v 1.57 2005/03/09 19:04:43 matt Exp $ */
+/* $NetBSD: bus_dma.c,v 1.57.2.1 2005/08/04 18:22:35 tron Exp $ */
/*-
* Copyright (c) 1997, 1998 The NetBSD Foundation, Inc.
@@ -39,7 +39,7 @@
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
-__KERNEL_RCSID(0, "$NetBSD: bus_dma.c,v 1.57 2005/03/09 19:04:43 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bus_dma.c,v 1.57.2.1 2005/08/04 18:22:35 tron Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -243,6 +243,7 @@
map->dm_mapsize = 0;
map->dm_nsegs = 0;
KASSERT(map->dm_maxsegsz <= map->_dm_maxmaxsegsz);
+ KASSERT((map->_dm_flags & (BUS_DMA_READ|BUS_DMA_WRITE)) == 0);
if (buflen > map->_dm_size)
return (EINVAL);
@@ -281,6 +282,7 @@
map->dm_mapsize = 0;
map->dm_nsegs = 0;
KASSERT(map->dm_maxsegsz <= map->_dm_maxmaxsegsz);
+ KASSERT((map->_dm_flags & (BUS_DMA_READ|BUS_DMA_WRITE)) == 0);
#ifdef DIAGNOSTIC
if ((m0->m_flags & M_PKTHDR) == 0)
@@ -371,6 +373,7 @@
map->dm_mapsize = 0;
map->dm_nsegs = 0;
KASSERT(map->dm_maxsegsz <= map->_dm_maxmaxsegsz);
+ KASSERT((map->_dm_flags & (BUS_DMA_READ|BUS_DMA_WRITE)) == 0);
resid = uio->uio_resid;
iov = uio->uio_iov;
@@ -441,6 +444,7 @@
map->dm_mapsize = 0;
map->dm_nsegs = 0;
map->_dm_window = NULL;
+ map->_dm_flags &= ~(BUS_DMA_READ|BUS_DMA_WRITE);
}
/*
Home |
Main Index |
Thread Index |
Old Index