Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/sandpoint/stand/altboot Make sure a frame is at lea...



details:   https://anonhg.NetBSD.org/src/rev/093fa1cb5fa5
branches:  trunk
changeset: 763798:093fa1cb5fa5
user:      phx <phx%NetBSD.org@localhost>
date:      Mon Apr 04 16:41:34 2011 +0000

description:
Make sure a frame is at least 60 bytes, as Realtek does not automatically
expand small frames.
Patch suggested by nisimura@.

diffstat:

 sys/arch/sandpoint/stand/altboot/rge.c |  6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diffs (20 lines):

diff -r dd0cfa8dfa86 -r 093fa1cb5fa5 sys/arch/sandpoint/stand/altboot/rge.c
--- a/sys/arch/sandpoint/stand/altboot/rge.c    Mon Apr 04 16:32:41 2011 +0000
+++ b/sys/arch/sandpoint/stand/altboot/rge.c    Mon Apr 04 16:41:34 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: rge.c,v 1.3 2011/03/27 19:09:43 phx Exp $ */
+/* $NetBSD: rge.c,v 1.4 2011/04/04 16:41:34 phx Exp $ */
 
 /*-
  * Copyright (c) 2007 The NetBSD Foundation, Inc.
@@ -219,6 +219,10 @@
        volatile struct desc *txd;
        unsigned loop;
 
+       if (len < 60) {
+               memset(buf + len, 0, 60 - len);
+               len = 60; /* RTL does not stretch <60 Tx frame */
+       }
        wbinv(buf, len);
        txd = &l->txd[l->tx];
        txd->xd2 = htole32(VTOPHYS(buf));



Home | Main Index | Thread Index | Old Index