release/src/linux/linux/arch/ia64/sn/io/pci.c
/*
 * snia64_read_config_dword - Read 4 bytes from the config area of the device.
 */
Read 4 bytes from the config area of the device.
Read 4 bytes from the config area of the device .
static int snia64_read_config_dword (struct pci_dev *dev,
                                    int where, unsigned int *val)
{
	unsigned long res = 0;
	unsigned size = 4; 
	devfs_handle_t device_vertex;
	if (where & 3) {
		return PCIBIOS_BAD_REGISTER_NUMBER;
	}
	if ( (dev == (struct pci_dev *)0) || (val == (unsigned int *)0) ) {
		return PCIBIOS_DEVICE_NOT_FOUND;
	}
	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);
	}
	res = pciio_config_get(device_vertex, (unsigned) where, size);
	*val = (unsigned int) res;
	return PCIBIOS_SUCCESSFUL;
}
static int snia64_read_config_dword ( struct pci_dev * dev , int where , unsigned int * val ) { unsigned long res = 0 ; unsigned size = 4 ; devfs_handle_t device_vertex ; if ( where & 3 ) { return PCIBIOS_BAD_REGISTER_NUMBER ; } if ( ( dev == ( struct pci_dev * ) 0 ) || ( val == ( unsigned int * ) 0 ) ) { return PCIBIOS_DEVICE_NOT_FOUND ; } 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 ) ; } res = pciio_config_get ( device_vertex , ( unsigned ) where , size ) ; * val = ( unsigned int ) res ; return PCIBIOS_SUCCESSFUL ; }
snia64_read_config_dword - Read 4 bytes from the config area of the device.
snia64_read_config_dword - Read 4 bytes from the config area of the device .
/* 4 bytes */