diff options
author | Thomas Schwinge <tschwinge@gnu.org> | 2006-01-22 11:16:10 +0000 |
---|---|---|
committer | Thomas Schwinge <tschwinge@gnu.org> | 2009-06-18 00:26:29 +0200 |
commit | 656d6634de02862e837f3a7d80a49e9ca072398d (patch) | |
tree | ee9c206af50fc85779828285c5468f3ab7e20585 /linux/src/drivers/net/ne2k-pci.c | |
parent | 80fee10735b608b95cbcd01b97e3bd2e35d42c2d (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.
Diffstat (limited to 'linux/src/drivers/net/ne2k-pci.c')
-rw-r--r-- | linux/src/drivers/net/ne2k-pci.c | 15 |
1 files changed, 8 insertions, 7 deletions
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 |