diff options
Diffstat (limited to 'drivers/net/korina.c')
-rw-r--r-- | drivers/net/korina.c | 32 |
1 files changed, 17 insertions, 15 deletions
diff --git a/drivers/net/korina.c b/drivers/net/korina.c index b4cf602c32b0..6df9d253cc0a 100644 --- a/drivers/net/korina.c +++ b/drivers/net/korina.c | |||
@@ -338,7 +338,7 @@ static irqreturn_t korina_rx_dma_interrupt(int irq, void *dev_id) | |||
338 | napi_schedule(&lp->napi); | 338 | napi_schedule(&lp->napi); |
339 | 339 | ||
340 | if (dmas & DMA_STAT_ERR) | 340 | if (dmas & DMA_STAT_ERR) |
341 | printk(KERN_ERR DRV_NAME "%s: DMA error\n", dev->name); | 341 | printk(KERN_ERR "%s: DMA error\n", dev->name); |
342 | 342 | ||
343 | retval = IRQ_HANDLED; | 343 | retval = IRQ_HANDLED; |
344 | } else | 344 | } else |
@@ -555,7 +555,7 @@ static void korina_tx(struct net_device *dev) | |||
555 | dev->stats.tx_dropped++; | 555 | dev->stats.tx_dropped++; |
556 | 556 | ||
557 | /* Should never happen */ | 557 | /* Should never happen */ |
558 | printk(KERN_ERR DRV_NAME "%s: split tx ignored\n", | 558 | printk(KERN_ERR "%s: split tx ignored\n", |
559 | dev->name); | 559 | dev->name); |
560 | } else if (devcs & ETH_TX_TOK) { | 560 | } else if (devcs & ETH_TX_TOK) { |
561 | dev->stats.tx_packets++; | 561 | dev->stats.tx_packets++; |
@@ -641,7 +641,7 @@ korina_tx_dma_interrupt(int irq, void *dev_id) | |||
641 | dev->trans_start = jiffies; | 641 | dev->trans_start = jiffies; |
642 | } | 642 | } |
643 | if (dmas & DMA_STAT_ERR) | 643 | if (dmas & DMA_STAT_ERR) |
644 | printk(KERN_ERR DRV_NAME "%s: DMA error\n", dev->name); | 644 | printk(KERN_ERR "%s: DMA error\n", dev->name); |
645 | 645 | ||
646 | retval = IRQ_HANDLED; | 646 | retval = IRQ_HANDLED; |
647 | } else | 647 | } else |
@@ -917,8 +917,7 @@ static int korina_restart(struct net_device *dev) | |||
917 | 917 | ||
918 | ret = korina_init(dev); | 918 | ret = korina_init(dev); |
919 | if (ret < 0) { | 919 | if (ret < 0) { |
920 | printk(KERN_ERR DRV_NAME "%s: cannot restart device\n", | 920 | printk(KERN_ERR "%s: cannot restart device\n", dev->name); |
921 | dev->name); | ||
922 | return ret; | 921 | return ret; |
923 | } | 922 | } |
924 | korina_multicast_list(dev); | 923 | korina_multicast_list(dev); |
@@ -1005,7 +1004,7 @@ static int korina_open(struct net_device *dev) | |||
1005 | /* Initialize */ | 1004 | /* Initialize */ |
1006 | ret = korina_init(dev); | 1005 | ret = korina_init(dev); |
1007 | if (ret < 0) { | 1006 | if (ret < 0) { |
1008 | printk(KERN_ERR DRV_NAME "%s: cannot open device\n", dev->name); | 1007 | printk(KERN_ERR "%s: cannot open device\n", dev->name); |
1009 | goto out; | 1008 | goto out; |
1010 | } | 1009 | } |
1011 | 1010 | ||
@@ -1015,14 +1014,14 @@ static int korina_open(struct net_device *dev) | |||
1015 | ret = request_irq(lp->rx_irq, &korina_rx_dma_interrupt, | 1014 | ret = request_irq(lp->rx_irq, &korina_rx_dma_interrupt, |
1016 | IRQF_DISABLED, "Korina ethernet Rx", dev); | 1015 | IRQF_DISABLED, "Korina ethernet Rx", dev); |
1017 | if (ret < 0) { | 1016 | if (ret < 0) { |
1018 | printk(KERN_ERR DRV_NAME "%s: unable to get Rx DMA IRQ %d\n", | 1017 | printk(KERN_ERR "%s: unable to get Rx DMA IRQ %d\n", |
1019 | dev->name, lp->rx_irq); | 1018 | dev->name, lp->rx_irq); |
1020 | goto err_release; | 1019 | goto err_release; |
1021 | } | 1020 | } |
1022 | ret = request_irq(lp->tx_irq, &korina_tx_dma_interrupt, | 1021 | ret = request_irq(lp->tx_irq, &korina_tx_dma_interrupt, |
1023 | IRQF_DISABLED, "Korina ethernet Tx", dev); | 1022 | IRQF_DISABLED, "Korina ethernet Tx", dev); |
1024 | if (ret < 0) { | 1023 | if (ret < 0) { |
1025 | printk(KERN_ERR DRV_NAME "%s: unable to get Tx DMA IRQ %d\n", | 1024 | printk(KERN_ERR "%s: unable to get Tx DMA IRQ %d\n", |
1026 | dev->name, lp->tx_irq); | 1025 | dev->name, lp->tx_irq); |
1027 | goto err_free_rx_irq; | 1026 | goto err_free_rx_irq; |
1028 | } | 1027 | } |
@@ -1031,7 +1030,7 @@ static int korina_open(struct net_device *dev) | |||
1031 | ret = request_irq(lp->ovr_irq, &korina_ovr_interrupt, | 1030 | ret = request_irq(lp->ovr_irq, &korina_ovr_interrupt, |
1032 | IRQF_DISABLED, "Ethernet Overflow", dev); | 1031 | IRQF_DISABLED, "Ethernet Overflow", dev); |
1033 | if (ret < 0) { | 1032 | if (ret < 0) { |
1034 | printk(KERN_ERR DRV_NAME"%s: unable to get OVR IRQ %d\n", | 1033 | printk(KERN_ERR "%s: unable to get OVR IRQ %d\n", |
1035 | dev->name, lp->ovr_irq); | 1034 | dev->name, lp->ovr_irq); |
1036 | goto err_free_tx_irq; | 1035 | goto err_free_tx_irq; |
1037 | } | 1036 | } |
@@ -1040,7 +1039,7 @@ static int korina_open(struct net_device *dev) | |||
1040 | ret = request_irq(lp->und_irq, &korina_und_interrupt, | 1039 | ret = request_irq(lp->und_irq, &korina_und_interrupt, |
1041 | IRQF_DISABLED, "Ethernet Underflow", dev); | 1040 | IRQF_DISABLED, "Ethernet Underflow", dev); |
1042 | if (ret < 0) { | 1041 | if (ret < 0) { |
1043 | printk(KERN_ERR DRV_NAME "%s: unable to get UND IRQ %d\n", | 1042 | printk(KERN_ERR "%s: unable to get UND IRQ %d\n", |
1044 | dev->name, lp->und_irq); | 1043 | dev->name, lp->und_irq); |
1045 | goto err_free_ovr_irq; | 1044 | goto err_free_ovr_irq; |
1046 | } | 1045 | } |
@@ -1137,7 +1136,7 @@ static int korina_probe(struct platform_device *pdev) | |||
1137 | dev->base_addr = r->start; | 1136 | dev->base_addr = r->start; |
1138 | lp->eth_regs = ioremap_nocache(r->start, r->end - r->start); | 1137 | lp->eth_regs = ioremap_nocache(r->start, r->end - r->start); |
1139 | if (!lp->eth_regs) { | 1138 | if (!lp->eth_regs) { |
1140 | printk(KERN_ERR DRV_NAME "cannot remap registers\n"); | 1139 | printk(KERN_ERR DRV_NAME ": cannot remap registers\n"); |
1141 | rc = -ENXIO; | 1140 | rc = -ENXIO; |
1142 | goto probe_err_out; | 1141 | goto probe_err_out; |
1143 | } | 1142 | } |
@@ -1145,7 +1144,7 @@ static int korina_probe(struct platform_device *pdev) | |||
1145 | r = platform_get_resource_byname(pdev, IORESOURCE_MEM, "korina_dma_rx"); | 1144 | r = platform_get_resource_byname(pdev, IORESOURCE_MEM, "korina_dma_rx"); |
1146 | lp->rx_dma_regs = ioremap_nocache(r->start, r->end - r->start); | 1145 | lp->rx_dma_regs = ioremap_nocache(r->start, r->end - r->start); |
1147 | if (!lp->rx_dma_regs) { | 1146 | if (!lp->rx_dma_regs) { |
1148 | printk(KERN_ERR DRV_NAME "cannot remap Rx DMA registers\n"); | 1147 | printk(KERN_ERR DRV_NAME ": cannot remap Rx DMA registers\n"); |
1149 | rc = -ENXIO; | 1148 | rc = -ENXIO; |
1150 | goto probe_err_dma_rx; | 1149 | goto probe_err_dma_rx; |
1151 | } | 1150 | } |
@@ -1153,14 +1152,14 @@ static int korina_probe(struct platform_device *pdev) | |||
1153 | r = platform_get_resource_byname(pdev, IORESOURCE_MEM, "korina_dma_tx"); | 1152 | r = platform_get_resource_byname(pdev, IORESOURCE_MEM, "korina_dma_tx"); |
1154 | lp->tx_dma_regs = ioremap_nocache(r->start, r->end - r->start); | 1153 | lp->tx_dma_regs = ioremap_nocache(r->start, r->end - r->start); |
1155 | if (!lp->tx_dma_regs) { | 1154 | if (!lp->tx_dma_regs) { |
1156 | printk(KERN_ERR DRV_NAME "cannot remap Tx DMA registers\n"); | 1155 | printk(KERN_ERR DRV_NAME ": cannot remap Tx DMA registers\n"); |
1157 | rc = -ENXIO; | 1156 | rc = -ENXIO; |
1158 | goto probe_err_dma_tx; | 1157 | goto probe_err_dma_tx; |
1159 | } | 1158 | } |
1160 | 1159 | ||
1161 | lp->td_ring = kmalloc(TD_RING_SIZE + RD_RING_SIZE, GFP_KERNEL); | 1160 | lp->td_ring = kmalloc(TD_RING_SIZE + RD_RING_SIZE, GFP_KERNEL); |
1162 | if (!lp->td_ring) { | 1161 | if (!lp->td_ring) { |
1163 | printk(KERN_ERR DRV_NAME "cannot allocate descriptors\n"); | 1162 | printk(KERN_ERR DRV_NAME ": cannot allocate descriptors\n"); |
1164 | rc = -ENXIO; | 1163 | rc = -ENXIO; |
1165 | goto probe_err_td_ring; | 1164 | goto probe_err_td_ring; |
1166 | } | 1165 | } |
@@ -1193,10 +1192,13 @@ static int korina_probe(struct platform_device *pdev) | |||
1193 | rc = register_netdev(dev); | 1192 | rc = register_netdev(dev); |
1194 | if (rc < 0) { | 1193 | if (rc < 0) { |
1195 | printk(KERN_ERR DRV_NAME | 1194 | printk(KERN_ERR DRV_NAME |
1196 | ": cannot register net device %d\n", rc); | 1195 | ": cannot register net device: %d\n", rc); |
1197 | goto probe_err_register; | 1196 | goto probe_err_register; |
1198 | } | 1197 | } |
1199 | setup_timer(&lp->media_check_timer, korina_poll_media, (unsigned long) dev); | 1198 | setup_timer(&lp->media_check_timer, korina_poll_media, (unsigned long) dev); |
1199 | |||
1200 | printk(KERN_INFO "%s: " DRV_NAME "-" DRV_VERSION " " DRV_RELDATE "\n", | ||
1201 | dev->name); | ||
1200 | out: | 1202 | out: |
1201 | return rc; | 1203 | return rc; |
1202 | 1204 | ||