ia64/xen-unstable

changeset 11163:ebd289e3d205

[NET] front: Fix features on resume when csum is off

When the netfront driver is resumed the features are renegotiated with
the backend. However, I forgot take into account the status of the TX
checksum setting. When TX checksum is disabled by the user, we cannot
enable SG or TSO since both require checksum offload. This patch
makes
xennet check the checksum setting before renegotiating SG or TSO.

This bug was fixed thanks to a report from Anton Burtsev.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
author kfraser@localhost.localdomain
date Wed Aug 16 14:26:59 2006 +0100 (2006-08-16)
parents 30fb6ea3a1f7
children e2e7f4c17b77
files linux-2.6-xen-sparse/drivers/xen/netfront/netfront.c
line diff
     1.1 --- a/linux-2.6-xen-sparse/drivers/xen/netfront/netfront.c	Wed Aug 16 14:01:03 2006 +0100
     1.2 +++ b/linux-2.6-xen-sparse/drivers/xen/netfront/netfront.c	Wed Aug 16 14:26:59 2006 +0100
     1.3 @@ -1369,6 +1369,10 @@ static void xennet_set_features(struct n
     1.4  	dev->features |= NETIF_F_GSO_ROBUST;
     1.5  	xennet_set_sg(dev, 0);
     1.6  
     1.7 +	/* We need checksum offload to enable scatter/gather and TSO. */
     1.8 +	if (!(dev->features & NETIF_F_ALL_CSUM))
     1.9 +		return;
    1.10 +
    1.11  	if (!xennet_set_sg(dev, 1))
    1.12  		xennet_set_tso(dev, 1);
    1.13  }