43
43
44
44
#undef DEBUG
45
45
46
- #define DRV_DESC "QE UCC Gigabit Ethernet Controller"
47
- #define DRV_NAME "ucc_geth"
48
- #define DRV_VERSION "1.1"
49
-
50
46
#define ugeth_printk (level , format , arg ...) \
51
47
printk(level format "\n", ## arg)
52
48
65
61
#define ugeth_vdbg (fmt , args ...) do { } while (0)
66
62
#endif /* UGETH_VERBOSE_DEBUG */
67
63
64
+ void uec_set_ethtool_ops (struct net_device * netdev );
65
+
68
66
static DEFINE_SPINLOCK (ugeth_lock );
69
67
70
68
static struct ucc_geth_info ugeth_primary_info = {
@@ -104,6 +102,7 @@ static struct ucc_geth_info ugeth_primary_info = {
104
102
.maxRetransmission = 0xf ,
105
103
.collisionWindow = 0x37 ,
106
104
.receiveFlowControl = 1 ,
105
+ .transmitFlowControl = 1 ,
107
106
.maxGroupAddrInHash = 4 ,
108
107
.maxIndAddrInHash = 4 ,
109
108
.prel = 7 ,
@@ -139,7 +138,9 @@ static struct ucc_geth_info ugeth_primary_info = {
139
138
.numStationAddresses = UCC_GETH_NUM_OF_STATION_ADDRESSES_1 ,
140
139
.largestexternallookupkeysize =
141
140
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 ,
143
144
.vlanOperationTagged = UCC_GETH_VLAN_OPERATION_TAGGED_NOP ,
144
145
.vlanOperationNonTagged = UCC_GETH_VLAN_OPERATION_NON_TAGGED_NOP ,
145
146
.rxQoSMode = UCC_GETH_QOS_MODE_DEFAULT ,
@@ -1200,7 +1201,7 @@ static int init_inter_frame_gap_params(u8 non_btb_cs_ipg,
1200
1201
return 0 ;
1201
1202
}
1202
1203
1203
- static int init_flow_control_params (u32 automatic_flow_control_mode ,
1204
+ int init_flow_control_params (u32 automatic_flow_control_mode ,
1204
1205
int rx_flow_control_enable ,
1205
1206
int tx_flow_control_enable ,
1206
1207
u16 pause_period ,
@@ -2507,7 +2508,7 @@ static int ucc_geth_startup(struct ucc_geth_private *ugeth)
2507
2508
/* For more details see the hardware spec. */
2508
2509
init_flow_control_params (ug_info -> aufc ,
2509
2510
ug_info -> receiveFlowControl ,
2510
- 1 ,
2511
+ ug_info -> transmitFlowControl ,
2511
2512
ug_info -> pausePeriod ,
2512
2513
ug_info -> extensionField ,
2513
2514
& uf_regs -> upsmr ,
@@ -3732,8 +3733,6 @@ static int ucc_geth_close(struct net_device *dev)
3732
3733
return 0 ;
3733
3734
}
3734
3735
3735
- const struct ethtool_ops ucc_geth_ethtool_ops = { };
3736
-
3737
3736
static phy_interface_t to_phy_interface (const char * phy_connection_type )
3738
3737
{
3739
3738
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
3896
3895
SET_NETDEV_DEV (dev , device );
3897
3896
3898
3897
/* Fill in the dev structure */
3898
+ uec_set_ethtool_ops (dev );
3899
3899
dev -> open = ucc_geth_open ;
3900
3900
dev -> hard_start_xmit = ucc_geth_start_xmit ;
3901
3901
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
3909
3909
// dev->change_mtu = ucc_geth_change_mtu;
3910
3910
dev -> mtu = 1500 ;
3911
3911
dev -> set_multicast_list = ucc_geth_set_multi ;
3912
- dev -> ethtool_ops = & ucc_geth_ethtool_ops ;
3913
3912
3914
3913
ugeth -> msg_enable = (NETIF_MSG_IFUP << 1 ) - 1 ;
3915
3914
ugeth -> phy_interface = phy_interface ;
0 commit comments