ia64/xen-unstable

changeset 250:9e4c6336ab3b

bitkeeper revision 1.103.1.1 (3e5d18a7GqCcFtgB4EjULbmAXiDJzw)

xenolinux network driver tx_event now set to tx_prod rather than tx_prod+1

seems to fix a network hang problem...
author iap10@labyrinth.cl.cam.ac.uk
date Wed Feb 26 19:42:31 2003 +0000 (2003-02-26)
parents ce6eb0deb0c7
children 574648259ee0
files xenolinux-2.4.21-pre4-sparse/arch/xeno/drivers/network/network.c
line diff
     1.1 --- a/xenolinux-2.4.21-pre4-sparse/arch/xeno/drivers/network/network.c	Wed Feb 26 15:57:33 2003 +0000
     1.2 +++ b/xenolinux-2.4.21-pre4-sparse/arch/xeno/drivers/network/network.c	Wed Feb 26 19:42:31 2003 +0000
     1.3 @@ -66,6 +66,17 @@ struct net_private
     1.4  };
     1.5  
     1.6   
     1.7 +static void dbg_network_int(int irq, void *dev_id, struct pt_regs *ptregs)
     1.8 +{
     1.9 +  struct net_device *dev = (struct net_device *)dev_id;
    1.10 +  struct net_private *np = dev->priv;
    1.11 +  printk(KERN_ALERT "tx_full = %d, tx_entries = %d, tx_idx = %d, tx_cons = %d, tx_prod = %d, tx_event = %d, state=%d\n",
    1.12 +	 np->tx_full, np->tx_entries, np->tx_idx, 
    1.13 +	 np->net_ring->tx_cons,np->net_ring->tx_prod,np->net_ring->tx_event,
    1.14 +	 test_bit(__LINK_STATE_XOFF, &dev->state));
    1.15 +}
    1.16 +
    1.17 +
    1.18  static int network_open(struct net_device *dev)
    1.19  {
    1.20      struct net_private *np = dev->priv;
    1.21 @@ -123,6 +134,11 @@ static int network_open(struct net_devic
    1.22          goto fail;
    1.23      }
    1.24  
    1.25 +#if 1
    1.26 +    request_irq( _EVENT_DEBUG, dbg_network_int, SA_SHARED, "debug", dev);    
    1.27 +#endif
    1.28 +
    1.29 +
    1.30      printk("XenoLinux Virtual Network Driver installed as %s\n", dev->name);
    1.31  
    1.32      netif_start_queue(dev);
    1.33 @@ -268,7 +284,7 @@ static int network_start_xmit(struct sk_
    1.34      else
    1.35      {
    1.36          /* Avoid unnecessary tx interrupts. */
    1.37 -        np->net_ring->tx_event = TX_RING_INC(np->net_ring->tx_prod);
    1.38 +        np->net_ring->tx_event = np->net_ring->tx_prod;
    1.39      }
    1.40      spin_unlock_irq(&np->tx_lock);
    1.41