Lines Matching refs:dev

210 	const struct pci_driver *last_driver, struct pci_device *dev)
230 dev->driver = driver;
231 dev->name = driver->ids[i].name;
252 dev->driver = driver;
253 dev->name = driver->name;
261 void scan_pci_bus(int type, struct pci_device *dev)
276 if (dev->driver) {
277 first_driver = dev->driver;
278 first_bus = dev->bus;
279 first_devfn = dev->devfn;
283 dev->driver = 0;
284 dev->bus = 0;
285 dev->devfn = 0;
333 scan_drivers(type, class, vendor, device, first_driver, dev);
334 if (!dev->driver){
343 dev->devfn = devfn;
344 dev->bus = bus;
345 dev->class = class;
346 dev->vendor = vendor;
347 dev->dev_id = device;
354 dev->romaddr = romaddr;
359 dev->membase = membase;
372 dev->ioaddr = ioaddr;
376 dev->name, romaddr);
422 unsigned long pci_bar_start(struct pci_device *dev, unsigned int index)
426 pci_read_config_dword(dev, index, &lo);
432 pci_read_config_dword(dev, index + 4, &hi);
446 return bar + pcibios_bus_base(dev->bus);
452 unsigned long pci_bar_size(struct pci_device *dev, unsigned int bar)
456 pci_read_config_dword(dev, bar, &start);
458 pci_write_config_dword(dev, bar, ~0);
459 pci_read_config_dword(dev, bar, &size);
461 pci_write_config_dword(dev, bar, start);
475 * @dev: PCI device to query
495 int pci_find_capability(struct pci_device *dev, int cap)
502 pci_read_config_word(dev, PCI_STATUS, &status);
505 pci_read_config_byte(dev, PCI_HEADER_TYPE, &hdr_type);
510 pci_read_config_byte(dev, PCI_CAPABILITY_LIST, &pos);
513 pci_read_config_byte(dev, PCI_CB_CAPABILITY_LIST, &pos);
518 pci_read_config_byte(dev, pos + PCI_CAP_LIST_ID, &id);
526 pci_read_config_byte(dev, pos + PCI_CAP_LIST_NEXT, &pos);