pci.c (0158b2dcc3bcc280a14a57dcab1ee58a88535269) pci.c (aa595accc9c977d6c3a31769fde1d0353385a3c1)
1/*
2 * Copyright (c) 1997, Stefan Esser <se@freebsd.org>
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

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

18 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
19 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
20 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
21 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
22 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
24 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25 *
1/*
2 * Copyright (c) 1997, Stefan Esser <se@freebsd.org>
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

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

18 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
19 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
20 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
21 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
22 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
24 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25 *
26 * $Id: pci.c,v 1.111 1999/07/27 04:28:14 mdodd Exp $
26 * $Id: pci.c,v 1.112 1999/07/27 05:08:36 mdodd Exp $
27 *
28 */
29
30#include "opt_bus.h"
31
32#include "opt_devfs.h"
33#include "opt_simos.h"
34

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

1328 end = cfg->intline;
1329 count = 1;
1330 }
1331 break;
1332
1333 case SYS_RES_DRQ: /* passthru for child isa */
1334 break;
1335
27 *
28 */
29
30#include "opt_bus.h"
31
32#include "opt_devfs.h"
33#include "opt_simos.h"
34

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

1328 end = cfg->intline;
1329 count = 1;
1330 }
1331 break;
1332
1333 case SYS_RES_DRQ: /* passthru for child isa */
1334 break;
1335
1336#ifdef __alpha__
1337 case SYS_RES_DENSE:
1338 case SYS_RES_BWX:
1339#endif
1336 case SYS_RES_MEMORY:
1337 if (isdefault) {
1338 map = pci_mapno(cfg, *rid);
1339 if (pci_memen(cfg) && pci_ismemmap(cfg, map)) {
1340 start = cfg->map[map].base;
1341 count = 1 << cfg->map[map].ln2size;
1342 end = start + count;
1343 rvp = &cfg->map[map].res;

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

1384 case SYS_RES_IRQ:
1385 if (rid != 0)
1386 return EINVAL;
1387 break;
1388
1389 case SYS_RES_DRQ: /* passthru for child isa */
1390 break;
1391
1340 case SYS_RES_MEMORY:
1341 if (isdefault) {
1342 map = pci_mapno(cfg, *rid);
1343 if (pci_memen(cfg) && pci_ismemmap(cfg, map)) {
1344 start = cfg->map[map].base;
1345 count = 1 << cfg->map[map].ln2size;
1346 end = start + count;
1347 rvp = &cfg->map[map].res;

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

1388 case SYS_RES_IRQ:
1389 if (rid != 0)
1390 return EINVAL;
1391 break;
1392
1393 case SYS_RES_DRQ: /* passthru for child isa */
1394 break;
1395
1396#ifdef __alpha__
1397 case SYS_RES_DENSE:
1398 case SYS_RES_BWX:
1399#endif
1392 case SYS_RES_MEMORY:
1393 case SYS_RES_IOPORT:
1394 /*
1395 * Only check the map registers if this is a direct
1396 * descendant.
1397 */
1398 if (device_get_parent(child) == dev)
1399 map = pci_mapno(cfg, rid);

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

1411 switch (type) {
1412 case SYS_RES_IRQ:
1413 cfg->irqres = 0;
1414 break;
1415
1416 case SYS_RES_DRQ: /* passthru for child isa */
1417 break;
1418
1400 case SYS_RES_MEMORY:
1401 case SYS_RES_IOPORT:
1402 /*
1403 * Only check the map registers if this is a direct
1404 * descendant.
1405 */
1406 if (device_get_parent(child) == dev)
1407 map = pci_mapno(cfg, rid);

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

1419 switch (type) {
1420 case SYS_RES_IRQ:
1421 cfg->irqres = 0;
1422 break;
1423
1424 case SYS_RES_DRQ: /* passthru for child isa */
1425 break;
1426
1427#ifdef __alpha__
1428 case SYS_RES_DENSE:
1429 case SYS_RES_BWX:
1430#endif
1419 case SYS_RES_MEMORY:
1420 case SYS_RES_IOPORT:
1421 if (map != -1)
1422 cfg->map[map].res = 0;
1423 break;
1424
1425 default:
1426 return ENOENT;

--- 73 unchanged lines hidden ---
1431 case SYS_RES_MEMORY:
1432 case SYS_RES_IOPORT:
1433 if (map != -1)
1434 cfg->map[map].res = 0;
1435 break;
1436
1437 default:
1438 return ENOENT;

--- 73 unchanged lines hidden ---