summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--debian/changelog4
-rw-r--r--debian/patches/11_nic_update.patch40
-rw-r--r--debian/patches/17_net_gcc_4.0.patch37
3 files changed, 57 insertions, 24 deletions
diff --git a/debian/changelog b/debian/changelog
index d39ddd6..ae44cb3 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -5,6 +5,10 @@ gnumach (1:20050801-2) UNRELEASED; urgency=low
stack when reading the MAC address from the io port. (Closes: #340389)
- debian/patches/16_net_apricot_stack_of.patch: New file.
Thanks to Sergio Lopez <koro@sinrega.org>.
+ * Fix invalid lvalue errors with gcc-4.0 in ne2k-pci driver.
+ - debian/patches/11_nic_update.patch: Split into ...
+ - debian/pacthes/17_net_gcc_4.0.patch: ... here.
+ Thanks to Thomas Schwinge <tschwinge@gnu.org>.
-- Guillem Jover <guillem@debian.org> Thu, 17 Nov 2005 01:20:14 +0200
diff --git a/debian/patches/11_nic_update.patch b/debian/patches/11_nic_update.patch
index b9033c0..8cc4e03 100644
--- a/debian/patches/11_nic_update.patch
+++ b/debian/patches/11_nic_update.patch
@@ -22,11 +22,6 @@
* linux/src/drivers/net/eepro100.c (pci_id_tbl): Add PCI ID's from
linux-2.6.14-rc4.
-2005-11-05 Thomas Schwinge <tschwinge@gnu.org>
-
- * linux/src/drivers/net/ne2k-pci.c (ne2k_pci_block_input)
- (ne2k_pci_block_output): Fix invalid lvalue errors with gcc 4.0.
-
2004-02-29 Alfred M. Szmidt <ams@kemisten.nu>
* i386/linux/Makefile.in (linux-net-files): Added `cb_shim.c',
@@ -17693,7 +17688,7 @@ diff -u -r1.1 ne2k-pci.c
outb(E8390_NODMA+E8390_PAGE0+E8390_START, nic_base+ NE_CMD);
outb(count & 0xff, nic_base + EN0_RCNTLO);
outb(count >> 8, nic_base + EN0_RCNTHI);
-@@ -537,31 +537,30 @@
+@@ -537,31 +537,28 @@
outb(ring_offset >> 8, nic_base + EN0_RSARHI);
outb(E8390_RREAD+E8390_START, nic_base + NE_CMD);
@@ -17705,6 +17700,14 @@ diff -u -r1.1 ne2k-pci.c
- {
- *buf = *(u16 *) buf + 1;
- *buf = inw(NE_BASE + NE_DATAPORT);
+- }
+- if (count & 1)
+- *buf = inb(NE_BASE + NE_DATAPORT);
+- }
+-#else
+- insw(NE_BASE + NE_DATAPORT,buf,count>>1);
+- if (count & 0x01) {
+- buf[count-1] = inb(NE_BASE + NE_DATAPORT);
+ if (ei_status.ne2k_flags & ONLY_16BIT_IO) {
+ insw(NE_BASE + NE_DATAPORT,buf,count>>1);
+ if (count & 0x01) {
@@ -17714,17 +17717,8 @@ diff -u -r1.1 ne2k-pci.c
+ insl(NE_BASE + NE_DATAPORT, buf, count>>2);
+ if (count & 3) {
+ buf += count & ~3;
-+ if (count & 2) {
-+ *((u16 *) buf) = le16_to_cpu(inw(NE_BASE + NE_DATAPORT));
-+ buf = (void *) buf + sizeof (u16);
- }
-- if (count & 1)
-- *buf = inb(NE_BASE + NE_DATAPORT);
-- }
--#else
-- insw(NE_BASE + NE_DATAPORT,buf,count>>1);
-- if (count & 0x01) {
-- buf[count-1] = inb(NE_BASE + NE_DATAPORT);
++ if (count & 2)
++ *((u16*)buf)++ = le16_to_cpu(inw(NE_BASE + NE_DATAPORT));
+ if (count & 1)
+ *buf = inb(NE_BASE + NE_DATAPORT);
+ }
@@ -17741,7 +17735,7 @@ diff -u -r1.1 ne2k-pci.c
const unsigned char *buf, const int start_page)
{
int nic_base = NE_BASE;
-@@ -569,15 +568,18 @@
+@@ -569,15 +566,18 @@
/* On little-endian it's always safe to round the count up for
word writes. */
@@ -17764,7 +17758,7 @@ diff -u -r1.1 ne2k-pci.c
return;
}
ei_status.dmaing |= 0x01;
-@@ -603,24 +605,25 @@
+@@ -603,24 +603,23 @@
outb(0x00, nic_base + EN0_RSARLO);
outb(start_page, nic_base + EN0_RSARHI);
outb(E8390_RWRITE+E8390_START, nic_base + NE_CMD);
@@ -17781,10 +17775,8 @@ diff -u -r1.1 ne2k-pci.c
+ outsl(NE_BASE + NE_DATAPORT, buf, count>>2);
+ if (count & 3) {
+ buf += count & ~3;
-+ if (count & 2) {
-+ outw(cpu_to_le16(*((u16 *) buf)), NE_BASE + NE_DATAPORT);
-+ buf = (void *) buf + sizeof (u16);
-+ }
++ if (count & 2)
++ outw(cpu_to_le16(*((u16*)buf)++), NE_BASE + NE_DATAPORT);
+ }
}
-#else
@@ -17801,7 +17793,7 @@ diff -u -r1.1 ne2k-pci.c
LNS8390_init(dev,1);
break;
}
-@@ -633,8 +636,8 @@
+@@ -633,8 +632,8 @@
/*
* Local variables:
diff --git a/debian/patches/17_net_gcc_4.0.patch b/debian/patches/17_net_gcc_4.0.patch
new file mode 100644
index 0000000..9534738
--- /dev/null
+++ b/debian/patches/17_net_gcc_4.0.patch
@@ -0,0 +1,37 @@
+#DPATCHLEVEL=0
+
+2005-11-05 Thomas Schwinge <tschwinge@gnu.org>
+
+ * linux/src/drivers/net/ne2k-pci.c (ne2k_pci_block_input)
+ (ne2k_pci_block_output): Fix invalid lvalue errors with gcc 4.0.
+
+
+diff -Naur linux/src/drivers/net/ne2k-pci.c linux/src/drivers/net/ne2k-pci.c
+--- linux/src/drivers/net/ne2k-pci.c 2005-11-28 03:34:08.000000000 +0200
++++ linux/src/drivers/net/ne2k-pci.c 2005-11-28 03:38:41.000000000 +0200
+@@ -546,8 +546,10 @@
+ insl(NE_BASE + NE_DATAPORT, buf, count>>2);
+ if (count & 3) {
+ buf += count & ~3;
+- if (count & 2)
+- *((u16*)buf)++ = le16_to_cpu(inw(NE_BASE + NE_DATAPORT));
++ if (count & 2) {
++ *((u16 *) buf) = le16_to_cpu(inw(NE_BASE + NE_DATAPORT));
++ buf = (void *) buf + sizeof (u16);
++ }
+ if (count & 1)
+ *buf = inb(NE_BASE + NE_DATAPORT);
+ }
+@@ -609,8 +611,10 @@
+ outsl(NE_BASE + NE_DATAPORT, buf, count>>2);
+ if (count & 3) {
+ buf += count & ~3;
+- if (count & 2)
+- outw(cpu_to_le16(*((u16*)buf)++), NE_BASE + NE_DATAPORT);
++ if (count & 2) {
++ outw(cpu_to_le16(*((u16 *) buf)), NE_BASE + NE_DATAPORT);
++ buf = (void *) buf + sizeof (u16);
++ }
+ }
+ }
+