You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
PCI: replace struct pci_bus secondary/subordinate with busn_res
Replace the struct pci_bus secondary/subordinate members with the struct resource busn_res. Later we'll build a resource tree of these bus numbers. [bhelgaas: changelog] Signed-off-by: Yinghai Lu <yinghai@kernel.org> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
This commit is contained in:
committed by
Bjorn Helgaas
parent
92f0243093
commit
b918c62e08
@@ -359,7 +359,7 @@ common_init_pci(void)
|
|||||||
hose, &resources);
|
hose, &resources);
|
||||||
hose->bus = bus;
|
hose->bus = bus;
|
||||||
hose->need_domain_info = need_domain_info;
|
hose->need_domain_info = need_domain_info;
|
||||||
next_busno = bus->subordinate + 1;
|
next_busno = bus->busn_res.end + 1;
|
||||||
/* Don't allow 8-bit bus number overflow inside the hose -
|
/* Don't allow 8-bit bus number overflow inside the hose -
|
||||||
reserve some space for bridges. */
|
reserve some space for bridges. */
|
||||||
if (next_busno > 224) {
|
if (next_busno > 224) {
|
||||||
|
|||||||
@@ -461,7 +461,7 @@ static void __init pcibios_init_hw(struct hw_pci *hw, struct list_head *head)
|
|||||||
if (!sys->bus)
|
if (!sys->bus)
|
||||||
panic("PCI: unable to scan bus!");
|
panic("PCI: unable to scan bus!");
|
||||||
|
|
||||||
busnr = sys->bus->subordinate + 1;
|
busnr = sys->bus->busn_res.end + 1;
|
||||||
|
|
||||||
list_add(&sys->node, head);
|
list_add(&sys->node, head);
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
+1
-1
@@ -384,7 +384,7 @@ pci_acpi_scan_root(struct acpi_pci_root *root)
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
pbus->subordinate = pci_scan_child_bus(pbus);
|
pbus->busn_res.end = pci_scan_child_bus(pbus);
|
||||||
return pbus;
|
return pbus;
|
||||||
|
|
||||||
out3:
|
out3:
|
||||||
|
|||||||
@@ -1506,10 +1506,10 @@ static void __devinit pcibios_scan_phb(struct pci_controller *hose)
|
|||||||
pci_free_resource_list(&resources);
|
pci_free_resource_list(&resources);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
bus->secondary = hose->first_busno;
|
bus->busn_res.start = hose->first_busno;
|
||||||
hose->bus = bus;
|
hose->bus = bus;
|
||||||
|
|
||||||
hose->last_busno = bus->subordinate;
|
hose->last_busno = bus->busn_res.end;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int __init pcibios_init(void)
|
static int __init pcibios_init(void)
|
||||||
|
|||||||
+1
-1
@@ -102,7 +102,7 @@ static void __devinit pcibios_scanbus(struct pci_controller *hose)
|
|||||||
need_domain_info = need_domain_info || hose->index;
|
need_domain_info = need_domain_info || hose->index;
|
||||||
hose->need_domain_info = need_domain_info;
|
hose->need_domain_info = need_domain_info;
|
||||||
if (bus) {
|
if (bus) {
|
||||||
next_busno = bus->subordinate + 1;
|
next_busno = bus->busn_res.end + 1;
|
||||||
/* Don't allow 8-bit bus number overflow inside the hose -
|
/* Don't allow 8-bit bus number overflow inside the hose -
|
||||||
reserve some space for bridges. */
|
reserve some space for bridges. */
|
||||||
if (next_busno > 224) {
|
if (next_busno > 224) {
|
||||||
|
|||||||
@@ -1646,7 +1646,7 @@ void __devinit pcibios_scan_phb(struct pci_controller *hose)
|
|||||||
pci_free_resource_list(&resources);
|
pci_free_resource_list(&resources);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
bus->secondary = hose->first_busno;
|
bus->busn_res.start = hose->first_busno;
|
||||||
hose->bus = bus;
|
hose->bus = bus;
|
||||||
|
|
||||||
/* Get probe mode and perform scan */
|
/* Get probe mode and perform scan */
|
||||||
@@ -1655,12 +1655,12 @@ void __devinit pcibios_scan_phb(struct pci_controller *hose)
|
|||||||
mode = ppc_md.pci_probe_mode(bus);
|
mode = ppc_md.pci_probe_mode(bus);
|
||||||
pr_debug(" probe mode: %d\n", mode);
|
pr_debug(" probe mode: %d\n", mode);
|
||||||
if (mode == PCI_PROBE_DEVTREE) {
|
if (mode == PCI_PROBE_DEVTREE) {
|
||||||
bus->subordinate = hose->last_busno;
|
bus->busn_res.end = hose->last_busno;
|
||||||
of_scan_bus(node, bus);
|
of_scan_bus(node, bus);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mode == PCI_PROBE_NORMAL)
|
if (mode == PCI_PROBE_NORMAL)
|
||||||
hose->last_busno = bus->subordinate = pci_scan_child_bus(bus);
|
hose->last_busno = bus->busn_res.end = pci_scan_child_bus(bus);
|
||||||
|
|
||||||
/* Platform gets a chance to do some global fixups before
|
/* Platform gets a chance to do some global fixups before
|
||||||
* we proceed to resource allocation
|
* we proceed to resource allocation
|
||||||
|
|||||||
@@ -236,7 +236,7 @@ long sys_pciconfig_iobase(long which, unsigned long in_bus,
|
|||||||
|
|
||||||
for (ln = pci_root_buses.next; ln != &pci_root_buses; ln = ln->next) {
|
for (ln = pci_root_buses.next; ln != &pci_root_buses; ln = ln->next) {
|
||||||
bus = pci_bus_b(ln);
|
bus = pci_bus_b(ln);
|
||||||
if (in_bus >= bus->number && in_bus <= bus->subordinate)
|
if (in_bus >= bus->number && in_bus <= bus->busn_res.end)
|
||||||
break;
|
break;
|
||||||
bus = NULL;
|
bus = NULL;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -240,7 +240,7 @@ void __devinit of_scan_pci_bridge(struct pci_dev *dev)
|
|||||||
}
|
}
|
||||||
|
|
||||||
bus->primary = dev->bus->number;
|
bus->primary = dev->bus->number;
|
||||||
bus->subordinate = busrange[1];
|
bus->busn_res.end = busrange[1];
|
||||||
bus->bridge_ctl = 0;
|
bus->bridge_ctl = 0;
|
||||||
|
|
||||||
/* parse ranges property */
|
/* parse ranges property */
|
||||||
|
|||||||
@@ -589,7 +589,7 @@ static int __devinit pnv_ioda_configure_pe(struct pnv_phb *phb,
|
|||||||
dcomp = OPAL_IGNORE_RID_DEVICE_NUMBER;
|
dcomp = OPAL_IGNORE_RID_DEVICE_NUMBER;
|
||||||
fcomp = OPAL_IGNORE_RID_FUNCTION_NUMBER;
|
fcomp = OPAL_IGNORE_RID_FUNCTION_NUMBER;
|
||||||
parent = pe->pbus->self;
|
parent = pe->pbus->self;
|
||||||
count = pe->pbus->subordinate - pe->pbus->secondary + 1;
|
count = pe->pbus->busn_res.end - pe->pbus->busn_res.start + 1;
|
||||||
switch(count) {
|
switch(count) {
|
||||||
case 1: bcomp = OpalPciBusAll; break;
|
case 1: bcomp = OpalPciBusAll; break;
|
||||||
case 2: bcomp = OpalPciBus7Bits; break;
|
case 2: bcomp = OpalPciBus7Bits; break;
|
||||||
@@ -816,11 +816,11 @@ static void __devinit pnv_ioda_setup_bus_PE(struct pci_dev *dev,
|
|||||||
pe->pdev = NULL;
|
pe->pdev = NULL;
|
||||||
pe->tce32_seg = -1;
|
pe->tce32_seg = -1;
|
||||||
pe->mve_number = -1;
|
pe->mve_number = -1;
|
||||||
pe->rid = bus->secondary << 8;
|
pe->rid = bus->busn_res.start << 8;
|
||||||
pe->dma_weight = 0;
|
pe->dma_weight = 0;
|
||||||
|
|
||||||
pe_info(pe, "Secondary busses %d..%d associated with PE\n",
|
pe_info(pe, "Secondary busses %pR associated with PE\n",
|
||||||
bus->secondary, bus->subordinate);
|
&bus->busn_res);
|
||||||
|
|
||||||
if (pnv_ioda_configure_pe(phb, pe)) {
|
if (pnv_ioda_configure_pe(phb, pe)) {
|
||||||
/* XXX What do we do here ? */
|
/* XXX What do we do here ? */
|
||||||
|
|||||||
@@ -121,7 +121,7 @@ void pcibios_add_pci_devices(struct pci_bus * bus)
|
|||||||
if (!num)
|
if (!num)
|
||||||
return;
|
return;
|
||||||
pcibios_setup_bus_devices(bus);
|
pcibios_setup_bus_devices(bus);
|
||||||
max = bus->secondary;
|
max = bus->busn_res.start;
|
||||||
for (pass=0; pass < 2; pass++)
|
for (pass=0; pass < 2; pass++)
|
||||||
list_for_each_entry(dev, &bus->devices, bus_list) {
|
list_for_each_entry(dev, &bus->devices, bus_list) {
|
||||||
if (dev->hdr_type == PCI_HEADER_TYPE_BRIDGE ||
|
if (dev->hdr_type == PCI_HEADER_TYPE_BRIDGE ||
|
||||||
|
|||||||
@@ -59,7 +59,7 @@ static void __devinit pcibios_scanbus(struct pci_channel *hose)
|
|||||||
need_domain_info = need_domain_info || hose->index;
|
need_domain_info = need_domain_info || hose->index;
|
||||||
hose->need_domain_info = need_domain_info;
|
hose->need_domain_info = need_domain_info;
|
||||||
if (bus) {
|
if (bus) {
|
||||||
next_busno = bus->subordinate + 1;
|
next_busno = bus->busn_res.end + 1;
|
||||||
/* Don't allow 8-bit bus number overflow inside the hose -
|
/* Don't allow 8-bit bus number overflow inside the hose -
|
||||||
reserve some space for bridges. */
|
reserve some space for bridges. */
|
||||||
if (next_busno > 224) {
|
if (next_busno > 224) {
|
||||||
|
|||||||
@@ -535,7 +535,7 @@ static void __devinit of_scan_pci_bridge(struct pci_pbm_info *pbm,
|
|||||||
}
|
}
|
||||||
|
|
||||||
bus->primary = dev->bus->number;
|
bus->primary = dev->bus->number;
|
||||||
bus->subordinate = busrange[1];
|
bus->busn_res.end = busrange[1];
|
||||||
bus->bridge_ctl = 0;
|
bus->bridge_ctl = 0;
|
||||||
|
|
||||||
/* parse ranges property, or cook one up by hand for Simba */
|
/* parse ranges property, or cook one up by hand for Simba */
|
||||||
@@ -693,8 +693,8 @@ struct pci_bus * __devinit pci_scan_one_pbm(struct pci_pbm_info *pbm,
|
|||||||
pci_free_resource_list(&resources);
|
pci_free_resource_list(&resources);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
bus->secondary = pbm->pci_first_busno;
|
bus->busn_res.start = pbm->pci_first_busno;
|
||||||
bus->subordinate = pbm->pci_last_busno;
|
bus->busn_res.end = pbm->pci_last_busno;
|
||||||
|
|
||||||
pci_of_scan_bus(pbm, node, bus);
|
pci_of_scan_bus(pbm, node, bus);
|
||||||
pci_bus_add_devices(bus);
|
pci_bus_add_devices(bus);
|
||||||
|
|||||||
@@ -329,7 +329,7 @@ int __init pcibios_init(void)
|
|||||||
*/
|
*/
|
||||||
bus = pci_scan_bus(0, controller->ops, controller);
|
bus = pci_scan_bus(0, controller->ops, controller);
|
||||||
controller->root_bus = bus;
|
controller->root_bus = bus;
|
||||||
controller->last_busno = bus->subordinate;
|
controller->last_busno = bus->busn_res.end;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -366,7 +366,7 @@ int __init pcibios_init(void)
|
|||||||
*/
|
*/
|
||||||
if ((dev->class >> 8) == PCI_CLASS_BRIDGE_PCI &&
|
if ((dev->class >> 8) == PCI_CLASS_BRIDGE_PCI &&
|
||||||
(PCI_SLOT(dev->devfn) == 0)) {
|
(PCI_SLOT(dev->devfn) == 0)) {
|
||||||
next_bus = dev->subordinate;
|
next_bus = dev->busn_res.end;
|
||||||
controllers[i].mem_resources[0] =
|
controllers[i].mem_resources[0] =
|
||||||
*next_bus->resource[0];
|
*next_bus->resource[0];
|
||||||
controllers[i].mem_resources[1] =
|
controllers[i].mem_resources[1] =
|
||||||
|
|||||||
+1
-1
@@ -440,7 +440,7 @@ struct pci_bus * __devinit pci_acpi_scan_root(struct acpi_pci_root *root)
|
|||||||
bus = pci_create_root_bus(NULL, busnum, &pci_root_ops, sd,
|
bus = pci_create_root_bus(NULL, busnum, &pci_root_ops, sd,
|
||||||
&resources);
|
&resources);
|
||||||
if (bus) {
|
if (bus) {
|
||||||
bus->subordinate = pci_scan_child_bus(bus);
|
bus->busn_res.end = pci_scan_child_bus(bus);
|
||||||
pci_set_host_bridge_release(
|
pci_set_host_bridge_release(
|
||||||
to_pci_host_bridge(bus->bridge),
|
to_pci_host_bridge(bus->bridge),
|
||||||
release_pci_root_info, info);
|
release_pci_root_info, info);
|
||||||
|
|||||||
@@ -187,7 +187,7 @@ static int __init pcibios_init(void)
|
|||||||
bus = pci_scan_root_bus(NULL, pci_ctrl->first_busno,
|
bus = pci_scan_root_bus(NULL, pci_ctrl->first_busno,
|
||||||
pci_ctrl->ops, pci_ctrl, &resources);
|
pci_ctrl->ops, pci_ctrl, &resources);
|
||||||
pci_ctrl->bus = bus;
|
pci_ctrl->bus = bus;
|
||||||
pci_ctrl->last_busno = bus->subordinate;
|
pci_ctrl->last_busno = bus->busn_res.end;
|
||||||
if (next_busno <= pci_ctrl->last_busno)
|
if (next_busno <= pci_ctrl->last_busno)
|
||||||
next_busno = pci_ctrl->last_busno+1;
|
next_busno = pci_ctrl->last_busno+1;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -661,7 +661,7 @@ static struct intel_iommu *device_to_iommu(int segment, u8 bus, u8 devfn)
|
|||||||
if (drhd->devices[i] &&
|
if (drhd->devices[i] &&
|
||||||
drhd->devices[i]->subordinate &&
|
drhd->devices[i]->subordinate &&
|
||||||
drhd->devices[i]->subordinate->number <= bus &&
|
drhd->devices[i]->subordinate->number <= bus &&
|
||||||
drhd->devices[i]->subordinate->subordinate >= bus)
|
drhd->devices[i]->subordinate->busn_res.end >= bus)
|
||||||
return drhd->iommu;
|
return drhd->iommu;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -14168,7 +14168,7 @@ static int __devinit tg3_get_invariants(struct tg3 *tp)
|
|||||||
if (bridge->subordinate &&
|
if (bridge->subordinate &&
|
||||||
(bridge->subordinate->number <=
|
(bridge->subordinate->number <=
|
||||||
tp->pdev->bus->number) &&
|
tp->pdev->bus->number) &&
|
||||||
(bridge->subordinate->subordinate >=
|
(bridge->subordinate->busn_res.end >=
|
||||||
tp->pdev->bus->number)) {
|
tp->pdev->bus->number)) {
|
||||||
tg3_flag_set(tp, 5701_DMA_BUG);
|
tg3_flag_set(tp, 5701_DMA_BUG);
|
||||||
pci_dev_put(bridge);
|
pci_dev_put(bridge);
|
||||||
@@ -14196,7 +14196,7 @@ static int __devinit tg3_get_invariants(struct tg3 *tp)
|
|||||||
if (bridge && bridge->subordinate &&
|
if (bridge && bridge->subordinate &&
|
||||||
(bridge->subordinate->number <=
|
(bridge->subordinate->number <=
|
||||||
tp->pdev->bus->number) &&
|
tp->pdev->bus->number) &&
|
||||||
(bridge->subordinate->subordinate >=
|
(bridge->subordinate->busn_res.end >=
|
||||||
tp->pdev->bus->number)) {
|
tp->pdev->bus->number)) {
|
||||||
tg3_flag_set(tp, 40BIT_DMA_BUG);
|
tg3_flag_set(tp, 40BIT_DMA_BUG);
|
||||||
pci_dev_put(bridge);
|
pci_dev_put(bridge);
|
||||||
|
|||||||
@@ -174,7 +174,7 @@ static int dino_cfg_read(struct pci_bus *bus, unsigned int devfn, int where,
|
|||||||
int size, u32 *val)
|
int size, u32 *val)
|
||||||
{
|
{
|
||||||
struct dino_device *d = DINO_DEV(parisc_walk_tree(bus->bridge));
|
struct dino_device *d = DINO_DEV(parisc_walk_tree(bus->bridge));
|
||||||
u32 local_bus = (bus->parent == NULL) ? 0 : bus->secondary;
|
u32 local_bus = (bus->parent == NULL) ? 0 : bus->busn_res.start;
|
||||||
u32 v = DINO_CFG_TOK(local_bus, devfn, where & ~3);
|
u32 v = DINO_CFG_TOK(local_bus, devfn, where & ~3);
|
||||||
void __iomem *base_addr = d->hba.base_addr;
|
void __iomem *base_addr = d->hba.base_addr;
|
||||||
unsigned long flags;
|
unsigned long flags;
|
||||||
@@ -209,7 +209,7 @@ static int dino_cfg_write(struct pci_bus *bus, unsigned int devfn, int where,
|
|||||||
int size, u32 val)
|
int size, u32 val)
|
||||||
{
|
{
|
||||||
struct dino_device *d = DINO_DEV(parisc_walk_tree(bus->bridge));
|
struct dino_device *d = DINO_DEV(parisc_walk_tree(bus->bridge));
|
||||||
u32 local_bus = (bus->parent == NULL) ? 0 : bus->secondary;
|
u32 local_bus = (bus->parent == NULL) ? 0 : bus->busn_res.start;
|
||||||
u32 v = DINO_CFG_TOK(local_bus, devfn, where & ~3);
|
u32 v = DINO_CFG_TOK(local_bus, devfn, where & ~3);
|
||||||
void __iomem *base_addr = d->hba.base_addr;
|
void __iomem *base_addr = d->hba.base_addr;
|
||||||
unsigned long flags;
|
unsigned long flags;
|
||||||
@@ -554,7 +554,7 @@ dino_fixup_bus(struct pci_bus *bus)
|
|||||||
struct dino_device *dino_dev = DINO_DEV(parisc_walk_tree(bus->bridge));
|
struct dino_device *dino_dev = DINO_DEV(parisc_walk_tree(bus->bridge));
|
||||||
|
|
||||||
DBG(KERN_WARNING "%s(0x%p) bus %d platform_data 0x%p\n",
|
DBG(KERN_WARNING "%s(0x%p) bus %d platform_data 0x%p\n",
|
||||||
__func__, bus, bus->secondary,
|
__func__, bus, bus->busn_res.start,
|
||||||
bus->bridge->platform_data);
|
bus->bridge->platform_data);
|
||||||
|
|
||||||
/* Firmware doesn't set up card-mode dino, so we have to */
|
/* Firmware doesn't set up card-mode dino, so we have to */
|
||||||
@@ -998,12 +998,12 @@ static int __init dino_probe(struct parisc_device *dev)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
bus->subordinate = pci_scan_child_bus(bus);
|
bus->busn_res.end = pci_scan_child_bus(bus);
|
||||||
|
|
||||||
/* This code *depends* on scanning being single threaded
|
/* This code *depends* on scanning being single threaded
|
||||||
* if it isn't, this global bus number count will fail
|
* if it isn't, this global bus number count will fail
|
||||||
*/
|
*/
|
||||||
dino_current_bus = bus->subordinate + 1;
|
dino_current_bus = bus->busn_res.end + 1;
|
||||||
pci_bus_assign_resources(bus);
|
pci_bus_assign_resources(bus);
|
||||||
pci_bus_add_devices(bus);
|
pci_bus_add_devices(bus);
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
@@ -532,7 +532,7 @@ iosapic_xlate_pin(struct iosapic_info *isi, struct pci_dev *pcidev)
|
|||||||
intr_slot = PCI_SLOT(pcidev->devfn);
|
intr_slot = PCI_SLOT(pcidev->devfn);
|
||||||
}
|
}
|
||||||
DBG_IRT("iosapic_xlate_pin: bus %d slot %d pin %d\n",
|
DBG_IRT("iosapic_xlate_pin: bus %d slot %d pin %d\n",
|
||||||
pcidev->bus->secondary, intr_slot, intr_pin);
|
pcidev->bus->busn_res.start, intr_slot, intr_pin);
|
||||||
|
|
||||||
return irt_find_irqline(isi, intr_slot, intr_pin);
|
return irt_find_irqline(isi, intr_slot, intr_pin);
|
||||||
}
|
}
|
||||||
|
|||||||
+11
-11
@@ -189,8 +189,8 @@ lba_dump_res(struct resource *r, int d)
|
|||||||
|
|
||||||
static int lba_device_present(u8 bus, u8 dfn, struct lba_device *d)
|
static int lba_device_present(u8 bus, u8 dfn, struct lba_device *d)
|
||||||
{
|
{
|
||||||
u8 first_bus = d->hba.hba_bus->secondary;
|
u8 first_bus = d->hba.hba_bus->busn_res.start;
|
||||||
u8 last_sub_bus = d->hba.hba_bus->subordinate;
|
u8 last_sub_bus = d->hba.hba_bus->busn_res.end;
|
||||||
|
|
||||||
if ((bus < first_bus) ||
|
if ((bus < first_bus) ||
|
||||||
(bus > last_sub_bus) ||
|
(bus > last_sub_bus) ||
|
||||||
@@ -364,7 +364,7 @@ lba_rd_cfg(struct lba_device *d, u32 tok, u8 reg, u32 size)
|
|||||||
static int elroy_cfg_read(struct pci_bus *bus, unsigned int devfn, int pos, int size, u32 *data)
|
static int elroy_cfg_read(struct pci_bus *bus, unsigned int devfn, int pos, int size, u32 *data)
|
||||||
{
|
{
|
||||||
struct lba_device *d = LBA_DEV(parisc_walk_tree(bus->bridge));
|
struct lba_device *d = LBA_DEV(parisc_walk_tree(bus->bridge));
|
||||||
u32 local_bus = (bus->parent == NULL) ? 0 : bus->secondary;
|
u32 local_bus = (bus->parent == NULL) ? 0 : bus->busn_res.start;
|
||||||
u32 tok = LBA_CFG_TOK(local_bus, devfn);
|
u32 tok = LBA_CFG_TOK(local_bus, devfn);
|
||||||
void __iomem *data_reg = d->hba.base_addr + LBA_PCI_CFG_DATA;
|
void __iomem *data_reg = d->hba.base_addr + LBA_PCI_CFG_DATA;
|
||||||
|
|
||||||
@@ -380,7 +380,7 @@ static int elroy_cfg_read(struct pci_bus *bus, unsigned int devfn, int pos, int
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (LBA_SKIP_PROBE(d) && !lba_device_present(bus->secondary, devfn, d)) {
|
if (LBA_SKIP_PROBE(d) && !lba_device_present(bus->busn_res.start, devfn, d)) {
|
||||||
DBG_CFG("%s(%x+%2x) -> -1 (b)\n", __func__, tok, pos);
|
DBG_CFG("%s(%x+%2x) -> -1 (b)\n", __func__, tok, pos);
|
||||||
/* either don't want to look or know device isn't present. */
|
/* either don't want to look or know device isn't present. */
|
||||||
*data = ~0U;
|
*data = ~0U;
|
||||||
@@ -431,7 +431,7 @@ lba_wr_cfg(struct lba_device *d, u32 tok, u8 reg, u32 data, u32 size)
|
|||||||
static int elroy_cfg_write(struct pci_bus *bus, unsigned int devfn, int pos, int size, u32 data)
|
static int elroy_cfg_write(struct pci_bus *bus, unsigned int devfn, int pos, int size, u32 data)
|
||||||
{
|
{
|
||||||
struct lba_device *d = LBA_DEV(parisc_walk_tree(bus->bridge));
|
struct lba_device *d = LBA_DEV(parisc_walk_tree(bus->bridge));
|
||||||
u32 local_bus = (bus->parent == NULL) ? 0 : bus->secondary;
|
u32 local_bus = (bus->parent == NULL) ? 0 : bus->busn_res.start;
|
||||||
u32 tok = LBA_CFG_TOK(local_bus,devfn);
|
u32 tok = LBA_CFG_TOK(local_bus,devfn);
|
||||||
|
|
||||||
if ((pos > 255) || (devfn > 255))
|
if ((pos > 255) || (devfn > 255))
|
||||||
@@ -444,7 +444,7 @@ static int elroy_cfg_write(struct pci_bus *bus, unsigned int devfn, int pos, int
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (LBA_SKIP_PROBE(d) && (!lba_device_present(bus->secondary, devfn, d))) {
|
if (LBA_SKIP_PROBE(d) && (!lba_device_present(bus->busn_res.start, devfn, d))) {
|
||||||
DBG_CFG("%s(%x+%2x) = 0x%x (b)\n", __func__, tok, pos,data);
|
DBG_CFG("%s(%x+%2x) = 0x%x (b)\n", __func__, tok, pos,data);
|
||||||
return 1; /* New Workaround */
|
return 1; /* New Workaround */
|
||||||
}
|
}
|
||||||
@@ -481,7 +481,7 @@ static struct pci_ops elroy_cfg_ops = {
|
|||||||
static int mercury_cfg_read(struct pci_bus *bus, unsigned int devfn, int pos, int size, u32 *data)
|
static int mercury_cfg_read(struct pci_bus *bus, unsigned int devfn, int pos, int size, u32 *data)
|
||||||
{
|
{
|
||||||
struct lba_device *d = LBA_DEV(parisc_walk_tree(bus->bridge));
|
struct lba_device *d = LBA_DEV(parisc_walk_tree(bus->bridge));
|
||||||
u32 local_bus = (bus->parent == NULL) ? 0 : bus->secondary;
|
u32 local_bus = (bus->parent == NULL) ? 0 : bus->busn_res.start;
|
||||||
u32 tok = LBA_CFG_TOK(local_bus, devfn);
|
u32 tok = LBA_CFG_TOK(local_bus, devfn);
|
||||||
void __iomem *data_reg = d->hba.base_addr + LBA_PCI_CFG_DATA;
|
void __iomem *data_reg = d->hba.base_addr + LBA_PCI_CFG_DATA;
|
||||||
|
|
||||||
@@ -514,7 +514,7 @@ static int mercury_cfg_write(struct pci_bus *bus, unsigned int devfn, int pos, i
|
|||||||
{
|
{
|
||||||
struct lba_device *d = LBA_DEV(parisc_walk_tree(bus->bridge));
|
struct lba_device *d = LBA_DEV(parisc_walk_tree(bus->bridge));
|
||||||
void __iomem *data_reg = d->hba.base_addr + LBA_PCI_CFG_DATA;
|
void __iomem *data_reg = d->hba.base_addr + LBA_PCI_CFG_DATA;
|
||||||
u32 local_bus = (bus->parent == NULL) ? 0 : bus->secondary;
|
u32 local_bus = (bus->parent == NULL) ? 0 : bus->busn_res.start;
|
||||||
u32 tok = LBA_CFG_TOK(local_bus,devfn);
|
u32 tok = LBA_CFG_TOK(local_bus,devfn);
|
||||||
|
|
||||||
if ((pos > 255) || (devfn > 255))
|
if ((pos > 255) || (devfn > 255))
|
||||||
@@ -636,7 +636,7 @@ lba_fixup_bus(struct pci_bus *bus)
|
|||||||
struct lba_device *ldev = LBA_DEV(parisc_walk_tree(bus->bridge));
|
struct lba_device *ldev = LBA_DEV(parisc_walk_tree(bus->bridge));
|
||||||
|
|
||||||
DBG("lba_fixup_bus(0x%p) bus %d platform_data 0x%p\n",
|
DBG("lba_fixup_bus(0x%p) bus %d platform_data 0x%p\n",
|
||||||
bus, bus->secondary, bus->bridge->platform_data);
|
bus, (int)bus->busn_res.start, bus->bridge->platform_data);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** Properly Setup MMIO resources for this bus.
|
** Properly Setup MMIO resources for this bus.
|
||||||
@@ -1511,7 +1511,7 @@ lba_driver_probe(struct parisc_device *dev)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
lba_bus->subordinate = pci_scan_child_bus(lba_bus);
|
lba_bus->busn_res.end = pci_scan_child_bus(lba_bus);
|
||||||
|
|
||||||
/* This is in lieu of calling pci_assign_unassigned_resources() */
|
/* This is in lieu of calling pci_assign_unassigned_resources() */
|
||||||
if (is_pdc_pat()) {
|
if (is_pdc_pat()) {
|
||||||
@@ -1541,7 +1541,7 @@ lba_driver_probe(struct parisc_device *dev)
|
|||||||
lba_dev->flags |= LBA_FLAG_SKIP_PROBE;
|
lba_dev->flags |= LBA_FLAG_SKIP_PROBE;
|
||||||
}
|
}
|
||||||
|
|
||||||
lba_next_bus = lba_bus->subordinate + 1;
|
lba_next_bus = lba_res->busn_res.end + 1;
|
||||||
pci_bus_add_devices(lba_bus);
|
pci_bus_add_devices(lba_bus);
|
||||||
|
|
||||||
/* Whew! Finally done! Tell services we got this one covered. */
|
/* Whew! Finally done! Tell services we got this one covered. */
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user