UDS: move from drivers/net/ to net/

Change-Id: I53992b205e767a77c7b3c868a38c7f3d772a4ed3
etc/usr/rc: fix argument passing for net drivers

The expected argument name would include the instance number, which
is not only redundant in many cases (FOOETHn_n=arg.., "n" being the
instance number) and conflicted with what netconf(8) does, but some
drivers need to be able to see the arguments for all instances of its
driver type--for example, dp8390 needs to know how many earlier
instances have been configured to use PCI.

Change-Id: I4830b823352722f554a032979464aba8b08fc166
dp8390: update, allow default port and IRQ

Bochs has switched from port base 0x240 to 0x300 for its default
NE2000 ISA configuration, and QEMU is using the same settings.

Change-Id: Ide6cdb14321eb4324d0bf6d6314c5970b3493e95
e1000: fix unaligned register access

This resolves a guru meditation in recent VirtualBox versions.

Change-Id: I5034d8af1fe885adda3c027cb23563bffaccf97e
fxp: enable bus mastering if needed

This is required for at least QEMU.  However, as of writing, QEMU also
requires fixes in its epro100 emulator before this driver can use it.

Change-Id: Ie5c5ffe4311b1a0e581bc687f1c15de3a85f4a30
orinoco: restore register memory mapping

Untested.

Change-Id: I439f0e711e16ba478dadf57ffc8ad74ec19ea1b9
libvirtio: expose result size on packet dequeue

Change-Id: I49304678895779849abc2528a9f78730f968e712
atl2: convert to KNF

Change-Id: Ie4b979aab3127a91a12b8086326da0eb1f9a860b
e1000: convert to KNF

Change-Id: Ibd156c2e0a58fed70895080d4b230b26c500fa11
libnetdriver: turn into network driver framework

The new implementation of this library provides abstractions for
network drivers, and should be used for all network drivers from now
on.  It provides the following functionality:

  - a function call table abstraction, hiding the details of the
    datalink protocol with simple parameters;
  - a state machine for sending and receiving packets, freeing the
    actual driver from keeping track of pending requests;
  - an abstraction for copying data from and to the network driver,
    freeing the actual driver from dealing with I/O vectors while at
    the same time providing a copy implementation which is more
    efficient than most current driver implementations;
  - a generalized implementation of zero-copy port-based I/O;
  - a clearer set of policies and defaults.

While the concept is very similar to lib{block,char,fs,input}driver,
one main difference is that libnetdriver now also takes care of SEF
initialization, mainly so that aspects such as recovery policies and
live-update aspects can be changed for all network drivers in a
single place.  As always, for the case that the provided message loop
is too restrictive, a set of more low-level message processing
functions is provided.

The netdriver API has been designed so as to allow alleviation of one
current protocol bottleneck: the fact that at most one send request
and one receive request may be pending at any time.  Changing this
aspect will however require a significant rewrite of libnetdriver,
and possibly debugging of drivers that are not able to cope with (in
particular) queuing multiple packets for transmission at once.

Beyond that, the design of the new API is based on the current
protocol, and may be changed/extended later to allow for non-ethernet
network drivers, exposure of link status, multicast address
configuration, suspend and resume, and any other features that are in
fact long overdue.

Change-Id: I47ec47e05852c42f92af04549d41524f928efec2
atl2: use new libnetdriver

Change-Id: I65de5d29a75d5f3101b2c5ab16a4b0d79bd77cc3
dec21140A: use new libnetdriver

Change-Id: I54be3b770e4d1fd320200c30e9e9073a7c1b405b
dp8390: use new libnetdriver

Change-Id: Ieaf6d605832d475f95fd9b06026b349dce7ee025
dpeth: use new libnetdriver

Change-Id: Ic389e54817c5b241dad851c89ef1cf16c015a79b
e1000: use new libnetdriver

Change-Id: I111750d2ca27f01039d0b427b1314aea861e2074
fxp: use new libnetdriver

Change-Id: I03268655a5daff3d109ae52e64673911ef096a3f
lan8710a: use new libnetdriver

Change-Id: Iaee4d75a5dfafc72d94f0b02681f9aea1c9da535
lance: use new libnetdriver

Change-Id: If3414088e66407c688c4960f99a165b0ee1ebc83
orinoco: use new libnetdriver

Change-Id: I003590539dd76f4be8e067f986bb1f17b151490d
rtl8139: use new libnetdriver

Change-Id: Iba941653b7c052375694bcec2561957c1979feb0