Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/arm32/podulebus Copy alignment fix from dev/ic/i825...



details:   https://anonhg.NetBSD.org/src/rev/a74ea801a04e
branches:  trunk
changeset: 473144:a74ea801a04e
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Fri May 21 21:31:37 1999 +0000

description:
Copy alignment fix from dev/ic/i82586.c  (Um, this copy of the driver
needs to die, pretty please.)

diffstat:

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

diffs (27 lines):

diff -r 83dff8da19e3 -r a74ea801a04e sys/arch/arm32/podulebus/if_ie.c
--- a/sys/arch/arm32/podulebus/if_ie.c  Fri May 21 15:32:38 1999 +0000
+++ b/sys/arch/arm32/podulebus/if_ie.c  Fri May 21 21:31:37 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_ie.c,v 1.23 1999/05/18 23:52:52 thorpej Exp $ */
+/* $NetBSD: if_ie.c,v 1.24 1999/05/21 21:31:37 thorpej Exp $ */
 
 /*
  * Copyright (c) 1995 Melvin Tang-Richardson.
@@ -1172,7 +1172,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