Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/sun3/dev Copy alignment fix from dev/ic/i82586.c (...



details:   https://anonhg.NetBSD.org/src/rev/65d3bd01ce97
branches:  trunk
changeset: 473145:65d3bd01ce97
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Fri May 21 21:33:59 1999 +0000

description:
Copy alignment fix from dev/ic/i82586.c  (Um, this extra copy should die,
too, but at least it's not as bad as the podulebus ie driver).

diffstat:

 sys/arch/sun3/dev/if_ie.c |  12 +++++++++++-
 1 files changed, 11 insertions(+), 1 deletions(-)

diffs (27 lines):

diff -r a74ea801a04e -r 65d3bd01ce97 sys/arch/sun3/dev/if_ie.c
--- a/sys/arch/sun3/dev/if_ie.c Fri May 21 21:31:37 1999 +0000
+++ b/sys/arch/sun3/dev/if_ie.c Fri May 21 21:33:59 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_ie.c,v 1.30 1999/05/18 23:52:53 thorpej Exp $ */
+/*     $NetBSD: if_ie.c,v 1.31 1999/05/21 21:33:59 thorpej Exp $ */
 
 /*-
  * Copyright (c) 1993, 1994, 1995 Charles M. Hannum.
@@ -977,7 +977,17 @@
                        if (m->m_flags & M_EXT)
                                len = MCLBYTES;
                }
+
+               if (mp == &top) {
+                       caddr_t newdata = (caddr_t)
+                           ALIGN(m->m_data + sizeof(struct ether_header)) -
+                           sizeof(struct ether_header);
+                       len -= newdata - m->m_data; 
+                       m->m_data = newdata;
+               }
+
                m->m_len = len = min(totlen, len);
+
                totlen -= len;
                *mp = m;
                mp = &m->m_next;



Home | Main Index | Thread Index | Old Index