The patch titled forcedeth: decouple vlan and rx checksum dependency has been added to the -mm tree. Its filename is forcedeth-decouple-vlan-and-rx-checksum-dependency.patch See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find out what to do about this ------------------------------------------------------ Subject: forcedeth: decouple vlan and rx checksum dependency From: Ayaz Abdulla <aabdulla@xxxxxxxxxx> Decouple the dependency between the rx checksum feature and vlan feature. This is done by ignoring the checksum information if the user has disabled rx checksum when vlan is enabled. Signed-off-by: Ayaz Abdulla <aabdulla@xxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxx> --- drivers/net/forcedeth.c | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) diff -puN drivers/net/forcedeth.c~forcedeth-decouple-vlan-and-rx-checksum-dependency drivers/net/forcedeth.c --- a/drivers/net/forcedeth.c~forcedeth-decouple-vlan-and-rx-checksum-dependency +++ a/drivers/net/forcedeth.c @@ -714,6 +714,7 @@ struct fe_priv { u32 vlanctl_bits; u32 driver_data; u32 register_size; + int rx_csum; void __iomem *base; @@ -1880,7 +1881,7 @@ static int nv_rx_process(struct net_devi } } } - if (np->txrxctl_bits & NVREG_TXRXCTL_RXCHECK) { + if (np->rx_csum) { flags &= NV_RX2_CHECKSUMMASK; if (flags == NV_RX2_CHECKSUMOK1 || flags == NV_RX2_CHECKSUMOK2 || @@ -3520,7 +3521,7 @@ static int nv_set_pauseparam(struct net_ static u32 nv_get_rx_csum(struct net_device *dev) { struct fe_priv *np = netdev_priv(dev); - return (np->txrxctl_bits & NVREG_TXRXCTL_RXCHECK) != 0; + return (np->rx_csum) != 0; } static int nv_set_rx_csum(struct net_device *dev, u32 data) @@ -3530,22 +3531,15 @@ static int nv_set_rx_csum(struct net_dev int retcode = 0; if (np->driver_data & DEV_HAS_CHECKSUM) { - - if (((np->txrxctl_bits & NVREG_TXRXCTL_RXCHECK) && data) || - (!(np->txrxctl_bits & NVREG_TXRXCTL_RXCHECK) && !data)) { - /* already set or unset */ - return 0; - } - if (data) { + np->rx_csum = 1; np->txrxctl_bits |= NVREG_TXRXCTL_RXCHECK; - } else if (!(np->vlanctl_bits & NVREG_VLANCONTROL_ENABLE)) { - np->txrxctl_bits &= ~NVREG_TXRXCTL_RXCHECK; } else { - printk(KERN_INFO "Can not disable rx checksum if vlan is enabled\n"); - return -EINVAL; + np->rx_csum = 0; + /* vlan is dependent on rx checksum offload */ + if (!(np->vlanctl_bits & NVREG_VLANCONTROL_ENABLE)) + np->txrxctl_bits &= ~NVREG_TXRXCTL_RXCHECK; } - if (netif_running(dev)) { spin_lock_irq(&np->lock); writel(np->txrxctl_bits, base + NvRegTxRxControl); @@ -4285,6 +4279,7 @@ static int __devinit nv_probe(struct pci np->pkt_limit = NV_PKTLIMIT_2; if (id->driver_data & DEV_HAS_CHECKSUM) { + np->rx_csum = 1; np->txrxctl_bits |= NVREG_TXRXCTL_RXCHECK; dev->features |= NETIF_F_HW_CSUM | NETIF_F_SG; #ifdef NETIF_F_TSO _ Patches currently in -mm which might be from aabdulla@xxxxxxxxxx are git-netdev-all.patch forcedeth-decouple-vlan-and-rx-checksum-dependency.patch - To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html