aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/smc911x.c
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2008-10-14 20:31:54 -0400
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2008-10-14 20:31:54 -0400
commit6dc6472581f693b5fc95aebedf67b4960fb85cf0 (patch)
tree06a5a9a08519950575505273eabced331ed51405 /drivers/net/smc911x.c
parentee673eaa72d8d185012b1027a05e25aba18c267f (diff)
parent8acd3a60bcca17c6d89c73cee3ad6057eb83ba1e (diff)
Merge commit 'origin'
Manual fixup of conflicts on: arch/powerpc/include/asm/dcr-regs.h drivers/net/ibm_newemac/core.h
Diffstat (limited to 'drivers/net/smc911x.c')
-rw-r--r--drivers/net/smc911x.c77
1 files changed, 40 insertions, 37 deletions
diff --git a/drivers/net/smc911x.c b/drivers/net/smc911x.c
index c5871624f972..8aa7460ef0e3 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
@@ -685,8 +685,10 @@ static void smc911x_phy_detect(struct net_device *dev)
685 * PHY#1 to PHY#31, and then PHY#0 last. 685 * PHY#1 to PHY#31, and then PHY#0 last.
686 */ 686 */
687 switch(lp->version) { 687 switch(lp->version) {
688 case 0x115: 688 case CHIP_9115:
689 case 0x117: 689 case CHIP_9117:
690 case CHIP_9215:
691 case CHIP_9217:
690 cfg = SMC_GET_HW_CFG(lp); 692 cfg = SMC_GET_HW_CFG(lp);
691 if (cfg & HW_CFG_EXT_PHY_DET_) { 693 if (cfg & HW_CFG_EXT_PHY_DET_) {
692 cfg &= ~HW_CFG_PHY_CLK_SEL_; 694 cfg &= ~HW_CFG_PHY_CLK_SEL_;
@@ -722,6 +724,9 @@ static void smc911x_phy_detect(struct net_device *dev)
722 break; 724 break;
723 } 725 }
724 } 726 }
727 if (phyaddr < 32)
728 /* Found an external PHY */
729 break;
725 } 730 }
726 default: 731 default:
727 /* Internal media only */ 732 /* Internal media only */
@@ -746,7 +751,7 @@ static int smc911x_phy_fixed(struct net_device *dev)
746 int phyaddr = lp->mii.phy_id; 751 int phyaddr = lp->mii.phy_id;
747 int bmcr; 752 int bmcr;
748 753
749 DBG(SMC_DEBUG_FUNC, "%s: --> %s\n", dev->name, __FUNCTION__); 754 DBG(SMC_DEBUG_FUNC, "%s: --> %s\n", dev->name, __func__);
750 755
751 /* Enter Link Disable state */ 756 /* Enter Link Disable state */
752 SMC_GET_PHY_BMCR(lp, phyaddr, bmcr); 757 SMC_GET_PHY_BMCR(lp, phyaddr, bmcr);
@@ -793,7 +798,7 @@ static int smc911x_phy_reset(struct net_device *dev, int phy)
793 unsigned long flags; 798 unsigned long flags;
794 unsigned int reg; 799 unsigned int reg;
795 800
796 DBG(SMC_DEBUG_FUNC, "%s: --> %s()\n", dev->name, __FUNCTION__); 801 DBG(SMC_DEBUG_FUNC, "%s: --> %s()\n", dev->name, __func__);
797 802
798 spin_lock_irqsave(&lp->lock, flags); 803 spin_lock_irqsave(&lp->lock, flags);
799 reg = SMC_GET_PMT_CTRL(lp); 804 reg = SMC_GET_PMT_CTRL(lp);
@@ -852,7 +857,7 @@ static void smc911x_phy_check_media(struct net_device *dev, int init)
852 int phyaddr = lp->mii.phy_id; 857 int phyaddr = lp->mii.phy_id;
853 unsigned int bmcr, cr; 858 unsigned int bmcr, cr;
854 859
855 DBG(SMC_DEBUG_FUNC, "%s: --> %s\n", dev->name, __FUNCTION__); 860 DBG(SMC_DEBUG_FUNC, "%s: --> %s\n", dev->name, __func__);
856 861
857 if (mii_check_media(&lp->mii, netif_msg_link(lp), init)) { 862 if (mii_check_media(&lp->mii, netif_msg_link(lp), init)) {
858 /* duplex state has changed */ 863 /* duplex state has changed */
@@ -892,7 +897,7 @@ static void smc911x_phy_configure(struct work_struct *work)
892 int status; 897 int status;
893 unsigned long flags; 898 unsigned long flags;
894 899
895 DBG(SMC_DEBUG_FUNC, "%s: --> %s()\n", dev->name, __FUNCTION__); 900 DBG(SMC_DEBUG_FUNC, "%s: --> %s()\n", dev->name, __func__);
896 901
897 /* 902 /*
898 * We should not be called if phy_type is zero. 903 * We should not be called if phy_type is zero.
@@ -985,7 +990,7 @@ static void smc911x_phy_interrupt(struct net_device *dev)
985 int phyaddr = lp->mii.phy_id; 990 int phyaddr = lp->mii.phy_id;
986 int status; 991 int status;
987 992
988 DBG(SMC_DEBUG_FUNC, "%s: --> %s\n", dev->name, __FUNCTION__); 993 DBG(SMC_DEBUG_FUNC, "%s: --> %s\n", dev->name, __func__);
989 994
990 if (lp->phy_type == 0) 995 if (lp->phy_type == 0)
991 return; 996 return;
@@ -1013,7 +1018,7 @@ static irqreturn_t smc911x_interrupt(int irq, void *dev_id)
1013 unsigned int rx_overrun=0, cr, pkts; 1018 unsigned int rx_overrun=0, cr, pkts;
1014 unsigned long flags; 1019 unsigned long flags;
1015 1020
1016 DBG(SMC_DEBUG_FUNC, "%s: --> %s\n", dev->name, __FUNCTION__); 1021 DBG(SMC_DEBUG_FUNC, "%s: --> %s\n", dev->name, __func__);
1017 1022
1018 spin_lock_irqsave(&lp->lock, flags); 1023 spin_lock_irqsave(&lp->lock, flags);
1019 1024
@@ -1174,8 +1179,6 @@ static irqreturn_t smc911x_interrupt(int irq, void *dev_id)
1174 1179
1175 spin_unlock_irqrestore(&lp->lock, flags); 1180 spin_unlock_irqrestore(&lp->lock, flags);
1176 1181
1177 DBG(3, "%s: Interrupt done (%d loops)\n", dev->name, 8-timeout);
1178
1179 return IRQ_HANDLED; 1182 return IRQ_HANDLED;
1180} 1183}
1181 1184
@@ -1188,7 +1191,7 @@ smc911x_tx_dma_irq(int dma, void *data)
1188 struct sk_buff *skb = lp->current_tx_skb; 1191 struct sk_buff *skb = lp->current_tx_skb;
1189 unsigned long flags; 1192 unsigned long flags;
1190 1193
1191 DBG(SMC_DEBUG_FUNC, "%s: --> %s\n", dev->name, __FUNCTION__); 1194 DBG(SMC_DEBUG_FUNC, "%s: --> %s\n", dev->name, __func__);
1192 1195
1193 DBG(SMC_DEBUG_TX | SMC_DEBUG_DMA, "%s: TX DMA irq handler\n", dev->name); 1196 DBG(SMC_DEBUG_TX | SMC_DEBUG_DMA, "%s: TX DMA irq handler\n", dev->name);
1194 /* Clear the DMA interrupt sources */ 1197 /* Clear the DMA interrupt sources */
@@ -1224,7 +1227,7 @@ smc911x_rx_dma_irq(int dma, void *data)
1224 unsigned long flags; 1227 unsigned long flags;
1225 unsigned int pkts; 1228 unsigned int pkts;
1226 1229
1227 DBG(SMC_DEBUG_FUNC, "%s: --> %s\n", dev->name, __FUNCTION__); 1230 DBG(SMC_DEBUG_FUNC, "%s: --> %s\n", dev->name, __func__);
1228 DBG(SMC_DEBUG_RX | SMC_DEBUG_DMA, "%s: RX DMA irq handler\n", dev->name); 1231 DBG(SMC_DEBUG_RX | SMC_DEBUG_DMA, "%s: RX DMA irq handler\n", dev->name);
1229 /* Clear the DMA interrupt sources */ 1232 /* Clear the DMA interrupt sources */
1230 SMC_DMA_ACK_IRQ(dev, dma); 1233 SMC_DMA_ACK_IRQ(dev, dma);
@@ -1272,7 +1275,7 @@ static void smc911x_timeout(struct net_device *dev)
1272 int status, mask; 1275 int status, mask;
1273 unsigned long flags; 1276 unsigned long flags;
1274 1277
1275 DBG(SMC_DEBUG_FUNC, "%s: --> %s\n", dev->name, __FUNCTION__); 1278 DBG(SMC_DEBUG_FUNC, "%s: --> %s\n", dev->name, __func__);
1276 1279
1277 spin_lock_irqsave(&lp->lock, flags); 1280 spin_lock_irqsave(&lp->lock, flags);
1278 status = SMC_GET_INT(lp); 1281 status = SMC_GET_INT(lp);
@@ -1310,7 +1313,7 @@ static void smc911x_set_multicast_list(struct net_device *dev)
1310 unsigned int mcr, update_multicast = 0; 1313 unsigned int mcr, update_multicast = 0;
1311 unsigned long flags; 1314 unsigned long flags;
1312 1315
1313 DBG(SMC_DEBUG_FUNC, "%s: --> %s\n", dev->name, __FUNCTION__); 1316 DBG(SMC_DEBUG_FUNC, "%s: --> %s\n", dev->name, __func__);
1314 1317
1315 spin_lock_irqsave(&lp->lock, flags); 1318 spin_lock_irqsave(&lp->lock, flags);
1316 SMC_GET_MAC_CR(lp, mcr); 1319 SMC_GET_MAC_CR(lp, mcr);
@@ -1412,7 +1415,7 @@ smc911x_open(struct net_device *dev)
1412{ 1415{
1413 struct smc911x_local *lp = netdev_priv(dev); 1416 struct smc911x_local *lp = netdev_priv(dev);
1414 1417
1415 DBG(SMC_DEBUG_FUNC, "%s: --> %s\n", dev->name, __FUNCTION__); 1418 DBG(SMC_DEBUG_FUNC, "%s: --> %s\n", dev->name, __func__);
1416 1419
1417 /* 1420 /*
1418 * Check that the address is valid. If its not, refuse 1421 * Check that the address is valid. If its not, refuse
@@ -1420,7 +1423,7 @@ smc911x_open(struct net_device *dev)
1420 * address using ifconfig eth0 hw ether xx:xx:xx:xx:xx:xx 1423 * address using ifconfig eth0 hw ether xx:xx:xx:xx:xx:xx
1421 */ 1424 */
1422 if (!is_valid_ether_addr(dev->dev_addr)) { 1425 if (!is_valid_ether_addr(dev->dev_addr)) {
1423 PRINTK("%s: no valid ethernet hw addr\n", __FUNCTION__); 1426 PRINTK("%s: no valid ethernet hw addr\n", __func__);
1424 return -EINVAL; 1427 return -EINVAL;
1425 } 1428 }
1426 1429
@@ -1449,7 +1452,7 @@ static int smc911x_close(struct net_device *dev)
1449{ 1452{
1450 struct smc911x_local *lp = netdev_priv(dev); 1453 struct smc911x_local *lp = netdev_priv(dev);
1451 1454
1452 DBG(SMC_DEBUG_FUNC, "%s: --> %s\n", dev->name, __FUNCTION__); 1455 DBG(SMC_DEBUG_FUNC, "%s: --> %s\n", dev->name, __func__);
1453 1456
1454 netif_stop_queue(dev); 1457 netif_stop_queue(dev);
1455 netif_carrier_off(dev); 1458 netif_carrier_off(dev);
@@ -1483,7 +1486,7 @@ smc911x_ethtool_getsettings(struct net_device *dev, struct ethtool_cmd *cmd)
1483 int ret, status; 1486 int ret, status;
1484 unsigned long flags; 1487 unsigned long flags;
1485 1488
1486 DBG(SMC_DEBUG_FUNC, "%s: --> %s\n", dev->name, __FUNCTION__); 1489 DBG(SMC_DEBUG_FUNC, "%s: --> %s\n", dev->name, __func__);
1487 cmd->maxtxpkt = 1; 1490 cmd->maxtxpkt = 1;
1488 cmd->maxrxpkt = 1; 1491 cmd->maxrxpkt = 1;
1489 1492
@@ -1621,7 +1624,7 @@ static int smc911x_ethtool_wait_eeprom_ready(struct net_device *dev)
1621 for(timeout=10;(e2p_cmd & E2P_CMD_EPC_BUSY_) && timeout; timeout--) { 1624 for(timeout=10;(e2p_cmd & E2P_CMD_EPC_BUSY_) && timeout; timeout--) {
1622 if (e2p_cmd & E2P_CMD_EPC_TIMEOUT_) { 1625 if (e2p_cmd & E2P_CMD_EPC_TIMEOUT_) {
1623 PRINTK("%s: %s timeout waiting for EEPROM to respond\n", 1626 PRINTK("%s: %s timeout waiting for EEPROM to respond\n",
1624 dev->name, __FUNCTION__); 1627 dev->name, __func__);
1625 return -EFAULT; 1628 return -EFAULT;
1626 } 1629 }
1627 mdelay(1); 1630 mdelay(1);
@@ -1629,7 +1632,7 @@ static int smc911x_ethtool_wait_eeprom_ready(struct net_device *dev)
1629 } 1632 }
1630 if (timeout == 0) { 1633 if (timeout == 0) {
1631 PRINTK("%s: %s timeout waiting for EEPROM CMD not busy\n", 1634 PRINTK("%s: %s timeout waiting for EEPROM CMD not busy\n",
1632 dev->name, __FUNCTION__); 1635 dev->name, __func__);
1633 return -ETIMEDOUT; 1636 return -ETIMEDOUT;
1634 } 1637 }
1635 return 0; 1638 return 0;
@@ -1742,7 +1745,7 @@ static int __init smc911x_findirq(struct net_device *dev)
1742 int timeout = 20; 1745 int timeout = 20;
1743 unsigned long cookie; 1746 unsigned long cookie;
1744 1747
1745 DBG(SMC_DEBUG_FUNC, "--> %s\n", __FUNCTION__); 1748 DBG(SMC_DEBUG_FUNC, "--> %s\n", __func__);
1746 1749
1747 cookie = probe_irq_on(); 1750 cookie = probe_irq_on();
1748 1751
@@ -1808,7 +1811,7 @@ static int __init smc911x_probe(struct net_device *dev)
1808 const char *version_string; 1811 const char *version_string;
1809 unsigned long irq_flags; 1812 unsigned long irq_flags;
1810 1813
1811 DBG(SMC_DEBUG_FUNC, "%s: --> %s\n", dev->name, __FUNCTION__); 1814 DBG(SMC_DEBUG_FUNC, "%s: --> %s\n", dev->name, __func__);
1812 1815
1813 /* First, see if the endian word is recognized */ 1816 /* First, see if the endian word is recognized */
1814 val = SMC_GET_BYTE_TEST(lp); 1817 val = SMC_GET_BYTE_TEST(lp);
@@ -2058,7 +2061,7 @@ static int smc911x_drv_probe(struct platform_device *pdev)
2058 unsigned int *addr; 2061 unsigned int *addr;
2059 int ret; 2062 int ret;
2060 2063
2061 DBG(SMC_DEBUG_FUNC, "--> %s\n", __FUNCTION__); 2064 DBG(SMC_DEBUG_FUNC, "--> %s\n", __func__);
2062 res = platform_get_resource(pdev, IORESOURCE_MEM, 0); 2065 res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
2063 if (!res) { 2066 if (!res) {
2064 ret = -ENODEV; 2067 ret = -ENODEV;
@@ -2129,7 +2132,7 @@ static int smc911x_drv_remove(struct platform_device *pdev)
2129 struct smc911x_local *lp = netdev_priv(ndev); 2132 struct smc911x_local *lp = netdev_priv(ndev);
2130 struct resource *res; 2133 struct resource *res;
2131 2134
2132 DBG(SMC_DEBUG_FUNC, "--> %s\n", __FUNCTION__); 2135 DBG(SMC_DEBUG_FUNC, "--> %s\n", __func__);
2133 platform_set_drvdata(pdev, NULL); 2136 platform_set_drvdata(pdev, NULL);
2134 2137
2135 unregister_netdev(ndev); 2138 unregister_netdev(ndev);
@@ -2159,7 +2162,7 @@ static int smc911x_drv_suspend(struct platform_device *dev, pm_message_t state)
2159 struct net_device *ndev = platform_get_drvdata(dev); 2162 struct net_device *ndev = platform_get_drvdata(dev);
2160 struct smc911x_local *lp = netdev_priv(ndev); 2163 struct smc911x_local *lp = netdev_priv(ndev);
2161 2164
2162 DBG(SMC_DEBUG_FUNC, "--> %s\n", __FUNCTION__); 2165 DBG(SMC_DEBUG_FUNC, "--> %s\n", __func__);
2163 if (ndev) { 2166 if (ndev) {
2164 if (netif_running(ndev)) { 2167 if (netif_running(ndev)) {
2165 netif_device_detach(ndev); 2168 netif_device_detach(ndev);
@@ -2177,7 +2180,7 @@ static int smc911x_drv_resume(struct platform_device *dev)
2177{ 2180{
2178 struct net_device *ndev = platform_get_drvdata(dev); 2181 struct net_device *ndev = platform_get_drvdata(dev);
2179 2182
2180 DBG(SMC_DEBUG_FUNC, "--> %s\n", __FUNCTION__); 2183 DBG(SMC_DEBUG_FUNC, "--> %s\n", __func__);
2181 if (ndev) { 2184 if (ndev) {
2182 struct smc911x_local *lp = netdev_priv(ndev); 2185 struct smc911x_local *lp = netdev_priv(ndev);
2183 2186