Deleted Added
full compact
if_ed_cbus.c (111427) if_ed_cbus.c (112569)
1/*
2 * Copyright (c) 1995, David Greenman
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 10 unchanged lines hidden (view full) ---

19 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
21 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25 * SUCH DAMAGE.
26 *
1/*
2 * Copyright (c) 1995, David Greenman
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 10 unchanged lines hidden (view full) ---

19 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
21 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25 * SUCH DAMAGE.
26 *
27 * $FreeBSD: head/sys/dev/ed/if_ed_cbus.c 111427 2003-02-24 14:32:27Z nyan $
27 * $FreeBSD: head/sys/dev/ed/if_ed_cbus.c 112569 2003-03-25 00:07:06Z jake $
28 */
29
30#include <sys/param.h>
31#include <sys/systm.h>
32#include <sys/socket.h>
33#include <sys/kernel.h>
34
35#include <sys/module.h>

--- 898 unchanged lines hidden (view full) ---

934 /*
935 * clear interface memory, then sum to make sure its valid
936 */
937 bzero(sc->mem_start, sc->mem_size);
938
939 for (i = 0; i < sc->mem_size; i++) {
940 if (sc->mem_start[i]) {
941 device_printf(dev, "failed to clear shared memory "
28 */
29
30#include <sys/param.h>
31#include <sys/systm.h>
32#include <sys/socket.h>
33#include <sys/kernel.h>
34
35#include <sys/module.h>

--- 898 unchanged lines hidden (view full) ---

934 /*
935 * clear interface memory, then sum to make sure its valid
936 */
937 bzero(sc->mem_start, sc->mem_size);
938
939 for (i = 0; i < sc->mem_size; i++) {
940 if (sc->mem_start[i]) {
941 device_printf(dev, "failed to clear shared memory "
942 "at %lx - check configuration\n",
942 "at %x - check configuration\n",
943 kvtop(sc->mem_start + i));
944
945 return (ENXIO);
946 }
947 }
948
949 sc->mem_shared = 1;
950 sc->mem_end = sc->mem_start + sc->mem_size;

--- 156 unchanged lines hidden (view full) ---

1107#endif
1108 return (ENXIO);
1109 }
1110
1111#ifdef DIAGNOSTIC
1112 /* Check window area address */
1113 tmp_s = kvtop(sc->mem_start) >> 12;
1114 if (tmp_s < 0x80) {
943 kvtop(sc->mem_start + i));
944
945 return (ENXIO);
946 }
947 }
948
949 sc->mem_shared = 1;
950 sc->mem_end = sc->mem_start + sc->mem_size;

--- 156 unchanged lines hidden (view full) ---

1107#endif
1108 return (ENXIO);
1109 }
1110
1111#ifdef DIAGNOSTIC
1112 /* Check window area address */
1113 tmp_s = kvtop(sc->mem_start) >> 12;
1114 if (tmp_s < 0x80) {
1115 device_printf(dev, "Please change window address(0x%lx)\n",
1115 device_printf(dev, "Please change window address(0x%x)\n",
1116 kvtop(sc->mem_start));
1117 return (ENXIO);
1118 }
1119
1120 tmp_s &= 0x0f;
1121 tmp = rman_get_start(sc->port_res) >> 12;
1122 if ((tmp_s <= tmp) && (tmp < (tmp_s + 4))) {
1123 device_printf(dev, "Please change iobase address(0x%lx) "
1116 kvtop(sc->mem_start));
1117 return (ENXIO);
1118 }
1119
1120 tmp_s &= 0x0f;
1121 tmp = rman_get_start(sc->port_res) >> 12;
1122 if ((tmp_s <= tmp) && (tmp < (tmp_s + 4))) {
1123 device_printf(dev, "Please change iobase address(0x%lx) "
1124 "or window address(0x%lx)\n",
1124 "or window address(0x%x)\n",
1125 rman_get_start(sc->port_res), kvtop(sc->mem_start));
1126 return (ENXIO);
1127 }
1128#endif
1129 /* Reset the board */
1130 ed_reset_CNET98(sc, flags);
1131
1132 /*

--- 35 unchanged lines hidden (view full) ---

1168 /*
1169 * clear interface memory, then sum to make sure its valid
1170 */
1171 bzero(sc->mem_start, sc->mem_size);
1172
1173 for (i = 0; i < sc->mem_size; i++) {
1174 if (sc->mem_start[i]) {
1175 device_printf(dev, "failed to clear shared memory "
1125 rman_get_start(sc->port_res), kvtop(sc->mem_start));
1126 return (ENXIO);
1127 }
1128#endif
1129 /* Reset the board */
1130 ed_reset_CNET98(sc, flags);
1131
1132 /*

--- 35 unchanged lines hidden (view full) ---

1168 /*
1169 * clear interface memory, then sum to make sure its valid
1170 */
1171 bzero(sc->mem_start, sc->mem_size);
1172
1173 for (i = 0; i < sc->mem_size; i++) {
1174 if (sc->mem_start[i]) {
1175 device_printf(dev, "failed to clear shared memory "
1176 "at %lx - check configuration\n",
1176 "at %x - check configuration\n",
1177 kvtop(sc->mem_start + i));
1178
1179 return (ENXIO);
1180 }
1181 }
1182
1183 sc->mem_shared = 1;
1184 sc->mem_end = sc->mem_start + sc->mem_size;

--- 572 unchanged lines hidden ---
1177 kvtop(sc->mem_start + i));
1178
1179 return (ENXIO);
1180 }
1181 }
1182
1183 sc->mem_shared = 1;
1184 sc->mem_end = sc->mem_start + sc->mem_size;

--- 572 unchanged lines hidden ---