release/src/linux/linux/arch/ia64/sn/io/pci.c
/*
 * snia64_write_config_word - Writes 2 bytes to the config area of the device.
 */
Writes 2 bytes to the config area of the device.
Writes 2 bytes to the config area of the device .
static int snia64_write_config_word (struct pci_dev *dev,
                                    int where, unsigned short val)
{
	devfs_handle_t device_vertex = NULL;
	if (where & 1) {
		return PCIBIOS_BAD_REGISTER_NUMBER;
	}
	if ( dev == (struct pci_dev *)0 ) {
		return PCIBIOS_DEVICE_NOT_FOUND;
	}
	if (dev->vendor == PCI_VENDOR_ID_SGI && 
	    dev->device == PCI_DEVICE_ID_SGI_IOC3)
		return PCIBIOS_SUCCESSFUL;
	device_vertex = devfn_to_vertex(dev->bus->number, dev->devfn);
	if (!device_vertex) {
		DBG("%s : nonexistent device: bus= 0x%x  slot= 0x%x  func= 0x%x\n", 
		__FUNCTION__, dev->bus->number, PCI_SLOT(dev->devfn), PCI_FUNC(dev->devfn));
		return(-1);
	}
	pciio_config_set( device_vertex, (unsigned)where, 2, (uint64_t) val);
	return PCIBIOS_SUCCESSFUL;
}
static int snia64_write_config_word ( struct pci_dev * dev , int where , unsigned short val ) { devfs_handle_t device_vertex = NULL ; if ( where & 1 ) { return PCIBIOS_BAD_REGISTER_NUMBER ; } if ( dev == ( struct pci_dev * ) 0 ) { return PCIBIOS_DEVICE_NOT_FOUND ; } if ( dev -> vendor == PCI_VENDOR_ID_SGI && dev -> device == PCI_DEVICE_ID_SGI_IOC3 ) return PCIBIOS_SUCCESSFUL ; device_vertex = devfn_to_vertex ( dev -> bus -> number , dev -> devfn ) ; if ( ! device_vertex ) { DBG ( " \n " , __FUNCTION__ , dev -> bus -> number , PCI_SLOT ( dev -> devfn ) , PCI_FUNC ( dev -> devfn ) ) ; return ( -1 ) ; } pciio_config_set ( device_vertex , ( unsigned ) where , 2 , ( uint64_t ) val ) ; return PCIBIOS_SUCCESSFUL ; }
snia64_write_config_word - Writes 2 bytes to the config area of the device.
snia64_write_config_word - Writes 2 bytes to the config area of the device .
/* 
	 * if it's an IOC3 then we bail out, we special
	 * case them with pci_fixup_ioc3
	 */