diff options
author | Iyappan Subramanian <isubramanian@apm.com> | 2014-10-09 21:32:05 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-10-10 15:06:59 -0400 |
commit | d0eb74582fa7b5c15710d293a3c4d8d3409ae165 (patch) | |
tree | 8e748aabf3544b9443dc68c25ce6860a1b56e08e | |
parent | 5fb32417b7e52d2e6d5f5c64d277a03e5c998a02 (diff) |
drivers: net: xgene: Preparing for adding 10GbE support
- Rearranged code to pave the way for adding 10GbE support
- Added mac_ops structure containing function pointers for mac specific functions
- Added port_ops structure containing function pointers for port specific functions
Signed-off-by: Iyappan Subramanian <isubramanian@apm.com>
Signed-off-by: Keyur Chudgar <kchudgar@apm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/net/ethernet/apm/xgene/xgene_enet_hw.c | 44 | ||||
-rw-r--r-- | drivers/net/ethernet/apm/xgene/xgene_enet_hw.h | 16 | ||||
-rw-r--r-- | drivers/net/ethernet/apm/xgene/xgene_enet_main.c | 40 | ||||
-rw-r--r-- | drivers/net/ethernet/apm/xgene/xgene_enet_main.h | 19 |
4 files changed, 78 insertions, 41 deletions
diff --git a/drivers/net/ethernet/apm/xgene/xgene_enet_hw.c b/drivers/net/ethernet/apm/xgene/xgene_enet_hw.c index 812d8d65159b..c8f3824f7606 100644 --- a/drivers/net/ethernet/apm/xgene/xgene_enet_hw.c +++ b/drivers/net/ethernet/apm/xgene/xgene_enet_hw.c | |||
@@ -402,7 +402,7 @@ static int xgene_mii_phy_read(struct xgene_enet_pdata *pdata, | |||
402 | return data; | 402 | return data; |
403 | } | 403 | } |
404 | 404 | ||
405 | void xgene_gmac_set_mac_addr(struct xgene_enet_pdata *pdata) | 405 | static void xgene_gmac_set_mac_addr(struct xgene_enet_pdata *pdata) |
406 | { | 406 | { |
407 | u32 addr0, addr1; | 407 | u32 addr0, addr1; |
408 | u8 *dev_addr = pdata->ndev->dev_addr; | 408 | u8 *dev_addr = pdata->ndev->dev_addr; |
@@ -436,13 +436,13 @@ static int xgene_enet_ecc_init(struct xgene_enet_pdata *pdata) | |||
436 | return 0; | 436 | return 0; |
437 | } | 437 | } |
438 | 438 | ||
439 | void xgene_gmac_reset(struct xgene_enet_pdata *pdata) | 439 | static void xgene_gmac_reset(struct xgene_enet_pdata *pdata) |
440 | { | 440 | { |
441 | xgene_enet_wr_mcx_mac(pdata, MAC_CONFIG_1_ADDR, SOFT_RESET1); | 441 | xgene_enet_wr_mcx_mac(pdata, MAC_CONFIG_1_ADDR, SOFT_RESET1); |
442 | xgene_enet_wr_mcx_mac(pdata, MAC_CONFIG_1_ADDR, 0); | 442 | xgene_enet_wr_mcx_mac(pdata, MAC_CONFIG_1_ADDR, 0); |
443 | } | 443 | } |
444 | 444 | ||
445 | void xgene_gmac_init(struct xgene_enet_pdata *pdata, int speed) | 445 | static void xgene_gmac_init(struct xgene_enet_pdata *pdata) |
446 | { | 446 | { |
447 | u32 value, mc2; | 447 | u32 value, mc2; |
448 | u32 intf_ctl, rgmii; | 448 | u32 intf_ctl, rgmii; |
@@ -456,7 +456,7 @@ void xgene_gmac_init(struct xgene_enet_pdata *pdata, int speed) | |||
456 | xgene_enet_rd_mcx_mac(pdata, INTERFACE_CONTROL_ADDR, &intf_ctl); | 456 | xgene_enet_rd_mcx_mac(pdata, INTERFACE_CONTROL_ADDR, &intf_ctl); |
457 | xgene_enet_rd_csr(pdata, RGMII_REG_0_ADDR, &rgmii); | 457 | xgene_enet_rd_csr(pdata, RGMII_REG_0_ADDR, &rgmii); |
458 | 458 | ||
459 | switch (speed) { | 459 | switch (pdata->phy_speed) { |
460 | case SPEED_10: | 460 | case SPEED_10: |
461 | ENET_INTERFACE_MODE2_SET(&mc2, 1); | 461 | ENET_INTERFACE_MODE2_SET(&mc2, 1); |
462 | CFG_MACMODE_SET(&icm0, 0); | 462 | CFG_MACMODE_SET(&icm0, 0); |
@@ -525,8 +525,8 @@ static void xgene_enet_config_ring_if_assoc(struct xgene_enet_pdata *pdata) | |||
525 | xgene_enet_wr_ring_if(pdata, ENET_CFGSSQMIQMLITEFPQASSOC_ADDR, val); | 525 | xgene_enet_wr_ring_if(pdata, ENET_CFGSSQMIQMLITEFPQASSOC_ADDR, val); |
526 | } | 526 | } |
527 | 527 | ||
528 | void xgene_enet_cle_bypass(struct xgene_enet_pdata *pdata, | 528 | static void xgene_enet_cle_bypass(struct xgene_enet_pdata *pdata, |
529 | u32 dst_ring_num, u16 bufpool_id) | 529 | u32 dst_ring_num, u16 bufpool_id) |
530 | { | 530 | { |
531 | u32 cb; | 531 | u32 cb; |
532 | u32 fpsel; | 532 | u32 fpsel; |
@@ -544,7 +544,7 @@ void xgene_enet_cle_bypass(struct xgene_enet_pdata *pdata, | |||
544 | xgene_enet_wr_csr(pdata, CLE_BYPASS_REG1_0_ADDR, cb); | 544 | xgene_enet_wr_csr(pdata, CLE_BYPASS_REG1_0_ADDR, cb); |
545 | } | 545 | } |
546 | 546 | ||
547 | void xgene_gmac_rx_enable(struct xgene_enet_pdata *pdata) | 547 | static void xgene_gmac_rx_enable(struct xgene_enet_pdata *pdata) |
548 | { | 548 | { |
549 | u32 data; | 549 | u32 data; |
550 | 550 | ||
@@ -552,7 +552,7 @@ void xgene_gmac_rx_enable(struct xgene_enet_pdata *pdata) | |||
552 | xgene_enet_wr_mcx_mac(pdata, MAC_CONFIG_1_ADDR, data | RX_EN); | 552 | xgene_enet_wr_mcx_mac(pdata, MAC_CONFIG_1_ADDR, data | RX_EN); |
553 | } | 553 | } |
554 | 554 | ||
555 | void xgene_gmac_tx_enable(struct xgene_enet_pdata *pdata) | 555 | static void xgene_gmac_tx_enable(struct xgene_enet_pdata *pdata) |
556 | { | 556 | { |
557 | u32 data; | 557 | u32 data; |
558 | 558 | ||
@@ -560,7 +560,7 @@ void xgene_gmac_tx_enable(struct xgene_enet_pdata *pdata) | |||
560 | xgene_enet_wr_mcx_mac(pdata, MAC_CONFIG_1_ADDR, data | TX_EN); | 560 | xgene_enet_wr_mcx_mac(pdata, MAC_CONFIG_1_ADDR, data | TX_EN); |
561 | } | 561 | } |
562 | 562 | ||
563 | void xgene_gmac_rx_disable(struct xgene_enet_pdata *pdata) | 563 | static void xgene_gmac_rx_disable(struct xgene_enet_pdata *pdata) |
564 | { | 564 | { |
565 | u32 data; | 565 | u32 data; |
566 | 566 | ||
@@ -568,7 +568,7 @@ void xgene_gmac_rx_disable(struct xgene_enet_pdata *pdata) | |||
568 | xgene_enet_wr_mcx_mac(pdata, MAC_CONFIG_1_ADDR, data & ~RX_EN); | 568 | xgene_enet_wr_mcx_mac(pdata, MAC_CONFIG_1_ADDR, data & ~RX_EN); |
569 | } | 569 | } |
570 | 570 | ||
571 | void xgene_gmac_tx_disable(struct xgene_enet_pdata *pdata) | 571 | static void xgene_gmac_tx_disable(struct xgene_enet_pdata *pdata) |
572 | { | 572 | { |
573 | u32 data; | 573 | u32 data; |
574 | 574 | ||
@@ -576,7 +576,7 @@ void xgene_gmac_tx_disable(struct xgene_enet_pdata *pdata) | |||
576 | xgene_enet_wr_mcx_mac(pdata, MAC_CONFIG_1_ADDR, data & ~TX_EN); | 576 | xgene_enet_wr_mcx_mac(pdata, MAC_CONFIG_1_ADDR, data & ~TX_EN); |
577 | } | 577 | } |
578 | 578 | ||
579 | void xgene_enet_reset(struct xgene_enet_pdata *pdata) | 579 | static void xgene_enet_reset(struct xgene_enet_pdata *pdata) |
580 | { | 580 | { |
581 | u32 val; | 581 | u32 val; |
582 | 582 | ||
@@ -593,7 +593,7 @@ void xgene_enet_reset(struct xgene_enet_pdata *pdata) | |||
593 | xgene_enet_wr_mcx_mac(pdata, MII_MGMT_CONFIG_ADDR, val); | 593 | xgene_enet_wr_mcx_mac(pdata, MII_MGMT_CONFIG_ADDR, val); |
594 | } | 594 | } |
595 | 595 | ||
596 | void xgene_gport_shutdown(struct xgene_enet_pdata *pdata) | 596 | static void xgene_gport_shutdown(struct xgene_enet_pdata *pdata) |
597 | { | 597 | { |
598 | clk_disable_unprepare(pdata->clk); | 598 | clk_disable_unprepare(pdata->clk); |
599 | } | 599 | } |
@@ -627,10 +627,10 @@ static void xgene_enet_adjust_link(struct net_device *ndev) | |||
627 | 627 | ||
628 | if (phydev->link) { | 628 | if (phydev->link) { |
629 | if (pdata->phy_speed != phydev->speed) { | 629 | if (pdata->phy_speed != phydev->speed) { |
630 | xgene_gmac_init(pdata, phydev->speed); | 630 | pdata->phy_speed = phydev->speed; |
631 | xgene_gmac_init(pdata); | ||
631 | xgene_gmac_rx_enable(pdata); | 632 | xgene_gmac_rx_enable(pdata); |
632 | xgene_gmac_tx_enable(pdata); | 633 | xgene_gmac_tx_enable(pdata); |
633 | pdata->phy_speed = phydev->speed; | ||
634 | phy_print_status(phydev); | 634 | phy_print_status(phydev); |
635 | } | 635 | } |
636 | } else { | 636 | } else { |
@@ -726,3 +726,19 @@ void xgene_enet_mdio_remove(struct xgene_enet_pdata *pdata) | |||
726 | mdiobus_free(pdata->mdio_bus); | 726 | mdiobus_free(pdata->mdio_bus); |
727 | pdata->mdio_bus = NULL; | 727 | pdata->mdio_bus = NULL; |
728 | } | 728 | } |
729 | |||
730 | struct xgene_mac_ops xgene_gmac_ops = { | ||
731 | .init = xgene_gmac_init, | ||
732 | .reset = xgene_gmac_reset, | ||
733 | .rx_enable = xgene_gmac_rx_enable, | ||
734 | .tx_enable = xgene_gmac_tx_enable, | ||
735 | .rx_disable = xgene_gmac_rx_disable, | ||
736 | .tx_disable = xgene_gmac_tx_disable, | ||
737 | .set_mac_addr = xgene_gmac_set_mac_addr, | ||
738 | }; | ||
739 | |||
740 | struct xgene_port_ops xgene_gport_ops = { | ||
741 | .reset = xgene_enet_reset, | ||
742 | .cle_bypass = xgene_enet_cle_bypass, | ||
743 | .shutdown = xgene_gport_shutdown, | ||
744 | }; | ||
diff --git a/drivers/net/ethernet/apm/xgene/xgene_enet_hw.h b/drivers/net/ethernet/apm/xgene/xgene_enet_hw.h index 371e7a5b2507..084ac68aed8d 100644 --- a/drivers/net/ethernet/apm/xgene/xgene_enet_hw.h +++ b/drivers/net/ethernet/apm/xgene/xgene_enet_hw.h | |||
@@ -318,20 +318,10 @@ void xgene_enet_parse_error(struct xgene_enet_desc_ring *ring, | |||
318 | struct xgene_enet_pdata *pdata, | 318 | struct xgene_enet_pdata *pdata, |
319 | enum xgene_enet_err_code status); | 319 | enum xgene_enet_err_code status); |
320 | 320 | ||
321 | void xgene_enet_reset(struct xgene_enet_pdata *priv); | ||
322 | void xgene_gmac_reset(struct xgene_enet_pdata *priv); | ||
323 | void xgene_gmac_init(struct xgene_enet_pdata *priv, int speed); | ||
324 | void xgene_gmac_tx_enable(struct xgene_enet_pdata *priv); | ||
325 | void xgene_gmac_rx_enable(struct xgene_enet_pdata *priv); | ||
326 | void xgene_gmac_tx_disable(struct xgene_enet_pdata *priv); | ||
327 | void xgene_gmac_rx_disable(struct xgene_enet_pdata *priv); | ||
328 | void xgene_gmac_set_mac_addr(struct xgene_enet_pdata *pdata); | ||
329 | void xgene_enet_cle_bypass(struct xgene_enet_pdata *pdata, | ||
330 | u32 dst_ring_num, u16 bufpool_id); | ||
331 | void xgene_gport_shutdown(struct xgene_enet_pdata *priv); | ||
332 | void xgene_gmac_get_tx_stats(struct xgene_enet_pdata *pdata); | ||
333 | |||
334 | int xgene_enet_mdio_config(struct xgene_enet_pdata *pdata); | 321 | int xgene_enet_mdio_config(struct xgene_enet_pdata *pdata); |
335 | void xgene_enet_mdio_remove(struct xgene_enet_pdata *pdata); | 322 | void xgene_enet_mdio_remove(struct xgene_enet_pdata *pdata); |
336 | 323 | ||
324 | extern struct xgene_mac_ops xgene_gmac_ops; | ||
325 | extern struct xgene_port_ops xgene_gport_ops; | ||
326 | |||
337 | #endif /* __XGENE_ENET_HW_H__ */ | 327 | #endif /* __XGENE_ENET_HW_H__ */ |
diff --git a/drivers/net/ethernet/apm/xgene/xgene_enet_main.c b/drivers/net/ethernet/apm/xgene/xgene_enet_main.c index e4222af2baa6..c4326444deaf 100644 --- a/drivers/net/ethernet/apm/xgene/xgene_enet_main.c +++ b/drivers/net/ethernet/apm/xgene/xgene_enet_main.c | |||
@@ -413,7 +413,7 @@ static void xgene_enet_timeout(struct net_device *ndev) | |||
413 | { | 413 | { |
414 | struct xgene_enet_pdata *pdata = netdev_priv(ndev); | 414 | struct xgene_enet_pdata *pdata = netdev_priv(ndev); |
415 | 415 | ||
416 | xgene_gmac_reset(pdata); | 416 | pdata->mac_ops->reset(pdata); |
417 | } | 417 | } |
418 | 418 | ||
419 | static int xgene_enet_register_irq(struct net_device *ndev) | 419 | static int xgene_enet_register_irq(struct net_device *ndev) |
@@ -445,10 +445,11 @@ static void xgene_enet_free_irq(struct net_device *ndev) | |||
445 | static int xgene_enet_open(struct net_device *ndev) | 445 | static int xgene_enet_open(struct net_device *ndev) |
446 | { | 446 | { |
447 | struct xgene_enet_pdata *pdata = netdev_priv(ndev); | 447 | struct xgene_enet_pdata *pdata = netdev_priv(ndev); |
448 | struct xgene_mac_ops *mac_ops = pdata->mac_ops; | ||
448 | int ret; | 449 | int ret; |
449 | 450 | ||
450 | xgene_gmac_tx_enable(pdata); | 451 | mac_ops->tx_enable(pdata); |
451 | xgene_gmac_rx_enable(pdata); | 452 | mac_ops->rx_enable(pdata); |
452 | 453 | ||
453 | ret = xgene_enet_register_irq(ndev); | 454 | ret = xgene_enet_register_irq(ndev); |
454 | if (ret) | 455 | if (ret) |
@@ -466,6 +467,7 @@ static int xgene_enet_open(struct net_device *ndev) | |||
466 | static int xgene_enet_close(struct net_device *ndev) | 467 | static int xgene_enet_close(struct net_device *ndev) |
467 | { | 468 | { |
468 | struct xgene_enet_pdata *pdata = netdev_priv(ndev); | 469 | struct xgene_enet_pdata *pdata = netdev_priv(ndev); |
470 | struct xgene_mac_ops *mac_ops = pdata->mac_ops; | ||
469 | 471 | ||
470 | netif_stop_queue(ndev); | 472 | netif_stop_queue(ndev); |
471 | 473 | ||
@@ -476,8 +478,8 @@ static int xgene_enet_close(struct net_device *ndev) | |||
476 | xgene_enet_free_irq(ndev); | 478 | xgene_enet_free_irq(ndev); |
477 | xgene_enet_process_ring(pdata->rx_ring, -1); | 479 | xgene_enet_process_ring(pdata->rx_ring, -1); |
478 | 480 | ||
479 | xgene_gmac_tx_disable(pdata); | 481 | mac_ops->tx_disable(pdata); |
480 | xgene_gmac_rx_disable(pdata); | 482 | mac_ops->rx_disable(pdata); |
481 | 483 | ||
482 | return 0; | 484 | return 0; |
483 | } | 485 | } |
@@ -724,7 +726,7 @@ static int xgene_enet_set_mac_address(struct net_device *ndev, void *addr) | |||
724 | ret = eth_mac_addr(ndev, addr); | 726 | ret = eth_mac_addr(ndev, addr); |
725 | if (ret) | 727 | if (ret) |
726 | return ret; | 728 | return ret; |
727 | xgene_gmac_set_mac_addr(pdata); | 729 | pdata->mac_ops->set_mac_addr(pdata); |
728 | 730 | ||
729 | return ret; | 731 | return ret; |
730 | } | 732 | } |
@@ -834,8 +836,8 @@ static int xgene_enet_init_hw(struct xgene_enet_pdata *pdata) | |||
834 | u16 dst_ring_num; | 836 | u16 dst_ring_num; |
835 | int ret; | 837 | int ret; |
836 | 838 | ||
837 | xgene_gmac_tx_disable(pdata); | 839 | pdata->mac_ops->tx_disable(pdata); |
838 | xgene_gmac_rx_disable(pdata); | 840 | pdata->mac_ops->rx_disable(pdata); |
839 | 841 | ||
840 | ret = xgene_enet_create_desc_rings(ndev); | 842 | ret = xgene_enet_create_desc_rings(ndev); |
841 | if (ret) { | 843 | if (ret) { |
@@ -853,11 +855,17 @@ static int xgene_enet_init_hw(struct xgene_enet_pdata *pdata) | |||
853 | } | 855 | } |
854 | 856 | ||
855 | dst_ring_num = xgene_enet_dst_ring_num(pdata->rx_ring); | 857 | dst_ring_num = xgene_enet_dst_ring_num(pdata->rx_ring); |
856 | xgene_enet_cle_bypass(pdata, dst_ring_num, buf_pool->id); | 858 | pdata->port_ops->cle_bypass(pdata, dst_ring_num, buf_pool->id); |
857 | 859 | ||
858 | return ret; | 860 | return ret; |
859 | } | 861 | } |
860 | 862 | ||
863 | static void xgene_enet_setup_ops(struct xgene_enet_pdata *pdata) | ||
864 | { | ||
865 | pdata->mac_ops = &xgene_gmac_ops; | ||
866 | pdata->port_ops = &xgene_gport_ops; | ||
867 | } | ||
868 | |||
861 | static int xgene_enet_probe(struct platform_device *pdev) | 869 | static int xgene_enet_probe(struct platform_device *pdev) |
862 | { | 870 | { |
863 | struct net_device *ndev; | 871 | struct net_device *ndev; |
@@ -886,8 +894,9 @@ static int xgene_enet_probe(struct platform_device *pdev) | |||
886 | if (ret) | 894 | if (ret) |
887 | goto err; | 895 | goto err; |
888 | 896 | ||
889 | xgene_enet_reset(pdata); | 897 | xgene_enet_setup_ops(pdata); |
890 | xgene_gmac_init(pdata, SPEED_1000); | 898 | pdata->port_ops->reset(pdata); |
899 | pdata->mac_ops->init(pdata); | ||
891 | 900 | ||
892 | ret = register_netdev(ndev); | 901 | ret = register_netdev(ndev); |
893 | if (ret) { | 902 | if (ret) { |
@@ -918,19 +927,21 @@ err: | |||
918 | static int xgene_enet_remove(struct platform_device *pdev) | 927 | static int xgene_enet_remove(struct platform_device *pdev) |
919 | { | 928 | { |
920 | struct xgene_enet_pdata *pdata; | 929 | struct xgene_enet_pdata *pdata; |
930 | struct xgene_mac_ops *mac_ops; | ||
921 | struct net_device *ndev; | 931 | struct net_device *ndev; |
922 | 932 | ||
923 | pdata = platform_get_drvdata(pdev); | 933 | pdata = platform_get_drvdata(pdev); |
934 | mac_ops = pdata->mac_ops; | ||
924 | ndev = pdata->ndev; | 935 | ndev = pdata->ndev; |
925 | 936 | ||
926 | xgene_gmac_rx_disable(pdata); | 937 | mac_ops->rx_disable(pdata); |
927 | xgene_gmac_tx_disable(pdata); | 938 | mac_ops->tx_disable(pdata); |
928 | 939 | ||
929 | netif_napi_del(&pdata->rx_ring->napi); | 940 | netif_napi_del(&pdata->rx_ring->napi); |
930 | xgene_enet_mdio_remove(pdata); | 941 | xgene_enet_mdio_remove(pdata); |
931 | xgene_enet_delete_desc_rings(pdata); | 942 | xgene_enet_delete_desc_rings(pdata); |
932 | unregister_netdev(ndev); | 943 | unregister_netdev(ndev); |
933 | xgene_gport_shutdown(pdata); | 944 | pdata->port_ops->shutdown(pdata); |
934 | free_netdev(ndev); | 945 | free_netdev(ndev); |
935 | 946 | ||
936 | return 0; | 947 | return 0; |
@@ -956,5 +967,6 @@ module_platform_driver(xgene_enet_driver); | |||
956 | 967 | ||
957 | MODULE_DESCRIPTION("APM X-Gene SoC Ethernet driver"); | 968 | MODULE_DESCRIPTION("APM X-Gene SoC Ethernet driver"); |
958 | MODULE_VERSION(XGENE_DRV_VERSION); | 969 | MODULE_VERSION(XGENE_DRV_VERSION); |
970 | MODULE_AUTHOR("Iyappan Subramanian <isubramanian@apm.com>"); | ||
959 | MODULE_AUTHOR("Keyur Chudgar <kchudgar@apm.com>"); | 971 | MODULE_AUTHOR("Keyur Chudgar <kchudgar@apm.com>"); |
960 | MODULE_LICENSE("GPL"); | 972 | MODULE_LICENSE("GPL"); |
diff --git a/drivers/net/ethernet/apm/xgene/xgene_enet_main.h b/drivers/net/ethernet/apm/xgene/xgene_enet_main.h index 0815866986b0..ac180f980fcd 100644 --- a/drivers/net/ethernet/apm/xgene/xgene_enet_main.h +++ b/drivers/net/ethernet/apm/xgene/xgene_enet_main.h | |||
@@ -68,6 +68,23 @@ struct xgene_enet_desc_ring { | |||
68 | }; | 68 | }; |
69 | }; | 69 | }; |
70 | 70 | ||
71 | struct xgene_mac_ops { | ||
72 | void (*init)(struct xgene_enet_pdata *pdata); | ||
73 | void (*reset)(struct xgene_enet_pdata *pdata); | ||
74 | void (*tx_enable)(struct xgene_enet_pdata *pdata); | ||
75 | void (*rx_enable)(struct xgene_enet_pdata *pdata); | ||
76 | void (*tx_disable)(struct xgene_enet_pdata *pdata); | ||
77 | void (*rx_disable)(struct xgene_enet_pdata *pdata); | ||
78 | void (*set_mac_addr)(struct xgene_enet_pdata *pdata); | ||
79 | }; | ||
80 | |||
81 | struct xgene_port_ops { | ||
82 | void (*reset)(struct xgene_enet_pdata *pdata); | ||
83 | void (*cle_bypass)(struct xgene_enet_pdata *pdata, | ||
84 | u32 dst_ring_num, u16 bufpool_id); | ||
85 | void (*shutdown)(struct xgene_enet_pdata *pdata); | ||
86 | }; | ||
87 | |||
71 | /* ethernet private data */ | 88 | /* ethernet private data */ |
72 | struct xgene_enet_pdata { | 89 | struct xgene_enet_pdata { |
73 | struct net_device *ndev; | 90 | struct net_device *ndev; |
@@ -98,6 +115,8 @@ struct xgene_enet_pdata { | |||
98 | u32 speed; | 115 | u32 speed; |
99 | u16 rm; | 116 | u16 rm; |
100 | struct rtnl_link_stats64 stats; | 117 | struct rtnl_link_stats64 stats; |
118 | struct xgene_mac_ops *mac_ops; | ||
119 | struct xgene_port_ops *port_ops; | ||
101 | }; | 120 | }; |
102 | 121 | ||
103 | /* Set the specified value into a bit-field defined by its starting position | 122 | /* Set the specified value into a bit-field defined by its starting position |