1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-10 09:42:26 +00:00

When I converted this driver, I neglected to deal with packet alignment.

We must force payload alignment to a longword boundary to make the
alpha happy. This should stop the driver from trapping on the alpha
when the interface is ifconfig'ed (actually, when the first frame is
received).
This commit is contained in:
Bill Paul 2000-12-07 23:30:51 +00:00
parent 5e1aea9fd7
commit 15f43fcb0b
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=69732

View File

@ -77,6 +77,7 @@
#define ETHER_MAX_LEN 1518
#define ETHER_ADDR_LEN 6
#define ETHER_ALIGN 2
static struct connector_entry {
int bit;
@ -687,6 +688,22 @@ vxread(sc)
++ifp->if_ipackets;
{
struct mbuf *m0;
m0 = m_devget(mtod(m, char *) - ETHER_ALIGN,
m->m_pkthdr.len + ETHER_ALIGN, 0, ifp, NULL);
if (m0 == NULL) {
ifp->if_ierrors++;
goto abort;
}
m_adj(m0, ETHER_ALIGN);
m_freem(m);
m = m0;
}
/* We assume the header fit entirely in one mbuf. */
eh = mtod(m, struct ether_header *);