Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 172021
b: refs/heads/master
c: c383b53
h: refs/heads/master
i:
  172019: 83270f2
v: v3
  • Loading branch information
Ben Hutchings authored and David S. Miller committed Nov 30, 2009
1 parent 52da060 commit d267035
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 76884835684411264cda2f15585261eb02183541
refs/heads/master: c383b53729a9bbbceee132a85955d084ba00ca3a
2 changes: 1 addition & 1 deletion trunk/drivers/net/sfc/efx.c
Original file line number Diff line number Diff line change
Expand Up @@ -2179,7 +2179,7 @@ static int __devinit efx_pci_probe(struct pci_dev *pci_dev,
net_dev = alloc_etherdev(sizeof(*efx));
if (!net_dev)
return -ENOMEM;
net_dev->features |= (NETIF_F_IP_CSUM | NETIF_F_SG |
net_dev->features |= (type->offload_features | NETIF_F_SG |
NETIF_F_HIGHDMA | NETIF_F_TSO |
NETIF_F_GRO);
/* Mask for features that also apply to VLAN devices */
Expand Down
16 changes: 15 additions & 1 deletion trunk/drivers/net/sfc/ethtool.c
Original file line number Diff line number Diff line change
Expand Up @@ -468,6 +468,19 @@ static void efx_ethtool_get_stats(struct net_device *net_dev,
}
}

static int efx_ethtool_set_tx_csum(struct net_device *net_dev, u32 enable)
{
struct efx_nic *efx = netdev_priv(net_dev);
unsigned long features = efx->type->offload_features & NETIF_F_ALL_CSUM;

if (enable)
net_dev->features |= features;
else
net_dev->features &= ~features;

return 0;
}

static int efx_ethtool_set_rx_csum(struct net_device *net_dev, u32 enable)
{
struct efx_nic *efx = netdev_priv(net_dev);
Expand Down Expand Up @@ -813,7 +826,8 @@ const struct ethtool_ops efx_ethtool_ops = {
.get_rx_csum = efx_ethtool_get_rx_csum,
.set_rx_csum = efx_ethtool_set_rx_csum,
.get_tx_csum = ethtool_op_get_tx_csum,
.set_tx_csum = ethtool_op_set_tx_csum,
/* Need to enable/disable IPv6 too */
.set_tx_csum = efx_ethtool_set_tx_csum,
.get_sg = ethtool_op_get_sg,
.set_sg = ethtool_op_set_sg,
.get_tso = ethtool_op_get_tso,
Expand Down
2 changes: 2 additions & 0 deletions trunk/drivers/net/sfc/falcon.c
Original file line number Diff line number Diff line change
Expand Up @@ -3304,6 +3304,7 @@ struct efx_nic_type falcon_a1_nic_type = {
.phys_addr_channels = 4,
.tx_dc_base = 0x130000,
.rx_dc_base = 0x100000,
.offload_features = NETIF_F_IP_CSUM,
.reset_world_flags = ETH_RESET_IRQ,
};

Expand Down Expand Up @@ -3351,6 +3352,7 @@ struct efx_nic_type falcon_b0_nic_type = {
* channels */
.tx_dc_base = 0x130000,
.rx_dc_base = 0x100000,
.offload_features = NETIF_F_IP_CSUM,
.reset_world_flags = ETH_RESET_IRQ,
};

3 changes: 3 additions & 0 deletions trunk/drivers/net/sfc/net_driver.h
Original file line number Diff line number Diff line change
Expand Up @@ -864,6 +864,8 @@ static inline const char *efx_dev_name(struct efx_nic *efx)
* descriptors
* @tx_dc_base: Base address in SRAM of TX queue descriptor caches
* @rx_dc_base: Base address in SRAM of RX queue descriptor caches
* @offload_features: net_device feature flags for protocol offload
* features implemented in hardware
* @reset_world_flags: Flags for additional components covered by
* reset method RESET_TYPE_WORLD
*/
Expand Down Expand Up @@ -904,6 +906,7 @@ struct efx_nic_type {
unsigned int phys_addr_channels;
unsigned int tx_dc_base;
unsigned int rx_dc_base;
unsigned long offload_features;
u32 reset_world_flags;
};

Expand Down

0 comments on commit d267035

Please sign in to comment.