From 656d6634de02862e837f3a7d80a49e9ca072398d Mon Sep 17 00:00:00 2001 From: Thomas Schwinge Date: Sun, 22 Jan 2006 11:16:10 +0000 Subject: 2006-01-22 Thomas Schwinge * linux/src/drivers/net/ne2k-pci.c (ne_block_input, ne_block_output): Fix previous patch. --- ChangeLog | 5 +++++ linux/src/drivers/net/ne2k-pci.c | 15 ++++++++------- 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 + + * linux/src/drivers/net/ne2k-pci.c (ne_block_input, ne_block_output): + Fix previous patch. + 2005-07-12 Guillem Jover * 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 -- cgit v1.2.3