if (cmd != oldcmd) {
printk(KERN_DEBUG "PCI: Enabling device: (%s), cmd %x\n",
- dev->slot_name, cmd);
+ pci_name(dev), cmd);
/* Enable the appropriate bits in the PCI command register. */
pci_write_config_word(dev, PCI_COMMAND, cmd);
}
pci_read_config_byte(dev, PCI_LATENCY_TIMER, &lat);
if (lat >= 16) return;
printk("PCI: Setting latency timer of device %s to 64\n",
- dev->slot_name);
+ pci_name(dev));
pci_write_config_byte(dev, PCI_LATENCY_TIMER, 64);
}
else if (pcidev_is_sa1111(pdev))
return "[SA-1111]";
else
- return pdev->slot_name;
+ return pci_name(pdev);
}
if ((page = pool_find_page (pool, dma)) == 0) {
printk (KERN_ERR "pci_pool_free %s/%s, %p/%lx (bad dma)\n",
- pool->dev ? pool->dev->slot_name : NULL,
+ pool->dev ? pci_name(pool->dev) : NULL,
pool->name, vaddr, (unsigned long) dma);
return;
}
#ifdef CONFIG_DEBUG_SLAB
if (((dma - page->dma) + (void *)page->vaddr) != vaddr) {
printk (KERN_ERR "pci_pool_free %s/%s, %p (bad vaddr)/%lx\n",
- pool->dev ? pool->dev->slot_name : NULL,
+ pool->dev ? pci_name(pool->dev) : NULL,
pool->name, vaddr, (unsigned long) dma);
return;
}
if (page->bitmap [map] & (1UL << block)) {
printk (KERN_ERR "pci_pool_free %s/%s, dma %x already free\n",
- pool->dev ? pool->dev->slot_name : NULL,
+ pool->dev ? pci_name(pool->dev) : NULL,
pool->name, dma);
return;
}
if (debug_pci)
printk("PCI: %s swizzling pin %d => pin %d slot %d\n",
- dev->slot_name, oldpin, *pin, slot);
+ pci_name(dev), oldpin, *pin, slot);
return slot;
}
if (debug_pci)
printk("PCI: %s mapping slot %d pin %d => irq %d\n",
- dev->slot_name, slot, pin, irq);
+ pci_name(dev), slot, pin, irq);
return irq;
}
r = dev->resource + idx;
if (!r->start && r->end) {
printk(KERN_ERR "PCI: Device %s not available because"
- " of resource collisions\n", dev->slot_name);
+ " of resource collisions\n", pci_name(dev));
return -EINVAL;
}
if (r->flags & IORESOURCE_IO)
if (cmd != old_cmd) {
printk("PCI: enabling device %s (%04x -> %04x)\n",
- dev->slot_name, old_cmd, cmd);
+ pci_name(dev), old_cmd, cmd);
pci_write_config_word(dev, PCI_COMMAND, cmd);
}
return 0;
default:
printk(KERN_ERR "PCI: unknown device in slot %s: %s\n",
- dev->slot_name, dev->dev.name);
+ pci_name(dev), dev->dev.name);
return 0;
}
}
int pxb, reg;
u8 busno, suba, subb;
- printk(KERN_WARNING "PCI: Searching for i450NX host bridges on %s\n", d->slot_name);
+ printk(KERN_WARNING "PCI: Searching for i450NX host bridges on %s\n", pci_name(d));
reg = 0xd0;
for(pxb=0; pxb<2; pxb++) {
pci_read_config_byte(d, reg++, &busno);
*/
u8 busno;
pci_read_config_byte(d, 0x4a, &busno);
- printk(KERN_INFO "PCI: i440KX/GX host bridge %s: secondary bus %02x\n", d->slot_name, busno);
+ printk(KERN_INFO "PCI: i440KX/GX host bridge %s: secondary bus %02x\n", pci_name(d), busno);
pci_scan_bus(busno, &pci_root_ops, NULL);
pcibios_last_bus = -1;
}
*/
int i;
- printk(KERN_WARNING "PCI: Fixing base address flags for device %s\n", d->slot_name);
+ printk(KERN_WARNING "PCI: Fixing base address flags for device %s\n", pci_name(d));
for(i=0; i<4; i++)
d->resource[i].flags |= PCI_BASE_ADDRESS_SPACE_IO;
}
* Fix class to be PCI_CLASS_STORAGE_SCSI
*/
if (!d->class) {
- printk(KERN_WARNING "PCI: fixing NCR 53C810 class code for %s\n", d->slot_name);
+ printk(KERN_WARNING "PCI: fixing NCR 53C810 class code for %s\n", pci_name(d));
d->class = PCI_CLASS_STORAGE_SCSI << 8;
}
}
*/
if ((d->class >> 8) != PCI_CLASS_STORAGE_IDE)
return;
- DBG("PCI: IDE base address fixup for %s\n", d->slot_name);
+ DBG("PCI: IDE base address fixup for %s\n", pci_name(d));
for(i=0; i<4; i++) {
struct resource *r = &d->resource[i];
if ((r->start & ~0x80) == 0x374) {
* There exist PCI IDE controllers which have utter garbage
* in first four base registers. Ignore that.
*/
- DBG("PCI: IDE base address trash cleared for %s\n", d->slot_name);
+ DBG("PCI: IDE base address trash cleared for %s\n", pci_name(d));
for(i=0; i<4; i++)
d->resource[i].start = d->resource[i].end = d->resource[i].flags = 0;
}
continue;
pr = pci_find_parent_resource(dev, r);
if (!pr || request_resource(pr, r) < 0)
- printk(KERN_ERR "PCI: Cannot allocate resource region %d of bridge %s\n", idx, dev->slot_name);
+ printk(KERN_ERR "PCI: Cannot allocate resource region %d of bridge %s\n", idx, pci_name(dev));
}
}
pcibios_allocate_bus_resources(&bus->children);
r->start, r->end, r->flags, disabled, pass);
pr = pci_find_parent_resource(dev, r);
if (!pr || request_resource(pr, r) < 0) {
- printk(KERN_ERR "PCI: Cannot allocate resource region %d of device %s\n", idx, dev->slot_name);
+ printk(KERN_ERR "PCI: Cannot allocate resource region %d of device %s\n", idx, pci_name(dev));
/* We'll assign a new address later */
r->end -= r->start;
r->start = 0;
if (r->flags & PCI_ROM_ADDRESS_ENABLE) {
/* Turn the ROM off, leave the resource region, but keep it unregistered. */
u32 reg;
- DBG("PCI: Switching off ROM of %s\n", dev->slot_name);
+ DBG("PCI: Switching off ROM of %s\n", pci_name(dev));
r->flags &= ~PCI_ROM_ADDRESS_ENABLE;
pci_read_config_dword(dev, dev->rom_base_reg, ®);
pci_write_config_dword(dev, dev->rom_base_reg, reg & ~PCI_ROM_ADDRESS_ENABLE);
r = &dev->resource[idx];
if (!r->start && r->end) {
- printk(KERN_ERR "PCI: Device %s not available because of resource collisions\n", dev->slot_name);
+ printk(KERN_ERR "PCI: Device %s not available because of resource collisions\n", pci_name(dev));
return -EINVAL;
}
if (r->flags & IORESOURCE_IO)
if (dev->resource[PCI_ROM_RESOURCE].start)
cmd |= PCI_COMMAND_MEMORY;
if (cmd != old_cmd) {
- printk("PCI: Enabling device %s (%04x -> %04x)\n", dev->slot_name, old_cmd, cmd);
+ printk("PCI: Enabling device %s (%04x -> %04x)\n", pci_name(dev), old_cmd, cmd);
pci_write_config_word(dev, PCI_COMMAND, cmd);
}
return 0;
lat = pcibios_max_latency;
else
return;
- printk(KERN_DEBUG "PCI: Setting latency timer of device %s to %d\n", dev->slot_name, lat);
+ printk(KERN_DEBUG "PCI: Setting latency timer of device %s to %d\n", pci_name(dev), lat);
pci_write_config_byte(dev, PCI_LATENCY_TIMER, lat);
}
pirq_router->name,
pirq_router_dev->vendor,
pirq_router_dev->device,
- pirq_router_dev->slot_name);
+ pci_name(pirq_router_dev));
}
static struct irq_info *pirq_get_info(struct pci_dev *dev)
if (!pirq_table)
return 0;
- DBG("IRQ for %s:%d", dev->slot_name, pin);
+ DBG("IRQ for %s:%d", pci_name(dev), pin);
info = pirq_get_info(dev);
if (!info) {
DBG(" -> not found in routing table\n");
newirq = dev->irq;
if (!((1 << newirq) & mask)) {
if ( pci_probe & PCI_USE_PIRQ_MASK) newirq = 0;
- else printk(KERN_WARNING "PCI: IRQ %i for device %s doesn't match PIRQ mask - try pci=usepirqmask\n", newirq, dev->slot_name);
+ else printk(KERN_WARNING "PCI: IRQ %i for device %s doesn't match PIRQ mask - try pci=usepirqmask\n", newirq, pci_name(dev));
}
if (!newirq && assign) {
for (i = 0; i < 16; i++) {
} else
return 0;
}
- printk(KERN_INFO "PCI: %s IRQ %d for device %s\n", msg, irq, dev->slot_name);
+ printk(KERN_INFO "PCI: %s IRQ %d for device %s\n", msg, irq, pci_name(dev));
/* Update IRQ for all devices with the same pirq value */
while ((dev2 = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, dev2)) != NULL) {
(!(pci_probe & PCI_USE_PIRQ_MASK) || \
((1 << dev2->irq) & mask)) ) {
printk(KERN_INFO "IRQ routing conflict for %s, have irq %d, want irq %d\n",
- dev2->slot_name, dev2->irq, irq);
+ pci_name(dev2), dev2->irq, irq);
continue;
}
dev2->irq = irq;
pirq_penalty[irq]++;
if (dev != dev2)
- printk(KERN_INFO "PCI: Sharing IRQ %d with %s\n", irq, dev2->slot_name);
+ printk(KERN_INFO "PCI: Sharing IRQ %d with %s\n", irq, pci_name(dev2));
}
}
return 1;
* Also keep track of which IRQ's are already in use.
*/
if (dev->irq >= 16) {
- DBG("%s: ignoring bogus IRQ %d\n", dev->slot_name, dev->irq);
+ DBG("%s: ignoring bogus IRQ %d\n", pci_name(dev), dev->irq);
dev->irq = 0;
}
/* If the IRQ is already assigned to a PCI device, ignore its ISA use penalty */
return 0;
printk(KERN_WARNING "PCI: No IRQ known for interrupt pin %c of device %s.%s\n",
- 'A' + pin - 1, dev->slot_name, msg);
+ 'A' + pin - 1, pci_name(dev), msg);
}
/* VIA bridges use interrupt line for apic/pci steering across
the V-Link */
u8 busno, suba, subb;
int quad = BUS2QUAD(d->bus->number);
- printk("PCI: Searching for i450NX host bridges on %s\n", d->slot_name);
+ printk("PCI: Searching for i450NX host bridges on %s\n", pci_name(d));
reg = 0xd0;
for(pxb=0; pxb<2; pxb++) {
pci_read_config_byte(d, reg++, &busno);
if (!r->start && r->end) {
printk(KERN_ERR
"PCI: Device %s not available because of resource collisions\n",
- dev->slot_name);
+ pci_name(dev));
return -EINVAL;
}
if (r->flags & IORESOURCE_IO)
if (dev->resource[PCI_ROM_RESOURCE].start)
cmd |= PCI_COMMAND_MEMORY;
if (cmd != old_cmd) {
- printk("PCI: Enabling device %s (%04x -> %04x)\n", dev->slot_name, old_cmd, cmd);
+ printk("PCI: Enabling device %s (%04x -> %04x)\n", pci_name(dev), old_cmd, cmd);
pci_write_config_word(dev, PCI_COMMAND, cmd);
}
return 0;
if (ret < 0)
return ret;
- printk(KERN_INFO "PCI: Found IRQ %d for device %s\n", dev->irq, dev->slot_name);
+ printk(KERN_INFO "PCI: Found IRQ %d for device %s\n", dev->irq, pci_name(dev));
return acpi_pci_irq_enable(dev);
}
current_linesize = 4 * pci_linesize;
if (desired_linesize != current_linesize) {
printk(KERN_WARNING "PCI: slot %s has incorrect PCI cache line size of %lu bytes,",
- dev->slot_name, current_linesize);
+ pci_name(dev), current_linesize);
if (current_linesize > desired_linesize) {
printk(" expected %lu bytes instead\n", desired_linesize);
rc = -EINVAL;
* currently we hack this with special code in
* sgi_pci_intr_support()
*/
- DBG("pci_fixup_ioc3: Fixing base addresses for ioc3 device %s\n", d->slot_name);
+ DBG("pci_fixup_ioc3: Fixing base addresses for ioc3 device %s\n", pci_name(d));
/* I happen to know from the spec that the ioc3 needs only 0xfffff
* The standard pci trick of writing ~0 to the baddr and seeing
if (!r->start && r->end) {
printk(KERN_ERR
"PCI: Device %s not available because of resource collisions\n",
- dev->slot_name);
+ pci_name(dev));
return -EINVAL;
}
if (r->flags & IORESOURCE_IO)
cmd |= PCI_COMMAND_MEMORY;
if (cmd != old_cmd) {
printk("PCI: Enabling device %s (%04x -> %04x)\n",
- dev->slot_name, old_cmd, cmd);
+ pci_name(dev), old_cmd, cmd);
pci_write_config_word(dev, PCI_COMMAND, cmd);
}
return 0;
galileo_pcibios_read_config_word(dev, PCI_COMMAND, &cmd);
cmd |= PCI_COMMAND_MASTER;
galileo_pcibios_write_config_word(dev, PCI_COMMAND, cmd);
- DBG("PCI: Enabling device %s (%04x)\n", dev->slot_name, cmd);
+ DBG("PCI: Enabling device %s (%04x)\n", pci_name(dev), cmd);
}
/* Externally-expected functions. Do not change function names */
if (!r->start && r->end) {
printk(KERN_ERR
"PCI: Device %s not available because of resource collisions\n",
- dev->slot_name);
+ pci_name(dev));
return -EINVAL;
}
if (r->flags & IORESOURCE_IO)
}
if (cmd != old_cmd) {
DBG(KERN_INFO "PCI: Enabling device %s (%04x -> %04x)\n",
- dev->slot_name, old_cmd, cmd);
+ pci_name(dev), old_cmd, cmd);
galileo_pcibios_write_config_word(dev, PCI_COMMAND, cmd);
}
addresses kilobyte aligned. */
if (size > 0x100) {
DBG(KERN_ERR "PCI: I/O Region %s/%d too large"
- " (%ld bytes)\n", dev->slot_name,
+ " (%ld bytes)\n", pci_name(dev),
dev->resource - res, size);
}
if (!r->start && r->end) {
printk(KERN_ERR
"PCI: Device %s not available because of "
- "resource collisions\n", dev->slot_name);
+ "resource collisions\n", pci_name(dev));
return -EINVAL;
}
if (r->flags & IORESOURCE_IO)
addresses kilobyte aligned. */
if (size > 0x100) {
printk(KERN_ERR "PCI: I/O Region %s/%d too large"
- " (%ld bytes)\n", dev->slot_name,
+ " (%ld bytes)\n", pci_name(dev),
dev->resource - res, size);
}
pci_read_config_word(dev, PCI_COMMAND, &cmd);
pci_read_config_word(dev, PCI_STATUS, &status);
- printk("PCI: Enabling device %s (%04x %04x)\n", dev->slot_name,
+ printk("PCI: Enabling device %s (%04x %04x)\n", pci_name(dev),
cmd, status);
/* We'll sort this out when we know it isn't enabled ;) */
unsigned long bus_id = (unsigned) d->bus->number;
printk("PCI: Fixing base addresses for IOC3 device %s\n",
- d->slot_name);
+ pci_name(d));
d->resource[0].start |= NODE_OFFSET(bus_to_nid[bus_id]);
d->resource[0].end |= NODE_OFFSET(bus_to_nid[bus_id]);
d->resource[0].start |=
((unsigned long) (bus_to_nid[d->bus->number]) << 32);
- printk("PCI: Fixing isp1020 in [bus:slot.fn] %s\n", d->slot_name);
+ printk("PCI: Fixing isp1020 in [bus:slot.fn] %s\n", pci_name(d));
/*
* Configure device to allow bus mastering, i/o and memory mapping.
unsigned int start;
unsigned short command;
- printk("PCI: Fixing isp2x00 in [bus:slot.fn] %s\n", d->slot_name);
+ printk("PCI: Fixing isp2x00 in [bus:slot.fn] %s\n", pci_name(d));
/* set the resource struct for this device */
start = (u32) (u64) bridge; /* yes, we want to lose the upper 32 bits here */
if (!r->start && r->end) {
printk(KERN_ERR
"PCI: Device %s not available because of "
- "resource collisions\n", dev->slot_name);
+ "resource collisions\n", pci_name(dev));
return -EINVAL;
}
if (r->flags & IORESOURCE_IO)
addresses kilobyte aligned. */
if (size > 0x100) {
printk(KERN_ERR "PCI: I/O Region %s/%d too large"
- " (%ld bytes)\n", dev->slot_name,
+ " (%ld bytes)\n", pci_name(dev),
dev->resource - res, size);
}
if (!r->start && r->end) {
printk(KERN_ERR
"PCI: Device %s not available because of "
- "resource collisions\n", dev->slot_name);
+ "resource collisions\n", pci_name(dev));
return -EINVAL;
}
if (r->flags & IORESOURCE_IO)
addresses kilobyte aligned. */
if (size > 0x100) {
printk(KERN_ERR "PCI: I/O Region %s/%d too large"
- " (%ld bytes)\n", dev->slot_name,
+ " (%ld bytes)\n", pci_name(dev),
dev->resource - res, size);
}
unsigned long mask, align;
DBG_RES("pcibios_align_resource(%s, (%p) [%lx,%lx]/%x, 0x%lx, 0x%lx)\n",
- ((struct pci_dev *) data)->slot_name,
+ pci_name(((struct pci_dev *) data)),
res->parent, res->start, res->end,
(int) res->flags, size, alignment);
if (dev->bus->bridge_ctl & PCI_BRIDGE_CTL_FAST_BACK)
cmd |= PCI_COMMAND_FAST_BACK;
#endif
- DBGC("PCIBIOS: Enabling device %s cmd 0x%04x\n", dev->slot_name, cmd);
+ DBGC("PCIBIOS: Enabling device %s cmd 0x%04x\n", pci_name(dev), cmd);
pci_write_config_word(dev, PCI_COMMAND, cmd);
return 0;
}
unsigned long offset;
if (!hose) {
- printk(KERN_ERR "No hose for PCI dev %s!\n", dev->slot_name);
+ printk(KERN_ERR "No hose for PCI dev %s!\n", pci_name(dev));
return;
}
for (i = 0; i < DEVICE_COUNT_RESOURCE; i++) {
continue;
if (!res->start || res->end == 0xffffffff) {
DBG("PCI:%s Resource %d [%08lx-%08lx] is unassigned\n",
- dev->slot_name, i, res->start, res->end);
+ pci_name(dev), i, res->start, res->end);
res->end -= res->start;
res->start = 0;
res->flags |= IORESOURCE_UNSET;
res->end += offset;
#ifdef DEBUG
printk("Fixup res %d (%lx) of dev %s: %lx -> %lx\n",
- i, res->flags, dev->slot_name,
+ i, res->flags, pci_name(dev),
res->start - offset, res->start);
#endif
}
if (size > 0x100) {
printk(KERN_ERR "PCI: I/O Region %s/%d too large"
- " (%ld bytes)\n", dev->slot_name,
+ " (%ld bytes)\n", pci_name(dev),
dev->resource - res, size);
}
} else {
DBG(KERN_ERR "PCI: ugh, bridge %s res %d has flags=%lx\n",
- dev->slot_name, i, res->flags);
+ pci_name(dev), i, res->flags);
}
pci_write_config_word(dev, PCI_COMMAND, cmd);
}
struct resource *pr, *r = &dev->resource[idx];
DBG("PCI:%s: Resource %d: %08lx-%08lx (f=%lx)\n",
- dev->slot_name, idx, r->start, r->end, r->flags);
+ pci_name(dev), idx, r->start, r->end, r->flags);
pr = pci_find_parent_resource(dev, r);
if (!pr || request_resource(pr, r) < 0) {
printk(KERN_ERR "PCI: Cannot allocate resource region %d"
- " of device %s\n", idx, dev->slot_name);
+ " of device %s\n", idx, pci_name(dev));
if (pr)
DBG("PCI: parent is %p: %08lx-%08lx (f=%lx)\n",
pr, pr->start, pr->end, pr->flags);
if (r->flags & PCI_ROM_ADDRESS_ENABLE) {
/* Turn the ROM off, leave the resource region, but keep it unregistered. */
u32 reg;
- DBG("PCI: Switching off ROM of %s\n", dev->slot_name);
+ DBG("PCI: Switching off ROM of %s\n", pci_name(dev));
r->flags &= ~PCI_ROM_ADDRESS_ENABLE;
pci_read_config_dword(dev, dev->rom_base_reg, ®);
pci_write_config_dword(dev, dev->rom_base_reg,
r = &dev->resource[idx];
if (r->flags & IORESOURCE_UNSET) {
- printk(KERN_ERR "PCI: Device %s not available because of resource collisions\n", dev->slot_name);
+ printk(KERN_ERR "PCI: Device %s not available because of resource collisions\n", pci_name(dev));
return -EINVAL;
}
if (r->flags & IORESOURCE_IO)
if (dev->resource[PCI_ROM_RESOURCE].start)
cmd |= PCI_COMMAND_MEMORY;
if (cmd != old_cmd) {
- printk("PCI: Enabling device %s (%04x -> %04x)\n", dev->slot_name, old_cmd, cmd);
+ printk("PCI: Enabling device %s (%04x -> %04x)\n", pci_name(dev), old_cmd, cmd);
pci_write_config_word(dev, PCI_COMMAND, cmd);
}
return 0;
for (idx=0; idx<6; idx++) {
r = &dev->resource[idx];
if (r->flags & IORESOURCE_UNSET) {
- printk(KERN_ERR "PCI: Device %s not available because of resource collisions\n", dev->slot_name);
+ printk(KERN_ERR "PCI: Device %s not available because of resource collisions\n", pci_name(dev));
return -EINVAL;
}
if (r->flags & IORESOURCE_IO)
}
if (cmd != old_cmd) {
printk("PCI: Enabling device %s (%04x -> %04x)\n",
- dev->slot_name, old_cmd, cmd);
+ pci_name(dev), old_cmd, cmd);
pci_write_config_word(dev, PCI_COMMAND, cmd);
}
return 0;
dn->eeh_config_addr, BUID_HI(dn->phb->buid), BUID_LO(dn->phb->buid));
if (ret == 0 && rets[1] == 1 && rets[0] >= 2) {
panic("EEH: MMIO failure (%ld) on device:\n %s %s\n",
- rets[0], dev->slot_name, dev->dev.name);
+ rets[0], pci_name(dev), dev->dev.name);
}
}
eeh_false_positives++;
pci_read_config_byte(pci_dev, PCI_INTERRUPT_PIN, &intpin);
if (intpin == 0) {
- PPCDBG(PPCDBG_BUSWALK,"\tDevice: %s No Interrupt used by device.\n", pci_dev->slot_name);
+ PPCDBG(PPCDBG_BUSWALK,"\tDevice: %s No Interrupt used by device.\n", pci_name(pci_dev));
return 0;
}
node = pci_device_to_OF_node(pci_dev);
if (node == NULL) {
PPCDBG(PPCDBG_BUSWALK,"\tDevice: %s Device Node not found.\n",
- pci_dev->slot_name);
+ pci_name(pci_dev));
return -1;
}
if (node->n_intrs == 0) {
- PPCDBG(PPCDBG_BUSWALK,"\tDevice: %s No Device OF interrupts defined.\n", pci_dev->slot_name);
+ PPCDBG(PPCDBG_BUSWALK,"\tDevice: %s No Device OF interrupts defined.\n", pci_name(pci_dev));
return -1;
}
pci_dev->irq = node->intrs[0].line;
pci_write_config_byte(pci_dev, PCI_INTERRUPT_LINE, pci_dev->irq);
PPCDBG(PPCDBG_BUSWALK,"\tDevice: %s pci_dev->irq = 0x%02X\n",
- pci_dev->slot_name, pci_dev->irq);
+ pci_name(pci_dev), pci_dev->irq);
return 0;
}
/* Cache the location of the ISA bridge (if we have one) */
ppc64_isabridge_dev = pci_find_class(PCI_CLASS_BRIDGE_ISA << 8, NULL);
if (ppc64_isabridge_dev != NULL)
- printk("ISA bridge at %s\n", ppc64_isabridge_dev->slot_name);
+ printk("ISA bridge at %s\n", pci_name(ppc64_isabridge_dev));
printk("PCI: Probing PCI hardware done\n");
//ppc64_boot_msg(0x41, "PCI Done");
if (cmd != oldcmd) {
printk(KERN_DEBUG "PCI: Enabling device: (%s), cmd %x\n",
- dev->slot_name, cmd);
+ pci_name(dev), cmd);
/* Enable the appropriate bits in the PCI command register. */
pci_write_config_word(dev, PCI_COMMAND, cmd);
}
}
if( irq < 0 ) {
- PCIDBG(3, "PCI: Error mapping IRQ on device %s\n", dev->slot_name);
+ PCIDBG(3, "PCI: Error mapping IRQ on device %s\n", pci_name(dev));
return irq;
}
- PCIDBG(2, "Setting IRQ for slot %s to %d\n", dev->slot_name, irq);
+ PCIDBG(2, "Setting IRQ for slot %s to %d\n", pci_name(dev), irq);
return irq;
}
*/
if ((d->class >> 8) != PCI_CLASS_STORAGE_IDE)
return;
- printk("PCI: IDE base address fixup for %s\n", d->slot_name);
+ printk("PCI: IDE base address fixup for %s\n", pci_name(d));
for(i=0; i<4; i++) {
struct resource *r = &d->resource[i];
if ((r->start & ~0x80) == 0x374) {
printk(KERN_ERR
"PCI: Device %s not available because"
" of resource collisions\n",
- dev->slot_name);
+ pci_name(dev));
return -EINVAL;
}
if (r->flags & IORESOURCE_IO)
}
if (cmd != old_cmd) {
printk("PCI: enabling device %s (%04x -> %04x)\n",
- dev->slot_name, old_cmd, cmd);
+ pci_name(dev), old_cmd, cmd);
pci_write_config_word(dev, PCI_COMMAND, cmd);
}
return 0;
lat = pcibios_max_latency;
else
return;
- printk("PCI: Setting latency timer of device %s to %d\n", dev->slot_name, lat);
+ printk("PCI: Setting latency timer of device %s to %d\n", pci_name(dev), lat);
pci_write_config_byte(dev, PCI_LATENCY_TIMER, lat);
}
*/
if ((d->class >> 8) != PCI_CLASS_STORAGE_IDE)
return;
- PCIDBG(3,"PCI: IDE base address fixup for %s\n", d->slot_name);
+ PCIDBG(3,"PCI: IDE base address fixup for %s\n", pci_name(d));
for(i=0; i<4; i++) {
struct resource *r = &d->resource[i];
if ((r->start & ~0x80) == 0x374) {
continue;
pr = pci_find_parent_resource(dev, r);
if (!pr || request_resource(pr, r) < 0)
- printk(KERN_ERR "PCI: Cannot allocate resource region %d of bridge %s\n", idx, dev->slot_name);
+ printk(KERN_ERR "PCI: Cannot allocate resource region %d of bridge %s\n", idx, pci_name(dev));
}
}
pcibios_allocate_bus_resources(&bus->children);
r->start, r->end, r->flags, disabled, pass);
pr = pci_find_parent_resource(dev, r);
if (!pr || request_resource(pr, r) < 0) {
- printk(KERN_ERR "PCI: Cannot allocate resource region %d of device %s\n", idx, dev->slot_name);
+ printk(KERN_ERR "PCI: Cannot allocate resource region %d of device %s\n", idx, pci_name(dev));
/* We'll assign a new address later */
r->end -= r->start;
r->start = 0;
if (r->flags & PCI_ROM_ADDRESS_ENABLE) {
/* Turn the ROM off, leave the resource region, but keep it unregistered. */
u32 reg;
- PCIDBG(3,"PCI: Switching off ROM of %s\n", dev->slot_name);
+ PCIDBG(3,"PCI: Switching off ROM of %s\n", pci_name(dev));
r->flags &= ~PCI_ROM_ADDRESS_ENABLE;
pci_read_config_dword(dev, dev->rom_base_reg, ®);
pci_write_config_dword(dev, dev->rom_base_reg, reg & ~PCI_ROM_ADDRESS_ENABLE);
return irq;
}
- PCIDBG(2,"Setting IRQ for slot %s to %d\n", dev->slot_name, irq);
+ PCIDBG(2,"Setting IRQ for slot %s to %d\n", pci_name(dev), irq);
return irq;
}
*/
if ((d->class >> 8) != PCI_CLASS_STORAGE_IDE)
return;
- printk("PCI: IDE base address fixup for %s\n", d->slot_name);
+ printk("PCI: IDE base address fixup for %s\n", pci_name(d));
for(i=0; i<4; i++) {
struct resource *r = &d->resource[i];
if ((r->start & ~0x80) == 0x374) {
pci_read_config_dword(dev, reg, &check);
if ((new ^ check) & ((new & PCI_BASE_ADDRESS_SPACE_IO) ? PCI_BASE_ADDRESS_IO_MASK : PCI_BASE_ADDRESS_MEM_MASK)) {
printk(KERN_ERR "PCI: Error while updating region "
- "%s/%d (%08x != %08x)\n", dev->slot_name, resource,
+ "%s/%d (%08x != %08x)\n", pci_name(dev), resource,
new, check);
}
}
for(idx=0; idx<6; idx++) {
r = &dev->resource[idx];
if (!r->start && r->end) {
- printk(KERN_ERR "PCI: Device %s not available because of resource collisions\n", dev->slot_name);
+ printk(KERN_ERR "PCI: Device %s not available because of resource collisions\n", pci_name(dev));
return -EINVAL;
}
if (r->flags & IORESOURCE_IO)
for(idx=0; idx<6; idx++) {
r = &dev->resource[idx];
if (!r->start && r->end) {
- printk(KERN_ERR "PCI: Device %s not available because of resource collisions\n", dev->slot_name);
+ printk(KERN_ERR "PCI: Device %s not available because of resource collisions\n", pci_name(dev));
return -EINVAL;
}
if (r->flags & IORESOURCE_IO)
r = &dev->resource[idx];
if (!r->start && r->end) {
printk(KERN_ERR "PCI: Device %s not available because "
- "of resource collisions\n", dev->slot_name);
+ "of resource collisions\n", pci_name(dev));
return -EINVAL;
}
if (r->flags & IORESOURCE_IO)
}
if (cmd != old_cmd) {
printk("PCI: Enabling device %s (%04x -> %04x)\n",
- dev->slot_name, old_cmd, cmd);
+ pci_name(dev), old_cmd, cmd);
pci_write_config_word(dev, PCI_COMMAND, cmd);
}
return 0;
printk(KERN_ERR
"PCI-DMA: Out of IOMMU space for %p size %lu at device %s[%s]\n",
- addr,size, dev ? dev->dev.name : "?", dev ? dev->slot_name : "?");
+ addr,size, dev ? dev->dev.name : "?", dev ? pci_name(dev) : "?");
if (size > PAGE_SIZE*EMERGENCY_PAGES) {
if (dir == PCI_DMA_FROMDEVICE || dir == PCI_DMA_BIDIRECTIONAL)
}
if (!irq) {
- ACPI_DEBUG_PRINT((ACPI_DB_WARN, "Unable to derive IRQ for device %s\n", dev->slot_name));
+ ACPI_DEBUG_PRINT((ACPI_DB_WARN, "Unable to derive IRQ for device %s\n", pci_name(dev)));
return_VALUE(0);
}
pci_read_config_byte(dev, PCI_INTERRUPT_PIN, &pin);
if (!pin) {
- ACPI_DEBUG_PRINT((ACPI_DB_INFO, "No interrupt pin configured for device %s\n", dev->slot_name));
+ ACPI_DEBUG_PRINT((ACPI_DB_INFO, "No interrupt pin configured for device %s\n", pci_name(dev)));
return_VALUE(0);
}
pin--;
* driver reported one, then use it. Exit in any case.
*/
if (!irq) {
- printk(KERN_WARNING PREFIX "No IRQ known for interrupt pin %c of device %s", ('A' + pin), dev->slot_name);
+ printk(KERN_WARNING PREFIX "No IRQ known for interrupt pin %c of device %s", ('A' + pin), pci_name(dev));
/* Interrupt Line values above 0xF are forbidden */
if (dev->irq && dev->irq >= 0xF) {
printk(" - using IRQ %d\n", dev->irq);
dev->irq = irq;
- ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Device %s using IRQ %d\n", dev->slot_name, dev->irq));
+ ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Device %s using IRQ %d\n", pci_name(dev), dev->irq));
/*
* Make sure all (legacy) PCI IRQs are set as level-triggered.
continue;
printk(KERN_INFO PFX "Putting AGP V%d device at %s into %dx mode\n",
- agp_v3 ? 3 : 2, device->slot_name, mode);
+ agp_v3 ? 3 : 2, pci_name(device), mode);
pci_write_config_dword(device, agp + PCI_AGP_COMMAND, command);
}
}
ctlp->AiopNumChan[aiop] = ports_per_aiop;
printk("Comtrol PCI controller #%d ID 0x%x found in bus:slot:fn %s at address %04lx, "
- "%d AIOP(s) (%s)\n", i, dev->device, dev->slot_name,
+ "%d AIOP(s) (%s)\n", i, dev->device, pci_name(dev),
rcktpt_io_addr[i], num_aiops, rocketModel[i].modelString);
printk(KERN_INFO "Installing %s, creating /dev/ttyR%d - %ld\n",
rocketModel[i].modelString,
if ((rc = pci_enable_device (pdev))) {
printk (KERN_ERR "pci_eisa : Could not enable device %s\n",
- pdev->slot_name);
+ pci_name(pdev));
return rc;
}
pci_read_config_byte(dev, PCI_REVISION_ID, &t);
printk(KERN_INFO "AMD_IDE: %s (rev %02x) %s controller on pci%s\n",
- dev->dev.name, t, amd_dma[amd_config->flags & AMD_UDMA], dev->slot_name);
+ dev->dev.name, t, amd_dma[amd_config->flags & AMD_UDMA], pci_name(dev));
/*
* Register /proc/ide/amd74xx entry
"controller on pci%s\n",
via_config->name, t,
via_dma[via_config->flags & VIA_UDMA],
- dev->slot_name);
+ pci_name(dev));
/*
* Setup /proc/ide/via entry.
if ((d->vendor != dev->vendor) && (d->device != dev->device)) {
printk(KERN_INFO "%s: unknown IDE controller at PCI slot "
"%s, VID=%04x, DID=%04x\n",
- d->name, dev->slot_name, dev->vendor, dev->device);
+ d->name, pci_name(dev), dev->vendor, dev->device);
} else {
printk(KERN_INFO "%s: IDE controller at PCI slot %s\n",
- d->name, dev->slot_name);
+ d->name, pci_name(dev));
}
}
port->read = cs461x_gameport_read;
port->cooked_read = cs461x_gameport_cooked_read;
- sprintf(phys, "pci%s/gameport0", pdev->slot_name);
+ sprintf(phys, "pci%s/gameport0", pci_name(pdev));
port->name = name;
port->phys = phys;
gameport_register_port(port);
printk(KERN_INFO "gameport: %s on pci%s speed %d kHz\n",
- name, pdev->slot_name, port->speed);
+ name, pci_name(pdev), port->speed);
return 0;
}
}
memset(emu, 0, sizeof(struct emu));
- sprintf(emu->phys, "pci%s/gameport0", pdev->slot_name);
+ sprintf(emu->phys, "pci%s/gameport0", pci_name(pdev));
emu->size = iolen;
emu->dev = pdev;
gameport_register_port(&emu->gameport);
printk(KERN_INFO "gameport: %s at pci%s speed %d kHz\n",
- pdev->dev.name, pdev->slot_name, emu->gameport.speed);
+ pdev->dev.name, pci_name(pdev), emu->gameport.speed);
return 0;
}
gameport_register_port(&gp->gameport);
printk(KERN_INFO "gameport: %s at pci%s speed %d kHz\n",
- pci->dev.name, pci->slot_name, gp->gameport.speed);
+ pci->dev.name, pci_name(pci), gp->gameport.speed);
return 0;
}
memset(vortex, 0, sizeof(struct vortex));
vortex->dev = dev;
- sprintf(vortex->phys, "pci%s/gameport0", dev->slot_name);
+ sprintf(vortex->phys, "pci%s/gameport0", pci_name(dev));
pci_set_drvdata(dev, vortex);
gameport_register_port(&vortex->gameport);
printk(KERN_INFO "gameport: %s at pci%s speed %d kHz\n",
- dev->dev.name, dev->slot_name, vortex->gameport.speed);
+ dev->dev.name, pci_name(dev), vortex->gameport.speed);
return 0;
}
adapter->irq = pdev->irq;
printk(KERN_INFO "hisax_fcpcipnp: found adapter %s at %s\n",
- (char *) ent->driver_data, pdev->slot_name);
+ (char *) ent->driver_data, pci_name(pdev));
retval = fcpcipnp_setup(adapter);
if (retval)
hfcpci_hw_init(adapter);
printk(KERN_INFO "hisax_hfcpci: found adapter %s at %s\n",
- (char *) ent->driver_data, pdev->slot_name);
+ (char *) ent->driver_data, pci_name(pdev));
return 0;
strcpy(cap->driver, "saa7146 v4l2");
strlcpy(cap->card, dev->ext->name, sizeof(cap->card));
- sprintf(cap->bus_info,"PCI:%s",dev->pci->slot_name);
+ sprintf(cap->bus_info,"PCI:%s",pci_name(dev->pci));
cap->version = SAA7146_VERSION_CODE;
cap->capabilities =
V4L2_CAP_VIDEO_CAPTURE |
return -EINVAL;
strcpy(cap->driver,"bttv");
strlcpy(cap->card,btv->video_dev.name,sizeof(cap->card));
- sprintf(cap->bus_info,"PCI:%s",btv->dev->slot_name);
+ sprintf(cap->bus_info,"PCI:%s",pci_name(btv->dev));
cap->version = BTTV_VERSION_CODE;
cap->capabilities =
V4L2_CAP_VIDEO_CAPTURE |
pci_read_config_byte(dev, PCI_CLASS_REVISION, &btv->revision);
pci_read_config_byte(dev, PCI_LATENCY_TIMER, &lat);
printk(KERN_INFO "bttv%d: Bt%d (rev %d) at %s, ",
- bttv_num,btv->id, btv->revision, dev->slot_name);
+ bttv_num,btv->id, btv->revision, pci_name(dev));
printk("irq: %d, latency: %d, mmio: 0x%lx\n",
btv->dev->irq, lat, pci_resource_start(dev,0));
pci_read_config_byte(pci_dev, PCI_LATENCY_TIMER, &dev->pci_lat);
printk(KERN_INFO "%s: found at %s, rev: %d, irq: %d, "
"latency: %d, mmio: 0x%lx\n", dev->name,
- pci_dev->slot_name, dev->pci_rev, pci_dev->irq,
+ pci_name(pci_dev), dev->pci_rev, pci_dev->irq,
dev->pci_lat,pci_resource_start(pci_dev,0));
pci_set_master(pci_dev);
if (!pci_dma_supported(pci_dev,0xffffffff)) {
strcpy(cap->driver, "saa7134");
strlcpy(cap->card, saa7134_boards[dev->board].name,
sizeof(cap->card));
- sprintf(cap->bus_info,"PCI:%s",dev->pci->slot_name);
+ sprintf(cap->bus_info,"PCI:%s",pci_name(dev->pci));
cap->version = SAA7134_VERSION_CODE;
cap->capabilities =
V4L2_CAP_VIDEO_CAPTURE |
strcpy(cap->driver, "saa7134");
strlcpy(cap->card, saa7134_boards[dev->board].name,
sizeof(cap->card));
- sprintf(cap->bus_info,"PCI:%s",dev->pci->slot_name);
+ sprintf(cap->bus_info,"PCI:%s",pci_name(dev->pci));
cap->version = SAA7134_VERSION_CODE;
cap->capabilities =
V4L2_CAP_VIDEO_CAPTURE |
strcpy(cap->driver, "saa7134");
strlcpy(cap->card, saa7134_boards[dev->board].name,
sizeof(cap->card));
- sprintf(cap->bus_info,"PCI:%s",dev->pci->slot_name);
+ sprintf(cap->bus_info,"PCI:%s",pci_name(dev->pci));
cap->version = SAA7134_VERSION_CODE;
cap->capabilities = V4L2_CAP_TUNER;
return 0;
pci_read_config_dword(dev, PCI_ROM_ADDRESS, &val);
val |= PCI_ROM_ADDRESS_ENABLE;
pci_write_config_dword(dev, PCI_ROM_ADDRESS, val);
- printk("%s: enabling expansion ROM\n", dev->slot_name);
+ printk("%s: enabling expansion ROM\n", pci_name(dev));
}
}
goto release;
map->map = mtd_pci_map;
- map->map.name = dev->slot_name;
+ map->map.name = pci_name(dev);
map->dev = dev;
map->exit = info->exit;
map->translate = info->translate;
if (gendev) {
if ((pdev = DEVICE_PCI(gendev))) {
- print_name = pdev->slot_name;
+ print_name = pci_name(pdev);
}
if ((edev = DEVICE_EISA(gendev))) {
strcpy(info.driver, DRV_NAME);
strcpy(info.version, DRV_VERSION);
if (VORTEX_PCI(vp))
- strcpy(info.bus_info, VORTEX_PCI(vp)->slot_name);
+ strcpy(info.bus_info, pci_name(VORTEX_PCI(vp)));
else {
if (VORTEX_EISA(vp))
sprintf (info.bus_info, vp->gendev->bus_id);
struct ethtool_drvinfo info = { ETHTOOL_GDRVINFO };
strcpy (info.driver, DRV_NAME);
strcpy (info.version, DRV_VERSION);
- strcpy (info.bus_info, cp->pdev->slot_name);
+ strcpy (info.bus_info, pci_name(cp->pdev));
info.regdump_len = CP_REGS_SIZE;
info.n_stats = CP_NUM_STATS;
if (copy_to_user (useraddr, &info, sizeof (info)))
if (pdev->vendor == PCI_VENDOR_ID_REALTEK &&
pdev->device == PCI_DEVICE_ID_REALTEK_8139 && pci_rev < 0x20) {
printk(KERN_ERR PFX "pci dev %s (id %04x:%04x rev %02x) is not an 8139C+ compatible chip\n",
- pdev->slot_name, pdev->vendor, pdev->device, pci_rev);
+ pci_name(pdev), pdev->vendor, pdev->device, pci_rev);
printk(KERN_ERR PFX "Try the \"8139too\" driver instead.\n");
return -ENODEV;
}
if (pdev->irq < 2) {
rc = -EIO;
printk(KERN_ERR PFX "invalid irq (%d) for pci dev %s\n",
- pdev->irq, pdev->slot_name);
+ pdev->irq, pci_name(pdev));
goto err_out_res;
}
pciaddr = pci_resource_start(pdev, 1);
if (!pciaddr) {
rc = -EIO;
printk(KERN_ERR PFX "no MMIO resource for pci dev %s\n",
- pdev->slot_name);
+ pci_name(pdev));
goto err_out_res;
}
if (pci_resource_len(pdev, 1) < CP_REGS_SIZE) {
rc = -EIO;
printk(KERN_ERR PFX "MMIO resource (%lx) too small on pci dev %s\n",
- pci_resource_len(pdev, 1), pdev->slot_name);
+ pci_resource_len(pdev, 1), pci_name(pdev));
goto err_out_res;
}
if (!regs) {
rc = -EIO;
printk(KERN_ERR PFX "Cannot map PCI MMIO (%lx@%lx) on pci dev %s\n",
- pci_resource_len(pdev, 1), pciaddr, pdev->slot_name);
+ pci_resource_len(pdev, 1), pciaddr, pci_name(pdev));
goto err_out_res;
}
dev->base_addr = (unsigned long) regs;
/* dev and dev->priv zeroed in alloc_etherdev */
dev = alloc_etherdev (sizeof (*tp));
if (dev == NULL) {
- printk (KERN_ERR PFX "%s: Unable to alloc new net device\n", pdev->slot_name);
+ printk (KERN_ERR PFX "%s: Unable to alloc new net device\n", pci_name(pdev));
return -ENOMEM;
}
SET_MODULE_OWNER(dev);
#ifdef USE_IO_OPS
/* make sure PCI base addr 0 is PIO */
if (!(pio_flags & IORESOURCE_IO)) {
- printk (KERN_ERR PFX "%s: region #0 not a PIO resource, aborting\n", pdev->slot_name);
+ printk (KERN_ERR PFX "%s: region #0 not a PIO resource, aborting\n", pci_name(pdev));
rc = -ENODEV;
goto err_out;
}
/* check for weird/broken PCI region reporting */
if (pio_len < RTL_MIN_IO_SIZE) {
- printk (KERN_ERR PFX "%s: Invalid PCI I/O region size(s), aborting\n", pdev->slot_name);
+ printk (KERN_ERR PFX "%s: Invalid PCI I/O region size(s), aborting\n", pci_name(pdev));
rc = -ENODEV;
goto err_out;
}
#else
/* make sure PCI base addr 1 is MMIO */
if (!(mmio_flags & IORESOURCE_MEM)) {
- printk (KERN_ERR PFX "%s: region #1 not an MMIO resource, aborting\n", pdev->slot_name);
+ printk (KERN_ERR PFX "%s: region #1 not an MMIO resource, aborting\n", pci_name(pdev));
rc = -ENODEV;
goto err_out;
}
if (mmio_len < RTL_MIN_IO_SIZE) {
- printk (KERN_ERR PFX "%s: Invalid PCI mem region size(s), aborting\n", pdev->slot_name);
+ printk (KERN_ERR PFX "%s: Invalid PCI mem region size(s), aborting\n", pci_name(pdev));
rc = -ENODEV;
goto err_out;
}
/* ioremap MMIO region */
ioaddr = ioremap (mmio_start, mmio_len);
if (ioaddr == NULL) {
- printk (KERN_ERR PFX "%s: cannot remap MMIO, aborting\n", pdev->slot_name);
+ printk (KERN_ERR PFX "%s: cannot remap MMIO, aborting\n", pci_name(pdev));
rc = -EIO;
goto err_out;
}
/* check for missing/broken hardware */
if (RTL_R32 (TxConfig) == 0xFFFFFFFF) {
printk (KERN_ERR PFX "%s: Chip not responding, ignoring board\n",
- pdev->slot_name);
+ pci_name(pdev));
rc = -EIO;
goto err_out;
}
/* if unknown chip, assume array element #0, original RTL-8139 in this case */
printk (KERN_DEBUG PFX "%s: unknown chip version, assuming RTL-8139\n",
- pdev->slot_name);
- printk (KERN_DEBUG PFX "%s: TxConfig = 0x%lx\n", pdev->slot_name, RTL_R32 (TxConfig));
+ pci_name(pdev));
+ printk (KERN_DEBUG PFX "%s: TxConfig = 0x%lx\n", pci_name(pdev), RTL_R32 (TxConfig));
tp->chipset = 0;
match:
if (pdev->vendor == PCI_VENDOR_ID_REALTEK &&
pdev->device == PCI_DEVICE_ID_REALTEK_8139 && pci_rev >= 0x20) {
printk(KERN_INFO PFX "pci dev %s (id %04x:%04x rev %02x) is an enhanced 8139C+ chip\n",
- pdev->slot_name, pdev->vendor, pdev->device, pci_rev);
+ pci_name(pdev), pdev->vendor, pdev->device, pci_rev);
printk(KERN_INFO PFX "Use the \"8139cp\" driver for improved performance and stability.\n");
}
struct ethtool_drvinfo info = { ETHTOOL_GDRVINFO };
strcpy (info.driver, DRV_NAME);
strcpy (info.version, DRV_VERSION);
- strcpy (info.bus_info, np->pci_dev->slot_name);
+ strcpy (info.bus_info, pci_name(np->pci_dev));
info.regdump_len = np->regs_len;
if (copy_to_user (useraddr, &info, sizeof (info)))
return -EFAULT;
tigonFwReleaseFix);
strncpy(info.version, version, sizeof(info.version) - 1);
if (ap && ap->pdev)
- strcpy(info.bus_info, ap->pdev->slot_name);
+ strcpy(info.bus_info, pci_name(ap->pdev));
if (copy_to_user(ifr->ifr_data, &info, sizeof(info)))
return -EFAULT;
return 0;
strcpy (info.version, MODULE_VERSION);
memset(&info.fw_version, 0, sizeof(info.fw_version));
sprintf(info.fw_version,"%u",chip_version);
- strcpy (info.bus_info, pci_dev->slot_name);
+ strcpy (info.bus_info, pci_name(pci_dev));
info.eedump_len = 0;
info.regdump_len = AMD8111E_REG_DUMP_LEN;
if (copy_to_user (useraddr, &info, sizeof(info)))
strcpy (info.driver, DRV_MODULE_NAME);
strcpy (info.version, DRV_MODULE_VERSION);
memset(&info.fw_version, 0, sizeof(info.fw_version));
- strcpy (info.bus_info, pci_dev->slot_name);
+ strcpy (info.bus_info, pci_name(pci_dev));
info.eedump_len = 0;
info.regdump_len = 0;
if (copy_to_user (useraddr, &info, sizeof (info)))
struct ethtool_drvinfo info = { ETHTOOL_GDRVINFO };
strcpy(info.driver, "DL2K");
strcpy(info.version, DRV_VERSION);
- strcpy(info.bus_info, np->pdev->slot_name);
+ strcpy(info.bus_info, pci_name(np->pdev));
memset(&info.fw_version, 0, sizeof(info.fw_version));
if (copy_to_user(useraddr, &info, sizeof(info)))
return -EFAULT;
strncpy(info.version, e100_driver_version, sizeof (info.version) - 1);
strncpy(info.fw_version, "N/A",
sizeof (info.fw_version) - 1);
- strncpy(info.bus_info, bdp->pdev->slot_name,
+ strncpy(info.bus_info, pci_name(bdp->pdev),
sizeof (info.bus_info) - 1);
info.n_stats = E100_STATS_LEN;
info.regdump_len = E100_REGS_LEN * sizeof(u32);
strncpy(drvinfo->driver, e1000_driver_name, 32);
strncpy(drvinfo->version, e1000_driver_version, 32);
strncpy(drvinfo->fw_version, "N/A", 32);
- strncpy(drvinfo->bus_info, adapter->pdev->slot_name, 32);
+ strncpy(drvinfo->bus_info, pci_name(adapter->pdev), 32);
drvinfo->n_stats = E1000_STATS_LEN;
drvinfo->testinfo_len = E1000_TEST_LEN;
#define E1000_REGS_LEN 32
strncpy(info.driver, "eepro100", sizeof(info.driver)-1);
strncpy(info.version, version, sizeof(info.version)-1);
if (sp && sp->pdev)
- strcpy(info.bus_info, sp->pdev->slot_name);
+ strcpy(info.bus_info, pci_name(sp->pdev));
if (copy_to_user(useraddr, &info, sizeof(info)))
return -EFAULT;
return 0;
if (debug > 2) {
printk(KERN_DEBUG DRV_NAME "(%s): EEPROM contents\n",
- pdev->slot_name);
+ pci_name(pdev));
for (i = 0; i < 64; i++)
printk(" %4.4x%s", read_eeprom(ioaddr, i),
i % 16 == 15 ? "\n" : "");
ep->phys[phy_idx++] = phy;
printk(KERN_INFO DRV_NAME "(%s): MII transceiver #%d control "
"%4.4x status %4.4x.\n",
- pdev->slot_name, phy, mdio_read(dev, phy, 0), mii_status);
+ pci_name(pdev), phy, mdio_read(dev, phy, 0), mii_status);
}
}
ep->mii_phy_cnt = phy_idx;
ep->mii.advertising = mdio_read(dev, phy, MII_ADVERTISE);
printk(KERN_INFO DRV_NAME "(%s): Autonegotiation advertising %4.4x link "
"partner %4.4x.\n",
- pdev->slot_name, ep->mii.advertising, mdio_read(dev, phy, 5));
+ pci_name(pdev), ep->mii.advertising, mdio_read(dev, phy, 5));
} else if ( ! (ep->chip_flags & NO_MII)) {
printk(KERN_WARNING DRV_NAME "(%s): ***WARNING***: No MII transceiver found!\n",
- pdev->slot_name);
+ pci_name(pdev));
/* Use the known PHY address of the EPII. */
ep->phys[0] = 3;
}
if (duplex) {
ep->mii.force_media = ep->mii.full_duplex = 1;
printk(KERN_INFO DRV_NAME "(%s): Forced full duplex operation requested.\n",
- pdev->slot_name);
+ pci_name(pdev));
}
dev->if_port = ep->default_port = option;
struct ethtool_drvinfo info = { ETHTOOL_GDRVINFO };
strcpy (info.driver, DRV_NAME);
strcpy (info.version, DRV_VERSION);
- strcpy (info.bus_info, np->pci_dev->slot_name);
+ strcpy (info.bus_info, pci_name(np->pci_dev));
if (copy_to_user (useraddr, &info, sizeof (info)))
return -EFAULT;
return 0;
struct ethtool_drvinfo info = { ETHTOOL_GDRVINFO };
strcpy (info.driver, DRV_NAME);
strcpy (info.version, DRV_VERSION);
- strcpy (info.bus_info, np->pci_dev->slot_name);
+ strcpy (info.bus_info, pci_name(np->pci_dev));
if (copy_to_user (useraddr, &info, sizeof (info)))
return -EFAULT;
return 0;
struct ethtool_drvinfo info = {ETHTOOL_GDRVINFO};
strcpy(info.driver, DRV_NAME);
strcpy(info.version, DRV_VERSION);
- strcpy(info.bus_info, np->pci_dev->slot_name);
+ strcpy(info.bus_info, pci_name(np->pci_dev));
if (copy_to_user(useraddr, &info, sizeof(info)))
return -EFAULT;
return 0;
ioc3 = (struct ioc3 *) ioremap(ioc3_base, ioc3_size);
if (!ioc3) {
printk(KERN_CRIT "ioc3eth(%s): ioremap failed, goodbye.\n",
- pdev->slot_name);
+ pci_name(pdev));
err = -ENOMEM;
goto out_res;
}
if (ip->phy == -1) {
printk(KERN_CRIT "ioc3-eth(%s): Didn't find a PHY, goodbye.\n",
- pdev->slot_name);
+ pci_name(pdev));
err = -ENODEV;
goto out_stop;
}
strncpy(drvinfo->driver, ixgb_driver_name, 32);
strncpy(drvinfo->version, ixgb_driver_version, 32);
strncpy(drvinfo->fw_version, "", 32);
- strncpy(drvinfo->bus_info, adapter->pdev->slot_name, 32);
+ strncpy(drvinfo->bus_info, pci_name(adapter->pdev), 32);
#ifdef ETHTOOL_GREGS
drvinfo->regdump_len = IXGB_REG_DUMP_LEN;
#endif /* ETHTOOL_GREGS */
strncpy(info.driver, DRV_NAME, ETHTOOL_BUSINFO_LEN);
strncpy(info.version, DRV_VERSION, ETHTOOL_BUSINFO_LEN);
info.fw_version[0] = '\0';
- strncpy(info.bus_info, np->pci_dev->slot_name,
+ strncpy(info.bus_info, pci_name(np->pci_dev),
ETHTOOL_BUSINFO_LEN);
info.eedump_len = NATSEMI_EEPROM_SIZE;
info.regdump_len = NATSEMI_REGS_SIZE;
/* Allocate dev->priv and fill in 8390 specific dev fields. */
if (ethdev_init(dev)) {
printk (KERN_ERR "ne2kpci(%s): unable to get memory for dev->priv.\n",
- pdev->slot_name);
+ pci_name(pdev));
goto err_out_free_netdev;
}
struct ethtool_drvinfo info = {ETHTOOL_GDRVINFO};
strcpy(info.driver, DRV_NAME);
strcpy(info.version, DRV_VERSION);
- strcpy(info.bus_info, pci_dev->slot_name);
+ strcpy(info.bus_info, pci_name(pci_dev));
if (copy_to_user(useraddr, &info, sizeof(info)))
return -EFAULT;
return 0;
struct ethtool_drvinfo info = { ETHTOOL_GDRVINFO };
strcpy(info.driver, "ns83820");
strcpy(info.version, VERSION);
- strcpy(info.bus_info, dev->pci_dev->slot_name);
+ strcpy(info.bus_info, pci_name(dev->pci_dev));
if (copy_to_user(useraddr, &info, sizeof (info)))
return -EFAULT;
return 0;
/* if unknown chip, assume array element #0, original RTL-8139 in this case */
printk (KERN_DEBUG PFX "PCI device %s: unknown chip version, assuming RTL-8139\n",
- pdev->slot_name);
- printk (KERN_DEBUG PFX "PCI device %s: TxConfig = 0x%lx\n", pdev->slot_name, NETDRV_R32 (TxConfig));
+ pci_name(pdev));
+ printk (KERN_DEBUG PFX "PCI device %s: TxConfig = 0x%lx\n", pci_name(pdev), NETDRV_R32 (TxConfig));
tp->chipset = 0;
match:
strcpy (info.driver, DRV_NAME);
strcpy (info.version, DRV_VERSION);
if (lp->pci_dev)
- strcpy (info.bus_info, lp->pci_dev->slot_name);
+ strcpy (info.bus_info, pci_name(lp->pci_dev));
else
sprintf(info.bus_info, "VLB 0x%lx", dev->base_addr);
if (copy_to_user (useraddr, &info, sizeof (info)))
//if unknown chip, assume array element #0, original RTL-8169 in this case
printk(KERN_DEBUG PFX
"PCI device %s: unknown chip version, assuming RTL-8169\n",
- pdev->slot_name);
+ pci_name(pdev));
printk(KERN_DEBUG PFX "PCI device %s: TxConfig = 0x%lx\n",
- pdev->slot_name, (unsigned long) RTL_R32(TxConfig));
+ pci_name(pdev), (unsigned long) RTL_R32(TxConfig));
tp->chipset = 0;
match:
struct ethtool_drvinfo info = { ETHTOOL_GDRVINFO };
strcpy (info.driver, SIS900_MODULE_NAME);
strcpy (info.version, SIS900_DRV_VERSION);
- strcpy (info.bus_info, sis_priv->pci_dev->slot_name);
+ strcpy (info.bus_info, pci_name(sis_priv->pci_dev));
if (copy_to_user (useraddr, &info, sizeof (info)))
return -EFAULT;
return 0;
#define netif_start_if(dev)
#define netif_stop_if(dev)
-#define PCI_SLOT_NAME(pci_dev) (pci_dev)->slot_name
+#define PCI_SLOT_NAME(pci_dev) pci_name(pci_dev)
#endif /* LINUX_VERSION_CODE > 0x20300 */
struct ethtool_drvinfo info = {ETHTOOL_GDRVINFO};
strcpy(info.driver, DRV_NAME);
strcpy(info.version, DRV_VERSION);
- strcpy(info.bus_info, np->pci_dev->slot_name);
+ strcpy(info.bus_info, pci_name(np->pci_dev));
memset(&info.fw_version, 0, sizeof(info.fw_version));
if (copy_to_user(useraddr, &info, sizeof(info)))
return -EFAULT;
strncpy(info.driver, DRV_NAME, ETHTOOL_BUSINFO_LEN);
strncpy(info.version, DRV_VERSION, ETHTOOL_BUSINFO_LEN);
info.fw_version[0] = '\0';
- strncpy(info.bus_info, gp->pdev->slot_name, ETHTOOL_BUSINFO_LEN);
+ strncpy(info.bus_info, pci_name(gp->pdev), ETHTOOL_BUSINFO_LEN);
info.regdump_len = 0; /*SUNGEM_NREGS;*/
if (copy_to_user(ep_user, &info, sizeof(info)))
strcpy (info.driver, DRV_MODULE_NAME);
strcpy (info.version, DRV_MODULE_VERSION);
memset(&info.fw_version, 0, sizeof(info.fw_version));
- strcpy (info.bus_info, pci_dev->slot_name);
+ strcpy (info.bus_info, pci_name(pci_dev));
info.eedump_len = 0;
info.regdump_len = TG3_REGDUMP_LEN;
if (copy_to_user (useraddr, &info, sizeof (info)))
err = tg3_set_power_state(tp, 0);
if (err) {
printk(KERN_ERR PFX "(%s) transition to D0 failed\n",
- tp->pdev->slot_name);
+ pci_name(tp->pdev));
return err;
}
err = tg3_phy_probe(tp);
if (err) {
printk(KERN_ERR PFX "(%s) phy probe failed, err %d\n",
- tp->pdev->slot_name, err);
+ pci_name(tp->pdev), err);
/* ... but do not return immediately ... */
}
struct ethtool_drvinfo info = { ETHTOOL_GDRVINFO };
strcpy (info.driver, DRV_NAME);
strcpy (info.version, DRV_VERSION);
- strcpy (info.bus_info, de->pdev->slot_name);
+ strcpy (info.bus_info, pci_name(de->pdev));
info.eedump_len = DE_EEPROM_SIZE;
info.regdump_len = DE_REGS_SIZE;
if (copy_to_user (useraddr, &info, sizeof (info)))
if (pdev->irq < 2) {
rc = -EIO;
printk(KERN_ERR PFX "invalid irq (%d) for pci dev %s\n",
- pdev->irq, pdev->slot_name);
+ pdev->irq, pci_name(pdev));
goto err_out_res;
}
if (!pciaddr) {
rc = -EIO;
printk(KERN_ERR PFX "no MMIO resource for pci dev %s\n",
- pdev->slot_name);
+ pci_name(pdev));
goto err_out_res;
}
if (pci_resource_len(pdev, 1) < DE_REGS_SIZE) {
rc = -EIO;
printk(KERN_ERR PFX "MMIO resource (%lx) too small on pci dev %s\n",
- pci_resource_len(pdev, 1), pdev->slot_name);
+ pci_resource_len(pdev, 1), pci_name(pdev));
goto err_out_res;
}
if (!regs) {
rc = -EIO;
printk(KERN_ERR PFX "Cannot map PCI MMIO (%lx@%lx) on pci dev %s\n",
- pci_resource_len(pdev, 1), pciaddr, pdev->slot_name);
+ pci_resource_len(pdev, 1), pciaddr, pci_name(pdev));
goto err_out_res;
}
dev->base_addr = (unsigned long) regs;
rc = de_reset_mac(de);
if (rc) {
printk(KERN_ERR PFX "Cannot reset MAC, pci dev %s\n",
- pdev->slot_name);
+ pci_name(pdev));
goto err_out_iomap;
}
printk(KERN_INFO "%s: Davicom DM%04lx at pci%s,",
dev->name,
ent->driver_data >> 16,
- pdev->slot_name);
+ pci_name(pdev));
for (i = 0; i < 6; i++)
printk("%c%02x", i ? ':' : ' ', dev->dev_addr[i]);
printk(", irq %d.\n", dev->irq);
strcpy(info.driver, DRV_NAME);
strcpy(info.version, DRV_VERSION);
if (db->pdev)
- strcpy(info.bus_info, db->pdev->slot_name);
+ strcpy(info.bus_info, pci_name(db->pdev));
else
sprintf(info.bus_info, "EISA 0x%lx %d",
dev->base_addr, dev->irq);
struct ethtool_drvinfo info = {ETHTOOL_GDRVINFO};
strcpy(info.driver, DRV_NAME);
strcpy(info.version, DRV_VERSION);
- strcpy(info.bus_info, np->pdev->slot_name);
+ strcpy(info.bus_info, pci_name(np->pdev));
if (copy_to_user(useraddr, &info, sizeof(info)))
return -EFAULT;
return 0;
u32 csr0;
if (tulip_debug > 3)
- printk(KERN_DEBUG "%s: tulip_mwi_config()\n", pdev->slot_name);
+ printk(KERN_DEBUG "%s: tulip_mwi_config()\n", pci_name(pdev));
tp->csr0 = csr0 = 0;
tp->csr0 = csr0;
if (tulip_debug > 2)
printk(KERN_DEBUG "%s: MWI config cacheline=%d, csr0=%08x\n",
- pdev->slot_name, cache, csr0);
+ pci_name(pdev), cache, csr0);
}
#endif
SET_NETDEV_DEV(dev, &pdev->dev);
if (pci_resource_len (pdev, 0) < tulip_tbl[chip_idx].io_size) {
printk (KERN_ERR PFX "%s: I/O region (0x%lx@0x%lx) too small, "
- "aborting\n", pdev->slot_name,
+ "aborting\n", pci_name(pdev),
pci_resource_len (pdev, 0),
pci_resource_start (pdev, 0));
goto err_out_free_netdev;
if (pci_set_dma_mask(pdev,0xFFFFffff)) {
printk(KERN_WARNING "Winbond-840: Device %s disabled due to DMA limitations.\n",
- pdev->slot_name);
+ pci_name(pdev));
return -EIO;
}
dev = alloc_etherdev(sizeof(*np));
struct ethtool_drvinfo info = {ETHTOOL_GDRVINFO};
strcpy(info.driver, DRV_NAME);
strcpy(info.version, DRV_VERSION);
- strcpy(info.bus_info, np->pci_dev->slot_name);
+ strcpy(info.bus_info, pci_name(np->pci_dev));
if (copy_to_user(useraddr, &info, sizeof(info)))
return -EFAULT;
return 0;
printk(version);
#endif
- //printk(KERN_INFO "xircom_init_one(%s)\n", pdev->slot_name);
+ //printk(KERN_INFO "xircom_init_one(%s)\n", pci_name(pdev));
board_idx++;
strcpy(info.driver, DRV_NAME);
strcpy(info.version, DRV_VERSION);
*info.fw_version = 0;
- strcpy(info.bus_info, tp->pdev->slot_name);
+ strcpy(info.bus_info, pci_name(tp->pdev));
if (copy_to_user(useraddr, &info, sizeof(info)))
return -EFAULT;
return 0;
strcpy(info->driver, DRV_MODULE_NAME);
strcpy(info->version, DRV_MODULE_VERSION);
- strcpy(info->bus_info, pci_dev->slot_name);
+ strcpy(info->bus_info, pci_name(pci_dev));
}
static inline void
dev = alloc_etherdev(sizeof(*tp));
if(dev == NULL) {
printk(ERR_PFX "%s: unable to alloc new net device\n",
- pdev->slot_name);
+ pci_name(pdev));
err = -ENOMEM;
goto error_out;
}
err = pci_enable_device(pdev);
if(err < 0) {
printk(ERR_PFX "%s: unable to enable device\n",
- pdev->slot_name);
+ pci_name(pdev));
goto error_out_dev;
}
err = pci_set_dma_mask(pdev, 0xffffffffULL);
if(err < 0) {
printk(ERR_PFX "%s: No usable DMA configuration\n",
- pdev->slot_name);
+ pci_name(pdev));
goto error_out_dev;
}
if(!(pci_resource_flags(pdev, 1) & IORESOURCE_MEM)) {
printk(ERR_PFX
"%s: region #1 not a PCI MMIO resource, aborting\n",
- pdev->slot_name);
+ pci_name(pdev));
err = -ENODEV;
goto error_out_dev;
}
if(pci_resource_len(pdev, 1) < 128) {
printk(ERR_PFX "%s: Invalid PCI MMIO region size, aborting\n",
- pdev->slot_name);
+ pci_name(pdev));
err = -ENODEV;
goto error_out_dev;
}
err = pci_request_regions(pdev, "typhoon");
if(err < 0) {
printk(ERR_PFX "%s: could not request regions\n",
- pdev->slot_name);
+ pci_name(pdev));
goto error_out_dev;
}
ioaddr = (unsigned long) ioremap(ioaddr, 128);
if(!ioaddr) {
printk(ERR_PFX "%s: cannot remap MMIO, aborting\n",
- pdev->slot_name);
+ pci_name(pdev));
err = -EIO;
goto error_out_regions;
}
&shared_dma);
if(!shared) {
printk(ERR_PFX "%s: could not allocate DMA memory\n",
- pdev->slot_name);
+ pci_name(pdev));
err = -ENOMEM;
goto error_out_remap;
}
* 5) Put the card to sleep.
*/
if(typhoon_reset(ioaddr, WaitSleep) < 0) {
- printk(ERR_PFX "%s: could not reset 3XP\n", pdev->slot_name);
+ printk(ERR_PFX "%s: could not reset 3XP\n", pci_name(pdev));
err = -EIO;
goto error_out_dma;
}
* use some common routines to initialize the card. So that those
* routines print the right name, we keep our oun pointer to the name
*/
- tp->name = pdev->slot_name;
+ tp->name = pci_name(pdev);
typhoon_init_interface(tp);
typhoon_init_rings(tp);
if(typhoon_boot_3XP(tp, TYPHOON_STATUS_WAITING_FOR_HOST) < 0) {
printk(ERR_PFX "%s: cannot boot 3XP sleep image\n",
- pdev->slot_name);
+ pci_name(pdev));
err = -EIO;
goto error_out_reset;
}
INIT_COMMAND_WITH_RESPONSE(&xp_cmd, TYPHOON_CMD_READ_MAC_ADDRESS);
if(typhoon_issue_command(tp, 1, &xp_cmd, 1, &xp_resp) < 0) {
printk(ERR_PFX "%s: cannot read MAC address\n",
- pdev->slot_name);
+ pci_name(pdev));
err = -EIO;
goto error_out_reset;
}
if(!is_valid_ether_addr(dev->dev_addr)) {
printk(ERR_PFX "%s: Could not obtain valid ethernet address, "
- "aborting\n", pdev->slot_name);
+ "aborting\n", pci_name(pdev));
goto error_out_reset;
}
if(typhoon_sleep(tp, 3, 0) < 0) {
printk(ERR_PFX "%s: cannot put adapter to sleep\n",
- pdev->slot_name);
+ pci_name(pdev));
err = -EIO;
goto error_out_reset;
}
ioaddr = (long) ioremap (memaddr, io_size);
if (!ioaddr) {
printk (KERN_ERR "ioremap failed for device %s, region 0x%X @ 0x%lX\n",
- pdev->slot_name, io_size, memaddr);
+ pci_name(pdev), io_size, memaddr);
goto err_out_free_res;
}
struct ethtool_drvinfo info = { ETHTOOL_GDRVINFO };
strcpy (info.driver, DRV_NAME);
strcpy (info.version, DRV_VERSION);
- strcpy (info.bus_info, np->pdev->slot_name);
+ strcpy (info.bus_info, pci_name(np->pdev));
if (copy_to_user (useraddr, &info, sizeof (info)))
return -EFAULT;
return 0;
printk(KERN_DEBUG
"Detected Orinoco/Prism2 PCI device at %s, mem:0x%lX to 0x%lX -> 0x%p, irq:%d\n",
- pdev->slot_name, dev->mem_start, dev->mem_end, pci_ioaddr, pdev->irq);
+ pci_name(pdev), dev->mem_start, dev->mem_end, pci_ioaddr, pdev->irq);
hermes_struct_init(&priv->hw, dev->base_addr,
HERMES_MEM, HERMES_32BIT_REGSPACING);
printk(KERN_DEBUG
"Detected Orinoco/Prism2 PLX device at %s irq:%d, io addr:0x%lx\n",
- pdev->slot_name, pdev->irq, pccard_ioaddr);
+ pci_name(pdev), pdev->irq, pccard_ioaddr);
hermes_struct_init(&(priv->hw), dev->base_addr,
HERMES_IO, HERMES_16BIT_REGSPACING);
printk(KERN_DEBUG
"Detected Orinoco/Prism2 TMD device at %s irq:%d, io addr:0x%lx\n",
- pdev->slot_name, pdev->irq, pccard_ioaddr);
+ pci_name(pdev), pdev->irq, pccard_ioaddr);
hermes_struct_init(&(priv->hw), dev->base_addr,
HERMES_IO, HERMES_16BIT_REGSPACING);
struct ethtool_drvinfo info = {ETHTOOL_GDRVINFO};
strcpy(info.driver, DRV_NAME);
strcpy(info.version, DRV_VERSION);
- strcpy(info.bus_info, np->pci_dev->slot_name);
+ strcpy(info.bus_info, pci_name(np->pci_dev));
if (copy_to_user(useraddr, &info, sizeof(info)))
return -EFAULT;
return 0;
if (dev->resource[i].flags & srch_flags) {
pci_claim_resource(dev, i);
DBG(" claimed %s %d [%lx,%lx]/%x\n",
- dev->slot_name, i,
+ pci_name(dev), i,
dev->resource[i].start,
dev->resource[i].end,
(int) dev->resource[i].flags
}
printk (KERN_INFO "SuperIO: Found NS87560 Legacy I/O device at %s (IRQ %i) \n",
- pdev->slot_name,sio->iosapic_irq);
+ pci_name(pdev),sio->iosapic_irq);
/* Find our I/O devices */
pci_read_config_word (pdev, SIO_SP1BAR, &sio->sp1_base);
return -1;
}
printk("superio_fixup_irq(%s) ven 0x%x dev 0x%x from %p\n",
- pcidev->slot_name,
+ pci_name(pcidev),
pcidev->vendor, pcidev->device,
__builtin_return_address(0));
#endif
{
#ifdef DEBUG_INIT
printk("superio_probe(%s) ven 0x%x dev 0x%x sv 0x%x sd 0x%x class 0x%x\n",
- dev->slot_name,
+ pci_name(dev),
dev->vendor, dev->device,
dev->subsystem_vendor, dev->subsystem_device,
dev->class);
if (request_resource(root, res) == 0)
return;
printk(KERN_INFO "yenta %s: Preassigned resource %d busy, reconfiguring...\n",
- socket->dev->slot_name, nr);
+ pci_name(socket->dev), nr);
res->start = res->end = 0;
}
align = size;
} while (size >= min);
printk(KERN_INFO "yenta %s: no resource of type %x available, trying to continue...\n",
- socket->dev->slot_name, type);
+ pci_name(socket->dev), type);
res->start = res->end = 0;
}
#define IPS_SCSI_SET_DEVICE(sh,ha) scsi_set_pci_device(sh, (ha)->pcidev)
#define IPS_PRINTK(level, pcidev, format, arg...) \
printk(level "%s %s:" format , (pcidev)->driver->name , \
- (pcidev)->slot_name , ## arg)
+ pci_name(pcidev) , ## arg)
#else
#define IPS_REGISTER_HOSTS(SHT) (!ips_detect(SHT))
#define IPS_UNREGISTER_HOSTS(SHT)
ret = nsp32_detect(pdev);
nsp32_msg(KERN_INFO, "nsp32 irq: %i mmio: 0x%lx slot: %s model: %s",
- pdev->irq, data->MmioAddress, pdev->slot_name,
+ pdev->irq, data->MmioAddress, pci_name(pdev),
nsp32_model[id->driver_data]);
nsp32_dbg(NSP32_DEBUG_REGISTER, "exit");
KERN_WARNING "message (0x%04x,0x%04x,0x%04x,0x%04x), the\n"
KERN_WARNING "manufacturer and name of serial board or\n"
KERN_WARNING "modem board to rmk+serial@arm.linux.org.uk.\n",
- dev->slot_name, str, dev->vendor, dev->device,
+ pci_name(dev), str, dev->vendor, dev->device,
dev->subsystem_vendor, dev->subsystem_device);
}
memset(&r, 0, sizeof(r));
strcpy(r.driver, "matroxfb");
strcpy(r.card, "Matrox");
- sprintf(r.bus_info, "PCI:%s", ACCESS_FBINFO(pcidev)->slot_name);
+ sprintf(r.bus_info, "PCI:%s", pci_name(ACCESS_FBINFO(pcidev)));
r.version = KERNEL_VERSION(1,0,0);
r.capabilities = V4L2_CAP_VIDEO_OUTPUT;
if (copy_to_user((void*)arg, &r, sizeof(r)))
char version[32]; /* driver version string */
char fw_version[32]; /* firmware version string, if applicable */
char bus_info[ETHTOOL_BUSINFO_LEN]; /* Bus info for this IF. */
- /* For PCI devices, use pci_dev->slot_name. */
+ /* For PCI devices, use pci_name(pci_dev). */
char reserved1[32];
char reserved2[16];
u32 n_stats; /* number of u64's from ETHTOOL_GSTATS */
{
__u8 driver[16]; /* i.e. "bttv" */
__u8 card[32]; /* i.e. "Hauppauge WinTV" */
- __u8 bus_info[32]; /* "PCI:" + pci_dev->slot_name */
+ __u8 bus_info[32]; /* "PCI:" + pci_name(pci_dev) */
__u32 version; /* should use KERNEL_VERSION() */
__u32 capabilities; /* Device capabilities */
__u32 reserved[4];