ia64/xen-unstable

changeset 2486:f3f17358fcb9

bitkeeper revision 1.1159.1.155 (414978fb_upK1Chu4SGdV6AGC6e2jg)

Cset exclude: cl349@freefall.cl.cam.ac.uk|ChangeSet|20040916093252|64395
author kaf24@freefall.cl.cam.ac.uk
date Thu Sep 16 11:28:59 2004 +0000 (2004-09-16)
parents 75c62d5f88c3
children 70305dfe5f6e
files linux-2.6.8.1-xen-sparse/drivers/xen/netfront/netfront.c
line diff
     1.1 --- a/linux-2.6.8.1-xen-sparse/drivers/xen/netfront/netfront.c	Thu Sep 16 10:40:36 2004 +0000
     1.2 +++ b/linux-2.6.8.1-xen-sparse/drivers/xen/netfront/netfront.c	Thu Sep 16 11:28:59 2004 +0000
     1.3 @@ -393,12 +393,11 @@ static int network_start_xmit(struct sk_
     1.4      tx->size = skb->len;
     1.5  
     1.6      wmb(); /* Ensure that backend will see the request. */
     1.7 -    i++;
     1.8 -    np->tx->req_prod = i;
     1.9 +    np->tx->req_prod = i + 1;
    1.10  
    1.11      network_tx_buf_gc(dev);
    1.12  
    1.13 -    if ( (i - np->tx_resp_cons) == NETIF_TX_RING_SIZE )
    1.14 +    if ( (i - np->tx_resp_cons) == (NETIF_TX_RING_SIZE - 1) )
    1.15      {
    1.16          np->tx_full = 1;
    1.17          netif_stop_queue(dev);
    1.18 @@ -411,7 +410,7 @@ static int network_start_xmit(struct sk_
    1.19  
    1.20      /* Only notify Xen if there are no outstanding responses. */
    1.21      mb();
    1.22 -    if ( np->tx->resp_prod != i )
    1.23 +    if ( np->tx->resp_prod == i )
    1.24          notify_via_evtchn(np->evtchn);
    1.25  
    1.26      return 0;