Lines Matching refs:bus

121 	uint_t		highest_bus;	/* Highest bus seen on the probe */
351 { 0xc01, "access-bus" },
544 * all its children) on the given bus. It is called when
553 uint_t bus;
572 * "bus" specified.
575 if (ddi_getlongprop_buf(DDI_DEV_T_ANY, devi, 0, "bus-range",
577 DEBUG0("no bus-range property\n");
581 bus = pci_bus_range.lo; /* primary bus number of this bus node */
599 bus, trans_device, func & 7, &highest_bus,
603 DEBUG2("configure failed: bus [0x%x] device "
604 "[0x%x]\n", bus, trans_device);
607 DEBUG3("no device : bus "
609 bus, trans_device, func &7);
624 DEBUG3("configure: bus => [%d] "
626 bus, trans_device, func & 7);
643 * header which is the side facing the host bus.
666 rv = pcicfg_configure_ntbridge(new_device, bus,
786 pcicfg_configure_ntbridge(dev_info_t *new_device, uint_t bus, uint_t device)
830 DEBUG0("ntbridge: Failed to get a bus number\n");
834 DEBUG1("ntbridge bus range start ->[%d]\n", next_bus);
843 if (ndi_prop_update_int_array(DDI_DEV_T_NONE, new_device, "bus-range",
845 DEBUG0("Cannot set ntbridge bus-range property");
876 /* Probe devices on 2nd bus */
931 DEBUG1("ntbridge: finish probing 2nd bus, rc=%d\n", rc);
937 uint_t *bus;
941 DDI_PROP_DONTPASS, "bus-range", (caddr_t)&bus, &k)
943 DEBUG0("Failed to read bus-range property\n");
948 DEBUG2("Need to free bus [%d] range [%d]\n",
949 bus[0], bus[1] - bus[0] + 1);
951 if (ndi_ra_free(ddi_get_parent(new_device), (uint64_t)bus[0],
952 (uint64_t)(bus[1] - bus[0] + 1), NDI_RA_TYPE_PCI_BUSNUM,
954 DEBUG0("Failed to free a bus number\n");
956 kmem_free(bus, k);
971 kmem_free(bus, k);
1134 "bus-range", (caddr_t)&bus_range, (int *)&len) != DDI_SUCCESS) {
1135 DEBUG0("no bus-range property\n");
1139 new_bus_range[0] = bus_range.lo; /* primary bus number */
1140 if (entry->highest_bus) { /* secondary bus number */
1143 "ntbridge bus range invalid !(%d,%d)\n",
1153 DEBUG2("ntbridge: bus range lo=%x, hi=%x\n", new_bus_range[0],
1156 if (ndi_prop_update_int_array(DDI_DEV_T_NONE, dip, "bus-range",
1158 DEBUG0("Failed to set bus-range property");
1248 int len, bus;
1255 "bus-range", (caddr_t)&pci_bus_range, &len) != DDI_SUCCESS) {
1256 DEBUG0("no bus-range property\n");
1260 bus = pci_bus_range.lo; /* primary bus number of this bus node */
1265 if (pcicfg_add_config_reg(new_ntbridgechild, bus, devno, 0)
1300 uint_t *bus;
1303 if (ddi_getlongprop(DDI_DEV_T_ANY, dip, DDI_PROP_DONTPASS, "bus-range",
1304 (caddr_t)&bus, &k) != DDI_PROP_SUCCESS) {
1305 DEBUG0("ntbridge: Failed to read bus-range property\n");
1309 DEBUG2("ntbridge: Need to free bus [%d] range [%d]\n",
1310 bus[0], bus[1] - bus[0] + 1);
1312 if (ndi_ra_free(ddi_get_parent(dip), (uint64_t)bus[0],
1313 (uint64_t)(bus[1] - bus[0] + 1),
1315 DEBUG0("ntbridge: Failed to free a bus number\n");
1316 kmem_free(bus, k);
1328 kmem_free(bus, k);
1782 "bus-range", bus_range, 2) != DDI_SUCCESS) {
1783 DEBUG0("Failed to set bus-range property");
2464 * If its a bridge - just record the highest bus seen
2572 uint_t *bus;
2655 "bus-range", (caddr_t)&bus, &k) != DDI_PROP_SUCCESS) {
2656 DEBUG0("Failed to read bus-range property\n");
2660 DEBUG2("Need to free bus [%d] range [%d]\n",
2661 bus[0], bus[1] - bus[0] + 1);
2663 if (ndi_ra_free(ddi_get_parent(dip), (uint64_t)bus[0],
2664 (uint64_t)(bus[1] - bus[0] + 1), NDI_RA_TYPE_PCI_BUSNUM,
2666 DEBUG0("Failed to free a bus number\n");
2667 kmem_free(bus, k);
2671 kmem_free(bus, k);
3163 * Enable memory, IO, and bus mastership
3515 * Program the bus numbers into the bridge
3521 DEBUG3("Setting bridge bus-range %d,%d,%d\n", primary, secondary,
3524 * Primary bus#
3529 * Secondary bus#
3534 * Set the subordinate bus number to ff in order to pass through any
3535 * type 1 cycle with a bus number higher than the secondary bus#
3548 * The highest bus seen during probing is the max-subordinate bus
3553 * Reset the secondary bus
3673 pcicfg_probe_children(dev_info_t *parent, uint_t bus, uint_t device,
3690 if (pcicfg_add_config_reg(new_child, bus, device, func)
3708 (void) pcie_init_bus(new_child, PCI_GETBDF(bus, device, func),
3761 DEBUG3("--Bridge found bus [0x%x] device[0x%x] func [0x%x]\n",
3762 bus, device, func);
3768 ret = pcicfg_probe_bridge(new_child, config_handle, bus,
3777 DEBUG3("--Leaf device found bus [0x%x] device"
3778 "[0x%x] func [0x%x]\n", bus, device, func);
4038 pcicfg_probe_bridge(dev_info_t *new_child, ddi_acc_handle_t h, uint_t bus,
4112 * Allocate bus range pool for the bridge.
4126 DEBUG0("NDI_RA_PARTIAL_REQ returned for bus range\n");
4129 "Failed to allocate bus range for bridge\n");
4139 * Put available bus range into the pool.
4151 DEBUG1("NEW bus found ->[%d]\n", new_bus);
4153 /* Keep track of highest bus for subordinate bus programming */
4415 (void) pcicfg_set_bus_numbers(h, bus, new_bus, max_bus);
4418 * Setup "ranges" and "bus-range" properties before onlining
4443 "bus-range", bus_range, 2);
4446 * Reset the secondary bus
4471 * Set bus properties
4517 DEBUG3("No Device at bus [0x%x]"
4526 DEBUG3("Failed to configure bus "
4784 * Give back unused bus numbers
4792 * Set bus numbers to ranges encountered during scan
4794 (void) pcicfg_set_bus_numbers(h, bus, new_bus, *highest_bus);
4840 "bus-range", bus_range, 2);
5076 uint_t bus, uint_t device, uint_t func)
5080 reg[0] = PCICFG_MAKE_REG_HIGH(bus, device, func, 0);
5204 char *bus;
5212 DDI_PROP_DONTPASS, "device_type", &bus) !=
5216 if (strcmp(bus, "pciex") == 0)
5219 ddi_prop_free(bus);