[parisc-linux-cvs] 2.4.17-pa32

Thomas Bogendoerfer tsbogend@alpha.franken.de
Tue, 26 Feb 2002 00:16:27 +0100


Diff of 2.4.17-pa32.

Thomas.


Index: drivers/net/3c503.c
===================================================================
RCS file: /home/cvs/parisc/linux/drivers/net/3c503.c,v
retrieving revision 1.10
diff -u -p -r1.10 3c503.c
--- drivers/net/3c503.c	2001/11/09 23:36:01	1.10
+++ drivers/net/3c503.c	2002/02/25 22:10:31
@@ -502,6 +502,7 @@ el2_get_8390_hdr(struct net_device *dev,
 
     if (dev->mem_start) {       /* Use the shared memory. */
 	isa_memcpy_fromio(hdr, hdr_start, sizeof(struct e8390_pkt_hdr));
+	hdr->count = le16_to_cpu(hdr->count);
 	return;
     }
 
Index: drivers/net/hp-plus.c
===================================================================
RCS file: /home/cvs/parisc/linux/drivers/net/hp-plus.c,v
retrieving revision 1.8
diff -u -p -r1.8 hp-plus.c
--- drivers/net/hp-plus.c	2001/11/09 23:36:03	1.8
+++ drivers/net/hp-plus.c	2002/02/25 22:54:37
@@ -351,7 +351,7 @@ hpp_mem_get_8390_hdr(struct net_device *
 	outw(option_reg & ~(MemDisable + BootROMEnb), ioaddr + HPP_OPTION);
 	isa_memcpy_fromio(hdr, dev->mem_start, sizeof(struct e8390_pkt_hdr));
 	outw(option_reg, ioaddr + HPP_OPTION);
-	hdr->count = (hdr->count + 3) & ~3;	/* Round up allocation. */
+	hdr->count = (le16_to_cpu(hdr->count) + 3) & ~3;	/* Round up allocation. */
 }
 
 static void
Index: drivers/net/smc-ultra.c
===================================================================
RCS file: /home/cvs/parisc/linux/drivers/net/smc-ultra.c,v
retrieving revision 1.10
diff -u -p -r1.10 smc-ultra.c
--- drivers/net/smc-ultra.c	2001/11/09 23:36:03	1.10
+++ drivers/net/smc-ultra.c	2002/02/25 22:15:28
@@ -383,9 +383,11 @@ ultra_get_8390_hdr(struct net_device *de
 	unsigned long hdr_start = dev->mem_start + ((ring_page - START_PG)<<8);
 
 	outb(ULTRA_MEMENB, dev->base_addr - ULTRA_NIC_OFFSET);	/* shmem on */
-#ifdef notdef
+#ifdef __BIG_ENDIAN
 	/* Officially this is what we are doing, but the readl() is faster */
+	/* unfortunately it isn't endian aware of the struct               */
 	isa_memcpy_fromio(hdr, hdr_start, sizeof(struct e8390_pkt_hdr));
+	hdr->count = le16_to_cpu(hdr->count);
 #else
 	((unsigned int*)hdr)[0] = isa_readl(hdr_start);
 #endif
Index: drivers/net/smc-ultra32.c
===================================================================
RCS file: /home/cvs/parisc/linux/drivers/net/smc-ultra32.c,v
retrieving revision 1.8
diff -u -p -r1.8 smc-ultra32.c
--- drivers/net/smc-ultra32.c	2001/11/09 23:36:04	1.8
+++ drivers/net/smc-ultra32.c	2002/02/25 22:18:37
@@ -320,9 +320,11 @@ static void ultra32_get_8390_hdr(struct 
 	/* Select correct 8KB Window. */
 	outb(ei_status.reg0 | ((ring_page & 0x60) >> 5), RamReg);
 
-#ifdef notdef
+#ifdef __BIG_ENDIAN
 	/* Officially this is what we are doing, but the readl() is faster */
+	/* unfortunately it isn't endian aware of the struct               */
 	isa_memcpy_fromio(hdr, hdr_start, sizeof(struct e8390_pkt_hdr));
+	hdr->count = le16_to_cpu(hdr->count);
 #else
 	((unsigned int*)hdr)[0] = isa_readl(hdr_start);
 #endif
Index: drivers/net/wd.c
===================================================================
RCS file: /home/cvs/parisc/linux/drivers/net/wd.c,v
retrieving revision 1.8
diff -u -p -r1.8 wd.c
--- drivers/net/wd.c	2001/11/09 23:36:04	1.8
+++ drivers/net/wd.c	2002/02/25 22:15:43
@@ -365,9 +365,11 @@ wd_get_8390_hdr(struct net_device *dev, 
 	if (ei_status.word16)
 		outb(ISA16 | ei_status.reg5, wd_cmdreg+WD_CMDREG5);
 
-#ifdef notdef
+#ifdef __BIG_ENDIAN
 	/* Officially this is what we are doing, but the readl() is faster */
+	/* unfortunately it isn't endian aware of the struct               */
 	isa_memcpy_fromio(hdr, hdr_start, sizeof(struct e8390_pkt_hdr));
+	hdr->count = le16_to_cpu(hdr->count);
 #else
 	((unsigned int*)hdr)[0] = isa_readl(hdr_start);
 #endif
Index: drivers/net/tulip/interrupt.c
===================================================================
RCS file: /home/cvs/parisc/linux/drivers/net/tulip/interrupt.c,v
retrieving revision 1.12
diff -u -p -r1.12 interrupt.c
--- drivers/net/tulip/interrupt.c	2001/12/13 22:37:14	1.12
+++ drivers/net/tulip/interrupt.c	2001/12/25 18:49:11
@@ -306,7 +306,7 @@ static inline void phy_interrupt (struct
 		tulip_check_duplex(dev);
 		spin_unlock(&tp->lock);
 		/* clear irq ack bit */
-		outl(csr12 | 0x00, ioaddr + CSR12);
+		outl(csr12 & ~0x02, ioaddr + CSR12);
 	}
 }
 #endif
Index: include/asm-parisc/io.h
===================================================================
RCS file: /home/cvs/parisc/linux/include/asm-parisc/io.h,v
retrieving revision 1.26
diff -u -p -r1.26 io.h
--- include/asm-parisc/io.h	2001/12/03 05:10:00	1.26
+++ include/asm-parisc/io.h	2002/02/25 21:31:23
@@ -173,6 +173,16 @@ extern void memset_io(unsigned long dest
 #define isa_memcpy_fromio(a,b,c) memcpy_fromio((a), EISA_BASE | (b), (c))
 #define isa_memcpy_toio(a,b,c) memcpy_toio(EISA_BASE | (a), (b), (c))
 
+/*
+ * XXX - We don't have csum_partial_copy_fromio() yet, so we cheat here and 
+ * just copy it. The net code will then do the checksum later. Presently 
+ * only used by some shared memory 8390 Ethernet cards anyway.
+ */
+
+#define eth_io_copy_and_sum(skb,src,len,unused) \
+  memcpy_fromio((skb)->data,(src),(len))
+#define isa_eth_io_copy_and_sum(skb,src,len,unused) \
+  isa_memcpy_fromio((skb)->data,(src),(len))
 
 /* Port-space IO */
 
Index: eisa_eeprom.c
===================================================================
RCS file: /home/cvs/parisc/linux/drivers/gsc/eisa_eeprom.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -p -r1.1 -r1.2
--- eisa_eeprom.c	2002/02/24 16:29:43	1.1
+++ eisa_eeprom.c	2002/02/25 19:41:48	1.2
@@ -22,10 +22,10 @@ static long long eisa_eeprom_llseek(stru
 		offset += file->f_pos;
 		break;
 	  case 2:
-		offset += HPEE_BASE_LENG;
+		offset += HPEE_MAX_LENGTH;
 		break;
 	}
-	return (offset >= 0 && offset < HPEE_BASE_LENG) ? (file->f_pos = offset) : -EINVAL;
+	return (offset >= 0 && offset < HPEE_MAX_LENGTH) ? (file->f_pos = offset) : -EINVAL;
 }
 
 static ssize_t eisa_eeprom_read(struct file * file,
@@ -35,10 +35,10 @@ static ssize_t eisa_eeprom_read(struct f
 	ssize_t ret;
 	int i;
 	
-	if (*ppos >= HPEE_BASE_LENG)
+	if (*ppos >= HPEE_MAX_LENGTH)
 		return 0;
 	
-	count = *ppos + count < HPEE_BASE_LENG ? count : HPEE_BASE_LENG - *ppos;
+	count = *ppos + count < HPEE_MAX_LENGTH ? count : HPEE_MAX_LENGTH - *ppos;
 	tmp = kmalloc(count, GFP_KERNEL);
 	if (tmp) {
 		for (i = 0; i < count; i++)

-- 
Crap can work. Given enough thrust pigs will fly, but it's not necessary a
good idea.                                 [ Alexander Viro on linux-kernel ]