Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/x68k/dev Revert a part of previous commit.



details:   https://anonhg.NetBSD.org/src/rev/2e867033cca9
branches:  trunk
changeset: 346847:2e867033cca9
user:      isaki <isaki%NetBSD.org@localhost>
date:      Fri Aug 05 05:32:02 2016 +0000

description:
Revert a part of previous commit.
If addr is not specified as "zsc0 at intio0" in kernel config
(though it's not right of course), it will cause a panic.
intio_map_allocate_region() should be called after address check.

diffstat:

 sys/arch/x68k/dev/zs.c |  12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diffs (40 lines):

diff -r defbee1e9ba0 -r 2e867033cca9 sys/arch/x68k/dev/zs.c
--- a/sys/arch/x68k/dev/zs.c    Fri Aug 05 04:21:01 2016 +0000
+++ b/sys/arch/x68k/dev/zs.c    Fri Aug 05 05:32:02 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: zs.c,v 1.43 2016/05/31 03:22:30 dholland Exp $ */
+/*     $NetBSD: zs.c,v 1.44 2016/08/05 05:32:02 isaki Exp $    */
 
 /*-
  * Copyright (c) 1998 Minoura Makoto
@@ -40,7 +40,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: zs.c,v 1.43 2016/05/31 03:22:30 dholland Exp $");
+__KERNEL_RCSID(0, "$NetBSD: zs.c,v 1.44 2016/08/05 05:32:02 isaki Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -148,10 +148,6 @@
        if (strcmp(ia->ia_name, "zsc") != 0)
                return 0;
 
-       ia->ia_size = 8;
-       if (intio_map_allocate_region(parent, ia, INTIO_MAP_TESTONLY))
-               return 0;
-
        for (i = 0; i < ZS_MAXDEV; i++)
                if (zsaddr == (void *)zs_physaddr[i]) /* XXX */
                        break;
@@ -160,6 +156,10 @@
                return 0;
        }
 
+       ia->ia_size = 8;
+       if (intio_map_allocate_region(parent, ia, INTIO_MAP_TESTONLY))
+               return 0;
+
        if (badaddr((void *)IIOV(zsaddr)))
                return 0;
 



Home | Main Index | Thread Index | Old Index