ab = find_acpi_bridge_by_bus(acpi_bridges_head, ctrl->seg, ctrl->bus); 
ab = find_acpi_bridge_by_bus(acpi_bridges_head, ctrl->seg, ctrl->slot_bus); 
void shpchprm_enable_card(	struct controller *ctrl,	struct pci_func *func,	u8 card_type){	u16 command, cmd, bcommand, bcmd;	struct pci_bus lpci_bus, *pci_bus;	struct acpi_bridge	*ab;	unsigned int devfn;	int rc;	memcpy(&lpci_bus, ctrl->pci_bus, sizeof(lpci_bus));	pci_bus = &lpci_bus;	pci_bus->number = func->bus;	devfn = PCI_DEVFN(func->device, func->function);	rc = pci_bus_read_config_word(pci_bus, devfn, PCI_COMMAND, &command);	if (card_type == PCI_HEADER_TYPE_BRIDGE) {		rc = pci_bus_read_config_word(pci_bus, devfn, PCI_BRIDGE_CONTROL, &bcommand);	}	cmd = command  = command | PCI_COMMAND_MASTER | PCI_COMMAND_INVALIDATE		| PCI_COMMAND_IO | PCI_COMMAND_MEMORY;	bcmd = bcommand  = bcommand | PCI_BRIDGE_CTL_NO_ISA;	ab = find_acpi_bridge_by_bus(acpi_bridges_head, ctrl->seg, ctrl->bus);	if (ab) {		if (ab->_hpp) {			if (ab->_hpp->enable_perr) {				command |= PCI_COMMAND_PARITY;				bcommand |= PCI_BRIDGE_CTL_PARITY;			} else {				command &= ~PCI_COMMAND_PARITY;				bcommand &= ~PCI_BRIDGE_CTL_PARITY;			}			if (ab->_hpp->enable_serr) {				command |= PCI_COMMAND_SERR;				bcommand |= PCI_BRIDGE_CTL_SERR;			} else {				command &= ~PCI_COMMAND_SERR;				bcommand &= ~PCI_BRIDGE_CTL_SERR;			}		} else			dbg("no _hpp for B/D/F = %#x/%#x/%#x.\n", func->bus, func->device, func->function);	} else		dbg("no acpi bridge for B/D/F = %#x/%#x/%#x.\n", func->bus, func->device, func->function);	if (command != cmd) {		rc = pci_bus_write_config_word(pci_bus, devfn, PCI_COMMAND, command);	}	if ((card_type == PCI_HEADER_TYPE_BRIDGE) && (bcommand != bcmd)) {		rc = pci_bus_write_config_word(pci_bus, devfn, PCI_BRIDGE_CONTROL, bcommand);	}}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/2ac2610b26c9da72820443328ff2c56c7b8c87b8/shpchprm_acpi.c/buggy/drivers/pci/hotplug/shpchprm_acpi.c