Exemplo n.º 1
0
static int
sbpci_write_config_word(struct pci_dev *dev, int where, u16 value)
{
	unsigned long flags;
	int ret;

	spin_lock_irqsave(&sbh_lock, flags);
	ret = sbpci_write_config(sbh, dev->bus->number, PCI_SLOT(dev->devfn),
		PCI_FUNC(dev->devfn), where, &value, sizeof(value));
	spin_unlock_irqrestore(&sbh_lock, flags);
	return ret ? PCIBIOS_DEVICE_NOT_FOUND : PCIBIOS_SUCCESSFUL;
}
Exemplo n.º 2
0
static int
bcm947xx_pci_write_config(struct pci_bus *bus, unsigned int devfn,
			  int where, int size, u32 value)
{
	unsigned long flags;
	int ret;

	spin_lock_irqsave(&sbh_lock, flags);
	ret =
	    sbpci_write_config(sbh, bus->number, PCI_SLOT(devfn),
			       PCI_FUNC(devfn), where, &value, size);
	spin_unlock_irqrestore(&sbh_lock, flags);
	return ret ? PCIBIOS_DEVICE_NOT_FOUND : PCIBIOS_SUCCESSFUL;
}