Commit graph

16 commits

Author SHA1 Message Date
Poul-Henning Kamp 6817526d14 Convert if_multiaddrs from LIST to TAILQ so that it can be traversed
backwards in the three drivers which want to do that.

Reviewed by:    mikeh
2001-02-06 10:12:15 +00:00
Poul-Henning Kamp ef9e85abba Use <sys/queue.h> macro API. 2001-02-04 12:37:48 +00:00
Bosko Milekic 08812b3925 Implement MTX_RECURSE flag for mtx_init().
All calls to mtx_init() for mutexes that recurse must now include
the MTX_RECURSE bit in the flag argument variable. This change is in
preparation for an upcoming (further) mutex API cleanup.
The witness code will call panic() if a lock is found to recurse but
the MTX_RECURSE bit was not set during the lock's initialization.

The old MTX_RECURSE "state" bit (in mtx_lock) has been renamed to
MTX_RECURSED, which is more appropriate given its meaning.

The following locks have been made "recursive," thus far:
eventhandler, Giant, callout, sched_lock, possibly some others declared
in the architecture-specific code, all of the network card driver locks
in pci/, as well as some other locks in dev/ stuff that I've found to
be recursive.

Reviewed by: jhb
2001-01-19 01:59:14 +00:00
Matt Jacob 61e1a8f478 Restore a sense of cleanly supporting multiple platforms. That is,
place the LOCKing macros within the areas within if_wxvar.h that
is set aside for them. Put any platform specific data also in those
areas.

For ease of maintenance purposes, merge in the OpenBSD version codebase here.
2000-12-06 00:52:28 +00:00
Jonathan Lemon 6e47e42f8d Don't attach the interface twice. While I'm here, add a driver
mutex.
2000-11-25 06:04:18 +00:00
Matt Jacob 3fdd89c865 Very early and very *very* lightly tested support for LIVENGOOD chipset
(followon to WISEMAN). Presumably some flavors are also no multimode copper
as well.
2000-10-16 23:08:45 +00:00
Archie Cobbs 21b8ebd926 Make all Ethernet drivers attach using ether_ifattach() and detach using
ether_ifdetach().

The former consolidates the operations of if_attach(), ng_ether_attach(),
and bpfattach(). The latter consolidates the corresponding detach operations.

Reviewed by:	julian, freebsd-net
2000-07-13 22:54:34 +00:00
Matt Jacob 6e95418137 Thanks for Andrew Gallatin pointing out that freeing contigmalloc'd
items via free is bad.
2000-07-09 00:18:21 +00:00
Matt Jacob 55b59b50f2 If swdpio1 doesn't clear, we have a reversed (or disconnected) cable. Change
the message to indicate that it could also be a disconnected cable, and
return okay from wx_hw_intialize *anyway*. This allows us to contineu to
set the station address and when we do get link up, we're ready to roll.
2000-06-25 02:04:27 +00:00
Matt Jacob a46c6a5114 Fix this driver to (finally) work with switches. Some more black
magic from the linux driver.
2000-06-16 06:28:31 +00:00
Archie Cobbs 2e2de7f23f Move code to handle BPF and bridging for incoming Ethernet packets out
of the individual drivers and into the common routine ether_input().
Also, remove the (incomplete) hack for matching ethernet headers
in the ip_fw code.

The good news: net result of 1016 lines removed, and this should make
bridging now work with *all* Ethernet drivers.

The bad news: it's nearly impossible to test every driver, especially
for bridging, and I was unable to get much testing help on the mailing
lists.

Reviewed by:	freebsd-net
2000-05-14 02:18:43 +00:00
Matt Jacob 8dc7582ba5 put things in place for jumbograms 2000-01-25 06:09:53 +00:00
Matt Jacob 1d575e0fd3 Correctly put the place to mark EOP where we actually do the packet
transmission- this handles the odd and rare case of a list terminating
with a zero length mbuf.
2000-01-23 03:19:49 +00:00
Matt Jacob 4931a540da Remove some debugging code, replace one line that had spaces with tabs,
and fix a silly botch for reinit.
2000-01-23 02:07:31 +00:00
Matt Jacob 6d918197cd Get rid of the WX_XMIT_SMALL code- we've fixed that problem. Restructure
the receive code so that it correctly chains receive descriptors together
and handles the case that only a part of a packet is done at the time
we get here.
2000-01-23 01:49:11 +00:00
Matt Jacob 78dda2ae0c Add first pass of the Intel Gigabit Ethernet (wiseman) driver. This
driver seems relatively functional, but could use some souping up,
particularly in the performance area. This has both NetBSD and FreeBSD
attachment code and a fair amount of effort has been put into making
it easy to port to different *BSD platforms.

The basic design is a one tfd per mbuf transmit (with no transmit
related interrupts- tfds are gc'd as needed). The receive ring
uses a 2K buffer per rfd with a +2 byte adjust for the ethernet
header (so the payload is aligned). There's support that *almost*
works for doing large packets- the rfd chaining code works, but there's
some problem with getting good checksums at the IP reassembly level
(ditto for doing short tfd's too).

The chip has support for TCP checksums insertion for transmit and
TCP checksum calculation on receive (for both you have to do some
appropriate backoff && twiddling), but this isn't in place.

This is nearly entirely reverse engineered from the released Intel
driver, so there's a lot of "We have to do this but do not know why"
stuff. There is somebody who has the chip specs who works in FreeBSD
but they're being a bit standoffish about even sharing hints which
is somewhat annoying. It's also apparent that all I had to work with
were the first rev boards.

This driver has been lightly tested on intel && alpha, but only
point-to-point. There may be some issues with switches- use of
boot time environment variables that override EEPROM settings
(e.g., 'set wx_ilos=1' which inverts the sense of optical signal
loss) may help with this.

I had this out for review for three weeks, and nobody said anything
negative or positive, ergo, this checkin has no 'reviewed by' field
which I would have preferred.
2000-01-04 11:12:42 +00:00