Deleted Added
full compact
pci.c (49157) pci.c (49195)
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.112 1999/07/27 05:08:36 mdodd Exp $
26 * $Id: pci.c,v 1.113 1999/07/28 07:57:47 dfr Exp $
27 *
28 */
29
30#include "opt_bus.h"
31
32#include "opt_devfs.h"
33#include "opt_simos.h"
34

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

1111{
1112 device_set_desc(dev, "PCI bus");
1113
1114 pci_add_children(dev, device_get_unit(dev));
1115
1116 return 0;
1117}
1118
27 *
28 */
29
30#include "opt_bus.h"
31
32#include "opt_devfs.h"
33#include "opt_simos.h"
34

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

1111{
1112 device_set_desc(dev, "PCI bus");
1113
1114 pci_add_children(dev, device_get_unit(dev));
1115
1116 return 0;
1117}
1118
1119static void
1119static int
1120pci_print_child(device_t dev, device_t child)
1121{
1122 struct pci_devinfo *dinfo;
1123 pcicfgregs *cfg;
1120pci_print_child(device_t dev, device_t child)
1121{
1122 struct pci_devinfo *dinfo;
1123 pcicfgregs *cfg;
1124 int retval = 0;
1124
1125 dinfo = device_get_ivars(child);
1126 cfg = &dinfo->cfg;
1125
1126 dinfo = device_get_ivars(child);
1127 cfg = &dinfo->cfg;
1128
1129 retval += bus_print_child_header(dev, child);
1130
1127 if (cfg->intpin > 0 && cfg->intline != 255)
1131 if (cfg->intpin > 0 && cfg->intline != 255)
1128 printf(" irq %d", cfg->intline);
1129 printf(" at device %d.%d", pci_get_slot(child), pci_get_function(child));
1130 printf(" on %s%d", device_get_name(dev), device_get_unit(dev));
1132 retval += printf(" irq %d", cfg->intline);
1133 retval += printf(" at device %d.%d", pci_get_slot(child),
1134 pci_get_function(child));
1135
1136 retval += bus_print_child_footer(dev, child);
1137
1138 return (retval);
1131}
1132
1133static void
1134pci_probe_nomatch(device_t dev, device_t child)
1135{
1136 struct pci_devinfo *dinfo;
1137 pcicfgregs *cfg;
1138

--- 373 unchanged lines hidden ---
1139}
1140
1141static void
1142pci_probe_nomatch(device_t dev, device_t child)
1143{
1144 struct pci_devinfo *dinfo;
1145 pcicfgregs *cfg;
1146

--- 373 unchanged lines hidden ---