diff options
author | Jeff Garzik <jeff@garzik.org> | 2006-06-27 10:47:51 -0400 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2006-07-05 13:42:07 -0400 |
commit | 2e8a538d865de0eb9813c8a0f2284e920299c0cc (patch) | |
tree | 30b773865f17b6a2768171f62fdae9700b54ec44 /drivers/net/cassini.c | |
parent | cabb7667dc150320ccd9d6f64fbd7a34766bc775 (diff) |
[netdrvr] Use dev_printk() when ethernet interface isn't available
For messages prior to register_netdev(), prefer dev_printk() because
that prints out both our driver name and our [PCI | whatever] bus id.
Updates: 8139{cp,too}, b44, bnx2, cassini, {eepro,epic}100, fealnx,
hamachi, ne2k-pci, ns83820, pci-skeleton, r8169.
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/net/cassini.c')
-rw-r--r-- | drivers/net/cassini.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/drivers/net/cassini.c b/drivers/net/cassini.c index d33130f64700..428e2067738c 100644 --- a/drivers/net/cassini.c +++ b/drivers/net/cassini.c | |||
@@ -4887,13 +4887,13 @@ static int __devinit cas_init_one(struct pci_dev *pdev, | |||
4887 | 4887 | ||
4888 | err = pci_enable_device(pdev); | 4888 | err = pci_enable_device(pdev); |
4889 | if (err) { | 4889 | if (err) { |
4890 | printk(KERN_ERR PFX "Cannot enable PCI device, " | 4890 | dev_printk(KERN_ERR, &pdev->dev, "Cannot enable PCI device, " |
4891 | "aborting.\n"); | 4891 | "aborting.\n"); |
4892 | return err; | 4892 | return err; |
4893 | } | 4893 | } |
4894 | 4894 | ||
4895 | if (!(pci_resource_flags(pdev, 0) & IORESOURCE_MEM)) { | 4895 | if (!(pci_resource_flags(pdev, 0) & IORESOURCE_MEM)) { |
4896 | printk(KERN_ERR PFX "Cannot find proper PCI device " | 4896 | dev_printk(KERN_ERR, &pdev->dev, "Cannot find proper PCI device " |
4897 | "base address, aborting.\n"); | 4897 | "base address, aborting.\n"); |
4898 | err = -ENODEV; | 4898 | err = -ENODEV; |
4899 | goto err_out_disable_pdev; | 4899 | goto err_out_disable_pdev; |
@@ -4901,7 +4901,7 @@ static int __devinit cas_init_one(struct pci_dev *pdev, | |||
4901 | 4901 | ||
4902 | dev = alloc_etherdev(sizeof(*cp)); | 4902 | dev = alloc_etherdev(sizeof(*cp)); |
4903 | if (!dev) { | 4903 | if (!dev) { |
4904 | printk(KERN_ERR PFX "Etherdev alloc failed, aborting.\n"); | 4904 | dev_printk(KERN_ERR, &pdev->dev, "Etherdev alloc failed, aborting.\n"); |
4905 | err = -ENOMEM; | 4905 | err = -ENOMEM; |
4906 | goto err_out_disable_pdev; | 4906 | goto err_out_disable_pdev; |
4907 | } | 4907 | } |
@@ -4910,7 +4910,7 @@ static int __devinit cas_init_one(struct pci_dev *pdev, | |||
4910 | 4910 | ||
4911 | err = pci_request_regions(pdev, dev->name); | 4911 | err = pci_request_regions(pdev, dev->name); |
4912 | if (err) { | 4912 | if (err) { |
4913 | printk(KERN_ERR PFX "Cannot obtain PCI resources, " | 4913 | dev_printk(KERN_ERR, &pdev->dev, "Cannot obtain PCI resources, " |
4914 | "aborting.\n"); | 4914 | "aborting.\n"); |
4915 | goto err_out_free_netdev; | 4915 | goto err_out_free_netdev; |
4916 | } | 4916 | } |
@@ -4941,7 +4941,7 @@ static int __devinit cas_init_one(struct pci_dev *pdev, | |||
4941 | if (pci_write_config_byte(pdev, | 4941 | if (pci_write_config_byte(pdev, |
4942 | PCI_CACHE_LINE_SIZE, | 4942 | PCI_CACHE_LINE_SIZE, |
4943 | cas_cacheline_size)) { | 4943 | cas_cacheline_size)) { |
4944 | printk(KERN_ERR PFX "Could not set PCI cache " | 4944 | dev_printk(KERN_ERR, &pdev->dev, "Could not set PCI cache " |
4945 | "line size\n"); | 4945 | "line size\n"); |
4946 | goto err_write_cacheline; | 4946 | goto err_write_cacheline; |
4947 | } | 4947 | } |
@@ -4955,7 +4955,7 @@ static int __devinit cas_init_one(struct pci_dev *pdev, | |||
4955 | err = pci_set_consistent_dma_mask(pdev, | 4955 | err = pci_set_consistent_dma_mask(pdev, |
4956 | DMA_64BIT_MASK); | 4956 | DMA_64BIT_MASK); |
4957 | if (err < 0) { | 4957 | if (err < 0) { |
4958 | printk(KERN_ERR PFX "Unable to obtain 64-bit DMA " | 4958 | dev_printk(KERN_ERR, &pdev->dev, "Unable to obtain 64-bit DMA " |
4959 | "for consistent allocations\n"); | 4959 | "for consistent allocations\n"); |
4960 | goto err_out_free_res; | 4960 | goto err_out_free_res; |
4961 | } | 4961 | } |
@@ -4963,7 +4963,7 @@ static int __devinit cas_init_one(struct pci_dev *pdev, | |||
4963 | } else { | 4963 | } else { |
4964 | err = pci_set_dma_mask(pdev, DMA_32BIT_MASK); | 4964 | err = pci_set_dma_mask(pdev, DMA_32BIT_MASK); |
4965 | if (err) { | 4965 | if (err) { |
4966 | printk(KERN_ERR PFX "No usable DMA configuration, " | 4966 | dev_printk(KERN_ERR, &pdev->dev, "No usable DMA configuration, " |
4967 | "aborting.\n"); | 4967 | "aborting.\n"); |
4968 | goto err_out_free_res; | 4968 | goto err_out_free_res; |
4969 | } | 4969 | } |
@@ -5023,7 +5023,7 @@ static int __devinit cas_init_one(struct pci_dev *pdev, | |||
5023 | /* give us access to cassini registers */ | 5023 | /* give us access to cassini registers */ |
5024 | cp->regs = pci_iomap(pdev, 0, casreg_len); | 5024 | cp->regs = pci_iomap(pdev, 0, casreg_len); |
5025 | if (cp->regs == 0UL) { | 5025 | if (cp->regs == 0UL) { |
5026 | printk(KERN_ERR PFX "Cannot map device registers, " | 5026 | dev_printk(KERN_ERR, &pdev->dev, "Cannot map device registers, " |
5027 | "aborting.\n"); | 5027 | "aborting.\n"); |
5028 | goto err_out_free_res; | 5028 | goto err_out_free_res; |
5029 | } | 5029 | } |
@@ -5040,7 +5040,7 @@ static int __devinit cas_init_one(struct pci_dev *pdev, | |||
5040 | pci_alloc_consistent(pdev, sizeof(struct cas_init_block), | 5040 | pci_alloc_consistent(pdev, sizeof(struct cas_init_block), |
5041 | &cp->block_dvma); | 5041 | &cp->block_dvma); |
5042 | if (!cp->init_block) { | 5042 | if (!cp->init_block) { |
5043 | printk(KERN_ERR PFX "Cannot allocate init block, " | 5043 | dev_printk(KERN_ERR, &pdev->dev, "Cannot allocate init block, " |
5044 | "aborting.\n"); | 5044 | "aborting.\n"); |
5045 | goto err_out_iounmap; | 5045 | goto err_out_iounmap; |
5046 | } | 5046 | } |
@@ -5085,7 +5085,7 @@ static int __devinit cas_init_one(struct pci_dev *pdev, | |||
5085 | dev->features |= NETIF_F_HIGHDMA; | 5085 | dev->features |= NETIF_F_HIGHDMA; |
5086 | 5086 | ||
5087 | if (register_netdev(dev)) { | 5087 | if (register_netdev(dev)) { |
5088 | printk(KERN_ERR PFX "Cannot register net device, " | 5088 | dev_printk(KERN_ERR, &pdev->dev, "Cannot register net device, " |
5089 | "aborting.\n"); | 5089 | "aborting.\n"); |
5090 | goto err_out_free_consistent; | 5090 | goto err_out_free_consistent; |
5091 | } | 5091 | } |