Commit 7c7459d1 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman

[PATCH] 64bit resource: fix up printks for resources in networks drivers

This is needed if we wish to change the size of the resource structures.

Based on an original patch from Vivek Goyal <vgoyal@in.ibm.com>

Cc: Vivek Goyal <vgoyal@in.ibm.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent aa0a2ddc
...@@ -1408,8 +1408,10 @@ static int __devinit vortex_probe1(struct device *gendev, ...@@ -1408,8 +1408,10 @@ static int __devinit vortex_probe1(struct device *gendev,
} }
if (print_info) { if (print_info) {
printk(KERN_INFO "%s: CardBus functions mapped %8.8lx->%p\n", printk(KERN_INFO "%s: CardBus functions mapped "
print_name, pci_resource_start(pdev, 2), "%16.16llx->%p\n",
print_name,
(unsigned long long)pci_resource_start(pdev, 2),
vp->cb_fn_base); vp->cb_fn_base);
} }
EL3WINDOW(2); EL3WINDOW(2);
......
...@@ -1883,8 +1883,8 @@ static int cp_init_one (struct pci_dev *pdev, const struct pci_device_id *ent) ...@@ -1883,8 +1883,8 @@ static int cp_init_one (struct pci_dev *pdev, const struct pci_device_id *ent)
} }
if (pci_resource_len(pdev, 1) < CP_REGS_SIZE) { if (pci_resource_len(pdev, 1) < CP_REGS_SIZE) {
rc = -EIO; rc = -EIO;
printk(KERN_ERR PFX "MMIO resource (%lx) too small on pci dev %s\n", printk(KERN_ERR PFX "MMIO resource (%llx) too small on pci dev %s\n",
pci_resource_len(pdev, 1), pci_name(pdev)); (unsigned long long)pci_resource_len(pdev, 1), pci_name(pdev));
goto err_out_res; goto err_out_res;
} }
...@@ -1916,8 +1916,9 @@ static int cp_init_one (struct pci_dev *pdev, const struct pci_device_id *ent) ...@@ -1916,8 +1916,9 @@ static int cp_init_one (struct pci_dev *pdev, const struct pci_device_id *ent)
regs = ioremap(pciaddr, CP_REGS_SIZE); regs = ioremap(pciaddr, CP_REGS_SIZE);
if (!regs) { if (!regs) {
rc = -EIO; rc = -EIO;
printk(KERN_ERR PFX "Cannot map PCI MMIO (%lx@%lx) on pci dev %s\n", printk(KERN_ERR PFX "Cannot map PCI MMIO (%llx@%llx) on pci dev %s\n",
pci_resource_len(pdev, 1), pciaddr, pci_name(pdev)); (unsigned long long)pci_resource_len(pdev, 1),
(unsigned long long)pciaddr, pci_name(pdev));
goto err_out_res; goto err_out_res;
} }
dev->base_addr = (unsigned long) regs; dev->base_addr = (unsigned long) regs;
......
...@@ -1341,9 +1341,9 @@ static int rtl8139_open (struct net_device *dev) ...@@ -1341,9 +1341,9 @@ static int rtl8139_open (struct net_device *dev)
netif_start_queue (dev); netif_start_queue (dev);
if (netif_msg_ifup(tp)) if (netif_msg_ifup(tp))
printk(KERN_DEBUG "%s: rtl8139_open() ioaddr %#lx IRQ %d" printk(KERN_DEBUG "%s: rtl8139_open() ioaddr %#llx IRQ %d"
" GP Pins %2.2x %s-duplex.\n", " GP Pins %2.2x %s-duplex.\n", dev->name,
dev->name, pci_resource_start (tp->pci_dev, 1), (unsigned long long)pci_resource_start (tp->pci_dev, 1),
dev->irq, RTL_R8 (MediaStatus), dev->irq, RTL_R8 (MediaStatus),
tp->mii.full_duplex ? "full" : "half"); tp->mii.full_duplex ? "full" : "half");
......
...@@ -2678,9 +2678,9 @@ static int __devinit e100_probe(struct pci_dev *pdev, ...@@ -2678,9 +2678,9 @@ static int __devinit e100_probe(struct pci_dev *pdev,
goto err_out_free; goto err_out_free;
} }
DPRINTK(PROBE, INFO, "addr 0x%lx, irq %d, " DPRINTK(PROBE, INFO, "addr 0x%llx, irq %d, "
"MAC addr %02X:%02X:%02X:%02X:%02X:%02X\n", "MAC addr %02X:%02X:%02X:%02X:%02X:%02X\n",
pci_resource_start(pdev, 0), pdev->irq, (unsigned long long)pci_resource_start(pdev, 0), pdev->irq,
netdev->dev_addr[0], netdev->dev_addr[1], netdev->dev_addr[2], netdev->dev_addr[0], netdev->dev_addr[1], netdev->dev_addr[2],
netdev->dev_addr[3], netdev->dev_addr[4], netdev->dev_addr[5]); netdev->dev_addr[3], netdev->dev_addr[4], netdev->dev_addr[5]);
......
...@@ -3354,8 +3354,8 @@ static int __devinit skge_probe(struct pci_dev *pdev, ...@@ -3354,8 +3354,8 @@ static int __devinit skge_probe(struct pci_dev *pdev,
if (err) if (err)
goto err_out_free_irq; goto err_out_free_irq;
printk(KERN_INFO PFX DRV_VERSION " addr 0x%lx irq %d chip %s rev %d\n", printk(KERN_INFO PFX DRV_VERSION " addr 0x%llx irq %d chip %s rev %d\n",
pci_resource_start(pdev, 0), pdev->irq, (unsigned long long)pci_resource_start(pdev, 0), pdev->irq,
skge_board_name(hw), hw->chip_rev); skge_board_name(hw), hw->chip_rev);
if ((dev = skge_devinit(hw, 0, using_dac)) == NULL) if ((dev = skge_devinit(hw, 0, using_dac)) == NULL)
......
...@@ -3311,9 +3311,9 @@ static int __devinit sky2_probe(struct pci_dev *pdev, ...@@ -3311,9 +3311,9 @@ static int __devinit sky2_probe(struct pci_dev *pdev,
if (err) if (err)
goto err_out_iounmap; goto err_out_iounmap;
printk(KERN_INFO PFX "v%s addr 0x%lx irq %d Yukon-%s (0x%x) rev %d\n", printk(KERN_INFO PFX "v%s addr 0x%llx irq %d Yukon-%s (0x%x) rev %d\n",
DRV_VERSION, pci_resource_start(pdev, 0), pdev->irq, DRV_VERSION, (unsigned long long)pci_resource_start(pdev, 0),
yukon2_name[hw->chip_id - CHIP_ID_YUKON_XL], pdev->irq, yukon2_name[hw->chip_id - CHIP_ID_YUKON_XL],
hw->chip_id, hw->chip_rev); hw->chip_id, hw->chip_rev);
dev = sky2_init_netdev(hw, 0, using_dac); dev = sky2_init_netdev(hw, 0, using_dac);
......
...@@ -2007,8 +2007,8 @@ static int __init de_init_one (struct pci_dev *pdev, ...@@ -2007,8 +2007,8 @@ static int __init de_init_one (struct pci_dev *pdev,
} }
if (pci_resource_len(pdev, 1) < DE_REGS_SIZE) { if (pci_resource_len(pdev, 1) < DE_REGS_SIZE) {
rc = -EIO; rc = -EIO;
printk(KERN_ERR PFX "MMIO resource (%lx) too small on pci dev %s\n", printk(KERN_ERR PFX "MMIO resource (%llx) too small on pci dev %s\n",
pci_resource_len(pdev, 1), pci_name(pdev)); (unsigned long long)pci_resource_len(pdev, 1), pci_name(pdev));
goto err_out_res; goto err_out_res;
} }
...@@ -2016,8 +2016,9 @@ static int __init de_init_one (struct pci_dev *pdev, ...@@ -2016,8 +2016,9 @@ static int __init de_init_one (struct pci_dev *pdev,
regs = ioremap_nocache(pciaddr, DE_REGS_SIZE); regs = ioremap_nocache(pciaddr, DE_REGS_SIZE);
if (!regs) { if (!regs) {
rc = -EIO; rc = -EIO;
printk(KERN_ERR PFX "Cannot map PCI MMIO (%lx@%lx) on pci dev %s\n", printk(KERN_ERR PFX "Cannot map PCI MMIO (%llx@%lx) on pci dev %s\n",
pci_resource_len(pdev, 1), pciaddr, pci_name(pdev)); (unsigned long long)pci_resource_len(pdev, 1),
pciaddr, pci_name(pdev));
goto err_out_res; goto err_out_res;
} }
dev->base_addr = (unsigned long) regs; dev->base_addr = (unsigned long) regs;
......
...@@ -1350,10 +1350,10 @@ static int __devinit tulip_init_one (struct pci_dev *pdev, ...@@ -1350,10 +1350,10 @@ static int __devinit tulip_init_one (struct pci_dev *pdev,
SET_MODULE_OWNER(dev); SET_MODULE_OWNER(dev);
SET_NETDEV_DEV(dev, &pdev->dev); SET_NETDEV_DEV(dev, &pdev->dev);
if (pci_resource_len (pdev, 0) < tulip_tbl[chip_idx].io_size) { 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, " printk (KERN_ERR PFX "%s: I/O region (0x%llx@0x%llx) too small, "
"aborting\n", pci_name(pdev), "aborting\n", pci_name(pdev),
pci_resource_len (pdev, 0), (unsigned long long)pci_resource_len (pdev, 0),
pci_resource_start (pdev, 0)); (unsigned long long)pci_resource_start (pdev, 0));
goto err_out_free_netdev; goto err_out_free_netdev;
} }
......
...@@ -2568,9 +2568,10 @@ typhoon_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) ...@@ -2568,9 +2568,10 @@ typhoon_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
pci_set_drvdata(pdev, dev); pci_set_drvdata(pdev, dev);
printk(KERN_INFO "%s: %s at %s 0x%lx, ", printk(KERN_INFO "%s: %s at %s 0x%llx, ",
dev->name, typhoon_card_info[card_id].name, dev->name, typhoon_card_info[card_id].name,
use_mmio ? "MMIO" : "IO", pci_resource_start(pdev, use_mmio)); use_mmio ? "MMIO" : "IO",
(unsigned long long)pci_resource_start(pdev, use_mmio));
for(i = 0; i < 5; i++) for(i = 0; i < 5; i++)
printk("%2.2x:", dev->dev_addr[i]); printk("%2.2x:", dev->dev_addr[i]);
printk("%2.2x\n", dev->dev_addr[i]); printk("%2.2x\n", dev->dev_addr[i]);
......
...@@ -732,15 +732,15 @@ static int __devinit dscc4_init_one(struct pci_dev *pdev, ...@@ -732,15 +732,15 @@ static int __devinit dscc4_init_one(struct pci_dev *pdev,
ioaddr = ioremap(pci_resource_start(pdev, 0), ioaddr = ioremap(pci_resource_start(pdev, 0),
pci_resource_len(pdev, 0)); pci_resource_len(pdev, 0));
if (!ioaddr) { if (!ioaddr) {
printk(KERN_ERR "%s: cannot remap MMIO region %lx @ %lx\n", printk(KERN_ERR "%s: cannot remap MMIO region %llx @ %llx\n",
DRV_NAME, pci_resource_len(pdev, 0), DRV_NAME, (unsigned long long)pci_resource_len(pdev, 0),
pci_resource_start(pdev, 0)); (unsigned long long)pci_resource_start(pdev, 0));
rc = -EIO; rc = -EIO;
goto err_free_mmio_regions_2; goto err_free_mmio_regions_2;
} }
printk(KERN_DEBUG "Siemens DSCC4, MMIO at %#lx (regs), %#lx (lbi), IRQ %d\n", printk(KERN_DEBUG "Siemens DSCC4, MMIO at %#llx (regs), %#llx (lbi), IRQ %d\n",
pci_resource_start(pdev, 0), (unsigned long long)pci_resource_start(pdev, 0),
pci_resource_start(pdev, 1), pdev->irq); (unsigned long long)pci_resource_start(pdev, 1), pdev->irq);
/* Cf errata DS5 p.2 */ /* Cf errata DS5 p.2 */
pci_write_config_byte(pdev, PCI_LATENCY_TIMER, 0xf8); pci_write_config_byte(pdev, PCI_LATENCY_TIMER, 0xf8);
......
...@@ -3445,9 +3445,9 @@ cpc_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) ...@@ -3445,9 +3445,9 @@ cpc_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
card = (pc300_t *) kmalloc(sizeof(pc300_t), GFP_KERNEL); card = (pc300_t *) kmalloc(sizeof(pc300_t), GFP_KERNEL);
if (card == NULL) { if (card == NULL) {
printk("PC300 found at RAM 0x%08lx, " printk("PC300 found at RAM 0x%016llx, "
"but could not allocate card structure.\n", "but could not allocate card structure.\n",
pci_resource_start(pdev, 3)); (unsigned long long)pci_resource_start(pdev, 3));
err = -ENOMEM; err = -ENOMEM;
goto err_disable_dev; goto err_disable_dev;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment