Deleted Added
full compact
40c40
< /* $FreeBSD: head/sys/dev/le/lancevar.h 155093 2006-01-31 14:48:58Z marius $ */
---
> /* $FreeBSD: head/sys/dev/le/lancevar.h 158663 2006-05-16 21:04:01Z marius $ */
45,46d44
< #define LE_DRIVER_NAME "le"
<
95,96c93,94
< void *sc_mem; /* base address of RAM -- CPU's view */
< u_long sc_addr; /* base address of RAM -- LANCE's view */
---
> void *sc_mem; /* base address of RAM - CPU's view */
> bus_addr_t sc_addr; /* base address of RAM - LANCE's view */
98c96
< u_long sc_memsize; /* size of RAM */
---
> bus_size_t sc_memsize; /* size of RAM */
133a132,136
> /*
> * Unfortunately, manual byte swapping is only necessary for the PCnet-PCI
> * variants but not for the original LANCE or ILACC so we cannot do this
> * with #ifdefs resolved at compile time.
> */
146c149
< void lance_read(struct lance_softc *, int, int);
---
> struct mbuf *lance_get(struct lance_softc *, int, int);
168a172,213
> /*
> * Compare two Ether/802 addresses for equality, inlined and
> * unrolled for speed. Use this like memcmp().
> *
> * XXX: Add <machine/inlines.h> for stuff like this?
> * XXX: or maybe add it to libkern.h instead?
> *
> * "I'd love to have an inline assembler version of this."
> * XXX: Who wanted that? mycroft? I wrote one, but this
> * version in C is as good as hand-coded assembly. -gwr
> *
> * Please do NOT tweak this without looking at the actual
> * assembly code generated before and after your tweaks!
> */
> static inline uint16_t
> ether_cmp(void *one, void *two)
> {
> uint16_t *a = (u_short *)one;
> uint16_t *b = (u_short *)two;
> uint16_t diff;
>
> #ifdef m68k
> /*
> * The post-increment-pointer form produces the best
> * machine code for m68k. This was carefully tuned
> * so it compiles to just 8 short (2-byte) op-codes!
> */
> diff = *a++ - *b++;
> diff |= *a++ - *b++;
> diff |= *a++ - *b++;
> #else
> /*
> * Most modern CPUs do better with a single expresion.
> * Note that short-cut evaluation is NOT helpful here,
> * because it just makes the code longer, not faster!
> */
> diff = (a[0] - b[0]) | (a[1] - b[1]) | (a[2] - b[2]);
> #endif
>
> return (diff);
> }
>