summaryrefslogtreecommitdiff
path: root/drivers/net/arcnet/arc-rawmode.c
diff options
context:
space:
mode:
authorJeff Morrow <jmorrow@jmorrow.org>2007-02-16 12:42:27 +0300
committerJeff Garzik <jeff@garzik.org>2007-02-17 23:30:48 +0300
commit52edc17f94f7bd4d9a66bb13d9142f4072c7a82d (patch)
tree0e0c32e5565bafd3b0f4c5fc75144ac4192abce9 /drivers/net/arcnet/arc-rawmode.c
parent659dd8351a0acbf6b057ebddd4388a97cdf0feb2 (diff)
downloadlinux-52edc17f94f7bd4d9a66bb13d9142f4072c7a82d.tar.xz
bugfixes and new hardware support for arcnet driver
The modifications and bug fixes noted below were done by Realtime Control Works and Contemporary Control Systems, Inc, Jan 2005. They were incorporated into the 2.6 kernel by Jeff Morrow of Sierra Analytics, Feb 2007. <jmorrow@massspec.com> The changes have been tested on a Contemporary Controls PCI20U-4000. Summary of changes: Arc-rawmode.c: rx(): - Fixed error in received packet lengths; 256 byte packets were being received as 257 bytes packets. prepare_tx(): - Fixed error in transmit length calcs; 257 byte packets were being transmitted as 260 byte packets. com20020.c: com20020_check(): - We now load the SETUP2 register if the 'clockm' parameter is non-zero, instead of checking for ARC_CAN_10MBIT. The user is now responsible for whether or not SETUP2 is loaded. If the clock multiplier is non-zero, this means that the user wants a baud rate greater than 2.5Mbps. This is not possible unless the SETUP2 register is present (COM20020D, or COM20022). So, we're relying on the user to be smart about what kind of chip he's dealing with... com20020-pci.c - Added several entries to com20020pci_id_table[]. Signed-off-by: Jeff Morrow <jmorrow@massspec.com> Cc: "David S. Miller" <davem@davemloft.net> Cc: Jeff Garzik <jeff@garzik.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/net/arcnet/arc-rawmode.c')
-rw-r--r--drivers/net/arcnet/arc-rawmode.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/arcnet/arc-rawmode.c b/drivers/net/arcnet/arc-rawmode.c
index e7555d4e6ff1..6318814a11a8 100644
--- a/drivers/net/arcnet/arc-rawmode.c
+++ b/drivers/net/arcnet/arc-rawmode.c
@@ -94,7 +94,7 @@ static void rx(struct net_device *dev, int bufnum,
BUGMSG(D_DURING, "it's a raw packet (length=%d)\n", length);
- if (length >= MinTU)
+ if (length > MTU)
ofs = 512 - length;
else
ofs = 256 - length;
@@ -183,7 +183,7 @@ static int prepare_tx(struct net_device *dev, struct archdr *pkt, int length,
length, XMTU);
length = XMTU;
}
- if (length > MinTU) {
+ if (length >= MinTU) {
hard->offset[0] = 0;
hard->offset[1] = ofs = 512 - length;
} else if (length > MTU) {