ia64/xen-unstable

changeset 1162:386a27cbdb84

bitkeeper revision 1.777.1.1 (40503a50e-1llqTCGgDibJS82qIg9g)

etherdevice.h, 8139too.c:
Fixes to RTL8139 driver.
author kaf24@scramble.cl.cam.ac.uk
date Thu Mar 11 10:07:12 2004 +0000 (2004-03-11)
parents 0f65f19b396c
children 2f4d22be2eb7
files xen/drivers/net/8139too.c xen/include/xeno/etherdevice.h
line diff
     1.1 --- a/xen/drivers/net/8139too.c	Wed Mar 10 17:13:25 2004 +0000
     1.2 +++ b/xen/drivers/net/8139too.c	Thu Mar 11 10:07:12 2004 +0000
     1.3 @@ -128,7 +128,7 @@ typedef int pid_t;
     1.4  
     1.5  
     1.6  /* enable PIO instead of MMIO, if CONFIG_8139TOO_PIO is selected */
     1.7 -#ifdef CONFIG_8139TOO_PIO
     1.8 +#if defined(CONFIG_8139TOO_PIO) || defined(XEN) /* XXX MMIO fails on Xen :-( */
     1.9  #define USE_IO_OPS 1
    1.10  #endif
    1.11  
    1.12 @@ -2250,6 +2250,7 @@ static int rtl8139_close (struct net_dev
    1.13  	return 0;
    1.14  }
    1.15  
    1.16 +#ifndef XEN
    1.17  
    1.18  /* Get the ethtool Wake-on-LAN settings.  Assumes that wol points to
    1.19     kernel memory, *wol has been initialized as {ETHTOOL_GWOL}, and
    1.20 @@ -2325,7 +2326,6 @@ static int netdev_set_wol (struct net_de
    1.21  	return 0;
    1.22  }
    1.23  
    1.24 -#ifndef XEN
    1.25  static int netdev_ethtool_ioctl (struct net_device *dev, void *useraddr)
    1.26  {
    1.27  	struct rtl8139_private *np = dev->priv;
     2.1 --- a/xen/include/xeno/etherdevice.h	Wed Mar 10 17:13:25 2004 +0000
     2.2 +++ b/xen/include/xeno/etherdevice.h	Thu Mar 11 10:07:12 2004 +0000
     2.3 @@ -25,6 +25,7 @@
     2.4  #define _LINUX_ETHERDEVICE_H
     2.5  
     2.6  #include <xeno/if_ether.h>
     2.7 +#include <asm/domain_page.h>
     2.8  
     2.9  #ifdef __KERNEL__
    2.10  extern int		eth_header(struct sk_buff *skb, struct net_device *dev,
    2.11 @@ -43,7 +44,9 @@ extern struct net_device *alloc_etherdev
    2.12  
    2.13  static inline void eth_copy_and_sum (struct sk_buff *dest, unsigned char *src, int len, int base)
    2.14  {
    2.15 -	memcpy (dest->data, src, len);
    2.16 +	char *vdata = map_domain_mem(__pa(dest->data));
    2.17 +	memcpy(vdata, src, len);
    2.18 +	unmap_domain_mem(vdata);
    2.19  }
    2.20  
    2.21  /**