Commit Graph

2324 Commits

Author SHA1 Message Date
Gleb Smirnoff
9619a56eff Fix typo in last commit. 2009-01-28 11:04:27 +00:00
Warner Losh
c27cd4240a at91dci isn't useful except on arm. 2009-01-28 08:39:48 +00:00
Nathan Whitehorn
8486eb86a7 Add support for the I2S and davbus audio controllers found in Apple PowerPC
hardware.

Submitted by:	Marco Trillo
2009-01-25 18:20:15 +00:00
Jung-uk Kim
129dec4245 - Add few VIA bridges to agp_via.c and connect it to amd64 build
as they support Intel Core/Core 2 and VIA Nano processors.
- Align "optional agp" in conf/files.* for consistency while I am here.
2009-01-23 17:48:18 +00:00
Weongyo Jeong
37af314cb9 urtw(4) works also on amd64.
Tested by:	kevlo
2009-01-23 08:18:58 +00:00
Weongyo Jeong
ac9b205234 Connect urtw(4) to the i386 build only because it's not tested on amd64
architecture but expect it'd work.  In cases on other architectures it'd
not work yet.
2009-01-23 05:45:17 +00:00
Weongyo Jeong
d195485267 Add a new USB wireless driver, urtw(4) for supporting Realtek's 8187L
chipset.
2009-01-23 05:04:49 +00:00
Andrew Thompson
20c2956049 MFp4: //depot/projects/usb@155869
Initial version of ATMEGA USB device controller
	driver. Has not been tested on real hardware yet.
	The driver is based upon the AT91DCI driver.

Submitted by: Hans Petter Selasky
2009-01-13 18:49:35 +00:00
Jung-uk Kim
9045c73682 Connect padlock(4) to amd64 build for VIA Nano processors. 2009-01-12 19:23:46 +00:00
Sam Leffler
ff7bdcae4c remove license ack requirement; this was never needed
Reviewed by:	core
2009-01-09 22:35:25 +00:00
Rong-En Fan
fb898a2cc2 - Remove snd_au88x0 which seems never got compiled into kernel nor as a kernel
module. These files cause manual interaction when building
  ports/audio/aureal-kmod which provides a usable i386-only driver (it requires
  linking against some linux object files distributed by vendor which bankrupted
  back in 2000).

MFC after:	1 week
2009-01-07 03:15:22 +00:00
Alfred Perlstein
d5474fd85f Sync with usb4bsd:
src/lib/libusb20/libusb20_desc.c

Make "libusb20_desc_foreach()" more readable.

src/sys/dev/usb2/controller/*.[ch]
src/sys/dev/usb2/core/*.[ch]

Implement support for USB power save for all HC's.

Implement support for Big-endian EHCI.

Move Huawei quirks back into "u3g" driver.

Improve device enumeration.

src/sys/dev/usb2/ethernet/*[ch]

Patches for supporting new AXE Gigabit chipset.

src/sys/dev/usb2/serial/*[ch]

Fix IOCTL return code.

src/sys/dev/usb2/wlan/*[ch]

Sync with old USB stack.

Submitted by: hps
2009-01-04 00:12:01 +00:00
Weongyo Jeong
0454f8732e unbreak the build. Decoupled the USB2's NDIS build from the default
build.

Pointy hat to:  me
2008-12-27 12:23:22 +00:00
Weongyo Jeong
b3974c00b5 Integrate the NDIS USB support code to CURRENT.
Now the NDISulator supports NDIS USB drivers that it've tested with
devices as follows:

  - Anygate XM-142 (Conexant)
  - Netgear WG111v2 (Realtek)
  - U-Khan UW-2054u (Marvell)
  - Shuttle XPC Accessory PN20 (Realtek)
  - ipTIME G054U2 (Ralink)
  - UNiCORN WL-54G (ZyDAS)
  - ZyXEL G-200v2 (ZyDAS)

All of them succeeded to attach and worked though there are still some
problems that it's expected to be solved.

To use NDIS USB support, you should rebuild and install ndiscvt(8) and
if you encounter a problem to attach please set `hw.ndisusb.halt' to
0 then retry.

I expect no changes of the NDIS code for PCI, PCMCIA devices.

Obtained from:  //depot/projects/ndisusb/...
2008-12-27 08:03:32 +00:00
Alexander Motin
ee8b2cf02a Rejoin ng_tty module to the build. 2008-12-25 09:32:20 +00:00
Julian Elischer
1018c6cbf9 Hook up the ether_echo node and fix the man page 2008-12-25 07:34:14 +00:00
Julian Elischer
a0b5197620 Add a trivial node to reflect ethernet frames to whence they came.
MFC after: 1 month
2008-12-25 00:01:29 +00:00
Qing Li
6e6b3f7cbc This main goals of this project are:
1. separating L2 tables (ARP, NDP) from the L3 routing tables
2. removing as much locking dependencies among these layers as
   possible to allow for some parallelism in the search operations
3. simplify the logic in the routing code,

The most notable end result is the obsolescent of the route
cloning (RTF_CLONING) concept, which translated into code reduction
in both IPv4 ARP and IPv6 NDP related modules, and size reduction in
struct rtentry{}. The change in design obsoletes the semantics of
RTF_CLONING, RTF_WASCLONE and RTF_LLINFO routing flags. The userland
applications such as "arp" and "ndp" have been modified to reflect
those changes. The output from "netstat -r" shows only the routing
entries.

Quite a few developers have contributed to this project in the
past: Glebius Smirnoff, Luigi Rizzo, Alessandro Cerri, and
Andre Oppermann. And most recently:

- Kip Macy revised the locking code completely, thus completing
  the last piece of the puzzle, Kip has also been conducting
  active functional testing
- Sam Leffler has helped me improving/refactoring the code, and
  provided valuable reviews
- Julian Elischer setup the perforce tree for me and has helped
  me maintaining that branch before the svn conversion
2008-12-15 06:10:57 +00:00
Sam Leffler
2a8d8e7cfd Combine ath rate control modules with ath after bringing ath_hal
src into the tree.  The old split was balanced on module dependencies
and symbol exposure that no longer exists.  Users that want a module
setup with rate control algorithm other than sample must override
ATH_RATE in the ath module Makefile.

Reviewed by:	imp
2008-12-14 22:26:57 +00:00
John Baldwin
3858a1f4f5 - Add 32-bit compat system calls for VFS_AIO. The system calls live in the
aio code and are registered via the recently added SYSCALL32_*() helpers.
- Since the aio code likes to invoke fuword and suword a lot down in the
  "bowels" of system calls, add a structure holding a set of operations for
  things like storing errors, copying in the aiocb structure, storing
  status, etc.  The 32-bit system calls use a separate operations vector to
  handle fuword32 vs fuword, etc.  Also, the oldsigevent handling is now
  done by having seperate operation vectors with different aiocb copyin
  routines.
- Split out kern_foo() functions for the various AIO system calls so the
  32-bit front ends can manage things like copying in and converting
  timespec structures, etc.
- For both the native and 32-bit aio_suspend() and lio_listio() calls,
  just use copyin() to read the array of aiocb pointers instead of using
  a for loop that iterated over fuword/fuword32.  The error handling in
  the old case was incomplete (lio_listio() just ignored any aiocb's that
  it got an EFAULT trying to read rather than reporting an error), and
  possibly slower.

MFC after:	1 month
2008-12-10 20:56:19 +00:00
Bjoern A. Zeeb
4b79449e2f Rather than using hidden includes (with cicular dependencies),
directly include only the header files needed. This reduces the
unneeded spamming of various headers into lots of files.

For now, this leaves us with very few modules including vnet.h
and thus needing to depend on opt_route.h.

Reviewed by:	brooks, gnn, des, zec, imp
Sponsored by:	The FreeBSD Foundation
2008-12-02 21:37:28 +00:00
Paul Saab
8f49dd912a Fix world by including opt_route.h 2008-12-02 04:45:33 +00:00
Sam Leffler
3364462355 Switch to ath hal source code. Note this removes the ath_hal
module; the ath module now brings in the hal support.  Kernel
config files are almost backwards compatible; supplying

device ath_hal

gives you the same chip support that the binary hal did but you
must also include

options AH_SUPPORT_AR5416

to enable the extended format descriptors used by 11n parts.
It is now possible to control the chip support included in a
build by specifying exactly which chips are to be supported
in the config file; consult ath_hal(4) for information.
2008-12-01 16:53:01 +00:00
Bjoern A. Zeeb
ac8fd4f437 make 'make universe' not complain about
In file included from /src/sys/modules/powermac_nvram/../../dev/powermac_nvram/powermac_nvram.c:38:
  @/dev/ofw/ofw_bus.h:36:24: error: ofw_bus_if.h: No such file or directory
I am not sure for how long this had not worked and if it was just the
latest vimage commit that had revealed this or if nobody had built
universe successfully in a while. Btw, the tinderbox did not complain
either so that is probably the reason noone had noticed.
2008-11-29 08:45:20 +00:00
Joseph Koshy
0cfab8ddc1 - Add support for PMCs in Intel CPUs of Family 6, model 0xE (Core Solo
and Core Duo), models 0xF (Core2), model 0x17 (Core2Extreme) and
  model 0x1C (Atom).

  In these CPUs, the actual numbers, kinds and widths of PMCs present
  need to queried at run time.  Support for specific "architectural"
  events also needs to be queried at run time.

  Model 0xE CPUs support programmable PMCs, subsequent CPUs
  additionally support "fixed-function" counters.

- Use event names that are close to vendor documentation, taking in
  account that:
  - events with identical semantics on two or more CPUs in this family
    can have differing names in vendor documentation,
  - identical vendor event names may map to differing events across
    CPUs,
  - each type of CPU supports a different subset of measurable
    events.

  Fixed-function and programmable counters both use the same vendor
  names for events.  The use of a class name prefix ("iaf-" or
  "iap-" respectively) permits these to be distinguished.

- In libpmc, refactor pmc_name_of_event() into a public interface
  and an internal helper function, for use by log handling code.

- Minor code tweaks: staticize a global, freshen a few comments.

Tested by:	gnn
2008-11-27 09:00:47 +00:00
Doug Rabson
23c107627d Fix standalone module build by generating opt_kgssapi.h.
Submitted by:	n_hibma
2008-11-25 16:11:41 +00:00
Bjoern A. Zeeb
b97cf8b6af Unbreak the build until alfred@ is back to fix it correctly.
For now disconnect the nonexistent serial_3g.
2008-11-25 09:17:01 +00:00
Alfred Perlstein
6fda742dfe src/lib/libusb20/libusb20_compat01.c
Fix some issues about re-scanning of the devices.

src/lib/libusb20/libusb20_ugen20.c

Fix issue about libusb20 having to release the
USB transfers before doing a SET_CONFIG, else
the kernel will kill the file handle.

src/sys/dev/usb2/core/usb2_device.
src/sys/dev/usb2/core/usb2_generic.c
src/sys/dev/usb2/core/usb2_generic.h

Add support for U3G devices.
Improve and cleanup FIFO free handling.
Improve device re-enumeration.

src/sys/dev/usb2/core/usb2_msctest.c
src/sys/dev/usb2/core/usb2_msctest.h

Fix some problems in the USB Mass Storage Test.
Add Huawei vendor specific quirks.

src/sys/dev/usb2/core/usb2_request.c

Improve device re-enumeration.

src/sys/dev/usb2/ethernet/if_aue2.c
src/sys/dev/usb2/include/usb2_devid.h
src/sys/dev/usb2/include/usb2_devtable.h
src/sys/dev/usb2/quirk/usb2_quirk.c

Integrate changes from the old USB driver.

src/sys/dev/usb2/include/usb2_standard.h

Add definition of USB3.0 structures from USB.org.

src/sys/dev/usb2/serial/u3g2.c
src/sys/dev/usb2/serial/ugensa2.c
src/sys/modules/usb2/Makefile
src/sys/modules/usb2/serial_3g/Makefile

Import U3G driver.

Submitted by:	Hans Petter Selasky (usb4bsd)
2008-11-25 08:04:40 +00:00
Marcel Moolenaar
df1cb3b734 Include the QUICC backend in the kernel module.
PR:		127120
2008-11-22 21:24:07 +00:00
Pawel Jakub Dawidek
1ba4a712dd Update ZFS from version 6 to 13 and bring some FreeBSD-specific changes.
This bring huge amount of changes, I'll enumerate only user-visible changes:

- Delegated Administration

	Allows regular users to perform ZFS operations, like file system
	creation, snapshot creation, etc.

- L2ARC

	Level 2 cache for ZFS - allows to use additional disks for cache.
	Huge performance improvements mostly for random read of mostly
	static content.

- slog

	Allow to use additional disks for ZFS Intent Log to speed up
	operations like fsync(2).

- vfs.zfs.super_owner

	Allows regular users to perform privileged operations on files stored
	on ZFS file systems owned by him. Very careful with this one.

- chflags(2)

	Not all the flags are supported. This still needs work.

- ZFSBoot

	Support to boot off of ZFS pool. Not finished, AFAIK.

	Submitted by:	dfr

- Snapshot properties

- New failure modes

	Before if write requested failed, system paniced. Now one
	can select from one of three failure modes:
	- panic - panic on write error
	- wait - wait for disk to reappear
	- continue - serve read requests if possible, block write requests

- Refquota, refreservation properties

	Just quota and reservation properties, but don't count space consumed
	by children file systems, clones and snapshots.

- Sparse volumes

	ZVOLs that don't reserve space in the pool.

- External attributes

	Compatible with extattr(2).

- NFSv4-ACLs

	Not sure about the status, might not be complete yet.

	Submitted by:	trasz

- Creation-time properties

- Regression tests for zpool(8) command.

Obtained from:	OpenSolaris
2008-11-17 20:49:29 +00:00
Paul Saab
b26f0efddd Fix world
Approved by:	kmacy
2008-11-14 01:56:11 +00:00
Bjoern A. Zeeb
f2718ae53f Add opt_inet.h which has been needed since r184718, which had
introduced checks for #ifdef INET.

MFC after:	54 days
2008-11-12 21:33:45 +00:00
Bjoern A. Zeeb
4174a06b60 Add opt_inet.h which has been needed since r184717 introducing
checks for #ifdef INET.

MFC after:	54 days
2008-11-12 21:32:49 +00:00
Bjoern A. Zeeb
710ca67300 Add opt_inet.h which has been needed since r184714, r184715 introducing
checks for #ifdef INET.

Submitted by:	kmacy (r184876, I splitted lines)
MFC after:	54 days
2008-11-12 21:30:39 +00:00
Pyun YongHyeon
3c6e15bcee Add ale(4), a driver for Atheros AR8121/AR8113/AR8114 PCIe ethernet
controller. The controller is also known as L1E(AR8121) and
L2E(AR8113/AR8114). Unlike its predecessor Attansic L1,
AR8121/AR8113/AR8114 uses completely different Rx logic such that
it requires separate driver. Datasheet for AR81xx is not available
to open source driver writers but it shares large part of Tx and
PHY logic of L1. I still don't understand some part of register
meaning and some MAC statistics counters but the driver seems to
have no critical issues for performance and stability.

The AR81xx requires copy operation to pass received frames to upper
stack such that ale(4) consumes a lot of CPU cycles than that of
other controller. A couple of silicon bugs also adds more CPU
cycles to address the known hardware bug. However, if you have fast
CPU you can still saturate the link.
Currently ale(4) supports the following hardware features.
  - MSI.
  - TCP Segmentation offload.
  - Hardware VLAN tag insertion/stripping with checksum offload.
  - Tx TCP/UDP checksum offload and Rx IP/TCP/UDP checksum offload.
  - Tx/Rx interrupt moderation.
  - Hardware statistics counters.
  - Jumbo frame.
  - WOL.

AR81xx PCIe ethernet controllers are mainly found on ASUS EeePC or
P5Q series of ASUS motherboards. Special thanks to Jeremy Chadwick
who sent the hardware to me. Without his donation writing a driver
for AR81xx would never have been possible. Big thanks to all people
who reported feedback or tested patches.

HW donated by:	koitsu
Tested by:	bsam, Joao Barros <joao.barros <> gmail DOT com >
		Jan Henrik Sylvester <me <> janh DOT de >
		Ivan Brawley < ivan <> brawley DOT id DOT au >,
		CURRENT ML
2008-11-12 09:52:06 +00:00
Joseph Koshy
e829eb6d61 - Separate PMC class dependent code from other kinds of machine
dependencies.  A 'struct pmc_classdep' structure describes operations
  on PMCs; 'struct pmc_mdep' contains one or more 'struct pmc_classdep'
  structures depending on the CPU in question.

  Inside PMC class dependent code, row indices are relative to the
  PMCs supported by the PMC class; MI code in "hwpmc_mod.c" translates
  global row indices before invoking class dependent operations.

- Augment the OP_GETCPUINFO request with the number of PMCs present
  in a PMC class.

- Move code common to Intel CPUs to file "hwpmc_intel.c".

- Move TSC handling to file "hwpmc_tsc.c".
2008-11-09 17:37:54 +00:00
Dag-Erling Smørgrav
19aa71e559 Unbreak NFS.
Pointy hat to:	dfr
2008-11-06 10:53:35 +00:00
Craig Rodrigues
e506f34b24 Merge latest DTrace changes from Perforce.
Approved by:	jb
2008-11-05 19:40:36 +00:00
Ed Schouten
932ef5b5cd Reintroduce the snp(4) driver.
Because the TTY hooks interface was not finished when I imported the
MPSAFE TTY layer, I had to disconnect the snp(4) driver. This snp(4)
implementation has been sitting in my P4 branch for some time now.
Unfortunately it still doesn't use the same error handling as snp(4)
(returning codes through FIONREAD), but it should already be usable.

I'm committing this to SVN, hoping someone else could polish off its
rough edges. It's always better than having a broken driver sitting in
the tree.
2008-11-05 15:04:03 +00:00
Alfred Perlstein
eabe30fc9c Bring in USB4BSD, Hans Petter Selasky rework of the USB stack
that includes significant features and SMP safety.

This commit includes a more or less complete rewrite of the *BSD USB
stack, including Host Controller and Device Controller drivers and
updating all existing USB drivers to use the new USB API:

1) A brief feature list:

  - A new and mutex enabled USB API.

  - Many USB drivers are now running Giant free.

  - Linux USB kernel compatibility layer.

  - New UGEN backend and libusb library, finally solves the "driver
    unloading" problem. The new BSD licensed libusb20 library is fully
    compatible with libusb-0.1.12 from sourceforge.

  - New "usbconfig" utility, for easy configuration of USB.

  - Full support for Split transactions, which means you can use your
    full speed USB audio device on a high speed USB HUB.

  - Full support for HS ISOC transactions, which makes writing drivers
    for various HS webcams possible, for example.

  - Full support for USB on embedded platforms, mostly cache flushing
    and buffer invalidating stuff.

  - Safer parsing of USB descriptors.

  - Autodetect of annoying USB install disks.

  - Support for USB device side mode, also called USB gadget mode,
    using the same API like the USB host side. In other words the new
    USB stack is symmetric with regard to host and device side.

  - Support for USB transfers like I/O vectors, means more throughput
    and less interrupts.

  - ... see the FreeBSD quarterly status reports under "USB project"

2) To enable the driver in the default kernel build:

2.a) Remove all existing USB device options from your kernel config
file.

2.b) Add the following USB device options to your kernel configuration
file:

# USB core support
device          usb2_core

# USB controller support
device		usb2_controller
device		usb2_controller_ehci
device		usb2_controller_ohci
device		usb2_controller_uhci

# USB mass storage support
device		usb2_storage
device		usb2_storage_mass

# USB ethernet support, requires miibus
device		usb2_ethernet
device		usb2_ethernet_aue
device		usb2_ethernet_axe
device		usb2_ethernet_cdce
device		usb2_ethernet_cue
device		usb2_ethernet_kue
device		usb2_ethernet_rue
device		usb2_ethernet_dav

# USB wireless LAN support
device		usb2_wlan
device		usb2_wlan_rum
device		usb2_wlan_ral
device		usb2_wlan_zyd

# USB serial device support
device		usb2_serial
device		usb2_serial_ark
device		usb2_serial_bsa
device		usb2_serial_bser
device		usb2_serial_chcom
device		usb2_serial_cycom
device		usb2_serial_foma
device		usb2_serial_ftdi
device		usb2_serial_gensa
device		usb2_serial_ipaq
device		usb2_serial_lpt
device		usb2_serial_mct
device		usb2_serial_modem
device		usb2_serial_moscom
device		usb2_serial_plcom
device		usb2_serial_visor
device		usb2_serial_vscom

# USB bluetooth support
device		usb2_bluetooth
device		usb2_bluetooth_ng

# USB input device support
device		usb2_input
device		usb2_input_hid
device		usb2_input_kbd
device		usb2_input_ms

# USB sound and MIDI device support
device		usb2_sound

2) To enable the driver at runtime:

2.a) Unload all existing USB modules. If USB is compiled into the
kernel then you might have to build a new kernel.

2.b) Load the "usb2_xxx.ko" modules under /boot/kernel having the same
base name like the kernel device option.

Submitted by: Hans Petter Selasky hselasky at c2i dot net
Reviewed by: imp, alfred
2008-11-04 02:31:03 +00:00
Doug Rabson
a9148abd9d Implement support for RPCSEC_GSS authentication to both the NFS client
and server. This replaces the RPC implementation of the NFS client and
server with the newer RPC implementation originally developed
(actually ported from the userland sunrpc code) to support the NFS
Lock Manager.  I have tested this code extensively and I believe it is
stable and that performance is at least equal to the legacy RPC
implementation.

The NFS code currently contains support for both the new RPC
implementation and the older legacy implementation inherited from the
original NFS codebase. The default is to use the new implementation -
add the NFS_LEGACYRPC option to fall back to the old code. When I
merge this support back to RELENG_7, I will probably change this so
that users have to 'opt in' to get the new code.

To use RPCSEC_GSS on either client or server, you must build a kernel
which includes the KGSSAPI option and the crypto device. On the
userland side, you must build at least a new libc, mountd, mount_nfs
and gssd. You must install new versions of /etc/rc.d/gssd and
/etc/rc.d/nfsd and add 'gssd_enable=YES' to /etc/rc.conf.

As long as gssd is running, you should be able to mount an NFS
filesystem from a server that requires RPCSEC_GSS authentication. The
mount itself can happen without any kerberos credentials but all
access to the filesystem will be denied unless the accessing user has
a valid ticket file in the standard place (/tmp/krb5cc_<uid>). There
is currently no support for situations where the ticket file is in a
different place, such as when the user logged in via SSH and has
delegated credentials from that login. This restriction is also
present in Solaris and Linux. In theory, we could improve this in
future, possibly using Brooks Davis' implementation of variant
symlinks.

Supporting RPCSEC_GSS on a server is nearly as simple. You must create
service creds for the server in the form 'nfs/<fqdn>@<REALM>' and
install them in /etc/krb5.keytab. The standard heimdal utility ktutil
makes this fairly easy. After the service creds have been created, you
can add a '-sec=krb5' option to /etc/exports and restart both mountd
and nfsd.

The only other difference an administrator should notice is that nfsd
doesn't fork to create service threads any more. In normal operation,
there will be two nfsd processes, one in userland waiting for TCP
connections and one in the kernel handling requests. The latter
process will create as many kthreads as required - these should be
visible via 'top -H'. The code has some support for varying the number
of service threads according to load but initially at least, nfsd uses
a fixed number of threads according to the value supplied to its '-n'
option.

Sponsored by:	Isilon Systems
MFC after:	1 month
2008-11-03 10:38:00 +00:00
Scott Long
9d685822a4 Add amr_cam module directory that was missed in the previous commit. 2008-11-03 04:13:27 +00:00
Scott Long
64c71632bf Move the CAM passthrough code into a true module so that it doesn't have to be
compiled into the main AMR driver.  It's code that is nice to have but not
required for normal operation, and it is reported to cause problems for some
people.
2008-11-03 00:53:54 +00:00
Warner Losh
4a8cdcaf87 Make RL_TWISTER_ENABLE a tunable/sysctl. Eliminate it as an option.
Fix module build.

Submitted by:	Kostik Belousov
2008-11-02 16:50:57 +00:00
Warner Losh
9b27478be4 Add RL_TWISTER_ENABLE option. This enables the magic bits to do long
cable tuning.  This has helped in some installations for hardware
deployed by a former employer.  Made optional because the lists aren't
full of complaints about these cards... even when they were wildly
popular.

Reviewed by:	attilio@, jhb@, trhodes@ (all an older version of the patch)
2008-10-31 23:24:13 +00:00
Robert Watson
34f6230e25 Break mac_bsdextended.c out into multiple .c files, with the base access
control logic and policy registration remaining in that file, and access
control checks broken out into other files by class of check.

Obtained from:	TrustedBSD Project
2008-10-27 12:09:15 +00:00
Nick Hibma
80ac287fe4 After adding U3G_DEBUG to LINT we need to create the opt_u3g.h file when
building the module.
2008-10-24 07:19:09 +00:00
Alexander Motin
831f5dcf12 Import sdhci (PCI SD Host Controller) driver.
Driver supports PCI devices with class 8 and subclass 5 according to
SD Host Controller Specification.

Update NOTES, enable module and static build.
Enable related mmc and mmcsd modules build.

Discussed on:   mobile@, current@
2008-10-21 20:33:40 +00:00
Nick Hibma
483b9e4739 Say hello to the u3g driver, implementing support for 3G modems.
This was located in the ubsa driver, but should be moved into a separate
driver:

- 3G modems provide multiple serial ports to allow AT commands while the PPP
  connection is up.
- 3G modems do not provide baud rate or other serial port settings.
- Huawei cards need specific initialisation.
- ubsa is for Belkin adapters, an Linuxy choice for another device like 3G.

Speeds achieved here with a weak signal at best is ~40kb/s (UMTS). No spooky
STALLED messages as well.

Next: Move over all entries for Sierra and Novatel cards once I have found
testers, and implemented serial port enumeration for Sierra (or rather have
Andrea Guzzo do it). They list all endpoints in 1 iface instead of 4 ifaces.

Submitted by:	aguzzo@anywi.com
MFC after:	3 weeks
2008-10-09 21:25:01 +00:00
Nick Hibma
84150d7fee Obfuscated by other diffs while committing r183728:
Remove the files for the HCI interfaces from the usb module.
2008-10-09 20:00:17 +00:00
Nick Hibma
5d4621f495 Add modules for the HCI part of USB. This is convenient when having a UHCI
controller in your laptop but inserting a (OHCI-based) Option Cardbus card.
2008-10-09 19:22:00 +00:00
Søren Schmidt
13014ca04a This is the roumored ATA modulerisation works, and it needs a little explanation.
If you just config KERNEL as usual there should be no apparent changes, you'll get all chipset support code compiled in.

However there is now a way to only compile in code for chipsets needed on a pr vendor basis. ATA now has the following "device" entries:

atacore:	ATA core functionality, always needed for any ATA setup

atacard:	CARDBUS support
atacbus:	PC98 cbus support
ataisa:		ISA bus support
atapci:		PCI bus support only generic chipset support.

ataahci:	AHCI support, also pulled in by some vendor modules.

ataacard, ataacerlabs, ataadaptec, ataamd, ataati, atacenatek, atacypress, atacyrix, atahighpoint, ataintel, ataite, atajmicron, atamarvell, atamicron, atanational, atanetcell, atanvidia, atapromise, ataserverworks, atasiliconimage, atasis, atavia;	Vendor support, ie atavia for VIA chipsets

atadisk:	ATA disk driver
ataraid:	ATA softraid driver

atapicd:	ATAPI cd/dvd driver
atapifd:	ATAPI floppy/flashdisk driver
atapist:	ATAPI tape driver

atausb:		ATA<>USB bridge
atapicam:	ATA<>CAM bridge

This makes it possible to config a kernel with just VIA chipset support by having the following ATA lines in the kernel config file:

device          atacore
device          atapci
device          atavia

And then you need the atadisk, atapicd etc lines in there just as usual.

If you use ATA as modules loaded at boot there is few changes except the rename of the "ata" module to "atacore", things looks just as usual.
However under atapci you now have a whole bunch of vendor specific drivers, that you can kldload individually depending on you needs. Drivers have the same names as used in the kernel config explained above.
2008-10-09 12:56:57 +00:00
Sam Leffler
77a62bf55d the 3945 firmware license does not require acknowledging the EULA,
remove the sysctl ack requirement

Pointed out by:	Joerg Sonnenberger
Reviewed by:	thompsa
Approved by:	core
2008-10-07 19:42:56 +00:00
Stanislav Sedov
ba26d470bd - Add driver for Attansic L2 FastEthernet controller found on
Asus EeePC and some Asus mainboards.

Reviewed by:	yongari, rpaulo, jhb
Tested by:	many
Approved by:	kib (mentor)
MFC after:	1 week
2008-10-03 10:31:31 +00:00
Kip Macy
a7db7fbd35 - Remove default NIC dependency on ulp headers
- make toe module build dependent on kernel support

Submitted by:	Chelsio Inc.
MFC after:	1 week
2008-09-24 01:19:08 +00:00
Kip Macy
79775f8f1b Update cxgb include paths to not require prefixing with dev/cxgb
Submitted by:	Chelsio Inc.
2008-09-23 03:16:54 +00:00
Sam Leffler
30e5495f26 add ddb support (default to off unless built with the kernel) 2008-09-15 22:46:12 +00:00
Ed Schouten
7969b32c44 Allow COMPAT_SVR4 to be built without COMPAT_43.
It seems we only depend on COMPAT_43 to implement the send() and recv()
routines. We can easily implement them using sendto() and recvfrom(),
just like we do inside our very own C library.

I wasn't able to really test it, apart from simple compilation testing.
I've heard rumours that COMPAT_SVR4 is broken inside execve() anyway.
It's still worth to fix this, because I suspect we'll get rid of
COMPAT_43 somewhere in the future...

Reviewed by:	rdivacky
Discussed with:	jhb
2008-09-15 15:09:35 +00:00
Takanori Watanabe
6ac5bf9062 Connect ufoma(4) to build and,
disable handsfree interface that is not yet ported to newtty.
2008-09-12 03:45:08 +00:00
John Baldwin
26e4688329 Resurrect the sbni(4) driver. Someone finally tested the MPSAFE patches and
the driver worked ok with them.

Tested by:	friends of yar
2008-09-10 18:36:58 +00:00
Rui Paulo
17a35b0822 Build k8temp on i386. 2008-09-09 22:32:30 +00:00
Warner Losh
9e51595ce6 Per email to arch@ a little while ago (that was greeted with silence),
prefer the more common > ${.TARGET} over > opt_foo.h in modules
makefiles.
2008-09-01 23:59:00 +00:00
Warner Losh
a423fd2c55 opt_bus.h isn't needed here anymore. It never was really needed,
since usb has no business including it like it did...
2008-08-30 16:24:01 +00:00
Warner Losh
ff54eabd8a Remove opt_wi.h from module and fix typo in pccarddevs. 2008-08-27 05:43:46 +00:00
Warner Losh
4cd8dc22eb Add uipaq. HTC smart phones use it, and it seems like a reasonable
thing to have laying around.
2008-08-24 21:27:01 +00:00
John Baldwin
aa7c1c059f Add a very simple dpms(4) driver that uses the VESA BIOS DPMS calls to
turn off the external display during suspend and restore it to its
original state on resume.

MFC after:	2 weeks
2008-08-23 21:00:40 +00:00
Robert Noland
a2a2d95441 Update drm kernel drivers.
This is a sync to mesa/drm pre-gem, with a few fixes on top of that.
It also contains one local patch supplied by kib@ that I can't apply to
git.master shared code.

Approved by:	flz
Obtained from:	mesa/drm git.master
MFC after:	2 weeks
2008-08-23 20:59:12 +00:00
Ed Schouten
bc093719ca Integrate the new MPSAFE TTY layer to the FreeBSD operating system.
The last half year I've been working on a replacement TTY layer for the
FreeBSD kernel. The new TTY layer was designed to improve the following:

- Improved driver model:

  The old TTY layer has a driver model that is not abstract enough to
  make it friendly to use. A good example is the output path, where the
  device drivers directly access the output buffers. This means that an
  in-kernel PPP implementation must always convert network buffers into
  TTY buffers.

  If a PPP implementation would be built on top of the new TTY layer
  (still needs a hooks layer, though), it would allow the PPP
  implementation to directly hand the data to the TTY driver.

- Improved hotplugging:

  With the old TTY layer, it isn't entirely safe to destroy TTY's from
  the system. This implementation has a two-step destructing design,
  where the driver first abandons the TTY. After all threads have left
  the TTY, the TTY layer calls a routine in the driver, which can be
  used to free resources (unit numbers, etc).

  The pts(4) driver also implements this feature, which means
  posix_openpt() will now return PTY's that are created on the fly.

- Improved performance:

  One of the major improvements is the per-TTY mutex, which is expected
  to improve scalability when compared to the old Giant locking.
  Another change is the unbuffered copying to userspace, which is both
  used on TTY device nodes and PTY masters.

Upgrading should be quite straightforward. Unlike previous versions,
existing kernel configuration files do not need to be changed, except
when they reference device drivers that are listed in UPDATING.

Obtained from:		//depot/projects/mpsafetty/...
Approved by:		philip (ex-mentor)
Discussed:		on the lists, at BSDCan, at the DevSummit
Sponsored by:		Snow B.V., the Netherlands
dcons(4) fixed by:	kan
2008-08-20 08:31:58 +00:00
Warner Losh
7e5dc2f88f Move wb driver from sys/pci to sys/dev/wb. 2008-08-14 21:26:29 +00:00
Warner Losh
5d5325f82c Move pcn driver from sys/pci to sys/dev/pcn. 2008-08-14 20:34:46 +00:00
Warner Losh
c8befdd5b6 Move the ste driver from sys/pci to sys/dev/ste. 2008-08-14 20:09:58 +00:00
Warner Losh
2bd7d759a6 Move the tl driver form sys/pci to sys/dev/tl. 2008-08-14 20:02:34 +00:00
Kip Macy
25292deb42 Remove cxgb private lro implementation and switch to using system implementation.
Obtained from:	Chelsio Inc.
MFC after:	1 week
2008-08-12 00:27:32 +00:00
Weongyo Jeong
a78426244e Connect upgt(4) to the build. 2008-08-11 04:46:14 +00:00
Weongyo Jeong
b3be9d15b4 Add Conexant/Intersil PrismGT SoftMAC wireless USB driver - upgt(4).
This driver supports GW3887 based chipsets and works on
x86/powerpc/sparc64.  You need upgtfw kernel module before loading
upgt(4).  Please see the manpage.

Obtained from:	OpenBSD
2008-08-11 03:57:31 +00:00
Warner Losh
d2155f2f19 Move sis to sys/dev/sis for consistency. 2008-08-10 10:00:14 +00:00
Warner Losh
83825b7109 Move the xl driver form sys/pci to sys/dev/xl for consistency. 2008-08-10 09:45:52 +00:00
Philip Paeps
a51aa5d1f6 Add glxsb(4) driver for the Security Block in AMD Geode LX processors (as
found in Soekris hardware, for instance).  The hardware supports acceleration
of AES-128-CBC accessible through crypto(4) and supplies entropy to random(4).

TODO:

    o Implement rndtest(4) support
    o Performance enhancements

Submitted by:	Patrick Lamaizière <patfbsd -at- davenulle.org>
Reviewed by:	jhb, sam
MFC after:	1 week
2008-08-09 14:52:31 +00:00
Stanislav Sedov
e085f869d5 - Add cpuctl(4) pseudo-device driver to provide access to some low-level
features of CPUs like reading/writing machine-specific registers,
  retrieving cpuid data, and updating microcode.
- Add cpucontrol(8) utility, that provides userland access to
  the features of cpuctl(4).
- Add subsequent manpages.

The cpuctl(4) device operates as follows. The pseudo-device node cpuctlX
is created for each cpu present in the systems. The pseudo-device minor
number corresponds to the cpu number in the system. The cpuctl(4) pseudo-
device allows a number of ioctl to be preformed, namely RDMSR/WRMSR/CPUID
and UPDATE. The first pair alows the caller to read/write machine-specific
registers from the correspondent CPU. cpuid data could be retrieved using
the CPUID call, and microcode updates are applied via UPDATE.

The permissions are inforced based on the pseudo-device file permissions.
RDMSR/CPUID will be allowed when the caller has read access to the device
node, while WRMSR/UPDATE will be granted only when the node is opened
for writing. There're also a number of priv(9) checks.

The cpucontrol(8) utility is intened to provide userland access to
the cpuctl(4) device features. The utility also allows one to apply
cpu microcode updates.

Currently only Intel and AMD cpus are supported and were tested.

Approved by:	kib
Reviewed by:	rpaulo, cokane, Peter Jeremy
MFC after:	1 month
2008-08-08 16:26:53 +00:00
Warner Losh
25c3d78377 Add card_if.h and pccarddevs.h 2008-08-07 20:51:51 +00:00
Ed Schouten
200d80cd74 Disconnect drivers that haven't been ported to MPSAFE TTY yet.
As clearly mentioned on the mailing lists, there is a list of drivers
that have not been ported to the MPSAFE TTY layer yet. Remove them from
the kernel configuration files. This means people can now still use
these drivers if they explicitly put them in their kernel configuration
file, which is good.

People should keep in mind that after August 10, these drivers will not
work anymore. Even though owners of the hardware are capable of getting
these drivers working again, I will see if I can at least get them to a
compilable state (if time permits).
2008-08-03 10:32:17 +00:00
Paul Saab
a5469167c1 Unbreak the build by creating opt_nfs.h 2008-07-31 02:13:36 +00:00
Maksim Yevmenkin
ecfcbb9f03 Hook up Bluetooth SCO sockets code to the build
MFC after:	3 months
2008-07-30 22:42:17 +00:00
Jack F Vogel
1a8a2aa55b Change Makefile to reflect new directory structure
MFC after:ASAP
2008-07-30 22:06:38 +00:00
Jack F Vogel
d7b1367463 Change to build module with new directory tree
MFC after:ASAP
2008-07-30 22:05:06 +00:00
Antoine Brodin
e8c6b2d8ca Remove a file that is not used and does not exist. 2008-07-28 17:56:37 +00:00
Marius Strobl
85f57c4d48 Prefer the opt_global.h from KERNBUILDDIR if existent so we obtain all
macros that might be relevant.
2008-07-24 14:07:52 +00:00
Marius Strobl
109c391928 For sun4v ensure there is an opt_global.h with SUN4V defined included,
even for the stand-alone build.
2008-07-22 09:56:45 +00:00
David Malone
744eaff7e6 Add an accept filter for TCP based DNS requests. It waits until the
whole first request is present before returning from accept.
2008-07-18 14:44:51 +00:00
Kip Macy
4af83c8cff import vendor fixes to cxgb 2008-07-18 06:12:31 +00:00
John Baldwin
a78c3ed89c Remove the sbsh(4) driver. No one responded to requests for testing the
MPSAFE patches on current@ and stable@.  This driver also has a fundamental
issue in that it sleeps when sending commands to the card including in the
if_init/if_start routines (which can be called from interrupt context).  As
such, the driver shouldn't be working reliably even on 4.x.
2008-07-04 21:24:35 +00:00
John Baldwin
e9a31041c0 Remove the sbni(4) driver. No one responded to calls to test it on
current@ and stable@.
2008-07-04 21:06:57 +00:00
John Baldwin
67c58e8a6e Remove the cnw(4) driver. No one responded to calls to test it on current@
and stable@.  It also is a driver for an older non-802.11 wireless PC card
that is quite slow in comparison to say, wi(4).  I know Warner wants this
driver axed as well.
2008-07-04 19:13:15 +00:00
John Baldwin
2c6298572e Remove the oltr(4) driver. No one responded to calls for testing on
current@ and stable@ for the locking patches.  The driver can always be
revived if someone tests it.

This driver also sleeps in its if_init routine, so it likely doesn't really
work at all anyway in modern releases.
2008-07-04 18:58:53 +00:00
John Baldwin
94f923b69d Remove the arl(4) driver. It is reported to not work on 6.x or later
even though the driver hasn't changed since 4.x (last known working
release).
2008-07-04 18:15:36 +00:00
John Baldwin
6bc1e9cd84 Rework the lifetime management of the kernel implementation of POSIX
semaphores.  Specifically, semaphores are now represented as new file
descriptor type that is set to close on exec.  This removes the need for
all of the manual process reference counting (and fork, exec, and exit
event handlers) as the normal file descriptor operations handle all of
that for us nicely.  It is also suggested as one possible implementation
in the spec and at least one other OS (OS X) uses this approach.

Some bugs that were fixed as a result include:
- References to a named semaphore whose name is removed still work after
  the sem_unlink() operation.  Prior to this patch, if a semaphore's name
  was removed, valid handles from sem_open() would get EINVAL errors from
  sem_getvalue(), sem_post(), etc.  This fixes that.
- Unnamed semaphores created with sem_init() were not cleaned up when a
  process exited or exec'd.  They were only cleaned up if the process
  did an explicit sem_destroy().  This could result in a leak of semaphore
  objects that could never be cleaned up.
- On the other hand, if another process guessed the id (kernel pointer to
  'struct ksem' of an unnamed semaphore (created via sem_init)) and had
  write access to the semaphore based on UID/GID checks, then that other
  process could manipulate the semaphore via sem_destroy(), sem_post(),
  sem_wait(), etc.
- As part of the permission check (UID/GID), the umask of the proces
  creating the semaphore was not honored.  Thus if your umask denied group
  read/write access but the explicit mode in the sem_init() call allowed
  it, the semaphore would be readable/writable by other users in the
  same group, for example.  This includes access via the previous bug.
- If the module refused to unload because there were active semaphores,
  then it might have deregistered one or more of the semaphore system
  calls before it noticed that there was a problem.  I'm not sure if
  this actually happened as the order that modules are discovered by the
  kernel linker depends on how the actual .ko file is linked.  One can
  make the order deterministic by using a single module with a mod_event
  handler that explicitly registers syscalls (and deregisters during
  unload after any checks).  This also fixes a race where even if the
  sem_module unloaded first it would have destroyed locks that the
  syscalls might be trying to access if they are still executing when
  they are unloaded.

  XXX: By the way, deregistering system calls doesn't do any blocking
  to drain any threads from the calls.
- Some minor fixes to errno values on error.  For example, sem_init()
  isn't documented to return ENFILE or EMFILE if we run out of semaphores
  the way that sem_open() can.  Instead, it should return ENOSPC in that
  case.

Other changes:
- Kernel semaphores now use a hash table to manage the namespace of
  named semaphores nearly in a similar fashion to the POSIX shared memory
  object file descriptors.  Kernel semaphores can now also have names
  longer than 14 chars (up to MAXPATHLEN) and can include subdirectories
  in their pathname.
- The UID/GID permission checks for access to a named semaphore are now
  done via vaccess() rather than a home-rolled set of checks.
- Now that kernel semaphores have an associated file object, the various
  MAC checks for POSIX semaphores accept both a file credential and an
  active credential.  There is also a new posixsem_check_stat() since it
  is possible to fstat() a semaphore file descriptor.
- A small set of regression tests (using the ksem API directly) is present
  in src/tools/regression/posixsem.

Reported by:	kris (1)
Tested by:	kris
Reviewed by:	rwatson (lightly)
MFC after:	1 month
2008-06-27 05:39:04 +00:00
Andrew Thompson
39978059cc Remove the non-existent rt2860 subdir. Note, the ralfw module is not used in
the build yet.

PR:		kern/125015
Submitted by:	Dan Cojocar
2008-06-26 18:58:01 +00:00
Doug Rabson
c675522fc4 Re-implement the client side of rpc.lockd in the kernel. This implementation
provides the correct semantics for flock(2) style locks which are used by the
lockf(1) command line tool and the pidfile(3) library. It also implements
recovery from server restarts and ensures that dirty cache blocks are written
to the server before obtaining locks (allowing multiple clients to use file
locking to safely share data).

Sponsored by:	Isilon Systems
PR:		94256
MFC after:	2 weeks
2008-06-26 10:21:54 +00:00
Andrew Thompson
f8c63cea14 Always create opt_ah.h regardless of KERNBUILDDIR. 2008-06-23 00:51:34 +00:00
Xin LI
4d52a57549 Add et(4), a port of DragonFly's Agere ET1310 10/100/Gigabit
Ethernet device driver, written by sephe@

Obtained from:	DragonFly
Sponsored by:	iXsystems
MFC after:	2 weeks
2008-06-20 19:28:33 +00:00
Wojciech A. Koszek
53a609f064 Remove obselete PECOFF image activator support.
PRs assigned at the time of removal:    kern/80742

Discussed on:   freebsd-current (silence), IRC
Tested by:      make universe
Approved by:    cognet (mentor)
2008-06-14 12:51:44 +00:00
Jack F Vogel
796c8b3758 Remove compile of tcp_lro since its now in netinet 2008-06-11 22:18:50 +00:00
Marcel Moolenaar
cf99524aed Add support for the Apple Big Mac (BMAC) Ethernet controller,
found on various Apple G3 models.

Submitted by:	Nathan Whitehorn
2008-06-07 22:58:32 +00:00
John Birrell
1f6d08865e Add the DTrace test kernel module so that people can run the tests. 2008-05-31 09:37:40 +00:00
Sam Leffler
e5861421aa don't let KERNBUILDDIR control whether we copy opt_ah.h
Submitted by:	jkim
2008-05-30 03:36:52 +00:00
Sam Leffler
cc2ee3f3db opt_ah.h is not constructed by config, it always comes from
the hal so don't let KERNBUILDDIR control whether or not we
copy it into the build dir
2008-05-29 00:16:58 +00:00
John Baldwin
dddc2117cf Add a module for cnw(4) and build it on i386. 2008-05-28 20:26:25 +00:00
Pyun YongHyeon
75a1bf5f47 Hook up jme(4) to the build. 2008-05-27 01:54:45 +00:00
Pyun YongHyeon
5defec9f52 Connect jmphy(4) to the build. 2008-05-27 01:23:17 +00:00
Robert Watson
e4372ceba0 Remove netatm from HEAD as it is not MPSAFE and relies on the now removed
NET_NEEDS_GIANT.  netatm has been disconnected from the build for ten
months in HEAD/RELENG_7.  Specifics:

- netatm include files
- netatm command line management tools
- libatm
- ATM parts in rescue and sysinstall
- sample configuration files and documents
- kernel support as a module or in NOTES
- netgraph wrapper nodes for netatm
- ctags data for netatm.
- netatm-specific device drivers.

MFC after:	3 weeks
Reviewed by:	bz
Discussed with:	bms, bz, harti
2008-05-25 22:11:40 +00:00
John Birrell
2376c117f6 Remove the dependency on lockstat. That its still work in progress. 2008-05-25 02:04:18 +00:00
Bjoern A. Zeeb
835f1f1216 Remove 'fasttrap' module for amd64 for now as the code is not there
in sys/cddl/dev/fasttrap.
2008-05-24 19:52:19 +00:00
John Birrell
3a3f8cb443 Leave out a couple of DTrace modules for now. 2008-05-24 04:36:07 +00:00
John Birrell
adab6548de Hook the DTrace kernel modules into the build. 2008-05-23 22:36:12 +00:00
John Birrell
2c2491dd98 The cyclic code is in sys/cddl/dev/cyclic to be consistent with
the other stuff.
2008-05-23 22:23:28 +00:00
Sam Leffler
1593c65a5b clear out crud
Submitted by:	"Pawel Worach" <pawel.worach@gmail.com>
2008-05-22 21:53:15 +00:00
Pyun YongHyeon
cfef026a03 Hook up age(4) to the build. 2008-05-19 01:53:47 +00:00
Pyun YongHyeon
5618f1be7b Connect atphy(4) to the build. 2008-05-19 01:18:02 +00:00
John Birrell
b8915e90a2 Add the DTrace kernel module makefiles. 2008-05-17 02:31:19 +00:00
Jack F Vogel
9ca4041b6c This is driver version 1.4.4 of the Intel ixgbe driver.
-It has new hardware support
  -It uses a new method of TX cleanup called Head Write Back
  -It includes the provisional generic TCP LRO feature contributed
   by Myricom and made general purpose by me. This should move into
   the stack upon approval but for this driver drop its in here.
  -Also bug fixes and etc...

MFC in a week if no serious issues arise.
2008-05-16 18:46:30 +00:00
John Baldwin
ee98c4a50e Add a new personality to mpt(4) devices to allow userland applications to
perform various operations on a controller.  Specifically, for each mpt(4)
device, create a character device in devfs which accepts ioctl requests for
reading and writing configuration pages and performing RAID actions.

MFC after:	1 week
Reviewed by:	scottl
2008-05-06 20:49:53 +00:00
Kip Macy
e7989722c0 only build iw_cxgb on i386 and amd64 2008-05-06 02:31:27 +00:00
Kip Macy
53d68f000f add rdma to build for i386 and amd64 2008-05-05 20:41:54 +00:00
Kip Macy
7df01cd583 add iw_cxgb to the build 2008-05-05 20:21:20 +00:00
Kip Macy
d9d41e2780 add makefiles for rdma 2008-05-05 20:19:33 +00:00
Marius Strobl
10eee905ca Restore SUBDIR+= accidentally removed in the previous revision.
Pointed out by:	ariff
2008-05-04 16:02:45 +00:00
Marius Strobl
07f35f4b9a Don't build unused SBus front-ends for sun4v, don't build EBus front-ends
which are also likely to be irrelevant for sun4v (there's no SBus on sun4v
and only some EBus devices). While at it fix some style bugs according to
style.Makefile(5) where appropriate.

MFC after:	3 days
2008-05-04 14:59:25 +00:00
Sam Leffler
74c9465320 enable IEEE80211_AMDPU_AGE by default 2008-05-03 17:06:59 +00:00
Sam Leffler
3971d07be7 Intel 4965 wireless driver (derived from openbsd driver of the same name) 2008-04-29 21:36:17 +00:00
Marcel Moolenaar
46c00da6b5 Include the QUICC bus front-end in the module for PowerPC. 2008-04-26 18:41:42 +00:00
Jack F Vogel
20e8415eb4 This delta has a few important items:
PR 122839 is fixed in both em and in igb

Second, the issue on building modules since the static kernel
build changes is now resolved. I was not able to get the fancier
directory hierarchy working, but this works, both em and igb
build as modules now.

Third, there is now support in em for two new NICs, Hartwell
(or 82574) is a low cost PCIE dual port adapter that has MSIX,
for this release it uses 3 vectors only, RX, TX, and LINK. In
the next release I will add a second TX and RX queue. Also, there
is support here for ICH10, the followon to ICH9. Both of these are
early releases, general availability will follow soon.

Fourth: On Hartwell and ICH10 we now have IEEE 1588 PTP support,
I have implemented this in a provisional way so that early adopters
may try and comment on the functionality. The IOCTL structure may
change. This feature is off by default, you need to edit the Makefile
and add the EM_TIMESYNC define to get the code.

Enjoy all!!
2008-04-25 21:19:41 +00:00
Sam Leffler
b032f27c36 Multi-bss (aka vap) support for 802.11 devices.
Note this includes changes to all drivers and moves some device firmware
loading to use firmware(9) and a separate module (e.g. ral).  Also there
no longer are separate wlan_scan* modules; this functionality is now
bundled into the wlan module.

Supported by:	Hobnob and Marvell
Reviewed by:	many
Obtained from:	Atheros (some bits)
2008-04-20 20:35:46 +00:00
Sam Leffler
f446360711 move awi to the Attic; it will not make the jump to the new world order
Reviewed by:	imp
2008-04-20 19:20:39 +00:00
Antoine Brodin
d6b57c13c4 Unbreak firmware.ko build without kernel.
Approved by:	rwatson (mentor)
MFC after:	1 month
2008-04-20 16:11:14 +00:00
Kip Macy
46b0a854cc move cxgb_lt2.[ch] from NIC to TOE
move most offload functionality from NIC to TOE
factor out all socket and inpcb direct access
factor out access to locking in incpb, pcbinfo, and sockbuf
2008-04-19 03:22:43 +00:00
Rui Paulo
6f15a9e57a Connect k8temp(4) to the build. 2008-04-12 14:20:22 +00:00
Marius Strobl
73c71caeff Hook up ZFS to the sparc64 build.
Approved by:	pjd
MFC after:	2 weeks
2008-04-11 23:04:36 +00:00
Marius Strobl
5b20de10b9 Add atomic operations for ZFS/sparc64.
Approved by:	core, pjd
Obtained from:	OpenSolaris (w/ adaptations)
MFC after:	2 weeks
2008-04-11 22:59:33 +00:00
Rui Paulo
01b18fc48a Remove isa_if.h. 2008-04-07 11:26:13 +00:00
Rui Paulo
e0c098c888 Add opt_intr_filter.h. 2008-04-07 11:08:45 +00:00
Jack F Vogel
e9d8b9c383 This update primarily addresses the ability to have both the em
and the igb driver static in the kernel. But it also reflects
some other bug fixes in my development stream at Intel.
PR 122373 is also fixed in this code.
2008-04-02 22:00:36 +00:00
Weongyo Jeong
e76ee87519 Add malo driver to the build
Approved by:	thompsa (mentor)
2008-04-01 01:55:19 +00:00
Marcel Moolenaar
b03fab128b Add support for PC-9800 partition tables. 2008-03-28 17:58:55 +00:00
John Birrell
e327f52446 The sources covered by Sun's CDDL have been repo copied below the
src/cddl and src/sys/cddl directories per the core@ decision following
the license review.

This change modifies the affected Makefiles to reference the sources
in their new location.
2008-03-27 23:21:25 +00:00
Antoine Brodin
10f0bcab61 Remove option headers that do not exist and are not used
from the Makefiles in sys/modules.
(opt_devfs.h, opt_bdg.h, opt_emu10kx.h and opt_uslcom.h)

Approved by:	rwatson (mentor)
2008-03-27 20:38:03 +00:00
Doug Rabson
6b0d16d374 Add nfslockd and krpc modules. 2008-03-27 11:55:03 +00:00
Doug Rabson
fa9d9930ca Add kernel module support for nfslockd and krpc. Use the module system
to detect (or load) kernel NLM support in rpc.lockd. Remove the '-k'
option to rpc.lockd and make kernel NLM the default. A user can still
force the use of the old user NLM by building a kernel without NFSLOCKD
and/or removing the nfslockd.ko module.
2008-03-27 11:54:20 +00:00
Weongyo Jeong
3c7e78d32d Add support for Marvell Libertas 88W8335 based PCI network adapters.
Reviewed by:	sam, many wireless people
Approved by:	thompsa (mentor)
2008-03-25 06:32:33 +00:00
Marcel Moolenaar
807e684076 Instead of making a single geom_part.ko module, make a module
for each partitioning scheme. The gpart code is currently non-
optional.
2008-03-23 01:42:47 +00:00
Pyun YongHyeon
daeba9bdc6 Update file list and Makefile after repocopying vr(4) from
src/sys/pci to src/sys/dev.
2008-03-11 03:50:57 +00:00
David E. O'Brien
0a3374af71 "root" the include path so there is less duplication. 2008-03-08 19:14:43 +00:00
Rink Springer
603d67ae36 Commit cmx(4), a driver for Omnikey CardMan 4040 PCMCIA smartcard readers.
PR:		kern/114582
Submitted by:	Daniel Roethlisberger <daniel@roe.ch>
Reviewed by:	imp, myself
Tested by:	johans, myself
MFC after:	2 weeks
2008-03-06 08:09:45 +00:00
Rink Springer
2e7328e7cc Import uslcom(4) from OpenBSD - this is a driver for Silicon Laboratories
CP2101/CP2102 based USB serial adapters.

Reviewed by:		imp, emaste
Obtained from:		OpenBSD
MFC after:		2 weeks
2008-03-05 14:13:30 +00:00
Kip Macy
66aaad30c9 Add KMOD target.
Discovered by: Takahashi Yoshihiro
2008-03-03 03:34:52 +00:00
Marcel Moolenaar
252dfdbdbd Remove makefiles for geom_apple and geom_gpt. These are non-existent
for while.
2008-03-02 05:59:25 +00:00
Marcel Moolenaar
da50cd3932 Add geom_part module. 2008-03-02 05:54:34 +00:00
Jack F Vogel
57158a0655 Last change was incomplete, instantiate the igb variable... 2008-02-29 22:52:59 +00:00
Jack F Vogel
6f48e68043 Add igb driver to the build 2008-02-29 22:42:29 +00:00
Paolo Pisati
755d3f8ae9 Hook ipfw_nat to the build. 2008-02-29 22:28:18 +00:00
Paolo Pisati
531c890b8a Move ipfw's nat code into its own kld: ipfw_nat. 2008-02-29 22:27:19 +00:00
Jack F Vogel
f75ef9e44f This change introduces a split to the Intel E1000 driver, now rather than
just em, there is an igb driver (this follows behavior with our Linux drivers).
All adapters up to the 82575 are supported in em, and new client/desktop support
will continue to be in that adapter.

The igb driver is for new server NICs like the 82575 and its followons.
Advanced features for virtualization and performance will be in this driver.

Also, both drivers now have shared code that is up to the latest we have
released. Some stylistic changes as well.

Enjoy :)
2008-02-29 21:50:11 +00:00
Kip Macy
64a3713337 move remaining binaries in to blob headers 2008-02-26 23:05:05 +00:00
Kip Macy
404825a72b Move firmware in to separate module that can be compiled statically in to the kernel
Add utility for converting future firmware revs to a C header file
2008-02-26 03:02:20 +00:00
Kip Macy
8e10660f12 - update firmware to 5.0
- add support for T3C
- add DDP support (zero-copy receive)
- fix TOE transmit of large requests
- fix shutdown so that sockets don't remain in CLOSING state indefinitely
- register listeners when an interface is brought up after tom is loaded
- fix setting of multicast filter
- enable link at device attach
- exit tick handler if shutdown is in progress
- add helper for logging TCB
- add sysctls for dumping transmit queues

- note that TOE wxill not be MFC'd until after 7.0 has been finalized

MFC after: 3 days
2008-02-23 01:06:17 +00:00
Ruslan Ermilov
741ac35cd4 Remove WARNS from here and compile with default kernel flags.
Switch off those warnings that ZFS sources do not pass.
2008-02-21 11:11:06 +00:00
Ruslan Ermilov
995dc98447 Remove WARNS from here and compile with default kernel flags. 2008-02-21 11:09:59 +00:00
Andrew Thompson
00620931e1 geom_lvm(4) is now known as geom_linux_lvm(4). 2008-02-20 11:32:12 +00:00
Andrew Thompson
b61033d925 Rename geom_lvm(4) to geom_linux_lvm(4).
Requested by:   des, phk
2008-02-20 11:30:49 +00:00
Andrew Thompson
1669d8afc6 Rename geom_lvm(4) to geom_linux_lvm(4).
Requested by:	des, phk
2008-02-20 07:50:13 +00:00
Robert Watson
f7acb749fb Remove coda_namecache from coda5 as well. We should probably GC coda5
entirely at this point as coda6 is considered the supported branch.

MFC after:	1 month
2008-02-13 16:31:04 +00:00
Robert Watson
44abffb44b Rather than having the Coda module use its own namecache, use the global
VFS namecache, as is done by the Coda module on Linux.  Unlike the Coda
namecache, the global VFS namecache isn't tagged by credential, so use
ore conservative flushing behavior (for now) when CODA_PURGEUSER is
issued by Venus.

This improves overall integration with the FreeBSD VFS, including
allowing __getcwd() to work better, procfs/procstat monitoring, and so
on.  This improves shell behavior in many cases, and improves ".."
handling.  It may lead to some slowdown until we've implemented a
specific access cache, which should net improve performance, but in the
mean time, lookup access control now always goes to Venus, whereas
previously it didn't.

MFC after:	1 month
2008-02-13 13:06:22 +00:00
Andrew Thompson
2b8d4f5bd4 Hook geom_lvm(4) up to the build. 2008-02-11 03:10:40 +00:00
Christian Brueffer
869a40898a Don't build the rr232x module, it has been removed.
Approved by:	rwatson (mentor)
2008-02-03 10:05:00 +00:00
Scott Long
593c873471 Remove the rr232x driver. It has been superceded by the hptrr driver. 2008-02-03 07:07:30 +00:00
Marius Strobl
d47d37af9b Add a driver for the National Semiconductor DP83815, DP83843 and
DP83847 PHYs. The main reason for using a specific driver for these
PHYs are reset quirks similar to the nsphy(4) driven DP83840A.

PR:		112654
Obtained from:	NetBSD
MFC after:	2 weeks
Thanks to:	mlaier for testing w/ DP83815
2008-01-27 01:10:41 +00:00
Marius Strobl
a9e28d7d0b Sort values according to style.Makefile(5). 2008-01-27 01:02:29 +00:00
Kip Macy
c2791efe44 add opt_global.h dependency 2008-01-26 01:00:56 +00:00
Pyun YongHyeon
6bf42daa74 Update file list and Makefile after repocopying sf(4) from
src/sys/pci to src/sys/dev.
2008-01-21 04:27:32 +00:00
Andrew Gallatin
1e413cf932 Add optional support to mxge for MSI-X interrupts and multiple receive
queues (which we call slices).  The NIC will steer traffic into up to
hw.mxge.max_slices different receive rings based on a configurable
hash type (hw.mxge.rss_hash_type).

Currently the driver defaults to using a single slice, so the default
behavior is unchanged.  Also, transmit from non-zero slices is
disabled currently.
2008-01-15 20:34:49 +00:00
Kip Macy
9c76da338c add cxgb_multiq.c to the build 2008-01-13 22:31:59 +00:00
Kip Macy
b96ebbf2e8 Don't overload tcp_usrreqs unless the kernel doesn't provide offload support. 2007-12-18 23:00:25 +00:00
Kip Macy
8090c9f504 Make TCP offload work on HEAD (modulo negative interaction between sbcompress
and t3_push_frames).
 - Import latest changes to cxgb_main.c and cxgb_sge.c from toestack p4 branch
 - make driver local copy of tcp_subr.c and tcp_usrreq.c and override tcp_usrreqs so
   TOE can also functions on versions with unmodified TCP

- add cxgb back to the build
2007-12-17 08:17:51 +00:00
Kip Macy
bfa0795b00 Add back in cxgb now that the includes are believed to be fixed 2007-12-16 18:45:23 +00:00
Kip Macy
3bd3bd76b5 Remove cxgb module from build until I can compensate for the lack of header
pollution on architectures other than amd64
2007-12-16 17:43:40 +00:00
Kip Macy
3b10e74aa9 Makefile for the TCP offload module 2007-12-16 05:40:18 +00:00
Kip Macy
64e4fdfff0 Don't use old style mbuf iovec interface 2007-12-16 05:34:18 +00:00
Kip Macy
22a80c41fa Move NIC driver (cxgb) into its own directory. Add toecore to support
registering different TOMs.
2007-12-15 22:03:19 +00:00
Scott Long
b063a42270 Add the 'hptrr' driver for supporting the following Highpoint RocketRAID
cards:

     o   RocketRAID 172x series
     o   RocketRAID 174x series
     o   RocketRAID 2210
     o   RocketRAID 222x series
     o   RocketRAID 2240
     o   RocketRAID 230x series
     o   RocketRAID 231x series
     o   RocketRAID 232x series
     o   RocketRAID 2340
     o   RocketRAID 2522

Many thanks to Highpoint for their continued support of FreeBSD.

Submitted by: Highpoint
2007-12-15 00:56:17 +00:00
Scott Long
eaf63cb2ae The AR_SCSI_PASSTHROUGH conditional no longer exists, remove it from the
makefile.
2007-12-02 18:39:38 +00:00
John Birrell
ee8a5fa77d Remove _SOLARIS_C_SOURCE now that it doesn't do anything in FreeBSD
headers. All OpenSolaris compatibility comes via the set of specific
compatibility headers in src/compat/opensolaris and
src/sys/compat/opensolaris.
2007-11-28 22:58:09 +00:00
John Baldwin
dbac8ff400 Move the agp(4) driver from sys/pci to sys/dev/agp. __FreeBSD_version was
bumped to 800004 to note the change though userland apps should not be
affected since they use <sys/agpio.h> rather than the headers in
sys/dev/agp.

Discussed with:	anholt
Repocopy by:	simon
2007-11-12 21:51:38 +00:00
Benjamin Close
037347714a Link wpi(4) into the build.
This includes:
    o mtree (for legal/intel_wpi)
    o manpage for i386/amd64 archs
    o module for i386/amd64 archs
    o NOTES for i386/amd64 archs

Approved by: mlaier (comentor)
2007-11-08 22:09:37 +00:00
Benjamin Close
8ffeaa536b Remove an unneeded CFLAGS line
Approved by: mlaier (comentor)
2007-11-08 22:02:38 +00:00
Rui Paulo
7124217701 asmc build infrastructure.
Approved by:	njl (mentor)
Reviewed by:	njl (mentor)
2007-11-07 20:12:21 +00:00
Rui Paulo
e702bc741c Connect asmc to the build infrastructure.
Approved by: 	njl (mentor)
Reviewed by:	njl (mentor)
2007-11-07 20:08:15 +00:00
Benjamin Close
6607310b74 Initial Import of wpi driver based on p4 changeset 128641.
This import includes:
   o wpi Wireless driver for the Intel 3945 Wireless Lan Controller (802.11abg) (sys/dev/wpi)
   o Intel firmware revision 2.14.4 & associated LICENSE (sys/dev/contrib/wpi, sys/contrib/dev/wpi/LICENSE)
   o wpifw Firmware driver (sys/modules/wpifw)

Approved by: mlaier, sam (co-mentors)
2007-11-05 11:47:19 +00:00
Sam Leffler
67154eb2de add zyd
MFC after:	3 days
2007-10-31 18:47:04 +00:00
Robert Watson
3be4cb0b4a Merge Neterion if_nxge driver version 2.0.9.11230 with the following
changes:

  01 -  Enhanced LRO:
  LRO feature is extended to support multi-buffer mode. Previously,
  Ethernet frames received in contiguous buffers were offloaded.
  Now, frames received in multiple non-contiguous buffers can be
  offloaded, as well. The driver now supports LRO for jumbo frames.

  02 - Locks Optimization:
  The driver code was re-organized to limit the use of locks.
  Moreover, lock contention was reduced by replacing wait locks
  with try locks.

  03 - Code Optimization:
  The driver code was re-factored  to eliminate some memcpy
  operations.  Fast path loops were optimized.

  04 - Tag Creations:
  Physical Buffer Tags are now optimized based upon frame size.
  For better performance, Physical Memory Maps are now re-used.

  05 - Configuration:
  Features such as TSO, LRO, and Interrupt Mode can be configured
  either at load or at run time. Rx buffer mode (mode 1 or mode 2)
  can be configured at load time through kenv.

  06 - Driver Statistics:
  Run time statistics are enhanced to provide better visibility
  into the driver performance.

  07 - Bug Fixes:
  The driver contains fixes for the problems discovered and
  reported since last submission.

  08 - MSI support:
  Added Message Signaled Interrupt feature which currently uses 1
  message.

  09  Removed feature:
  Rx 3 buffer mode feature has been removed. Driver now supports 1,
  2 and 5 buffer modes of which 2 and 5 buffer modes can be used
  for header separation.

  10  Compiler warning:
  Fixed compiler warning when compiled for 32 bit system.

  11 Copyright notice:
  Source files are updated with the proper copyright notice.

MFC after:	3 days
Submitted by:	Alicia Pena <Alicia dot Pena at neterion dot com>,
		Muhammad Shafiq <Muhammad dot Shafiq at neterion dot com>
2007-10-29 14:19:32 +00:00
Yoshihiro Takahashi
c2a6fe6133 Disable the coretemp and nvram on pc98. 2007-10-26 13:42:17 +00:00
Pawel Jakub Dawidek
88882dcf11 Add GEOM VIRSTOR module to the build. 2007-10-26 08:23:57 +00:00
Peter Wemm
d556638404 Split /dev/nvram driver out of isa/clock.c for i386 and amd64. I have not
refactored it to be a generic device.
Instead of being part of the standard kernel, there is now a 'nvram' device
for i386/amd64.  It is in DEFAULTS like io and mem, and can be turned off
with 'nodevice nvram'.  This matches the previous behavior when it was
first committed.
2007-10-26 03:23:54 +00:00
Takanori Watanabe
02c788a24e Add Winchiphead (or Nanjin QinHeng Electronics) USB Serial converter driver.
I tested it on cheap serial converter.(Only costs 980JPY.)
2007-10-18 10:51:06 +00:00
Ruslan Ermilov
9ae6614295 Rescue whitespace nits. 2007-10-16 11:39:28 +00:00
Alexander Leidinger
9f05d312b3 Backout sensors framework.
Requested by:	phk
Discussed on:	cvs-all
2007-10-15 20:00:24 +00:00
Ruslan Ermilov
8c11b23186 Sort. 2007-10-15 08:26:12 +00:00
Alexander Leidinger
989500bf1a Import it(4) and lm(4), supporting most popular Super I/O Hardware Monitors.
Submitted by:	Constantine A. Murenin <cnst@FreeBSD.org>
Sponsored by:	Google Summer of Code 2007 (GSoC2007/cnst-sensors)
Mentored by:	syrinx
Tested by:	many
OKed by:	kensmith
Obtained from:	OpenBSD (parts)
2007-10-14 10:55:50 +00:00
Marius Strobl
1ed3fed743 o Revert the part of if_gem.c rev. 1.35 which added a call to gem_stop()
to gem_attach() as the former access softc members not yet initialized
  at that time and gem_reset() actually is enough to stop the chip. [1]
o Revise the use of gem_bitwait(); add bus_barrier() calls before calling
  gem_bitwait() to ensure the respective bit has been written before we
  starting polling on it and poll for the right bits to change, f.e. even
  though we only reset RX we have to actually wait for both GEM_RESET_RX
  and GEM_RESET_TX to clear. Add some additional gem_bitwait() calls in
  places we've been missing them according to the GEM documentation.
  Along with this some excessive DELAYs, which probably only were added
  because of bugs in gem_bitwait() and its use in the first place, as
  well as as have of an gem_bitwait() reimplementation in gem_reset_tx()
  were removed.
o Add gem_reset_rxdma() and use it to deal with GEM_MAC_RX_OVERFLOW errors
  more gracefully as unlike gem_init_locked() it resets the RX DMA engine
  only, causing no link loss and the FIFOs not to be cleared. Also use it
  deal with GEM_INTR_RX_TAG_ERR errors, with previously were unhandled.
  This was based on information obtained from the Linux GEM and OpenSolaris
  ERI drivers.
o Turn on workarounds for silicon bugs in the Apple GMAC variants.
  This was based on information obtained from the Darwin GMAC and Linux GEM
  drivers.
o Turn on "infinite" (i.e. maximum 31 * 64 bytes in length) DMA bursts.
  This greatly improves especially RX performance.
o Optimize the RX path, this consists of:
  - kicking the receiver as soon as we've a spare descriptor in gem_rint()
    again instead of just once after all the ready ones have been handled;
  - kicking the receiver the right way, i.e. as outlined in the GEM
    documentation in batches of 4 and by pointing it to the descriptor
    after the last valid one;
  - calling gem_rint() before gem_tint() in gem_intr() as gem_tint() may
    take quite a while;
  - doubling the size of the RX ring to 256 descriptors.
  Overall the RX performance of a GEM in a 1GHz Sun Fire V210 was improved
  from ~100Mbit/s to ~850Mbit/s.
o In gem_add_rxbuf() don't assign the newly allocated mbuf to rxs_mbuf
  before calling bus_dmamap_load_mbuf_sg(), if bus_dmamap_load_mbuf_sg()
  fails we'll free the newly allocated mbuf, unable to recycle the
  previous one but a NULL pointer dereference instead.
o In gem_init_locked() honor the return value of gem_meminit().
o Simplify gem_ringsize() and dont' return garbage in the default case.
  Based on OpenBSD.
o Don't turn on MAC control, MIF and PCS interrupts unless GEM_DEBUG is
  defined as we don't need/use these interrupts for operation.
o In gem_start_locked() sync the DMA maps of the descriptor rings before
  every kick of the transmitter and not just once after enqueuing all
  packets as the NIC might instantly start transmitting after we kicked
  it the first time.
o Keep state of the link state and use it to enable or disable the MAC
  in gem_mii_statchg() accordingly as well as to return early from
  gem_start_locked() in case the link is down. [3]
o Initialize the maximum frame size to a sane value.
o In gem_mii_statchg() enable carrier extension if appropriate.
o Increment if_ierrors in case of an GEM_MAC_RX_OVERFLOW error and in
  gem_eint(). [3]
o Handle IFF_ALLMULTI correctly; don't set it if we've turned promiscuous
  group mode on and don't clear the flag if we've disabled promiscuous
  group mode (these were mostly NOPs though). [2]
o Let gem_eint() also report GEM_INTR_PERR errors.
o Move setting sc_variant from gem_pci_probe() to gem_pci_attach() as
  device probe methods are not supposed to touch the softc.
o Collapse sc_inited and sc_pci into bits for sc_flags.
o Add CTASSERTs ensuring that GEM_NRXDESC and GEM_NTXDESC are set to
  legal values.
o Correctly set up for 802.3x flow control, though #ifdef out the code
  that actually enables it as this needs more testing and mainly a proper
  framework to support it.
o Correct and add some conversions from hard-coded functions names to
  __func__ which were borked or forgotten in if_gem.c rev. 1.42.
o Use PCIR_BAR instead of a homegrown macro.
o Replace sc_enaddr[6] with sc_enaddr[ETHER_ADDR_LEN].
o In gem_pci_attach() in case attaching fails release the resources in
  the opposite order they were allocated.
o Make gem_reset() static to if_gem.c as it's not needed outside that
  module.
o Remove the GEM_GIGABIT flag and the associated code; GEM_GIGABIT was
  never set and the associated code was in the wrong place.
o Remove sc_mif_config; it was only used to cache the contents of the
  respective register within gem_attach().
o Remove the #ifdef'ed out NetBSD/OpenBSD code for establishing a suspend
  hook as it will never be used on FreeBSD.
o Also probe Apple Intrepid 2 GMAC and Apple Shasta GMAC, add support for
  Apple K2 GMAC. Based on OpenBSD.
o Add support for Sun GBE/P cards, or in other words actually add support
  for cards based on GEM to gem(4). This mainly consists of adding support
  for the TBI of these chips. Along with this the PHY selection code was
  rewritten to hardcode the PHY number for certain configurations as for
  example the PHY of the on-board ERI of Blade 1000 shows up twice causing
  no link as the second incarnation is isolated.
  These changes were ported from OpenBSD with some additional improvements
  and modulo some bugs.
o Add code to if_gem_pci.c allowing to read the MAC-address from the VPD on
  systems without Open Firmware.
  This is an improved version of my variant of the respective code in
  if_hme_pci.c
o Now that gem(4) is MI enable it for all archs.

Pointed out by:	yongari [1]
Suggested by:	rwatson [2], yongari [3]
Tested on:	i386 (GEM), powerpc (GMACs by marcel and yongari),
		sparc64 (ERI and GEM)
Reviewed by:	yongari
Approved by:	re (kensmith)
2007-09-26 21:14:18 +00:00
Nate Lawson
83dcc133d8 Rewrite the EC driver event model. The main goal is to avoid
polling/interrupt-driven fallback and instead use polling only during
boot and pure interrupt-driven mode after boot.  Polled mode could be
relegated completely to a legacy role if we could enable interrupts
during boot.  Polled mode can be forced after boot by setting
debug.acpi.ec.polled="1", i.e. if there are timeouts.

- Use polling only during boot, shutdown, or if requested by the user.
  Otherwise, use a generation count of GPEs, incremented atomically.  This
  prevents an old status value from being used if the EC is really slow
  and the same condition (i.e. multiple IBEs for a write transaction) is
  being checked.
- Check for and run the query handler directly if the SCI bit is set in
  the status register during boot.  Previously, the query handler wouldn't
  run until interrupts were finally enabled late in boot.
- During boot and after starting a command, check if the event appears
  to already have occurred before we even start waiting.  If so, it's
  possible the EC is very slow and we might accept an old status value.
  Print a warning in this case.  Once we've booted, interrupt-driven mode
  should work just fine but polled mode could be unreliable.  There's not
  much more we can do about this until interrupts are enabled during boot.
- In the above case, we also do one final check if the interrupt-driven
  mode gets a timeout.  If the status is complete, it will force the
  system back into polled mode since interrupt mode doesn't work.  For
  polled mode during boot, if the status appears to be already complete
  before beginning the check loop, it waits 10 us before actually checking
  the status, just in case the EC is really slow and hasn't gotten to work
  on the new request yet.
- Use upper-case hex for the _Qxx method
- Use device_printf for errors, don't hide them under verbose
- Increase default total timeout to 750 ms and decrease polling interval
  to 5 us.
- Don't pass the status value via the softc.  Just read it directly.
- Remove the mutex. We use the sx lock for transaction serialization
  with the query handler.
- Remove the Intel copyright notice as no code of theirs was ever
  present in this file (verified against rev 1.1)
- Allow KTR module-only builds for ease of testing

Thanks to jkim and Alexey Starikovskiy for helpful discussions and testing.

Approved by:	re
MFC after:	2 weeks
2007-09-24 16:59:06 +00:00
Pawel Jakub Dawidek
f854db0bf5 Bring in the GEOM Virtualisation class, which allows to create huge GEOM
providers with limited physical storage and add physical storage as
needed.

Submitted by:	Ivan Voras
Sponsored by:	Google Summer of Code 2006
Approved by:	re (kensmith)
2007-09-23 07:34:23 +00:00
Ariff Abdullah
b28624fde6 Update snd_emu10kx driver with recent perforce changes (and few
other changes too).

(without any real order)

1. Use device_get_nameunit for mutex naming
2. Add timer for low-latency playback
3. Move most mixer controls from sysctls to mixer(8) controls.
   This is a largest part of this patch.
4. Add analog/digital switch (as a temporary sysctl)
5. Get back support for low-bitrate playback (with help of (2))
6. Change locking for exclusive I/O. Writing to non-PTR register
   is almost safe and does not need to be ordered with PTR operations.
7. Disable MIDI until we get it to detach properly and fix memory
   managment problems.
8. Enable multichannel playback by default. It is as stable as
   single-channel mode. Multichannel recording is still an
   experimental feature.
9. Multichannel options can be changed by loader tunables.
10. Add a way to disable card from a loader tunable.
11. Add new PCI IDs.
12. Debugger settings are loader tunables now.
14. Remove some unused variables.
15. Mark pcm sub-devices MPSAFE.
16. Partially revert (bus_setup_intr -> snd_setup_intr) since it need
    to be done independently

Submitted by:	Yuriy Tsibizov (driver maintainer)
Approved by:	re (bmah)
2007-09-12 07:43:43 +00:00
Kip Macy
5c5df3da16 - fix qset to port binding as a proper fix for the problems encountered on the 4-port
- fix the use after free seen when sending packets small enough to fit as an immediate
   and bpf peers are present
 - update to firmware rev 4.7 along with various small vendor fixes

Supported by: Chelsio
Approved by: re (blanket)
MFC after: 3 days
2007-09-09 01:28:03 +00:00
Jack F Vogel
3ec35e52b8 This is an update to the new Intel 10G 82598 driver.
The first drop was Beta, this code is expected to be the release version.
Note that this driver code will build in either 6.2 or 7. If you
use the code in 6.2 you will not get TSO or MSI/X support but it will
function in a legacy mode.

Approved by: re
2007-09-04 02:31:35 +00:00
Warner Losh
44298c2b79 Makefile for building zyd kernel module.
Submitted by: Weongyo Jeong
Approved by: re@ (kensmith)
2007-08-29 21:04:26 +00:00
Dag-Erling Smørgrav
83d18f2283 Add a driver for the on-die digital thermal sensor found on Intel Core
and newer CPUs (including Core 2 and Core / Core 2 based Xeons).  The
driver attaches to each cpu device and creates a sysctl node in that
device's sysctl context (dev.cpu.N.temperature).  When invoked, the
handler binds to the appropriate CPU to ensure a correct reading.

Submitted by:	Rui Paulo <rpaulo@fnop.net>
Sponsored by:	Google Summer of Code 2007
Tested by:	des, marcus, Constantine A. Murenin, Ian FREISLICH
Approved by:	re (kensmith)
MFC after:	3 weeks
2007-08-15 19:26:03 +00:00
Maksim Yevmenkin
51713b2a7b Make ng_h4(4) MPSAFE. Use similar to ng_tty(4) locking strategy.
Reconnect ng_h(4) back to the build.

Reviewed by:	kensmith
Approved by:	re (kensmith)
MFC after:	1 month
2007-08-13 17:19:28 +00:00
Scott Long
05a4c1c1ef Attach the iscsi module build.
Approved by: re
2007-07-24 16:58:18 +00:00
Scott Long
c5933b2086 Introduce Danny Braniss' iSCSI initiator, version 2.0.99. Please read the
included man pages on how to use it.  This code is still somewhat experimental
but has been successfully tested on a number of targets.  Many thanks to
Danny for contributing this.

Approved by: re
2007-07-24 15:35:02 +00:00
Andrew Gallatin
f9ae02802f - Enable static building of mxge(4) and its firmware.
- Add custom .c wrappers for the firmware, rather than the standard
  firmware(9) generated firmware objects to work around toolchain
  problems on ia64 involving linking objects produced by
  ld -b -binary into the kernel.

- Move from using Myricom's ".dat" firmware blobs to using Myricom's
  zlib compressed ".h" firmware header files.  This is done to
  facilitate the custom wrappers, and saves a fair amount of wired
  memory in the case where the firmware is built in, or preloaded.

- Fix two compile issues in mxge which only appear on non-i386/amd64.

Reviewed by: mlaier, mav (earlier version with just zlib support)
Glanced at by: sam
Approved by: re (kensmith)
2007-07-19 16:16:00 +00:00
Kip Macy
ac3a6d9cef - integrate most recent changes from vendor branch and upgrade to firmware revision 4.5.5
- add filter support
	- further improvements for T304
- recover gracefully from spurious immediate packets

Approved by: re(blanket)
Supported by: Chelsio
MFC after: 3 days
2007-07-17 06:50:35 +00:00
Robert Watson
2b851aeb63 Disconnect netatm from the build as it is not MPSAFE and relies on
NET_NEEDS_GIANT, which will shortly be removed.  This is done in a
away that it may be easily reattached to the build before 7.1 if
appropriate locking is added.  Specifics:

- Don't install netatm include files
- Disconnect netatm command line management tools
- Don't build libatm
- Don't include ATM parts in rescue or sysinstall
- Don't install sample configuration files and documents
- Don't build kernel support as a module or in NOTES
- Don't build netgraph wrapper nodes for netatm

This removes the last remaining consumer of NET_NEEDS_GIANT.

Reviewed by:	harti
Discussed with:	bz, bms
Approved by:	re (kensmith)
2007-07-14 21:49:24 +00:00
Robert Watson
00f05dc847 Complete repo-copy and move of Coda from src/sys/coda to src/sys/fs/coda
by removing files from src/sys/coda, and updating include paths in the
new location, kernel configuration, and  Makefiles.  In one case add
$FreeBSD$.

Discussed with:		anderson, Jan Harkes <jaharkes@cs.cmu.edu>
Approved by:		re (kensmith)
Repo-copy madness:	simon
2007-07-12 21:04:58 +00:00
Maksim Yevmenkin
08b755600f Mark ng_h4(4) as not MPSAFE and disconnect it from the build for now.
Approved by:	re (rwatson)
2007-07-10 16:38:43 +00:00
Max Laier
60ee384760 Link pf 4.1 to the build:
- move ftp-proxy from libexec to usr.sbin
 - add tftp-proxy
 - new altq mtag link

Approved by:	re (kensmith)
2007-07-03 12:46:08 +00:00
Sam Leffler
5091eab37c fix ia64 build
Approved by:	re (followup to previous commit)
2007-06-30 04:35:34 +00:00
Sam Leffler
fd3ddbd038 Neterion Xframe 10GbE Server/Storage adapter driver.
The nxge driver provides support for Neterion Xframe-I and Xframe-II
adapters. The driver supports TCP Segmentation Offload (TSO/LSO),
Jumbo frames (5 buffer mode), Header separation (2 and 3 Receive
buffer modes), VLAN, and Promiscuous mode.

Submitted by:	Neterion
Reviewed by:	rwatson
Approved by:	re (kensmith)
2007-06-29 22:47:18 +00:00
Sam Leffler
4c0d85d90a import opt_ah.h for newer hal's that optionally include 11n support
Approved by:	re (kensmith)
MFC after:	2 weeks
2007-06-29 19:52:31 +00:00
Xin LI
9b258fca27 MFp4:
- Remove unnecessary NULL checks after M_WAITOK allocations.
 - Use VOP_ACCESS instead of hand-rolled suser_cred()
   calls. [1]
 - Use malloc(9) KPI to allocate memory for string.  The
   optimization taken from NetBSD is not valid for FreeBSD
   because our malloc(9) already act that way. [2]

Requested by:	rwatson [1]
Submitted by:	Howard Su [2]
Approved by:	re (tmpfs blanket)
2007-06-29 05:23:15 +00:00
Rong-En Fan
534046e301 - Remove UMAP filesystem. It was disconnected from build three years ago,
and it is seriously broken.

Discussed on:   freebsd-arch@
Approved by:	re (mux)
2007-06-25 05:06:57 +00:00
Nate Lawson
81cd8a5bf0 Make acpica include path relative, not absolute.
Approved by:	re
2007-06-24 20:36:51 +00:00
Nate Lawson
41621cb408 The viapm module build had what appear to be some debugging CFLAGS left
around to force the IO port to a fixed address.  They were only turned
on in the module build and were present since the original import.  This
breaks soft power-off on the Asus A7V since it reprograms the SMBus base
address to a different one than the BIOS expects.  A similar issue was
found in the alpm(4) module build.

PR:		kern/113986, i386/97468
MFC after:	3 days
Approved by:	re
2007-06-24 20:35:59 +00:00
Xin LI
1f5d755661 Use .CURDIR when referring source code. This fixes build
when 'make obj' was done first.  I found this when fixing
a problem reported by tinderbox, but forgot to send the
patchset to re@ altogether.

Approved by:	re (kensmith)
2007-06-20 00:29:51 +00:00
Xin LI
d1fa59e9e1 MFp4: Add tmpfs, an efficient memory file system.
Please note that, this is currently considered as an
experimental feature so there could be some rough
edges.  Consult http://wiki.freebsd.org/TMPFS for
more information.

For now, connect tmpfs to build on i386 and amd64
architectures only.  Please let us know if you have
success with other platforms.

This work was developed by Julio M. Merino Vidal
for NetBSD as a SoC project; Rohit Jalan ported it
from NetBSD to FreeBSD.  Howard Su and Glen Leeder
are worked on it to continue this effort.

Obtained from:	NetBSD via p4
Submitted by:	Howard Su (with some minor changes)
Approved by:	re (kensmith)
2007-06-16 01:56:05 +00:00
Kip Macy
ef72318f0e - import new common code for the T304
- update to firmware version 4.1.0

- switch over to standard method for initializing cdevs (contributed by scottl@)
- break out timer_reclaim_task to be per-port
- move msix teardown into separate function
- fix bus_setup_intr for msi-x for the multi-port case so that msi-x resources
  are not corrupted on unload
- handle 10/100/1000 base-T media and auto negotiation
- bind qset to cpu even for singleq case
- white space cleanups
- remove recursive PORT_LOCK
- move mtu setting to separate function
- stop and re-init port when changing mtu
- replace all direct references to m_data with calls to mtod
- handle attach failure better by not trying to de-initialize
  taskqueues when they have not been allocated
- no longer default to jumbo frames

Sponsored by: Chelsio
MFC after: 3 days
2007-06-13 05:36:00 +00:00
Stephane E. Potvin
04031e9ae2 Options spring cleanup:
- Add and document the KVM and KVM_SUPPORT options that
are needed for the ifmcstats(3) makefile
- Garbage collect unused variables
- Add missing inclusion of bsd.own.mk where needed

Approved by: kan (mentor)
Reviewed by: ru
2007-06-13 02:08:04 +00:00
Andrew Thompson
7262410a41 Add new files in the net80211 changes. 2007-06-11 07:26:35 +00:00
Sam Leffler
68e8e04e93 Update 802.11 wireless support:
o major overhaul of the way channels are handled: channels are now
  fully enumerated and uniquely identify the operating characteristics;
  these changes are visible to user applications which require changes
o make scanning support independent of the state machine to enable
  background scanning and roaming
o move scanning support into loadable modules based on the operating
  mode to enable different policies and reduce the memory footprint
  on systems w/ constrained resources
o add background scanning in station mode (no support for adhoc/ibss
  mode yet)
o significantly speedup sta mode scanning with a variety of techniques
o add roaming support when background scanning is supported; for now
  we use a simple algorithm to trigger a roam: we threshold the rssi
  and tx rate, if either drops too low we try to roam to a new ap
o add tx fragmentation support
o add first cut at 802.11n support: this code works with forthcoming
  drivers but is incomplete; it's included now to establish a baseline
  for other drivers to be developed and for user applications
o adjust max_linkhdr et. al. to reflect 802.11 requirements; this eliminates
  prepending mbufs for traffic generated locally
o add support for Atheros protocol extensions; mainly the fast frames
  encapsulation (note this can be used with any card that can tx+rx
  large frames correctly)
o add sta support for ap's that beacon both WPA1+2 support
o change all data types from bsd-style to posix-style
o propagate noise floor data from drivers to net80211 and on to user apps
o correct various issues in the sta mode state machine related to handling
  authentication and association failures
o enable the addition of sta mode power save support for drivers that need
  net80211 support (not in this commit)
o remove old WI compatibility ioctls (wicontrol is officially dead)
o change the data structures returned for get sta info and get scan
  results so future additions will not break user apps
o fixed tx rate is now maintained internally as an ieee rate and not an
  index into the rate set; this needs to be extended to deal with
  multi-mode operation
o add extended channel specifications to radiotap to enable 11n sniffing

Drivers:
o ath: add support for bg scanning, tx fragmentation, fast frames,
       dynamic turbo (lightly tested), 11n (sniffing only and needs
       new hal)
o awi: compile tested only
o ndis: lightly tested
o ipw: lightly tested
o iwi: add support for bg scanning (well tested but may have some
       rough edges)
o ral, ural, rum: add suppoort for bg scanning, calibrate rssi data
o wi: lightly tested

This work is based on contributions by Atheros, kmacy, sephe, thompsa,
mlaier, kevlo, and others.  Much of the scanning work was supported by
Atheros.  The 11n work was supported by Marvell.
2007-06-11 03:36:55 +00:00
Pyun YongHyeon
a88b5e214f Connect icsphy(4) to the build. 2007-06-11 02:07:08 +00:00
Ken Smith
3c7e4206c2 Add ofw_bus_if.h as a dependency on sparc64. Without this sparc64 kernel
builds had been succeeding if run serially but could fail if run in
parallel because the bge module build might start before ofw_bus_if.h
got created as part of the mainline kernel build.

Diagnosis and patch by:	ru
2007-06-10 00:58:41 +00:00
Pawel Jakub Dawidek
3b7917d766 - Reduce number of atomic operations needed to be implemented in asm by
implementing some of them using existing ones.
- Allow to compile ZFS on all archs and use atomic operations surrounded
  by global mutex on archs we don't have or can't have all atomic
  operations needed by ZFS.
2007-06-08 12:35:47 +00:00
Hidetoshi Shimokawa
9163fee71f Fix a breakage with "MODULES_WITH_WORLD=true make buildworld".
PR: kern/11320
2007-06-01 00:23:34 +00:00
Ariff Abdullah
bba4862c64 Last major commit and updates for RELENG_7:
- Rework the entire pcm_channel structure:
  * Remove rarely used link placeholder, instead, make each pcm_channel
    as head/link of each own/each other. Unlock - Lock sequence due to
    sleep malloc has been reduced.
  * Implement "busy" queue which will contain list of busy/active
    channels. This greatly reduce locking contention for example while
    servicing interrupt for hardware with many channels or when virtual
    channels reach its 256 peak channels.

- So I heard you like v chan ... O RLY?
  Welcome to Virtual **Record** Channels (vrec, rec vchans, vchans for
  recording, Rec-Chan, you decide), the ultimate solutions for your
  nagging O_RDWR full-duplex wannabe (note: flash plugins) monopolizing
  single record channel causing EBUSY.  Vrec works exactly like Vchans
  (or, should I rename it to "Vplay" :) , except that it operates on the
  opposite direction (recording). Up to 256 vrecs (like vchans) are
  possible.

  Notes:
   * Relocate dev.pcm.%d.{vchans,vchanformat,vchanrate} to each of its
     respective node/direction:
       dev.pcm.%d.play.* for "play"   (cdev = dsp%d.vp%d)
       dev.pcm.%d.rec.*  for "record" (cdev = dsp%d.vr%d)
   * Don't expect that it will magically give you ability to split
     "recording source" (eg: 1 channel for cdrom, 1 channel for mic,
     etc). Just admit that you only have a *single* recording source /
     channel. Please bug your hardware vendor instead :)

- Bump maxautovchans from 4 to 16. For a full-fledged multimedia
  desktop/workstation with too many soundservers installed (esound,
  artsd, jackd, pulse/polypaudio, ding-dong pling plong mudkip fuh fuh,
  etc), 4 seems inadequate. There will be no memory penalty here, since
  virtual channels are allocate only by demand.

- Nuke/Rework the entire statically created cdev entries. Everything is
  clonable through snd own clone manager which designed to withstand many
  kind of abusive devfs droids such as:
      * while : ; do /bin/test -e /dev/dsp ; done
      * jot 16777216 0 | while read x ; do ls /dev/dsp0.$x ; done
      * hundreds (could be thousands) concurrent threads/process opening
	"/dev/dsp" (previously, this might result EBUSY even with just
	3 contesting threads/procs).
  o Reusable clone objects (instead of creating new one like there's no
    tomorrow) after certain expiration deadline. The clone allocator will
    decide whether to reuse, share, or creating new clone.
  o Automatic garbage collector.

- Dynamic unit magic allocator. Maximum attached soundcards can be tuned
  using tunable "hw.snd.maxunit" (Default to 512). Minimum is 16, and
  maximum is 2048.

- ..other fixes, mostly related to concurrency issues.

joel@ will do the manpage updates on sound(4).

Have fun.
2007-05-31 18:43:33 +00:00
Kip Macy
10faa56870 When building cxgb as a module make include paths relative to the driver's root.
This will make it possible to build the module out of tree against an older src tree.

MFC after: 3 days
2007-05-28 22:57:27 +00:00
Kip Macy
d722cab49a (MFp4)
- upgrade to reflect state of 1.0.0.86
        - move from firmware rev 3.2 to 4.0.0
        - import driver bits for offload functionality
	- remove binary distribution clause from top level files as it
	  runs counter to the intent of purely supporting the hardware

MFC after: 3 days
2007-05-25 09:48:20 +00:00
Pawel Jakub Dawidek
d4c4dfe96f FreeBSD's namecache works quite well with ZFS, so remove DNLC. 2007-05-23 21:33:02 +00:00
Konstantin Belousov
a96811b171 Fix the dependency for the linux_support.s, explicitely add linux_assym.h.
Reported by:	rwatson
In collaboration with:	rdivacky
Sponsored by:	Google SoC 2007
2007-05-23 15:45:52 +00:00
Konstantin Belousov
1c182de9a9 Move futex support code from <arch>/support.s into linux compat directory.
Implement all futex atomic operations in assembler to not depend on the
fuword() that does not allow to distinguish between -1 and failure return.
Correctly return 0 from atomic operations on success.

In collaboration with:	rdivacky
Tested by:	Scot Hetzel <swhetzel gmail com>, Milos Vyletel <mvyletel mzm cz>
Sponsored by:	Google SoC 2007
2007-05-23 08:33:06 +00:00
Andrew Gallatin
6200d44319 Hook mxge_lro.c to the build so that the if_mxge.ko module
will load.
2007-05-22 14:38:17 +00:00
Scott Long
f366931c86 Add the 'mfip' sub-driver for gaining SCSI-passthrough access to devices
on an MFI controller.
2007-05-16 17:19:47 +00:00
Alexander Motin
1adb54142d A node that implements various traffic shaping and rate limiting algorithms.
Approved by:	glebius (mentor)
2007-05-15 16:24:50 +00:00
George V. Neville-Neil
559d3390d0 Integrate the Camellia Block Cipher. For more information see RFC 4132
and its bibliography.

Submitted by:   Tomoyuki Okazaki <okazaki at kick dot gr dot jp>
MFC after:      1 month
2007-05-09 19:37:02 +00:00