aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2018-02-28 12:00:28 -0500
committerDavid S. Miller <davem@davemloft.net>2018-02-28 12:00:28 -0500
commit64ec1acdff21bf95ed565218d8ce38cb39d30cca (patch)
tree12d708137480bfe8956c8fce8c0df49bc81c52ec
parent82695b30ffeeab665f41416c6f5015dea3147bd5 (diff)
parent1e9b9a8bbdbb7d472a2a203f658b38f0b2d99333 (diff)
Merge branch 'macmace-cleanups'
Finn Thain says: ==================== Fixes, cleanup and modernization for macmace driver Changes since v4 of combined patch series: - Removed redundant and non-portable MACH_IS_MAC tests. - Omitted patches unrelated to macmace driver. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/ethernet/apple/macmace.c25
1 files changed, 4 insertions, 21 deletions
diff --git a/drivers/net/ethernet/apple/macmace.c b/drivers/net/ethernet/apple/macmace.c
index f17a160dbff2..137cbb470af2 100644
--- a/drivers/net/ethernet/apple/macmace.c
+++ b/drivers/net/ethernet/apple/macmace.c
@@ -247,8 +247,8 @@ static int mace_probe(struct platform_device *pdev)
247 dev->netdev_ops = &mace_netdev_ops; 247 dev->netdev_ops = &mace_netdev_ops;
248 dev->watchdog_timeo = TX_TIMEOUT; 248 dev->watchdog_timeo = TX_TIMEOUT;
249 249
250 printk(KERN_INFO "%s: 68K MACE, hardware address %pM\n", 250 pr_info("Onboard MACE, hardware address %pM, chip revision 0x%04X\n",
251 dev->name, dev->dev_addr); 251 dev->dev_addr, mp->chipid);
252 252
253 err = register_netdev(dev); 253 err = register_netdev(dev);
254 if (!err) 254 if (!err)
@@ -589,7 +589,6 @@ static irqreturn_t mace_interrupt(int irq, void *dev_id)
589 else if (fs & (UFLO|LCOL|RTRY)) { 589 else if (fs & (UFLO|LCOL|RTRY)) {
590 ++dev->stats.tx_aborted_errors; 590 ++dev->stats.tx_aborted_errors;
591 if (mb->xmtfs & UFLO) { 591 if (mb->xmtfs & UFLO) {
592 printk(KERN_ERR "%s: DMA underrun.\n", dev->name);
593 dev->stats.tx_fifo_errors++; 592 dev->stats.tx_fifo_errors++;
594 mace_txdma_reset(dev); 593 mace_txdma_reset(dev);
595 } 594 }
@@ -644,10 +643,8 @@ static void mace_dma_rx_frame(struct net_device *dev, struct mace_frame *mf)
644 643
645 if (frame_status & (RS_OFLO | RS_CLSN | RS_FRAMERR | RS_FCSERR)) { 644 if (frame_status & (RS_OFLO | RS_CLSN | RS_FRAMERR | RS_FCSERR)) {
646 dev->stats.rx_errors++; 645 dev->stats.rx_errors++;
647 if (frame_status & RS_OFLO) { 646 if (frame_status & RS_OFLO)
648 printk(KERN_DEBUG "%s: fifo overflow.\n", dev->name);
649 dev->stats.rx_fifo_errors++; 647 dev->stats.rx_fifo_errors++;
650 }
651 if (frame_status & RS_CLSN) 648 if (frame_status & RS_CLSN)
652 dev->stats.collisions++; 649 dev->stats.collisions++;
653 if (frame_status & RS_FRAMERR) 650 if (frame_status & RS_FRAMERR)
@@ -770,18 +767,4 @@ static struct platform_driver mac_mace_driver = {
770 }, 767 },
771}; 768};
772 769
773static int __init mac_mace_init_module(void) 770module_platform_driver(mac_mace_driver);
774{
775 if (!MACH_IS_MAC)
776 return -ENODEV;
777
778 return platform_driver_register(&mac_mace_driver);
779}
780
781static void __exit mac_mace_cleanup_module(void)
782{
783 platform_driver_unregister(&mac_mace_driver);
784}
785
786module_init(mac_mace_init_module);
787module_exit(mac_mace_cleanup_module);