12
in the middle. The mfree( ) routine is called to free any
Otherwise, adds the length and sets the next memory buffer in the chain to the mp mbuf pointer.
9.2.3 Transmitting the Buffer
The following code shows how the el_start_locked( ) routine transmits the buffer:
WRITE_DATA(sc, len TX_INT); 1 dat = mtod(ms, unsigned char *); len =
while (ms != NULL) {
io_blockwrite((vm_offset_t)dat, 2
HANDLE_LONGWORD);
dat += (len & ~ 3);
ms =
i = len % 4; 3 if (ms == NULL) {
if (i) { val = 0;
for (j=0; j<i; j++)
val = (*dat++ << (8*j)); WRITE_DATA(sc, val);
}
} else {
if (i) { val = 0;
for (j=0; j<i; j++)
val = (*dat++ << (8*j));
dat = mtod(ms, unsigned char *);
if
for (j=0;
ms = NULL; } else {
len =
val = (*dat++ << (8*j));
}
WRITE_DATA(sc, val); } else {
dat = mtod(ms, unsigned char *); len =
}
}
}
1
Requests an interrupt upon completion of the transmit operation.