aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/smc911x.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/smc911x.c')
-rw-r--r--drivers/net/smc911x.c66
1 files changed, 33 insertions, 33 deletions
diff --git a/drivers/net/smc911x.c b/drivers/net/smc911x.c
index e15abc3606cd..02cc064c2c8b 100644
--- a/drivers/net/smc911x.c
+++ b/drivers/net/smc911x.c
@@ -183,7 +183,7 @@ static void smc911x_reset(struct net_device *dev)
183 unsigned int reg, timeout=0, resets=1; 183 unsigned int reg, timeout=0, resets=1;
184 unsigned long flags; 184 unsigned long flags;
185 185
186 DBG(SMC_DEBUG_FUNC, "%s: --> %s\n", dev->name, __FUNCTION__); 186 DBG(SMC_DEBUG_FUNC, "%s: --> %s\n", dev->name, __func__);
187 187
188 /* Take out of PM setting first */ 188 /* Take out of PM setting first */
189 if ((SMC_GET_PMT_CTRL(lp) & PMT_CTRL_READY_) == 0) { 189 if ((SMC_GET_PMT_CTRL(lp) & PMT_CTRL_READY_) == 0) {
@@ -272,7 +272,7 @@ static void smc911x_enable(struct net_device *dev)
272 unsigned mask, cfg, cr; 272 unsigned mask, cfg, cr;
273 unsigned long flags; 273 unsigned long flags;
274 274
275 DBG(SMC_DEBUG_FUNC, "%s: --> %s\n", dev->name, __FUNCTION__); 275 DBG(SMC_DEBUG_FUNC, "%s: --> %s\n", dev->name, __func__);
276 276
277 SMC_SET_MAC_ADDR(lp, dev->dev_addr); 277 SMC_SET_MAC_ADDR(lp, dev->dev_addr);
278 278
@@ -329,7 +329,7 @@ static void smc911x_shutdown(struct net_device *dev)
329 unsigned cr; 329 unsigned cr;
330 unsigned long flags; 330 unsigned long flags;
331 331
332 DBG(SMC_DEBUG_FUNC, "%s: --> %s\n", CARDNAME, __FUNCTION__); 332 DBG(SMC_DEBUG_FUNC, "%s: --> %s\n", CARDNAME, __func__);
333 333
334 /* Disable IRQ's */ 334 /* Disable IRQ's */
335 SMC_SET_INT_EN(lp, 0); 335 SMC_SET_INT_EN(lp, 0);
@@ -348,7 +348,7 @@ static inline void smc911x_drop_pkt(struct net_device *dev)
348 struct smc911x_local *lp = netdev_priv(dev); 348 struct smc911x_local *lp = netdev_priv(dev);
349 unsigned int fifo_count, timeout, reg; 349 unsigned int fifo_count, timeout, reg;
350 350
351 DBG(SMC_DEBUG_FUNC | SMC_DEBUG_RX, "%s: --> %s\n", CARDNAME, __FUNCTION__); 351 DBG(SMC_DEBUG_FUNC | SMC_DEBUG_RX, "%s: --> %s\n", CARDNAME, __func__);
352 fifo_count = SMC_GET_RX_FIFO_INF(lp) & 0xFFFF; 352 fifo_count = SMC_GET_RX_FIFO_INF(lp) & 0xFFFF;
353 if (fifo_count <= 4) { 353 if (fifo_count <= 4) {
354 /* Manually dump the packet data */ 354 /* Manually dump the packet data */
@@ -382,7 +382,7 @@ static inline void smc911x_rcv(struct net_device *dev)
382 unsigned char *data; 382 unsigned char *data;
383 383
384 DBG(SMC_DEBUG_FUNC | SMC_DEBUG_RX, "%s: --> %s\n", 384 DBG(SMC_DEBUG_FUNC | SMC_DEBUG_RX, "%s: --> %s\n",
385 dev->name, __FUNCTION__); 385 dev->name, __func__);
386 status = SMC_GET_RX_STS_FIFO(lp); 386 status = SMC_GET_RX_STS_FIFO(lp);
387 DBG(SMC_DEBUG_RX, "%s: Rx pkt len %d status 0x%08x \n", 387 DBG(SMC_DEBUG_RX, "%s: Rx pkt len %d status 0x%08x \n",
388 dev->name, (status & 0x3fff0000) >> 16, status & 0xc000ffff); 388 dev->name, (status & 0x3fff0000) >> 16, status & 0xc000ffff);
@@ -460,7 +460,7 @@ static void smc911x_hardware_send_pkt(struct net_device *dev)
460 unsigned char *buf; 460 unsigned char *buf;
461 unsigned long flags; 461 unsigned long flags;
462 462
463 DBG(SMC_DEBUG_FUNC | SMC_DEBUG_TX, "%s: --> %s\n", dev->name, __FUNCTION__); 463 DBG(SMC_DEBUG_FUNC | SMC_DEBUG_TX, "%s: --> %s\n", dev->name, __func__);
464 BUG_ON(lp->pending_tx_skb == NULL); 464 BUG_ON(lp->pending_tx_skb == NULL);
465 465
466 skb = lp->pending_tx_skb; 466 skb = lp->pending_tx_skb;
@@ -524,7 +524,7 @@ static int smc911x_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
524 unsigned long flags; 524 unsigned long flags;
525 525
526 DBG(SMC_DEBUG_FUNC | SMC_DEBUG_TX, "%s: --> %s\n", 526 DBG(SMC_DEBUG_FUNC | SMC_DEBUG_TX, "%s: --> %s\n",
527 dev->name, __FUNCTION__); 527 dev->name, __func__);
528 528
529 BUG_ON(lp->pending_tx_skb != NULL); 529 BUG_ON(lp->pending_tx_skb != NULL);
530 530
@@ -596,7 +596,7 @@ static void smc911x_tx(struct net_device *dev)
596 unsigned int tx_status; 596 unsigned int tx_status;
597 597
598 DBG(SMC_DEBUG_FUNC | SMC_DEBUG_TX, "%s: --> %s\n", 598 DBG(SMC_DEBUG_FUNC | SMC_DEBUG_TX, "%s: --> %s\n",
599 dev->name, __FUNCTION__); 599 dev->name, __func__);
600 600
601 /* Collect the TX status */ 601 /* Collect the TX status */
602 while (((SMC_GET_TX_FIFO_INF(lp) & TX_FIFO_INF_TSUSED_) >> 16) != 0) { 602 while (((SMC_GET_TX_FIFO_INF(lp) & TX_FIFO_INF_TSUSED_) >> 16) != 0) {
@@ -647,7 +647,7 @@ static int smc911x_phy_read(struct net_device *dev, int phyaddr, int phyreg)
647 SMC_GET_MII(lp, phyreg, phyaddr, phydata); 647 SMC_GET_MII(lp, phyreg, phyaddr, phydata);
648 648
649 DBG(SMC_DEBUG_MISC, "%s: phyaddr=0x%x, phyreg=0x%02x, phydata=0x%04x\n", 649 DBG(SMC_DEBUG_MISC, "%s: phyaddr=0x%x, phyreg=0x%02x, phydata=0x%04x\n",
650 __FUNCTION__, phyaddr, phyreg, phydata); 650 __func__, phyaddr, phyreg, phydata);
651 return phydata; 651 return phydata;
652} 652}
653 653
@@ -661,7 +661,7 @@ static void smc911x_phy_write(struct net_device *dev, int phyaddr, int phyreg,
661 struct smc911x_local *lp = netdev_priv(dev); 661 struct smc911x_local *lp = netdev_priv(dev);
662 662
663 DBG(SMC_DEBUG_MISC, "%s: phyaddr=0x%x, phyreg=0x%x, phydata=0x%x\n", 663 DBG(SMC_DEBUG_MISC, "%s: phyaddr=0x%x, phyreg=0x%x, phydata=0x%x\n",
664 __FUNCTION__, phyaddr, phyreg, phydata); 664 __func__, phyaddr, phyreg, phydata);
665 665
666 SMC_SET_MII(lp, phyreg, phyaddr, phydata); 666 SMC_SET_MII(lp, phyreg, phyaddr, phydata);
667} 667}
@@ -676,7 +676,7 @@ static void smc911x_phy_detect(struct net_device *dev)
676 int phyaddr; 676 int phyaddr;
677 unsigned int cfg, id1, id2; 677 unsigned int cfg, id1, id2;
678 678
679 DBG(SMC_DEBUG_FUNC, "%s: --> %s\n", dev->name, __FUNCTION__); 679 DBG(SMC_DEBUG_FUNC, "%s: --> %s\n", dev->name, __func__);
680 680
681 lp->phy_type = 0; 681 lp->phy_type = 0;
682 682
@@ -746,7 +746,7 @@ static int smc911x_phy_fixed(struct net_device *dev)
746 int phyaddr = lp->mii.phy_id; 746 int phyaddr = lp->mii.phy_id;
747 int bmcr; 747 int bmcr;
748 748
749 DBG(SMC_DEBUG_FUNC, "%s: --> %s\n", dev->name, __FUNCTION__); 749 DBG(SMC_DEBUG_FUNC, "%s: --> %s\n", dev->name, __func__);
750 750
751 /* Enter Link Disable state */ 751 /* Enter Link Disable state */
752 SMC_GET_PHY_BMCR(lp, phyaddr, bmcr); 752 SMC_GET_PHY_BMCR(lp, phyaddr, bmcr);
@@ -793,7 +793,7 @@ static int smc911x_phy_reset(struct net_device *dev, int phy)
793 unsigned long flags; 793 unsigned long flags;
794 unsigned int reg; 794 unsigned int reg;
795 795
796 DBG(SMC_DEBUG_FUNC, "%s: --> %s()\n", dev->name, __FUNCTION__); 796 DBG(SMC_DEBUG_FUNC, "%s: --> %s()\n", dev->name, __func__);
797 797
798 spin_lock_irqsave(&lp->lock, flags); 798 spin_lock_irqsave(&lp->lock, flags);
799 reg = SMC_GET_PMT_CTRL(lp); 799 reg = SMC_GET_PMT_CTRL(lp);
@@ -852,7 +852,7 @@ static void smc911x_phy_check_media(struct net_device *dev, int init)
852 int phyaddr = lp->mii.phy_id; 852 int phyaddr = lp->mii.phy_id;
853 unsigned int bmcr, cr; 853 unsigned int bmcr, cr;
854 854
855 DBG(SMC_DEBUG_FUNC, "%s: --> %s\n", dev->name, __FUNCTION__); 855 DBG(SMC_DEBUG_FUNC, "%s: --> %s\n", dev->name, __func__);
856 856
857 if (mii_check_media(&lp->mii, netif_msg_link(lp), init)) { 857 if (mii_check_media(&lp->mii, netif_msg_link(lp), init)) {
858 /* duplex state has changed */ 858 /* duplex state has changed */
@@ -892,7 +892,7 @@ static void smc911x_phy_configure(struct work_struct *work)
892 int status; 892 int status;
893 unsigned long flags; 893 unsigned long flags;
894 894
895 DBG(SMC_DEBUG_FUNC, "%s: --> %s()\n", dev->name, __FUNCTION__); 895 DBG(SMC_DEBUG_FUNC, "%s: --> %s()\n", dev->name, __func__);
896 896
897 /* 897 /*
898 * We should not be called if phy_type is zero. 898 * We should not be called if phy_type is zero.
@@ -985,7 +985,7 @@ static void smc911x_phy_interrupt(struct net_device *dev)
985 int phyaddr = lp->mii.phy_id; 985 int phyaddr = lp->mii.phy_id;
986 int status; 986 int status;
987 987
988 DBG(SMC_DEBUG_FUNC, "%s: --> %s\n", dev->name, __FUNCTION__); 988 DBG(SMC_DEBUG_FUNC, "%s: --> %s\n", dev->name, __func__);
989 989
990 if (lp->phy_type == 0) 990 if (lp->phy_type == 0)
991 return; 991 return;
@@ -1013,7 +1013,7 @@ static irqreturn_t smc911x_interrupt(int irq, void *dev_id)
1013 unsigned int rx_overrun=0, cr, pkts; 1013 unsigned int rx_overrun=0, cr, pkts;
1014 unsigned long flags; 1014 unsigned long flags;
1015 1015
1016 DBG(SMC_DEBUG_FUNC, "%s: --> %s\n", dev->name, __FUNCTION__); 1016 DBG(SMC_DEBUG_FUNC, "%s: --> %s\n", dev->name, __func__);
1017 1017
1018 spin_lock_irqsave(&lp->lock, flags); 1018 spin_lock_irqsave(&lp->lock, flags);
1019 1019
@@ -1186,7 +1186,7 @@ smc911x_tx_dma_irq(int dma, void *data)
1186 struct sk_buff *skb = lp->current_tx_skb; 1186 struct sk_buff *skb = lp->current_tx_skb;
1187 unsigned long flags; 1187 unsigned long flags;
1188 1188
1189 DBG(SMC_DEBUG_FUNC, "%s: --> %s\n", dev->name, __FUNCTION__); 1189 DBG(SMC_DEBUG_FUNC, "%s: --> %s\n", dev->name, __func__);
1190 1190
1191 DBG(SMC_DEBUG_TX | SMC_DEBUG_DMA, "%s: TX DMA irq handler\n", dev->name); 1191 DBG(SMC_DEBUG_TX | SMC_DEBUG_DMA, "%s: TX DMA irq handler\n", dev->name);
1192 /* Clear the DMA interrupt sources */ 1192 /* Clear the DMA interrupt sources */
@@ -1222,7 +1222,7 @@ smc911x_rx_dma_irq(int dma, void *data)
1222 unsigned long flags; 1222 unsigned long flags;
1223 unsigned int pkts; 1223 unsigned int pkts;
1224 1224
1225 DBG(SMC_DEBUG_FUNC, "%s: --> %s\n", dev->name, __FUNCTION__); 1225 DBG(SMC_DEBUG_FUNC, "%s: --> %s\n", dev->name, __func__);
1226 DBG(SMC_DEBUG_RX | SMC_DEBUG_DMA, "%s: RX DMA irq handler\n", dev->name); 1226 DBG(SMC_DEBUG_RX | SMC_DEBUG_DMA, "%s: RX DMA irq handler\n", dev->name);
1227 /* Clear the DMA interrupt sources */ 1227 /* Clear the DMA interrupt sources */
1228 SMC_DMA_ACK_IRQ(dev, dma); 1228 SMC_DMA_ACK_IRQ(dev, dma);
@@ -1270,7 +1270,7 @@ static void smc911x_timeout(struct net_device *dev)
1270 int status, mask; 1270 int status, mask;
1271 unsigned long flags; 1271 unsigned long flags;
1272 1272
1273 DBG(SMC_DEBUG_FUNC, "%s: --> %s\n", dev->name, __FUNCTION__); 1273 DBG(SMC_DEBUG_FUNC, "%s: --> %s\n", dev->name, __func__);
1274 1274
1275 spin_lock_irqsave(&lp->lock, flags); 1275 spin_lock_irqsave(&lp->lock, flags);
1276 status = SMC_GET_INT(lp); 1276 status = SMC_GET_INT(lp);
@@ -1308,7 +1308,7 @@ static void smc911x_set_multicast_list(struct net_device *dev)
1308 unsigned int mcr, update_multicast = 0; 1308 unsigned int mcr, update_multicast = 0;
1309 unsigned long flags; 1309 unsigned long flags;
1310 1310
1311 DBG(SMC_DEBUG_FUNC, "%s: --> %s\n", dev->name, __FUNCTION__); 1311 DBG(SMC_DEBUG_FUNC, "%s: --> %s\n", dev->name, __func__);
1312 1312
1313 spin_lock_irqsave(&lp->lock, flags); 1313 spin_lock_irqsave(&lp->lock, flags);
1314 SMC_GET_MAC_CR(lp, mcr); 1314 SMC_GET_MAC_CR(lp, mcr);
@@ -1410,7 +1410,7 @@ smc911x_open(struct net_device *dev)
1410{ 1410{
1411 struct smc911x_local *lp = netdev_priv(dev); 1411 struct smc911x_local *lp = netdev_priv(dev);
1412 1412
1413 DBG(SMC_DEBUG_FUNC, "%s: --> %s\n", dev->name, __FUNCTION__); 1413 DBG(SMC_DEBUG_FUNC, "%s: --> %s\n", dev->name, __func__);
1414 1414
1415 /* 1415 /*
1416 * Check that the address is valid. If its not, refuse 1416 * Check that the address is valid. If its not, refuse
@@ -1418,7 +1418,7 @@ smc911x_open(struct net_device *dev)
1418 * address using ifconfig eth0 hw ether xx:xx:xx:xx:xx:xx 1418 * address using ifconfig eth0 hw ether xx:xx:xx:xx:xx:xx
1419 */ 1419 */
1420 if (!is_valid_ether_addr(dev->dev_addr)) { 1420 if (!is_valid_ether_addr(dev->dev_addr)) {
1421 PRINTK("%s: no valid ethernet hw addr\n", __FUNCTION__); 1421 PRINTK("%s: no valid ethernet hw addr\n", __func__);
1422 return -EINVAL; 1422 return -EINVAL;
1423 } 1423 }
1424 1424
@@ -1447,7 +1447,7 @@ static int smc911x_close(struct net_device *dev)
1447{ 1447{
1448 struct smc911x_local *lp = netdev_priv(dev); 1448 struct smc911x_local *lp = netdev_priv(dev);
1449 1449
1450 DBG(SMC_DEBUG_FUNC, "%s: --> %s\n", dev->name, __FUNCTION__); 1450 DBG(SMC_DEBUG_FUNC, "%s: --> %s\n", dev->name, __func__);
1451 1451
1452 netif_stop_queue(dev); 1452 netif_stop_queue(dev);
1453 netif_carrier_off(dev); 1453 netif_carrier_off(dev);
@@ -1481,7 +1481,7 @@ smc911x_ethtool_getsettings(struct net_device *dev, struct ethtool_cmd *cmd)
1481 int ret, status; 1481 int ret, status;
1482 unsigned long flags; 1482 unsigned long flags;
1483 1483
1484 DBG(SMC_DEBUG_FUNC, "%s: --> %s\n", dev->name, __FUNCTION__); 1484 DBG(SMC_DEBUG_FUNC, "%s: --> %s\n", dev->name, __func__);
1485 cmd->maxtxpkt = 1; 1485 cmd->maxtxpkt = 1;
1486 cmd->maxrxpkt = 1; 1486 cmd->maxrxpkt = 1;
1487 1487
@@ -1619,7 +1619,7 @@ static int smc911x_ethtool_wait_eeprom_ready(struct net_device *dev)
1619 for(timeout=10;(e2p_cmd & E2P_CMD_EPC_BUSY_) && timeout; timeout--) { 1619 for(timeout=10;(e2p_cmd & E2P_CMD_EPC_BUSY_) && timeout; timeout--) {
1620 if (e2p_cmd & E2P_CMD_EPC_TIMEOUT_) { 1620 if (e2p_cmd & E2P_CMD_EPC_TIMEOUT_) {
1621 PRINTK("%s: %s timeout waiting for EEPROM to respond\n", 1621 PRINTK("%s: %s timeout waiting for EEPROM to respond\n",
1622 dev->name, __FUNCTION__); 1622 dev->name, __func__);
1623 return -EFAULT; 1623 return -EFAULT;
1624 } 1624 }
1625 mdelay(1); 1625 mdelay(1);
@@ -1627,7 +1627,7 @@ static int smc911x_ethtool_wait_eeprom_ready(struct net_device *dev)
1627 } 1627 }
1628 if (timeout == 0) { 1628 if (timeout == 0) {
1629 PRINTK("%s: %s timeout waiting for EEPROM CMD not busy\n", 1629 PRINTK("%s: %s timeout waiting for EEPROM CMD not busy\n",
1630 dev->name, __FUNCTION__); 1630 dev->name, __func__);
1631 return -ETIMEDOUT; 1631 return -ETIMEDOUT;
1632 } 1632 }
1633 return 0; 1633 return 0;
@@ -1740,7 +1740,7 @@ static int __init smc911x_findirq(struct net_device *dev)
1740 int timeout = 20; 1740 int timeout = 20;
1741 unsigned long cookie; 1741 unsigned long cookie;
1742 1742
1743 DBG(SMC_DEBUG_FUNC, "--> %s\n", __FUNCTION__); 1743 DBG(SMC_DEBUG_FUNC, "--> %s\n", __func__);
1744 1744
1745 cookie = probe_irq_on(); 1745 cookie = probe_irq_on();
1746 1746
@@ -1806,7 +1806,7 @@ static int __init smc911x_probe(struct net_device *dev)
1806 const char *version_string; 1806 const char *version_string;
1807 unsigned long irq_flags; 1807 unsigned long irq_flags;
1808 1808
1809 DBG(SMC_DEBUG_FUNC, "%s: --> %s\n", dev->name, __FUNCTION__); 1809 DBG(SMC_DEBUG_FUNC, "%s: --> %s\n", dev->name, __func__);
1810 1810
1811 /* First, see if the endian word is recognized */ 1811 /* First, see if the endian word is recognized */
1812 val = SMC_GET_BYTE_TEST(lp); 1812 val = SMC_GET_BYTE_TEST(lp);
@@ -2056,7 +2056,7 @@ static int smc911x_drv_probe(struct platform_device *pdev)
2056 unsigned int *addr; 2056 unsigned int *addr;
2057 int ret; 2057 int ret;
2058 2058
2059 DBG(SMC_DEBUG_FUNC, "--> %s\n", __FUNCTION__); 2059 DBG(SMC_DEBUG_FUNC, "--> %s\n", __func__);
2060 res = platform_get_resource(pdev, IORESOURCE_MEM, 0); 2060 res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
2061 if (!res) { 2061 if (!res) {
2062 ret = -ENODEV; 2062 ret = -ENODEV;
@@ -2127,7 +2127,7 @@ static int smc911x_drv_remove(struct platform_device *pdev)
2127 struct smc911x_local *lp = netdev_priv(ndev); 2127 struct smc911x_local *lp = netdev_priv(ndev);
2128 struct resource *res; 2128 struct resource *res;
2129 2129
2130 DBG(SMC_DEBUG_FUNC, "--> %s\n", __FUNCTION__); 2130 DBG(SMC_DEBUG_FUNC, "--> %s\n", __func__);
2131 platform_set_drvdata(pdev, NULL); 2131 platform_set_drvdata(pdev, NULL);
2132 2132
2133 unregister_netdev(ndev); 2133 unregister_netdev(ndev);
@@ -2157,7 +2157,7 @@ static int smc911x_drv_suspend(struct platform_device *dev, pm_message_t state)
2157 struct net_device *ndev = platform_get_drvdata(dev); 2157 struct net_device *ndev = platform_get_drvdata(dev);
2158 struct smc911x_local *lp = netdev_priv(ndev); 2158 struct smc911x_local *lp = netdev_priv(ndev);
2159 2159
2160 DBG(SMC_DEBUG_FUNC, "--> %s\n", __FUNCTION__); 2160 DBG(SMC_DEBUG_FUNC, "--> %s\n", __func__);
2161 if (ndev) { 2161 if (ndev) {
2162 if (netif_running(ndev)) { 2162 if (netif_running(ndev)) {
2163 netif_device_detach(ndev); 2163 netif_device_detach(ndev);
@@ -2175,7 +2175,7 @@ static int smc911x_drv_resume(struct platform_device *dev)
2175{ 2175{
2176 struct net_device *ndev = platform_get_drvdata(dev); 2176 struct net_device *ndev = platform_get_drvdata(dev);
2177 2177
2178 DBG(SMC_DEBUG_FUNC, "--> %s\n", __FUNCTION__); 2178 DBG(SMC_DEBUG_FUNC, "--> %s\n", __func__);
2179 if (ndev) { 2179 if (ndev) {
2180 struct smc911x_local *lp = netdev_priv(ndev); 2180 struct smc911x_local *lp = netdev_priv(ndev);
2181 2181