by Eduardo Horvath and Simon Burge of Wasabi Systems.
IBM 4xx series CPU features:
- New pmap and revised trap handler.
- Support on-chip timers, PCI controller, UARTs
- Framework for on-chip ethernet and watchdog timer.
General PowerPC features:
- Add in-kernel PPC floating point emulation
- New in{,4}_cksum that is between 1.5 and 5 times faster than the
old version depending on CPU type.
General changes:
- Kernel support for generic dbsym-style symbols.
them define __HAVE_PCIIDE_MACHDEP_COMPAT_INTR_ESTABLISH
in pci_machdep.h and pciide_map_compat_intr() only calls
pciide_machdep_compat_intr_establish() if that preprocessor
define exists.
Ports that don't need to do this no longer need to supply a
dummy function.
network interfaces. This works by pre-computing the pseudo-header
checksum and caching it, delaying the actual checksum to ip_output()
if the hardware cannot perform the sum for us. In-bound checksums
can either be fully-checked by hardware, or summed up for final
verification by software. This method was modeled after how this
is done in FreeBSD, although the code is significantly different in
most places.
We don't delay checksums for IPv6/TCP, but we do take advantage of the
cached pseudo-header checksum.
Note: hardware-assisted checksumming defaults to "off". It is
enabled with ifconfig(8). See the manual page for details.
Implement hardware-assisted checksumming on the DP83820 Gigabit Ethernet,
3c90xB/3c90xC 10/100 Ethernet, and Alteon Tigon/Tigon2 Gigabit Ethernet.
SIP_EVENT_COUNTERS.
- Decrease SIP_NTXSEGS to 8 and increase SIP_TXQUEUELEN to 256.
This gives us 256 transmit jobs with only twice the descriptor
memory footprint. This prevents stalling transmissions due to
lack of transmit jobs under heavy load.
- Increase SIP_NRXDESC to 128 so we don't run out of receive descriptors
under extreme load.
- As recommended by the manual, leave one descriptor in the transmit ring
with OWN clear to prevent wrap-around.
- Even though the manual claims that driver software must initialize
TXDP if there are no pending transmissions when a new transmission
is to be initialized, doing so causes serious performance degredation
on the DP83820 under heavy load. Not initializing TXDP also increases
performance on the DP83815.
All of this gets us up to ~90Mb/s on both the DP83820 and DP83815 when
connected to a 100base network.
DP83820. The DP83820 definitions are wrapped in #ifdef DP83820, since
there are enough differences that a single binary object would not be
able to efficiently drive both the DP83815 and DP83820.
to guess the pciide capabilities, rather than trying to guess it by ourselve.
Add preliminary support for the 686b (Ultra/100) guessed from FreeBSD/linux
driver (datasheet not publically available, I contacted via).
Let chip-specific map routine do the autoconf printf if ide_name is NULL
(they may have more details about the controller than we have in pciide_attach)
This is a completely rewritten scsipi_xfer execution engine, and the
associated changes to HBA drivers. Overview of changes & features:
- All xfers are queued in the mid-layer, rather than doing so in an
ad-hoc fashion in individual adapter drivers.
- Adapter/channel resource management in the mid-layer, avoids even trying
to start running an xfer if the adapter/channel doesn't have the resources.
- Better communication between the mid-layer and the adapters.
- Asynchronous event notification mechanism from adapter to mid-layer and
peripherals.
- Better peripheral queue management: freeze/thaw, sorted requeueing during
recovery, etc.
- Clean separation of peripherals, adapters, and adapter channels (no more
scsipi_link).
- Kernel thread for each scsipi_channel makes error recovery much easier
(no more dealing with interrupt context when recovering from an error).
- Mid-layer support for tagged queueing: commands can have the tag type
set explicitly, tag IDs are allocated in the mid-layer (thus eliminating
the need to use buggy tag ID allocation schemes in many adapter drivers).
- support for QUEUE FULL and CHECK CONDITION status in mid-layer; the command
will be requeued, or a REQUEST SENSE will be sent as appropriate.
Just before the merge syssrc has been tagged with thorpej_scsipi_beforemerge
need to explicitly relatch the interrupt when firing it up again. So, in the
trigger routines, explicitly disable and reenable the interrupt to relatch it,
like we do in the interrupt routine.
Also clean up some broken loop overrun checks.
My ES1371 seems to be more reliable now, but I'm not going to pretend to fully
understand this chip.
XXX Currently disabled by default because it has some problems on macppc.
XXX Maybe some more initialization is needed, but there is few information
XXX about the chips.
change DLT type to cisco HDLC, as lmc driver is hardwired to cisco HDLC
on driver attach. XXX we may need to revisit this, as if_spppsubr may want
to alter this later.
saves about 2.2MB under /usr/include/dev/. Discussed on tech-kern@
recently.
I HOPE to get the list right. The headers I left in are ones
used for MI tools and those whose usage I discovered by grep over tree sources.
Feel free to put needed includes back in if you encounter anything which
should not be removed from lists.
This now provides slightly more functionality than the FreeBSD layer1-newbus
interface. It was meant to be a simple change to one header and a few
c files, but the change rippled all through various stuff.
To prevent a change to the kernel<->userland interface right now the kernel
is now lying about card types to userland (but who cares). This will be fixed
when the userland interface changes, after layer 3 <-> layer 4 has been
fixed.
Functional changes:
Provide a clean interface for hardware drivers to attach to the upper
layers. This will need another small change in the B-channel handling
when a similar change to the layer 3 <-> layer 4 interface happens.
Avoid passing indices into global arrays of pointers around, instead pass
the pointers itself. Don't code hardware driver types by predefined magic
numbers (think LKM). Prepare for detachable drivers (think pcmcia).
While there remove some sets of function pointers always pointing to the
same function (meant to be the configurable set of D channel protocol
handlers). It is unlikely another supported D-channel protocol will fit into
that (maximal layer interface) abstraction. When we get support for another
protocol, we will need to come up with a workable interface. Besides, the
old implementation was, uhm, strange.
Revert the revert. Naturally, I considered OpenBSD and FreeBSD when I fixed
the incorrect use of the spl*() interface. The change I made is _required_
for both NetBSD _and_ OpenBSD, or the code won't even COMPILE except on
i386, and it is acceptable on FreeBSD. Your revert and mod rebroke it on
OpenBSD and tangled things up on NetBSD. It made no difference on FreeBSD.
In particular, there are 2,895 uses of splx() within the FreeBSD kernel,
and only a mere 21, that's "twenty one" uses of intrmask_t, and those are
almost exclusively in the guts of the interrupt implementation, _not_ in
the _use_ of the exported spl*() functions. It's perfectly OK to `int s
= spltty()' in a portable driver in FreeBSD.
For that matter, FreeBSD (-current at least) does not even *use* spl*()
any more and stubs them all out with inlines that do _nothing_ except return
0, making intrmask_t vs int _even less_ important there than it already
was.
I think it's great that you want to start hacking on the kernel, but do
note that this is certainly the most simple of the kernel interfaces. It
just gets worse from here. Be careful out there!
- Set the destination address register properly for "perfect match" mode
in the receive filter setup.
- Do not enable multicast receipt unless we are configured for some multicast.
- Use the "recommended settings" (which set undocumented registers and
documented-as-reserved fields) for the silicon revision 302h (not 203h,
as documented in one of the two places in the manual) because the
documentation is unclear and because those settings fix the card's
behavior in "perfect match" mode. Without those settings, the card
was generating random CRC/invalid symbol errors and generally not
working unless it was set to be promiscuous.
With these changes, this week's version of the Netgear FA311 works for me.
pci_dev_funcorder() that have the following signatures:
int pci_bus_devorder(pci_chipset_tag_t pc, int bus, char list[32]);
int pci_dev_funcorder(pci_chipset_tag_t pc, int bus, int device, char list[8]);
they control the order of PCI bus probe at the device and function level,
by filling in a value from 0 to 31 for pci_bus_devorder() or 0 to 7 for
pci_dev_funcorder, with a value of -1 to signify no more entries.
when device properties arrive, these will be replaced with some facility
based on properties (design/implementation unknown currently.)
remove all (legacy) "i4b_" prefixes outside of sys/netisdn.
Prefix all card specific driver support files with the basename
of the driver bus attachement file.
Renamed here:
pci_isic.h -> isic_pci.h
pci_isic.c -> isic_pci.c
i4b_avm_fritz_pci.c -> isic_pci_avm_fritz_pci.c
i4b_elsa_qs1p.c -> isic_pci_elsa_qs1p.c
for proper console text handling (especially in-line insertion) on
8-bit displays.
From Christian Groessler <cpg@aladdin.de>.
Tested on 32-bit TGA by me.
configuration (assignment of bus numbers, BARs, timer values,
interrupt lines, etc.).
The interface must be called from m.d. code prior to probing the bus.
It is meant to be called once for each primary (bus == 0) PCI bus in
the system. It will configure any busses behind PCI-PCI bridges.
Section 9 man page for pci_configure_bus() will come soon.
In the meantime, sample usage is in arch/sandpoint/sandpoint/mainbus.c.
[ Reviewed by thorpej ]