summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Schwinge <tschwinge@gnu.org>2006-01-22 11:16:10 +0000
committerThomas Schwinge <tschwinge@gnu.org>2009-06-18 00:26:29 +0200
commit656d6634de02862e837f3a7d80a49e9ca072398d (patch)
treeee9c206af50fc85779828285c5468f3ab7e20585
parent80fee10735b608b95cbcd01b97e3bd2e35d42c2d (diff)
2006-01-22 Thomas Schwinge <tschwinge@gnu.org>
* linux/src/drivers/net/ne2k-pci.c (ne_block_input, ne_block_output): Fix previous patch.
-rw-r--r--ChangeLog5
-rw-r--r--linux/src/drivers/net/ne2k-pci.c15
2 files changed, 13 insertions, 7 deletions
diff --git a/ChangeLog b/ChangeLog
index e717a8f..7124a1e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2006-01-22 Thomas Schwinge <tschwinge@gnu.org>
+
+ * linux/src/drivers/net/ne2k-pci.c (ne_block_input, ne_block_output):
+ Fix previous patch.
+
2005-07-12 Guillem Jover <guillem@hadrons.org>
* configure: Regenerated.
diff --git a/linux/src/drivers/net/ne2k-pci.c b/linux/src/drivers/net/ne2k-pci.c
index bdc3e74..280fb72 100644
--- a/linux/src/drivers/net/ne2k-pci.c
+++ b/linux/src/drivers/net/ne2k-pci.c
@@ -541,11 +541,10 @@ ne_block_input(struct device *dev, int count, struct sk_buff *skb, int ring_offs
insl(NE_BASE + NE_DATAPORT, buf, count>>2);
if (count & 3) {
buf += count & ~3;
- if (count & 2)
- {
- *buf = *(u16 *) buf + 1;
- *buf = inw(NE_BASE + NE_DATAPORT);
- }
+ if (count & 2) {
+ *((u16 *) buf) = inw(NE_BASE + NE_DATAPORT);
+ buf = (void *) buf + sizeof (u16);
+ }
if (count & 1)
*buf = inb(NE_BASE + NE_DATAPORT);
}
@@ -607,8 +606,10 @@ ne_block_output(struct device *dev, int count,
outsl(NE_BASE + NE_DATAPORT, buf, count>>2);
if (count & 3) {
buf += count & ~3;
- if (count & 2)
- outw(*buf++, NE_BASE + NE_DATAPORT);
+ if (count & 2) {
+ outw(*((u16 *) buf), NE_BASE + NE_DATAPORT);
+ buf = (void *) buf + sizeof (u16);
+ }
}
#else