diff options
Diffstat (limited to 'drivers/net/ethernet/ti/davinci_emac.c')
-rw-r--r-- | drivers/net/ethernet/ti/davinci_emac.c | 78 |
1 files changed, 37 insertions, 41 deletions
diff --git a/drivers/net/ethernet/ti/davinci_emac.c b/drivers/net/ethernet/ti/davinci_emac.c index 4da93a5d7ec6..ab0bbb78699a 100644 --- a/drivers/net/ethernet/ti/davinci_emac.c +++ b/drivers/net/ethernet/ti/davinci_emac.c | |||
@@ -375,7 +375,7 @@ static char *emac_rxhost_errcodes[16] = { | |||
375 | #define emac_ctrl_write(reg, val) iowrite32(val, (priv->ctrl_base + (reg))) | 375 | #define emac_ctrl_write(reg, val) iowrite32(val, (priv->ctrl_base + (reg))) |
376 | 376 | ||
377 | /** | 377 | /** |
378 | * emac_dump_regs: Dump important EMAC registers to debug terminal | 378 | * emac_dump_regs - Dump important EMAC registers to debug terminal |
379 | * @priv: The DaVinci EMAC private adapter structure | 379 | * @priv: The DaVinci EMAC private adapter structure |
380 | * | 380 | * |
381 | * Executes ethtool set cmd & sets phy mode | 381 | * Executes ethtool set cmd & sets phy mode |
@@ -466,7 +466,7 @@ static void emac_dump_regs(struct emac_priv *priv) | |||
466 | } | 466 | } |
467 | 467 | ||
468 | /** | 468 | /** |
469 | * emac_get_drvinfo: Get EMAC driver information | 469 | * emac_get_drvinfo - Get EMAC driver information |
470 | * @ndev: The DaVinci EMAC network adapter | 470 | * @ndev: The DaVinci EMAC network adapter |
471 | * @info: ethtool info structure containing name and version | 471 | * @info: ethtool info structure containing name and version |
472 | * | 472 | * |
@@ -481,7 +481,7 @@ static void emac_get_drvinfo(struct net_device *ndev, | |||
481 | } | 481 | } |
482 | 482 | ||
483 | /** | 483 | /** |
484 | * emac_get_settings: Get EMAC settings | 484 | * emac_get_settings - Get EMAC settings |
485 | * @ndev: The DaVinci EMAC network adapter | 485 | * @ndev: The DaVinci EMAC network adapter |
486 | * @ecmd: ethtool command | 486 | * @ecmd: ethtool command |
487 | * | 487 | * |
@@ -500,7 +500,7 @@ static int emac_get_settings(struct net_device *ndev, | |||
500 | } | 500 | } |
501 | 501 | ||
502 | /** | 502 | /** |
503 | * emac_set_settings: Set EMAC settings | 503 | * emac_set_settings - Set EMAC settings |
504 | * @ndev: The DaVinci EMAC network adapter | 504 | * @ndev: The DaVinci EMAC network adapter |
505 | * @ecmd: ethtool command | 505 | * @ecmd: ethtool command |
506 | * | 506 | * |
@@ -518,7 +518,7 @@ static int emac_set_settings(struct net_device *ndev, struct ethtool_cmd *ecmd) | |||
518 | } | 518 | } |
519 | 519 | ||
520 | /** | 520 | /** |
521 | * emac_get_coalesce : Get interrupt coalesce settings for this device | 521 | * emac_get_coalesce - Get interrupt coalesce settings for this device |
522 | * @ndev : The DaVinci EMAC network adapter | 522 | * @ndev : The DaVinci EMAC network adapter |
523 | * @coal : ethtool coalesce settings structure | 523 | * @coal : ethtool coalesce settings structure |
524 | * | 524 | * |
@@ -536,7 +536,7 @@ static int emac_get_coalesce(struct net_device *ndev, | |||
536 | } | 536 | } |
537 | 537 | ||
538 | /** | 538 | /** |
539 | * emac_set_coalesce : Set interrupt coalesce settings for this device | 539 | * emac_set_coalesce - Set interrupt coalesce settings for this device |
540 | * @ndev : The DaVinci EMAC network adapter | 540 | * @ndev : The DaVinci EMAC network adapter |
541 | * @coal : ethtool coalesce settings structure | 541 | * @coal : ethtool coalesce settings structure |
542 | * | 542 | * |
@@ -614,11 +614,9 @@ static int emac_set_coalesce(struct net_device *ndev, | |||
614 | } | 614 | } |
615 | 615 | ||
616 | 616 | ||
617 | /** | 617 | /* ethtool_ops: DaVinci EMAC Ethtool structure |
618 | * ethtool_ops: DaVinci EMAC Ethtool structure | ||
619 | * | 618 | * |
620 | * Ethtool support for EMAC adapter | 619 | * Ethtool support for EMAC adapter |
621 | * | ||
622 | */ | 620 | */ |
623 | static const struct ethtool_ops ethtool_ops = { | 621 | static const struct ethtool_ops ethtool_ops = { |
624 | .get_drvinfo = emac_get_drvinfo, | 622 | .get_drvinfo = emac_get_drvinfo, |
@@ -631,7 +629,7 @@ static const struct ethtool_ops ethtool_ops = { | |||
631 | }; | 629 | }; |
632 | 630 | ||
633 | /** | 631 | /** |
634 | * emac_update_phystatus: Update Phy status | 632 | * emac_update_phystatus - Update Phy status |
635 | * @priv: The DaVinci EMAC private adapter structure | 633 | * @priv: The DaVinci EMAC private adapter structure |
636 | * | 634 | * |
637 | * Updates phy status and takes action for network queue if required | 635 | * Updates phy status and takes action for network queue if required |
@@ -697,7 +695,7 @@ static void emac_update_phystatus(struct emac_priv *priv) | |||
697 | } | 695 | } |
698 | 696 | ||
699 | /** | 697 | /** |
700 | * hash_get: Calculate hash value from mac address | 698 | * hash_get - Calculate hash value from mac address |
701 | * @addr: mac address to delete from hash table | 699 | * @addr: mac address to delete from hash table |
702 | * | 700 | * |
703 | * Calculates hash value from mac address | 701 | * Calculates hash value from mac address |
@@ -723,9 +721,9 @@ static u32 hash_get(u8 *addr) | |||
723 | } | 721 | } |
724 | 722 | ||
725 | /** | 723 | /** |
726 | * hash_add: Hash function to add mac addr from hash table | 724 | * hash_add - Hash function to add mac addr from hash table |
727 | * @priv: The DaVinci EMAC private adapter structure | 725 | * @priv: The DaVinci EMAC private adapter structure |
728 | * mac_addr: mac address to delete from hash table | 726 | * @mac_addr: mac address to delete from hash table |
729 | * | 727 | * |
730 | * Adds mac address to the internal hash table | 728 | * Adds mac address to the internal hash table |
731 | * | 729 | * |
@@ -765,9 +763,9 @@ static int hash_add(struct emac_priv *priv, u8 *mac_addr) | |||
765 | } | 763 | } |
766 | 764 | ||
767 | /** | 765 | /** |
768 | * hash_del: Hash function to delete mac addr from hash table | 766 | * hash_del - Hash function to delete mac addr from hash table |
769 | * @priv: The DaVinci EMAC private adapter structure | 767 | * @priv: The DaVinci EMAC private adapter structure |
770 | * mac_addr: mac address to delete from hash table | 768 | * @mac_addr: mac address to delete from hash table |
771 | * | 769 | * |
772 | * Removes mac address from the internal hash table | 770 | * Removes mac address from the internal hash table |
773 | * | 771 | * |
@@ -807,7 +805,7 @@ static int hash_del(struct emac_priv *priv, u8 *mac_addr) | |||
807 | #define EMAC_ALL_MULTI_CLR 3 | 805 | #define EMAC_ALL_MULTI_CLR 3 |
808 | 806 | ||
809 | /** | 807 | /** |
810 | * emac_add_mcast: Set multicast address in the EMAC adapter (Internal) | 808 | * emac_add_mcast - Set multicast address in the EMAC adapter (Internal) |
811 | * @priv: The DaVinci EMAC private adapter structure | 809 | * @priv: The DaVinci EMAC private adapter structure |
812 | * @action: multicast operation to perform | 810 | * @action: multicast operation to perform |
813 | * mac_addr: mac address to set | 811 | * mac_addr: mac address to set |
@@ -855,7 +853,7 @@ static void emac_add_mcast(struct emac_priv *priv, u32 action, u8 *mac_addr) | |||
855 | } | 853 | } |
856 | 854 | ||
857 | /** | 855 | /** |
858 | * emac_dev_mcast_set: Set multicast address in the EMAC adapter | 856 | * emac_dev_mcast_set - Set multicast address in the EMAC adapter |
859 | * @ndev: The DaVinci EMAC network adapter | 857 | * @ndev: The DaVinci EMAC network adapter |
860 | * | 858 | * |
861 | * Set multicast addresses in EMAC adapter | 859 | * Set multicast addresses in EMAC adapter |
@@ -901,7 +899,7 @@ static void emac_dev_mcast_set(struct net_device *ndev) | |||
901 | *************************************************************************/ | 899 | *************************************************************************/ |
902 | 900 | ||
903 | /** | 901 | /** |
904 | * emac_int_disable: Disable EMAC module interrupt (from adapter) | 902 | * emac_int_disable - Disable EMAC module interrupt (from adapter) |
905 | * @priv: The DaVinci EMAC private adapter structure | 903 | * @priv: The DaVinci EMAC private adapter structure |
906 | * | 904 | * |
907 | * Disable EMAC interrupt on the adapter | 905 | * Disable EMAC interrupt on the adapter |
@@ -931,7 +929,7 @@ static void emac_int_disable(struct emac_priv *priv) | |||
931 | } | 929 | } |
932 | 930 | ||
933 | /** | 931 | /** |
934 | * emac_int_enable: Enable EMAC module interrupt (from adapter) | 932 | * emac_int_enable - Enable EMAC module interrupt (from adapter) |
935 | * @priv: The DaVinci EMAC private adapter structure | 933 | * @priv: The DaVinci EMAC private adapter structure |
936 | * | 934 | * |
937 | * Enable EMAC interrupt on the adapter | 935 | * Enable EMAC interrupt on the adapter |
@@ -967,7 +965,7 @@ static void emac_int_enable(struct emac_priv *priv) | |||
967 | } | 965 | } |
968 | 966 | ||
969 | /** | 967 | /** |
970 | * emac_irq: EMAC interrupt handler | 968 | * emac_irq - EMAC interrupt handler |
971 | * @irq: interrupt number | 969 | * @irq: interrupt number |
972 | * @dev_id: EMAC network adapter data structure ptr | 970 | * @dev_id: EMAC network adapter data structure ptr |
973 | * | 971 | * |
@@ -1060,7 +1058,7 @@ static void emac_tx_handler(void *token, int len, int status) | |||
1060 | } | 1058 | } |
1061 | 1059 | ||
1062 | /** | 1060 | /** |
1063 | * emac_dev_xmit: EMAC Transmit function | 1061 | * emac_dev_xmit - EMAC Transmit function |
1064 | * @skb: SKB pointer | 1062 | * @skb: SKB pointer |
1065 | * @ndev: The DaVinci EMAC network adapter | 1063 | * @ndev: The DaVinci EMAC network adapter |
1066 | * | 1064 | * |
@@ -1111,7 +1109,7 @@ fail_tx: | |||
1111 | } | 1109 | } |
1112 | 1110 | ||
1113 | /** | 1111 | /** |
1114 | * emac_dev_tx_timeout: EMAC Transmit timeout function | 1112 | * emac_dev_tx_timeout - EMAC Transmit timeout function |
1115 | * @ndev: The DaVinci EMAC network adapter | 1113 | * @ndev: The DaVinci EMAC network adapter |
1116 | * | 1114 | * |
1117 | * Called when system detects that a skb timeout period has expired | 1115 | * Called when system detects that a skb timeout period has expired |
@@ -1138,7 +1136,7 @@ static void emac_dev_tx_timeout(struct net_device *ndev) | |||
1138 | } | 1136 | } |
1139 | 1137 | ||
1140 | /** | 1138 | /** |
1141 | * emac_set_type0addr: Set EMAC Type0 mac address | 1139 | * emac_set_type0addr - Set EMAC Type0 mac address |
1142 | * @priv: The DaVinci EMAC private adapter structure | 1140 | * @priv: The DaVinci EMAC private adapter structure |
1143 | * @ch: RX channel number | 1141 | * @ch: RX channel number |
1144 | * @mac_addr: MAC address to set in device | 1142 | * @mac_addr: MAC address to set in device |
@@ -1165,7 +1163,7 @@ static void emac_set_type0addr(struct emac_priv *priv, u32 ch, char *mac_addr) | |||
1165 | } | 1163 | } |
1166 | 1164 | ||
1167 | /** | 1165 | /** |
1168 | * emac_set_type1addr: Set EMAC Type1 mac address | 1166 | * emac_set_type1addr - Set EMAC Type1 mac address |
1169 | * @priv: The DaVinci EMAC private adapter structure | 1167 | * @priv: The DaVinci EMAC private adapter structure |
1170 | * @ch: RX channel number | 1168 | * @ch: RX channel number |
1171 | * @mac_addr: MAC address to set in device | 1169 | * @mac_addr: MAC address to set in device |
@@ -1187,7 +1185,7 @@ static void emac_set_type1addr(struct emac_priv *priv, u32 ch, char *mac_addr) | |||
1187 | } | 1185 | } |
1188 | 1186 | ||
1189 | /** | 1187 | /** |
1190 | * emac_set_type2addr: Set EMAC Type2 mac address | 1188 | * emac_set_type2addr - Set EMAC Type2 mac address |
1191 | * @priv: The DaVinci EMAC private adapter structure | 1189 | * @priv: The DaVinci EMAC private adapter structure |
1192 | * @ch: RX channel number | 1190 | * @ch: RX channel number |
1193 | * @mac_addr: MAC address to set in device | 1191 | * @mac_addr: MAC address to set in device |
@@ -1213,7 +1211,7 @@ static void emac_set_type2addr(struct emac_priv *priv, u32 ch, | |||
1213 | } | 1211 | } |
1214 | 1212 | ||
1215 | /** | 1213 | /** |
1216 | * emac_setmac: Set mac address in the adapter (internal function) | 1214 | * emac_setmac - Set mac address in the adapter (internal function) |
1217 | * @priv: The DaVinci EMAC private adapter structure | 1215 | * @priv: The DaVinci EMAC private adapter structure |
1218 | * @ch: RX channel number | 1216 | * @ch: RX channel number |
1219 | * @mac_addr: MAC address to set in device | 1217 | * @mac_addr: MAC address to set in device |
@@ -1242,7 +1240,7 @@ static void emac_setmac(struct emac_priv *priv, u32 ch, char *mac_addr) | |||
1242 | } | 1240 | } |
1243 | 1241 | ||
1244 | /** | 1242 | /** |
1245 | * emac_dev_setmac_addr: Set mac address in the adapter | 1243 | * emac_dev_setmac_addr - Set mac address in the adapter |
1246 | * @ndev: The DaVinci EMAC network adapter | 1244 | * @ndev: The DaVinci EMAC network adapter |
1247 | * @addr: MAC address to set in device | 1245 | * @addr: MAC address to set in device |
1248 | * | 1246 | * |
@@ -1277,7 +1275,7 @@ static int emac_dev_setmac_addr(struct net_device *ndev, void *addr) | |||
1277 | } | 1275 | } |
1278 | 1276 | ||
1279 | /** | 1277 | /** |
1280 | * emac_hw_enable: Enable EMAC hardware for packet transmission/reception | 1278 | * emac_hw_enable - Enable EMAC hardware for packet transmission/reception |
1281 | * @priv: The DaVinci EMAC private adapter structure | 1279 | * @priv: The DaVinci EMAC private adapter structure |
1282 | * | 1280 | * |
1283 | * Enables EMAC hardware for packet processing - enables PHY, enables RX | 1281 | * Enables EMAC hardware for packet processing - enables PHY, enables RX |
@@ -1347,7 +1345,7 @@ static int emac_hw_enable(struct emac_priv *priv) | |||
1347 | } | 1345 | } |
1348 | 1346 | ||
1349 | /** | 1347 | /** |
1350 | * emac_poll: EMAC NAPI Poll function | 1348 | * emac_poll - EMAC NAPI Poll function |
1351 | * @ndev: The DaVinci EMAC network adapter | 1349 | * @ndev: The DaVinci EMAC network adapter |
1352 | * @budget: Number of receive packets to process (as told by NAPI layer) | 1350 | * @budget: Number of receive packets to process (as told by NAPI layer) |
1353 | * | 1351 | * |
@@ -1430,7 +1428,7 @@ static int emac_poll(struct napi_struct *napi, int budget) | |||
1430 | 1428 | ||
1431 | #ifdef CONFIG_NET_POLL_CONTROLLER | 1429 | #ifdef CONFIG_NET_POLL_CONTROLLER |
1432 | /** | 1430 | /** |
1433 | * emac_poll_controller: EMAC Poll controller function | 1431 | * emac_poll_controller - EMAC Poll controller function |
1434 | * @ndev: The DaVinci EMAC network adapter | 1432 | * @ndev: The DaVinci EMAC network adapter |
1435 | * | 1433 | * |
1436 | * Polled functionality used by netconsole and others in non interrupt mode | 1434 | * Polled functionality used by netconsole and others in non interrupt mode |
@@ -1489,7 +1487,7 @@ static void emac_adjust_link(struct net_device *ndev) | |||
1489 | *************************************************************************/ | 1487 | *************************************************************************/ |
1490 | 1488 | ||
1491 | /** | 1489 | /** |
1492 | * emac_devioctl: EMAC adapter ioctl | 1490 | * emac_devioctl - EMAC adapter ioctl |
1493 | * @ndev: The DaVinci EMAC network adapter | 1491 | * @ndev: The DaVinci EMAC network adapter |
1494 | * @ifrq: request parameter | 1492 | * @ifrq: request parameter |
1495 | * @cmd: command parameter | 1493 | * @cmd: command parameter |
@@ -1516,7 +1514,7 @@ static int match_first_device(struct device *dev, void *data) | |||
1516 | } | 1514 | } |
1517 | 1515 | ||
1518 | /** | 1516 | /** |
1519 | * emac_dev_open: EMAC device open | 1517 | * emac_dev_open - EMAC device open |
1520 | * @ndev: The DaVinci EMAC network adapter | 1518 | * @ndev: The DaVinci EMAC network adapter |
1521 | * | 1519 | * |
1522 | * Called when system wants to start the interface. We init TX/RX channels | 1520 | * Called when system wants to start the interface. We init TX/RX channels |
@@ -1649,7 +1647,7 @@ rollback: | |||
1649 | } | 1647 | } |
1650 | 1648 | ||
1651 | /** | 1649 | /** |
1652 | * emac_dev_stop: EMAC device stop | 1650 | * emac_dev_stop - EMAC device stop |
1653 | * @ndev: The DaVinci EMAC network adapter | 1651 | * @ndev: The DaVinci EMAC network adapter |
1654 | * | 1652 | * |
1655 | * Called when system wants to stop or down the interface. We stop the network | 1653 | * Called when system wants to stop or down the interface. We stop the network |
@@ -1691,7 +1689,7 @@ static int emac_dev_stop(struct net_device *ndev) | |||
1691 | } | 1689 | } |
1692 | 1690 | ||
1693 | /** | 1691 | /** |
1694 | * emac_dev_getnetstats: EMAC get statistics function | 1692 | * emac_dev_getnetstats - EMAC get statistics function |
1695 | * @ndev: The DaVinci EMAC network adapter | 1693 | * @ndev: The DaVinci EMAC network adapter |
1696 | * | 1694 | * |
1697 | * Called when system wants to get statistics from the device. | 1695 | * Called when system wants to get statistics from the device. |
@@ -1763,7 +1761,7 @@ static const struct net_device_ops emac_netdev_ops = { | |||
1763 | }; | 1761 | }; |
1764 | 1762 | ||
1765 | /** | 1763 | /** |
1766 | * davinci_emac_probe: EMAC device probe | 1764 | * davinci_emac_probe - EMAC device probe |
1767 | * @pdev: The DaVinci EMAC device that we are removing | 1765 | * @pdev: The DaVinci EMAC device that we are removing |
1768 | * | 1766 | * |
1769 | * Called when probing for emac devicesr. We get details of instances and | 1767 | * Called when probing for emac devicesr. We get details of instances and |
@@ -1949,7 +1947,7 @@ free_clk: | |||
1949 | } | 1947 | } |
1950 | 1948 | ||
1951 | /** | 1949 | /** |
1952 | * davinci_emac_remove: EMAC device remove | 1950 | * davinci_emac_remove - EMAC device remove |
1953 | * @pdev: The DaVinci EMAC device that we are removing | 1951 | * @pdev: The DaVinci EMAC device that we are removing |
1954 | * | 1952 | * |
1955 | * Called when removing the device driver. We disable clock usage and release | 1953 | * Called when removing the device driver. We disable clock usage and release |
@@ -2015,9 +2013,7 @@ static const struct dev_pm_ops davinci_emac_pm_ops = { | |||
2015 | .resume = davinci_emac_resume, | 2013 | .resume = davinci_emac_resume, |
2016 | }; | 2014 | }; |
2017 | 2015 | ||
2018 | /** | 2016 | /* davinci_emac_driver: EMAC platform driver structure */ |
2019 | * davinci_emac_driver: EMAC platform driver structure | ||
2020 | */ | ||
2021 | static struct platform_driver davinci_emac_driver = { | 2017 | static struct platform_driver davinci_emac_driver = { |
2022 | .driver = { | 2018 | .driver = { |
2023 | .name = "davinci_emac", | 2019 | .name = "davinci_emac", |
@@ -2029,7 +2025,7 @@ static struct platform_driver davinci_emac_driver = { | |||
2029 | }; | 2025 | }; |
2030 | 2026 | ||
2031 | /** | 2027 | /** |
2032 | * davinci_emac_init: EMAC driver module init | 2028 | * davinci_emac_init - EMAC driver module init |
2033 | * | 2029 | * |
2034 | * Called when initializing the driver. We register the driver with | 2030 | * Called when initializing the driver. We register the driver with |
2035 | * the platform. | 2031 | * the platform. |
@@ -2041,7 +2037,7 @@ static int __init davinci_emac_init(void) | |||
2041 | late_initcall(davinci_emac_init); | 2037 | late_initcall(davinci_emac_init); |
2042 | 2038 | ||
2043 | /** | 2039 | /** |
2044 | * davinci_emac_exit: EMAC driver module exit | 2040 | * davinci_emac_exit - EMAC driver module exit |
2045 | * | 2041 | * |
2046 | * Called when exiting the driver completely. We unregister the driver with | 2042 | * Called when exiting the driver completely. We unregister the driver with |
2047 | * the platform and exit | 2043 | * the platform and exit |