Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/ic Instead of writing the packet length in two 8bit ...
details: https://anonhg.NetBSD.org/src/rev/c996610fd85c
branches: trunk
changeset: 581824:c996610fd85c
user: pooka <pooka%NetBSD.org@localhost>
date: Mon Jun 06 20:20:09 2005 +0000
description:
Instead of writing the packet length in two 8bit pieces, use one
16bit write. At least in certain environments this has the effect
of the latter 8bit write of the length to be not interpreted as
the first 16 bits of the packet contents and hence the interface
working.
diffstat:
sys/dev/ic/smc91cxx.c | 7 +++----
1 files changed, 3 insertions(+), 4 deletions(-)
diffs (28 lines):
diff -r 39e04757643d -r c996610fd85c sys/dev/ic/smc91cxx.c
--- a/sys/dev/ic/smc91cxx.c Mon Jun 06 19:56:46 2005 +0000
+++ b/sys/dev/ic/smc91cxx.c Mon Jun 06 20:20:09 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: smc91cxx.c,v 1.51 2005/02/27 00:27:02 perry Exp $ */
+/* $NetBSD: smc91cxx.c,v 1.52 2005/06/06 20:20:09 pooka Exp $ */
/*-
* Copyright (c) 1997 The NetBSD Foundation, Inc.
@@ -78,7 +78,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: smc91cxx.c,v 1.51 2005/02/27 00:27:02 perry Exp $");
+__KERNEL_RCSID(0, "$NetBSD: smc91cxx.c,v 1.52 2005/06/06 20:20:09 pooka Exp $");
#include "opt_inet.h"
#include "opt_ccitt.h"
@@ -737,8 +737,7 @@
* and the status word (set to zeros).
*/
bus_space_write_2(bst, bsh, DATA_REG_W, 0);
- bus_space_write_1(bst, bsh, DATA_REG_B, (length + 6) & 0xff);
- bus_space_write_1(bst, bsh, DATA_REG_B, ((length + 6) >> 8) & 0xff);
+ bus_space_write_2(bst, bsh, DATA_REG_W, (length + 6) & 0x7ff);
/*
* Get the packet from the kernel. This will include the Ethernet
Home |
Main Index |
Thread Index |
Old Index