4343
4444#undef DEBUG
4545
46- #define DRV_DESC "QE UCC Gigabit Ethernet Controller"
47- #define DRV_NAME "ucc_geth"
48- #define DRV_VERSION "1.1"
49-
5046#define ugeth_printk (level , format , arg ...) \
5147 printk(level format "\n", ## arg)
5248
6561#define ugeth_vdbg (fmt , args ...) do { } while (0)
6662#endif /* UGETH_VERBOSE_DEBUG */
6763
64+ void uec_set_ethtool_ops (struct net_device * netdev );
65+
6866static DEFINE_SPINLOCK (ugeth_lock );
6967
7068static struct ucc_geth_info ugeth_primary_info = {
@@ -104,6 +102,7 @@ static struct ucc_geth_info ugeth_primary_info = {
104102 .maxRetransmission = 0xf ,
105103 .collisionWindow = 0x37 ,
106104 .receiveFlowControl = 1 ,
105+ .transmitFlowControl = 1 ,
107106 .maxGroupAddrInHash = 4 ,
108107 .maxIndAddrInHash = 4 ,
109108 .prel = 7 ,
@@ -139,7 +138,9 @@ static struct ucc_geth_info ugeth_primary_info = {
139138 .numStationAddresses = UCC_GETH_NUM_OF_STATION_ADDRESSES_1 ,
140139 .largestexternallookupkeysize =
141140 QE_FLTR_LARGEST_EXTERNAL_TABLE_LOOKUP_KEY_SIZE_NONE ,
142- .statisticsMode = UCC_GETH_STATISTICS_GATHERING_MODE_NONE ,
141+ .statisticsMode = UCC_GETH_STATISTICS_GATHERING_MODE_HARDWARE |
142+ UCC_GETH_STATISTICS_GATHERING_MODE_FIRMWARE_TX |
143+ UCC_GETH_STATISTICS_GATHERING_MODE_FIRMWARE_RX ,
143144 .vlanOperationTagged = UCC_GETH_VLAN_OPERATION_TAGGED_NOP ,
144145 .vlanOperationNonTagged = UCC_GETH_VLAN_OPERATION_NON_TAGGED_NOP ,
145146 .rxQoSMode = UCC_GETH_QOS_MODE_DEFAULT ,
@@ -1200,7 +1201,7 @@ static int init_inter_frame_gap_params(u8 non_btb_cs_ipg,
12001201 return 0 ;
12011202}
12021203
1203- static int init_flow_control_params (u32 automatic_flow_control_mode ,
1204+ int init_flow_control_params (u32 automatic_flow_control_mode ,
12041205 int rx_flow_control_enable ,
12051206 int tx_flow_control_enable ,
12061207 u16 pause_period ,
@@ -2507,7 +2508,7 @@ static int ucc_geth_startup(struct ucc_geth_private *ugeth)
25072508 /* For more details see the hardware spec. */
25082509 init_flow_control_params (ug_info -> aufc ,
25092510 ug_info -> receiveFlowControl ,
2510- 1 ,
2511+ ug_info -> transmitFlowControl ,
25112512 ug_info -> pausePeriod ,
25122513 ug_info -> extensionField ,
25132514 & uf_regs -> upsmr ,
@@ -3732,8 +3733,6 @@ static int ucc_geth_close(struct net_device *dev)
37323733 return 0 ;
37333734}
37343735
3735- const struct ethtool_ops ucc_geth_ethtool_ops = { };
3736-
37373736static phy_interface_t to_phy_interface (const char * phy_connection_type )
37383737{
37393738 if (strcasecmp (phy_connection_type , "mii" ) == 0 )
@@ -3896,6 +3895,7 @@ static int ucc_geth_probe(struct of_device* ofdev, const struct of_device_id *ma
38963895 SET_NETDEV_DEV (dev , device );
38973896
38983897 /* Fill in the dev structure */
3898+ uec_set_ethtool_ops (dev );
38993899 dev -> open = ucc_geth_open ;
39003900 dev -> hard_start_xmit = ucc_geth_start_xmit ;
39013901 dev -> tx_timeout = ucc_geth_timeout ;
@@ -3909,7 +3909,6 @@ static int ucc_geth_probe(struct of_device* ofdev, const struct of_device_id *ma
39093909// dev->change_mtu = ucc_geth_change_mtu;
39103910 dev -> mtu = 1500 ;
39113911 dev -> set_multicast_list = ucc_geth_set_multi ;
3912- dev -> ethtool_ops = & ucc_geth_ethtool_ops ;
39133912
39143913 ugeth -> msg_enable = (NETIF_MSG_IFUP << 1 ) - 1 ;
39153914 ugeth -> phy_interface = phy_interface ;
0 commit comments