Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/ebus cs4231_ebus_round_blocksize: never return 0 as ...
details: https://anonhg.NetBSD.org/src/rev/d3d6071e5f29
branches: trunk
changeset: 350833:d3d6071e5f29
user: martin <martin%NetBSD.org@localhost>
date: Tue Jan 24 05:22:38 2017 +0000
description:
cs4231_ebus_round_blocksize: never return 0 as blocksize
diffstat:
sys/dev/ebus/cs4231_ebus.c | 10 +++++++---
1 files changed, 7 insertions(+), 3 deletions(-)
diffs (33 lines):
diff -r cd542800b611 -r d3d6071e5f29 sys/dev/ebus/cs4231_ebus.c
--- a/sys/dev/ebus/cs4231_ebus.c Mon Jan 23 17:35:34 2017 +0000
+++ b/sys/dev/ebus/cs4231_ebus.c Tue Jan 24 05:22:38 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: cs4231_ebus.c,v 1.35 2011/11/23 23:07:31 jmcneill Exp $ */
+/* $NetBSD: cs4231_ebus.c,v 1.36 2017/01/24 05:22:38 martin Exp $ */
/*
* Copyright (c) 2002 Valeriy E. Ushakov
@@ -28,7 +28,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: cs4231_ebus.c,v 1.35 2011/11/23 23:07:31 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cs4231_ebus.c,v 1.36 2017/01/24 05:22:38 martin Exp $");
#ifdef _KERNEL_OPT
#include "opt_sparc_arch.h"
@@ -268,9 +268,13 @@
cs4231_ebus_round_blocksize(void *addr, int blk, int mode,
const audio_params_t *param)
{
+ int sz;
/* we want to use DMA burst size of 16 words */
- return blk & -64;
+ sz = blk & -64;
+ if (sz == 0)
+ sz = 64; /* zero is not a good blocksize */
+ return sz;
}
Home |
Main Index |
Thread Index |
Old Index