Module Name: src Committed By: phx Date: Mon Apr 4 16:41:34 UTC 2011
Modified Files: src/sys/arch/sandpoint/stand/altboot: rge.c Log Message: Make sure a frame is at least 60 bytes, as Realtek does not automatically expand small frames. Patch suggested by nisimura@. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/sys/arch/sandpoint/stand/altboot/rge.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/arch/sandpoint/stand/altboot/rge.c diff -u src/sys/arch/sandpoint/stand/altboot/rge.c:1.3 src/sys/arch/sandpoint/stand/altboot/rge.c:1.4 --- src/sys/arch/sandpoint/stand/altboot/rge.c:1.3 Sun Mar 27 19:09:43 2011 +++ src/sys/arch/sandpoint/stand/altboot/rge.c Mon Apr 4 16:41:34 2011 @@ -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));