Commit graph

56791 commits

Author SHA1 Message Date
John Baldwin 23de16f9a7 Add support for the nForce2/3/4 SMBus controllers which all contain two
SMBus busses.  Because of limitations in smbus_if.m, the second smbus is
attached to an amdpm1 device that is a child of amdpm0.

Submitted by:	Artemiev Igor ai (at) bmc dot brk dot ru
2005-12-14 17:49:45 +00:00
Søren Schmidt 59a269294f Add RAID0+1 and RAID5 support to VIA RAID code.
Fix support for multiple arrays.
2005-12-14 13:07:49 +00:00
Søren Schmidt a569390328 Add support for VIA VT8251 southbridge.
SATA support for now in compat mode, but all 4 channels usable.
2005-12-14 12:13:00 +00:00
Søren Schmidt c6c6c58a89 Correct calculation of RAID0 sizes on VIA RAID arrays. 2005-12-14 12:11:51 +00:00
Scott Long 5351742ea2 Mega update to the LSI MegaRAID driver:
1.  Implement a large set of ioctl shims so that the Linux management apps
from LSI will work.  This includes infrastructure to support adding, deleting
and rescanning arrays at runtime.  This is based on work from Doug Ambrosko,
heavily augmented by LSI and Yahoo.

2.  Implement full 64-bit DMA support.  Systems with more than 4GB of RAM
can now operate without the cost of bounce buffers.  Cards that cannot do
64-bit DMA will automatically revert to using bounce buffers.  This option
can be forced off by setting the 'hw.amr.force_sg32" tunable in the loader.
It should only be turned off for debugging purposes.  This work was sponsored
by Yahoo.

3.  Streamline the command delivery and interrupt handler paths after
much discussion with Dell and LSI.  The logic now closely matches the
intended design, making it both more robust and much faster.  Certain
i/o failures under heavy load should be fixed with this.

4.  Optimize the locking.  In the interrupt handler, the card can be checked
for completed commands without any locks held, due to the handler being
implicitely serialized and there being no need to look at any shared data.
Only grab the lock to return the command structure to the free pool.  A
small optimization can still be made to collect all of the completions
together and then free them together under a single lock.

Items 3 and 4 significantly increase the performance of the driver.  On an
LSI 320-2X card, transactions per second went from 13,000 to 31,000 in my
testing with these changes.  However, these changes are still fairly
experimental and shouldn't be merged to 6.x until there is more testing.

Thanks to Doug Ambrosko, LSI, Dell, and Yahoo for contributing towards
this.
2005-12-14 03:26:49 +00:00
Andrew Thompson 91f6764e93 Add support for creating span ports so that one can snoop bridged traffic
from another interface/machine/network.

Obtained from:	OpenBSD
MFC after:	2 weeks
2005-12-14 02:52:13 +00:00
Sam Leffler 8e292e8ecd When creating neighbor entries for an ahdemo bss apply the local
settings.  In particular this allows us to use QoS frames in a
bss and in turn enables disabling ack's.
2005-12-14 01:18:36 +00:00
Sam Leffler 50d8b493e4 when creating an ahdemo bss use any requested bssid; otherwise use zero
Obtained from:	madwifi
2005-12-14 01:16:22 +00:00
Sam Leffler 259bb4d3b9 allow setting the bssid in any mode
Obtained from:	netbsd
2005-12-14 01:14:22 +00:00
Dag-Erling Smørgrav 0430a5e289 Eradicate caddr_t from the VFS API. 2005-12-14 00:49:52 +00:00
Dag-Erling Smørgrav e26b05cf44 Nuke vnodeop_desc.vdesc_transports, which has been unused since the dawn
of time (or the inception of ncvs, whichever came last)
2005-12-14 00:15:11 +00:00
Scott Long 6239708b1c Fix the Tigon I/II driver to support 64-bit DMA. In the process, convert it
to use busdma.  Unlike most of the other drivers, but similar to the
if_em driver, pre-allocate the dmamaps at init time instead of allocating
them on the fly when descriptors need to be filled.  This isn't ideal right
now because a map is allocated for every descriptor slot in the tx, rx, mini,
and jumbo rings (which is a lot!) in order to simplify the bookkeeping, even
though the driver might support filling only a subset of those slots.
Luckily, maps are typically NULL on i386 and amd64, so the cost isn't
very high.  It could be an issue with sparc64, but the driver isn't endian
clean either, and that is a much bigger problem to solve first.

Note that jumbo frame support is under-tested, and I'm not even sure if
it till really works correctly given the evil VM magic that is does.
The changes here attempt to preserve the existing semanitcs.

Thanks to Martin Nillson for contributing the Netgear card for this work.

MFC-After: 3 weeks
2005-12-14 00:03:41 +00:00
John Baldwin d272fe53a4 Add a new 'show lock' command to ddb. If the argument has a valid lock
class, then it displays various information about the lock and calls a
new function pointer in lock_class (lc_ddb_show) to dump class-specific
information about the lock as well (such as the owner of a mutex or
xlock'ed sx lock).  This is easier than staring at hex dumps of locks to
figure out who owns the lock, etc.  Note that extending lock_class doesn't
affect the ABI for any kernel modules as the only code that deals with
lock_class structures directly is kern_mutex.c, kern_sx.c, and witness.

MFC after:	1 week
2005-12-13 23:14:35 +00:00
Craig Rodrigues 63ec04adea Hide DDB-specific functions inside check for #ifdef DDB.
Noticed by:	des
2005-12-13 22:42:02 +00:00
Alan Cox 984922d761 Assert that the page that is given to vm_page_free_toq() does not have any
managed mappings.
2005-12-13 19:59:09 +00:00
Peter Wemm 737429bc96 MFamd64 rev 1.223: Use the TSC to implement DELAY() if not marked broken
and it has been calibrated.
2005-12-13 19:08:55 +00:00
John Baldwin e83f6bcb75 Revert previous commit. The BIOS braindamage is even worse than I
originally thought.  The BIOS that cleared CPUID_APIC actually managed
to disable the local APIC entirely and even Windows 64 doesn't boot on
it.

Reported by:	bz
2005-12-13 18:29:10 +00:00
Xin LI 1278dd6847 In Linux, kernel parameters passed to ioctl are by value, while in FreeBSD
they are passed by reference.  Handle the difference within the
linux_ioctl_termio on the LINUX_TCFLSH path.

Submitted by:	Jaroslav Drzik <jaro_AT_coop-voz_dot_sk>
2005-12-13 15:32:52 +00:00
John Baldwin 15b7edbeaa Don't check the CPUID_APIC bit in the cpu_features flags field to determine
if the boot CPU has a local APIC because some BIOS vendors are not
competent enough to set this bit.  Instead, just assume that we always have
a local APIC on amd64.  For i386 the check is a bit more subtle.  FreeBSD
requires either an MP Table or an ACPI MADT table to enumerate APICs.  The
only systems that have one of those tables that don't have local APICs are
some presumably rare (and old) SMP 486 systems using external APICs.  Thus,
instead of checking the CPUID_APIC flag, check the CPU class and abort if
we are running on a 486.

MFC after:	1 week
Reported by:	bz
2005-12-13 15:09:40 +00:00
Gleb Smirnoff 40b1ae9e00 Add a new feature for optimizining ipfw rulesets - substitution of the
action argument with the value obtained from table lookup. The feature
is now applicable only to "pipe", "queue", "divert", "tee", "netgraph"
and "ngtee" rules.

An example usage:

  ipfw pipe 1000 config bw 1000Kbyte/s
  ipfw pipe 4000 config bw 4000Kbyte/s
  ipfw table 1 add x.x.x.x 1000
  ipfw table 1 add x.x.x.y 4000
  ipfw pipe tablearg ip from table(1) to any

In the example above the rule will throw different packets to different pipes.

TODO:
  - Support "skipto" action, but without searching all rules.
  - Improve parser, so that it warns about bad rules. These are:
    - "tablearg" argument to action, but no "table" in the rule. All
      traffic will be blocked.
    - "tablearg" argument to action, but "table" searches for entry with
      a specific value. All traffic will be blocked.
    - "tablearg" argument to action, and two "table" looks - for src and
      for dst. The last lookup will match.
2005-12-13 12:16:03 +00:00
Marcel Moolenaar 2778b70e71 In bge_link_upd(), rewrite the logic so that status is assigned
on the code path it is used in a way that GCC understands. This
avoids breakage due to higher optimization levels.
2005-12-13 06:14:14 +00:00
Craig Rodrigues e497db39e8 Inherit system-wide BLKDEV_IOSIZE definition.
Submitted by:	kan
2005-12-13 02:32:30 +00:00
Paul Saab fc6ff223c4 Improve upon rev 1.133 where NFS/TCP would not reconnect.
Submitted by:	Mohan Srinivasan
2005-12-12 23:18:05 +00:00
Peter Wemm 6bcdd71391 For the amd64 platform, we can depend on the TSC being present. This patch
changes DELAY to use the TSC once it has been calibrated.  This does NOT
use the TSC for long-term timekeeping.   It only uses it to bound the
DELAY() spinloop.  This should not be affected by the Athlon64 X2 TSC
quirks because the cpu is not halted while we use DELAY().
2005-12-12 22:27:07 +00:00
Warner Losh fbd68c4b4c Make uart_getenv() not be ns8250 dependent. This will allow, in the future,
compilation of kernels without ns8250 support but using the uart framework.
These kernels will be for machines where size matters more, so including code
that can never be executed is undesriable...
2005-12-12 21:00:58 +00:00
Gleb Smirnoff 02a101a611 - Polling can be used on SMP.
- A kernel module can support polling.
2005-12-12 19:29:30 +00:00
Sam Leffler d16441fde1 disallow module unload when there are dynamic references
MFC after:	1 week
2005-12-12 19:07:48 +00:00
Sam Leffler 1fd2349de8 propagate current bss state on sta join so, in particular, authmode
is set properly in the new bss node

MFC after:	2 weeks
2005-12-12 18:44:27 +00:00
Sam Leffler 1b49e12042 Bandaid ieee80211_set_chan to handle a channel parameter of "any";
this can happen under certain conditions when scanning.  This logic
will eventually go away with the new scanning code.

While here de-inline the routine.

MFC after:	1 week
2005-12-12 18:42:20 +00:00
Sam Leffler 6cfac1074c o correct auto mode logic for avoiding turbo channels
o correct assumption that a static turbo channel is also
  usable in 11a; the opposite is true

MFC after:	1 week
2005-12-12 18:38:20 +00:00
Sam Leffler e701e041f2 Add ieee80211_beacon_miss for processing sta mode beacon miss events
in the 802.11 layer: we send a directed probe request frame to the
current ap bmiss_max times (w/o answer) before scanning for a new ap.

MFC after:	2 weeks
2005-12-12 18:04:44 +00:00
Sam Leffler 047f1635dd add some useful definitions that'll be used soon 2005-12-12 17:57:00 +00:00
Sam Leffler 64353cb0ef add fixed rate for sending multicast frames
Obtained from:	atheros
MFC after:	1 week
2005-12-12 17:54:39 +00:00
Sam Leffler c25442860a change malloc when setting an optional ie to use M_NOWAIT
MFC after:	3 days
2005-12-12 17:40:49 +00:00
Sam Leffler e55e5e4276 correct parameter check when retrieving the current channel list
MFC after:	3 days
2005-12-12 17:38:53 +00:00
Marius Strobl 00d3c930da Fix a bug introduced in rev. 1.5; for retrieving the device_t of the
parent bridge of a PCI-PCI bridge we need two device_get_parent().
2005-12-12 16:07:11 +00:00
Maxime Henrion 52dfd9cdad Add the device ID of fxp(4) NICs found in Sony Vaio VGN-TX1XP laptops.
PR:		kern/90024
Submitted by:	Thomas Hurst <tom@hur.st>
MFC after:	3 days
2005-12-12 14:30:13 +00:00
Søren Schmidt 921f15117f Add support for writing SiS metadata. 2005-12-12 14:13:55 +00:00
Bruno Ducrot f9ead0fcbe Don't flood kernel logs with "invalid _PSS package" messages.
Approved by:	njl, imp (mentor)
2005-12-12 11:15:20 +00:00
Ruslan Ermilov e9484e32a1 Remove all redundant option file names that don't hurt readability. 2005-12-12 10:15:11 +00:00
Bjoern A. Zeeb 3e4212785c Make nve(4) work for people with nf3/nf4 who never got it
working at all and only saw "nve0: device timeout (N)" messages.

- Setup PHY before handing control to NVidia API setting
  speed, duplex, enabling interrupts, etc.
- Add restriction of MAXADDR_32BIT for high address to contigmalloc
  to make the driver work on machines with 4+GB of memory.

PR:        kern/85583, kern/88045
Tested by: scottl, others earlier version
MFC after: 10 days
2005-12-12 06:23:43 +00:00
David Xu dd1a6f53ac Stop fiddling thread priority with msleep, eliminating unnecessary
context switching. This improves performance about 30% on UP machine.
2005-12-12 05:04:56 +00:00
Craig Rodrigues 15fd62fa0f #define __user to nothing 2005-12-12 03:21:37 +00:00
Craig Rodrigues 7b30d7180f Add read-only XFS to LINT. 2005-12-12 02:01:51 +00:00
Craig Rodrigues 80d8e89620 Build xfs before xl.
Noticed by:	pjd
2005-12-12 01:37:57 +00:00
Craig Rodrigues 5518f0df3a Add xfs to list of modules which are built. 2005-12-12 01:29:57 +00:00
Craig Rodrigues e1fd210e51 Hook XFS into kernel build. 2005-12-12 01:14:59 +00:00
Craig Rodrigues 1f83e99e4c Add Makefile for compiling XFS as a kernel module. 2005-12-12 01:11:08 +00:00
Craig Rodrigues 93d9c69ff4 Initial import of read-only support for SGI's XFS filesystem.
Contributed by:		XFS for FreeBSD project
2005-12-12 01:04:32 +00:00
Craig Rodrigues 92f44a3f3c Contributions from XFS for FreeBSD project:
- Implement cv_wait_unlock() method which has semantics compatible
  with the sv_wait() method in IRIX.  For cv_wait_unlock(), the lock
  must be held before entering the function, but is not held when the
  function is exited.

- Implement the existing cv_wait() function in terms of cv_wait_unlock().

Submitted by:	kan
Feedback from:	jhb, trhodes, Christoph Hellwig <hch at infradead dot org>
2005-12-12 00:02:22 +00:00