Commit 64ec1acd authored by David S. Miller's avatar David S. Miller

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: default avatarDavid S. Miller <davem@davemloft.net>
parents 82695b30 1e9b9a8b
...@@ -247,8 +247,8 @@ static int mace_probe(struct platform_device *pdev) ...@@ -247,8 +247,8 @@ static int mace_probe(struct platform_device *pdev)
dev->netdev_ops = &mace_netdev_ops; dev->netdev_ops = &mace_netdev_ops;
dev->watchdog_timeo = TX_TIMEOUT; dev->watchdog_timeo = TX_TIMEOUT;
printk(KERN_INFO "%s: 68K MACE, hardware address %pM\n", pr_info("Onboard MACE, hardware address %pM, chip revision 0x%04X\n",
dev->name, dev->dev_addr); dev->dev_addr, mp->chipid);
err = register_netdev(dev); err = register_netdev(dev);
if (!err) if (!err)
...@@ -589,7 +589,6 @@ static irqreturn_t mace_interrupt(int irq, void *dev_id) ...@@ -589,7 +589,6 @@ static irqreturn_t mace_interrupt(int irq, void *dev_id)
else if (fs & (UFLO|LCOL|RTRY)) { else if (fs & (UFLO|LCOL|RTRY)) {
++dev->stats.tx_aborted_errors; ++dev->stats.tx_aborted_errors;
if (mb->xmtfs & UFLO) { if (mb->xmtfs & UFLO) {
printk(KERN_ERR "%s: DMA underrun.\n", dev->name);
dev->stats.tx_fifo_errors++; dev->stats.tx_fifo_errors++;
mace_txdma_reset(dev); mace_txdma_reset(dev);
} }
...@@ -644,10 +643,8 @@ static void mace_dma_rx_frame(struct net_device *dev, struct mace_frame *mf) ...@@ -644,10 +643,8 @@ static void mace_dma_rx_frame(struct net_device *dev, struct mace_frame *mf)
if (frame_status & (RS_OFLO | RS_CLSN | RS_FRAMERR | RS_FCSERR)) { if (frame_status & (RS_OFLO | RS_CLSN | RS_FRAMERR | RS_FCSERR)) {
dev->stats.rx_errors++; dev->stats.rx_errors++;
if (frame_status & RS_OFLO) { if (frame_status & RS_OFLO)
printk(KERN_DEBUG "%s: fifo overflow.\n", dev->name);
dev->stats.rx_fifo_errors++; dev->stats.rx_fifo_errors++;
}
if (frame_status & RS_CLSN) if (frame_status & RS_CLSN)
dev->stats.collisions++; dev->stats.collisions++;
if (frame_status & RS_FRAMERR) if (frame_status & RS_FRAMERR)
...@@ -770,18 +767,4 @@ static struct platform_driver mac_mace_driver = { ...@@ -770,18 +767,4 @@ static struct platform_driver mac_mace_driver = {
}, },
}; };
static int __init mac_mace_init_module(void) module_platform_driver(mac_mace_driver);
{
if (!MACH_IS_MAC)
return -ENODEV;
return platform_driver_register(&mac_mace_driver);
}
static void __exit mac_mace_cleanup_module(void)
{
platform_driver_unregister(&mac_mace_driver);
}
module_init(mac_mace_init_module);
module_exit(mac_mace_cleanup_module);
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