Commit Graph

28 Commits

Author SHA1 Message Date
pooka
10fe49d72c Redefine bpf linkage through an always present op vector, i.e.
#if NBPFILTER is no longer required in the client.  This change
doesn't yet add support for loading bpf as a module, since drivers
can register before bpf is attached.  However, callers of bpf can
now be modularized.

Dynamically loadable bpf could probably be done fairly easily with
coordination from the stub driver and the real driver by registering
attachments in the stub before the real driver is loaded and doing
a handoff.  ... and I'm not going to ponder the depths of unload
here.

Tested with i386/MONOLITHIC, modified MONOLITHIC without bpf and rump.
2010-01-19 22:06:18 +00:00
tsutsui
4890eaf0d8 Pass correct size (after padding) to bus_dmamap_sync(9) for RX mbufs
in iee_intr().  Fixes panic on DIAGNOSTIC kernel reported by skrll@.
2009-05-13 13:12:06 +00:00
tsutsui
84e868b269 - adjust comments for the previous change
- wrap a long comment
- remove a trailing whitespace
2009-05-10 04:36:58 +00:00
tsutsui
f76d0651b7 Misc bus_dma(9) related cleanup:
- calculate each descriptor sizes and offsets in iee_attach() and store them
  into softc, rather than re-calculating them everywhere via macros
- prepare macros to sync DMA shmem per each descriptor
- sync only necessary descriptors in iee_intr() and iee_start()
- make sure SCB_FOO macros take softc as an arg properly
- use bus_dmamap_load_mbuf(9) for RX mbufs
- put 2 byte alignments to RX mbufs

XXX: still slower than ie(4) in i82586 compat mode on HP9000 735/125.
2009-05-10 04:26:19 +00:00
tsutsui
3ec7e0d881 Fix more pasto botch. 2009-05-09 20:44:56 +00:00
tsutsui
f8a52a52cb Remove (wrong) function names by pasto from attach failure messages. 2009-05-09 20:42:09 +00:00
tsutsui
8de92473d5 Also check if cache line alignment is power of two in KASSERT(). 2009-05-09 03:54:10 +00:00
tsutsui
0eda417b19 Move allocation of DMA shared memory with bus_dma(9) ops
from MD attachments to MI iee_attach().
Tested on HP9000 735/125. Compile test only on ews4800mips.

XXX: more strict bus_dmamap_sync(9) calls are required in various places.
2009-05-09 03:22:20 +00:00
tsutsui
1ad413250a Add support for i82596 Rev A chip which doesn't have the enhanced 32 bit
big endian mode:
- add IEE_REV_A flag to indicate if chip support the 32 bit BE mode or not
- add IEE_SWAPA32() macro and use it on necessary 32 bit DMA pointers
- rename IEE_SWAP() macro for the SCP address pointer and statistics
  counters which require word swap even on Rev B/C chips to IEE_SWAP32()
  for clarification
- add comments about these BE mode quirks

Tested on HP9000 735/125 by me and also tested on 715/50 by skrll@
with netbsd-5 branch, and fixes MI part of PR port-hp700/35531.
2009-05-05 15:47:35 +00:00
tsutsui
a3fc79baa9 Split device_t/softc for iee(4), with misc cosmetic changes. 2008-04-04 17:03:42 +00:00
ad
a2a3828545 machine/{bus,cpu,intr}.h -> sys/{bus,cpu,intr}.h 2007-10-19 11:59:34 +00:00
dyoung
71e77a61b4 Constify: LLADDR -> CLLADDR. I'm aiming here to make it easier to
identify sockaddr_dl abuse that remains in the kernel, especially
the potential for overwriting memory past the end of a sockaddr_dl
with, e.g., memcpy(LLADDR(), ...).
2007-08-26 22:45:55 +00:00
skrll
a3ff9cc3ff Remove bogus if_drain. If an attempt to reclaim mbufs was made the
interface was marked down.

Should fix PR 31540.
2007-04-17 14:12:06 +00:00
christos
53524e44ef Kill caddr_t; there will be some MI fallout, but it will be fixed shortly. 2007-03-04 05:59:00 +00:00
skrll
b819728719 Note this driver is for the i82596CA and i82596DX/SX chips and provide
links to documentation on developers.intel.com
2006-07-12 05:12:06 +00:00
skrll
eb4039be03 KNF some comments and whitespace. 2006-07-08 16:24:08 +00:00
skrll
e5a112d805 Spelling in comments. No functional change. 2006-07-08 16:07:47 +00:00
christos
95e1ffb156 merge ktrace-lwp. 2005-12-11 12:16:03 +00:00
skrll
51b20ca033 Fix typo. 2005-06-07 06:27:17 +00:00
he
05721f8fb4 Adapt to -Wcast-qual by adding a const and using __UNVOLATILE() in
a couple of places where memcpy() is used.
2005-06-02 14:41:26 +00:00
perry
f31bd063e9 nuke trailing whitespace 2005-02-27 00:26:58 +00:00
tsutsui
11b735f28a u_intNN_t -> uintNN_t 2005-02-18 22:39:31 +00:00
tsutsui
13238da8a4 Account ifp->if_opackets and ifp->if_collisions. 2005-02-17 15:16:26 +00:00
tsutsui
a68fa671e6 Remove unneeded includes. 2005-02-17 11:23:36 +00:00
thorpej
bebd825b66 iee_ioctl(): Make this look like other drivers, fixing a missing "splx(s)"
as a side-effect.  Don't bother handling IFF_PROMISC here, because
ether_ioctl() already calls (*if_init)() to handle flags changes.

When adding/deleting multicast addresses, only whack the address
filter if the interface is marked RUNNING.

Fixes kern/27678.
2004-10-30 23:52:22 +00:00
thorpej
e9818f5b5e When adding/deleting multicast addresses, only whack the address
filter if the interface is marked RUNNING.

Fixes kern/27678.
2004-10-30 18:08:34 +00:00
jkunz
6c6c2be95f Remove race conditions caused by the CPU cache of PA7100 CPUs. 2004-08-26 16:56:07 +00:00
jkunz
17e4dce36a Import MI part of new Intel i82596 Ethernet driver. 2004-03-12 11:37:17 +00:00