Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/pci Don't allow block sizes < 288 bytes on VT823x ch...



details:   https://anonhg.NetBSD.org/src/rev/64fe1be48acb
branches:  trunk
changeset: 565182:64fe1be48acb
user:      jmcneill <jmcneill%NetBSD.org@localhost>
date:      Wed Mar 31 21:10:04 2004 +0000

description:
Don't allow block sizes < 288 bytes on VT823x chips (patch from kent@).
Fixes kern/22788.

diffstat:

 sys/dev/pci/auvia.c |  10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)

diffs (31 lines):

diff -r fd09febc8eea -r 64fe1be48acb sys/dev/pci/auvia.c
--- a/sys/dev/pci/auvia.c       Wed Mar 31 20:58:15 2004 +0000
+++ b/sys/dev/pci/auvia.c       Wed Mar 31 21:10:04 2004 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: auvia.c,v 1.36 2004/03/25 23:07:09 xtraeme Exp $       */
+/*     $NetBSD: auvia.c,v 1.37 2004/03/31 21:10:04 jmcneill Exp $      */
 
 /*-
  * Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -47,7 +47,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: auvia.c,v 1.36 2004/03/25 23:07:09 xtraeme Exp $");
+__KERNEL_RCSID(0, "$NetBSD: auvia.c,v 1.37 2004/03/31 21:10:04 jmcneill Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -754,6 +754,12 @@
 int
 auvia_round_blocksize(void *addr, int blk)
 {
+       struct auvia_softc *sc = addr;
+
+       /* XXX VT823x might have the limitation of dma_ops size */
+       if (sc->sc_flags & AUVIA_FLAGS_VT8233 && blk < 288)
+               blk = 288;
+
        return (blk & -32);
 }
 



Home | Main Index | Thread Index | Old Index