aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/tile/tilepro.c
diff options
context:
space:
mode:
authorChris Metcalf <cmetcalf@tilera.com>2013-08-01 11:36:42 -0400
committerDavid S. Miller <davem@davemloft.net>2013-08-01 17:35:49 -0400
commita8eaed55f86ec45a58414ffd04818be641b9e0de (patch)
tree14f1f45caf3d98149fd49fb2e3e1243b50f08517 /drivers/net/ethernet/tile/tilepro.c
parent84915c646271abc6b87fed0477dc72278fe4f8a3 (diff)
tile: set hw_features and vlan_features in setup
This change allows the user to configure various features of the tile networking drivers on and off. There is no change to the default initialization state of either the tilegx or tilepro drivers. Neither driver needs the ndo_fix_features or ndo_set_features callbacks, since the generic code already handles the dependencies for fix_features, and there is no hardware state to tweak in set_features. Signed-off-by: Chris Metcalf <cmetcalf@tilera.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/tile/tilepro.c')
-rw-r--r--drivers/net/ethernet/tile/tilepro.c43
1 files changed, 14 insertions, 29 deletions
diff --git a/drivers/net/ethernet/tile/tilepro.c b/drivers/net/ethernet/tile/tilepro.c
index f66ac2000c00..34b43b400ab3 100644
--- a/drivers/net/ethernet/tile/tilepro.c
+++ b/drivers/net/ethernet/tile/tilepro.c
@@ -89,10 +89,6 @@
89/* ISSUE: This has not been thoroughly tested (except at 1500). */ 89/* ISSUE: This has not been thoroughly tested (except at 1500). */
90#define TILE_NET_MTU 1500 90#define TILE_NET_MTU 1500
91 91
92/* HACK: Define to support GSO. */
93/* ISSUE: This may actually hurt performance of the TCP blaster. */
94/* #define TILE_NET_GSO */
95
96/* Define this to collapse "duplicate" acks. */ 92/* Define this to collapse "duplicate" acks. */
97/* #define IGNORE_DUP_ACKS */ 93/* #define IGNORE_DUP_ACKS */
98 94
@@ -2336,39 +2332,28 @@ static const struct net_device_ops tile_net_ops = {
2336 */ 2332 */
2337static void tile_net_setup(struct net_device *dev) 2333static void tile_net_setup(struct net_device *dev)
2338{ 2334{
2339 PDEBUG("tile_net_setup()\n"); 2335 netdev_features_t features = 0;
2340 2336
2341 ether_setup(dev); 2337 ether_setup(dev);
2342
2343 dev->netdev_ops = &tile_net_ops; 2338 dev->netdev_ops = &tile_net_ops;
2344
2345 dev->watchdog_timeo = TILE_NET_TIMEOUT; 2339 dev->watchdog_timeo = TILE_NET_TIMEOUT;
2340 dev->tx_queue_len = TILE_NET_TX_QUEUE_LEN;
2341 dev->mtu = TILE_NET_MTU;
2346 2342
2347 /* We want lockless xmit. */ 2343 features |= NETIF_F_LLTX;
2348 dev->features |= NETIF_F_LLTX; 2344 features |= NETIF_F_HW_CSUM;
2349 2345 features |= NETIF_F_SG;
2350 /* We support hardware tx checksums. */ 2346 features |= NETIF_F_TSO;
2351 dev->features |= NETIF_F_HW_CSUM;
2352
2353 /* We support scatter/gather. */
2354 dev->features |= NETIF_F_SG;
2355
2356 /* We support TSO. */
2357 dev->features |= NETIF_F_TSO;
2358
2359#ifdef TILE_NET_GSO
2360 /* We support GSO. */
2361 dev->features |= NETIF_F_GSO;
2362#endif
2363 2347
2348 /* We can't support HIGHDMA without hash_default, since we need
2349 * to be able to finv() with a VA if we don't have hash_default.
2350 */
2364 if (hash_default) 2351 if (hash_default)
2365 dev->features |= NETIF_F_HIGHDMA; 2352 features |= NETIF_F_HIGHDMA;
2366
2367 /* ISSUE: We should support NETIF_F_UFO. */
2368 2353
2369 dev->tx_queue_len = TILE_NET_TX_QUEUE_LEN; 2354 dev->hw_features |= features;
2370 2355 dev->vlan_features |= features;
2371 dev->mtu = TILE_NET_MTU; 2356 dev->features |= features;
2372} 2357}
2373 2358
2374 2359