Commit Graph

148662 Commits

Author SHA1 Message Date
Robert Watson
2642bf60f7 Use queue(9) instead of hand-crafted link lists for the global netatalk
address list.  Generally follow the style and convention of similar parts
in netinet.

MFC after:	6 weeks
2009-06-24 21:36:09 +00:00
Robert Watson
32187eb6d9 Fix CARP build.
Reported by:	bz
2009-06-24 21:34:38 +00:00
Jack F Vogel
e33ee9237e Fix lint issue. 2009-06-24 21:32:51 +00:00
John Baldwin
b648d4806b Change the ABI of some of the structures used by the SYSV IPC API:
- The uid/cuid members of struct ipc_perm are now uid_t instead of unsigned
  short.
- The gid/cgid members of struct ipc_perm are now gid_t instead of unsigned
  short.
- The mode member of struct ipc_perm is now mode_t instead of unsigned short
  (this is merely a style bug).
- The rather dubious padding fields for ABI compat with SV/I386 have been
  removed from struct msqid_ds and struct semid_ds.
- The shm_segsz member of struct shmid_ds is now a size_t instead of an
  int.  This removes the need for the shm_bsegsz member in struct
  shmid_kernel and should allow for complete support of SYSV SHM regions
  >= 2GB.
- The shm_nattch member of struct shmid_ds is now an int instead of a
  short.
- The shm_internal member of struct shmid_ds is now gone.  The internal
  VM object pointer for SHM regions has been moved into struct
  shmid_kernel.
- The existing __semctl(), msgctl(), and shmctl() system call entries are
  now marked COMPAT7 and new versions of those system calls which support
  the new ABI are now present.
- The new system calls are assigned to the FBSD-1.1 version in libc.  The
  FBSD-1.0 symbols in libc now refer to the old COMPAT7 system calls.
- A simplistic framework for tagging system calls with compatibility
  symbol versions has been added to libc.  Version tags are added to
  system calls by adding an appropriate __sym_compat() entry to
  src/lib/libc/incldue/compat.h. [1]

PR:		kern/16195 kern/113218 bin/129855
Reviewed by:	arch@, rwatson
Discussed with:	kan, kib [1]
2009-06-24 21:10:52 +00:00
Andrew Gallatin
8c5d766cd7 Add a dying flag to prevent races at detach.
I tried re-ordering ether_ifdetach(), but this created a new race
where sometimes, when under heavy receive load (>1Mpps) and running
tcpdump, the machine would panic.  At panic, the ithread was still in
the original (not dead) if_input() path, and was accessing stale BPF
data structs.  By using a dying flag, I can close the interface prior
to if_detach() to be certain the interface cannot send packets up in
the middle of ether_ifdetach.
2009-06-24 21:09:56 +00:00
Olivier Houchard
aeb56f0662 Fix typo. 2009-06-24 21:03:59 +00:00
Robert Watson
80af0152f3 Convert netinet6 to using queue(9) rather than hand-crafted linked lists
for the global IPv6 address list (in6_ifaddr -> in6_ifaddrhead).  Adopt
the code styles and conventions present in netinet where possible.

Reviewed by:	gnn, bz
MFC after:	6 weeks (possibly not MFCable?)
2009-06-24 21:00:25 +00:00
Olivier Houchard
f03aef6beb Fix typo. 2009-06-24 21:00:13 +00:00
Robert Watson
574644abac Use queue(9) instead of hand-crafted link lists for the global IPX
address list (ipx_ifaddr -> ipx_ifaddrhead), and generally adopt the
naming and usage conventions found in netinet.

MFC after:	6 weeks
2009-06-24 20:57:50 +00:00
Marius Strobl
73591c462d - Change this driver to do taskqueue(9) based TX and interrupt
handling in order to reduce interrupt overhead which results in
  better performance.
- Call ether_ifdetach(9) before stopping the controller and the
  callouts detach in order to prevent active BPF listeners to clear
  promiscuous mode which may lead to the tick callout being restarted
  which will trigger a panic once it's actually gone.
- Add explicit IFF_DRV_RUNNING checking in order to prevent extra
  link up/down events when using dhclient(8).
- Use the correct macro for deciding whether 2/3 of the available TX
  descriptors are used.
- Wrap the RX fault printing in #ifdef CAS_DEBUG in order to not
  unnecessarily frighten users and as debugging was the actual
  intention. Real errors caused by these faults still will be
  accumulated as input errors. It might be a good idea to later on
  add driver specific counters for the faults though.

Submitted by:	yongari (original patch)
2009-06-24 20:56:06 +00:00
Marius Strobl
23f7f783f8 - Remove unused variables. [1]
- Remove redundant zeroing of tmf_req which Coverity Prevent(tm) complains
  about. [2]

Submitted by:	Christoph Mallon [1]
Found with:     Coverity Prevent(tm) [2]
CID:            2496 [2]
MFC after:	2 weeks
2009-06-24 20:52:59 +00:00
Alexander Motin
9919839806 MFp4:
Define several ATA capabilies bits.
2009-06-24 20:52:37 +00:00
Marius Strobl
16d58437ed o merge from amd64:
- r187144: Add a reference to the config(5) manpage and
    to the "env" kernel config option.
  - Add/enable the default USB drivers. Originally the USB
    controller and keyboard drivers were disabled as these
    interacted badly with the Open Firmware console driver,
    i.e. caused the keyboard to not work with ofw_console(4).
    Even when switch to uart(4) and the frame buffer drivers
    most of the USB drivers still were kept disabled as
    several of them, amongst others all of the drivers for
    USB Ethernet controllers, weren't endian clean. With the
    new USB stack these problem should be gone now so there's
    no longer a reason to not include the same set of USB
    drivers amd64 does.
o Remove the commented out device ofw_console; apart from it
  being currently broken by some TTY changes one really needs
  to know how to actually enable and make it work correctly.
2009-06-24 20:49:02 +00:00
Alexander Motin
6fca500004 MFp4:
Remove unused ATAPI definitions, conflicting with ata.h.

Submitted by:	scottl
2009-06-24 20:43:51 +00:00
Jilles Tjoelker
97ab37f704 Add test for r190698.
Submitted by:	Eygene Ryabinkin
Approved by:	ed (mentor) (implicit)
2009-06-24 20:22:54 +00:00
Robert Watson
5387b2276c Remove kernel SLIP and PPP privileges, since they are no longer used.
Suggested by:	bz
2009-06-24 20:06:16 +00:00
John Baldwin
45f48220bb Deprecate the msgsys(), semsys(), and shmsys() system calls by moving
them under COMPAT_FREEBSD[4567].  Starting with FreeBSD 5.0 the SYSV IPC
API was implemented via direct system calls (e.g. msgctl(), msgget(), etc.)
rather than indirecting through the var-args *sys() system calls.  The
shmsys() system call was already effectively deprecated for all but
COMPAT_FREEBSD4 already as its implementation for the !COMPAT_FREEBSD4 case
was to simply invoke nosys().
2009-06-24 20:01:13 +00:00
Alexander Motin
f95dcaae42 MFp4:
Reduce default PCI ATA drivers priorities from absolute to default,
to allow them been overriden. It was so before modularization.
2009-06-24 19:49:18 +00:00
Joerg Wunsch
81f5cd998c Drop the defunct FDOPT_NOERRLOG option from all the floppy utilities.
The kernel does not log floppy media errors anymore.

In fdcontrol, do always open the file descriptor in read-only mode so
it can operate on read-only media, as there is no longer a separate
control device to operate on.
2009-06-24 19:47:53 +00:00
Joerg Wunsch
3fdc1d5c48 With the fdc control device disappearing some 5 years ago, it is no
longer useful for the FD_STYPE and FD_SOPTS ioctls to insist on being
issued on a writable file descriptor.  Otherwise, there's no longer a
chance to set the drive type or options when a read-only medium is
present in the drive, as there is no way to obtain a writable fd then.
2009-06-24 19:30:31 +00:00
Alexander Motin
f64d65b27e Document new hint.atapci.X.msi and hint.ata.X.pm_level tunables. 2009-06-24 19:25:47 +00:00
John Baldwin
7af55bd450 Whitespace fix. 2009-06-24 19:16:48 +00:00
Marius Strobl
b3a1f860fa Revert the part of r194763 which added a dying flag and instead
call ether_ifdetach(9) before stopping the controller and the
callouts. The consensus is that the latter is now safe to do and
should also solve the problem of active BPF listeners clearing
promiscuous mode can result in the tick callout being restarted
which in turn will trigger a panic once it's actually gone.
2009-06-24 19:04:08 +00:00
Ulf Lilleengen
2dd43ecaec - Similar to the previous commit, but for CURRENT: Fix a bug where a FIFO vnode
use count was increased twice, but only decreased once.
2009-06-24 18:44:38 +00:00
Doug Rabson
0775314b63 Don't use sys/nfs/rpcv2.h - it is part of the old kernel RPC implementation
and will be removed.
2009-06-24 18:42:21 +00:00
Ulf Lilleengen
7083246d7c - Fix a bug where a FIFO vnode use count was increased twice, but only
decreased once.

MFC after:	1 week
2009-06-24 18:38:51 +00:00
Rick Macklem
b211588596 If the initial attempt to refresh credentials in the RPCSEC_GSS client
side fails, the entry in the cache is left with no valid context
(gd_ctx == GSS_C_NO_CONTEXT). As such, subsequent hits on the cache
will result in persistent authentication failure, even after the user has
done a kinit or similar and acquired a new valid TGT. This patch adds a test
for that case upon a cache hit and calls rpc_gss_init() to make another
attempt at getting valid credentials. It also moves the setting of gc_proc
to before the import of the principal name to ensure that, if that case
fails, it will be detected as a failure after going to "out:".

Reviewed by:	dfr
Approved by:	kib (mentor)
2009-06-24 18:30:14 +00:00
Jack F Vogel
d8602bb9a7 Update for the Intel 10G driver, this adds support for
newest hardware, adds multiqueue tx interface, infrastructure
cleanup to allow up to 32 MSIX vectors on newer Nehalem systems.
Bug fixes, etc.
2009-06-24 18:27:07 +00:00
Sam Leffler
4a71a9f6bc add a link named athpeek since my fingers keep typing it 2009-06-24 18:24:37 +00:00
Sam Leffler
12a39a13db read back the written value and display 2009-06-24 18:24:20 +00:00
Jamie Gritton
5061de23fa Add the "vnet" and "-vnet" options, to allow moving interfaces between
jails with VIMAGE.

Approved by:	bz (mentor)
2009-06-24 18:21:37 +00:00
Jamie Gritton
29d08a6da6 Add libjail, a (somewhat) simpler interface to the jail_set and jail_get
system calls and the security.jail.param sysctls.

Approved by:	bz (mentor)
2009-06-24 18:19:55 +00:00
Jamie Gritton
de6f37045c Add libjail, a (somewhat) simpler interface to the jail_set and jail_get
system calls and the security.jail.param sysctls.

Approved by:	bz (mentor)
2009-06-24 18:18:35 +00:00
Jack F Vogel
9d81738f8f Updates for both the em and igb drivers, add support
for multiqueue tx, shared code updates, new device
support, and some bug fixes.
2009-06-24 17:41:29 +00:00
Warner Losh
3ae218fe9c Remove usb. The need to have core@ approve major changes to usb has
passed now that the new usb stack is in the tree.  The coordination
issues that necessitated this entry are now OBE.

Approved by:	core (rwatson)
2009-06-24 17:23:10 +00:00
Alexander Motin
8380c28e5a Some DMA related changes:
- honor parent DMA tag limitations, as man page requires,
 - allow data buffer to be allocated within full 64bit address range, when
   support is announced by hardware,
 - add quirk, disabling 64bit addresses for broken chips, use it for MCP78.
2009-06-24 17:03:06 +00:00
Andrew Thompson
b35f050eb2 Move programming info from usb(4) to usbdi(9) and update for the usb stack
changeover. Needs much more content still.
2009-06-24 17:01:17 +00:00
Garance A Drosehn
46bfa198cf Fix end-of-line issues that can come up when `lpq' reads information
about a queue from a remote host.  That remote host may use \r, \r\n,
or \n\r as the line-ending character.  In some cases the remote host
will write a single line of information without *any* EOL sequence.

Translate all the non-unix EOL's to the standard newline, and make
sure the final line includes a terminating newline.  Logic is also
added to translate all unprintable characters to '?', but that is
#if-ed out for now.

PR:		bin/104731
MFC after:	3 weeks
2009-06-24 16:57:33 +00:00
Konstantin Belousov
186cff43e3 Unbreak sparc64 after the swap accounting changes: mark kernel_map
entries allocated for translations in pmap_init() as MAP_NOFAULT. This
prevents vm_map_insert from trying to account the entries for swap
usage, that is both wrong and too early to work.

While there, change FALSE to VMFS_NO_SPACE.

Reported and tested by:	Florian Smeets <flo at kasimir com>
Reviewed by:	marius
2009-06-24 16:52:30 +00:00
Robert Watson
e0d35fbe8e Rework locking and reference counting in ipx_control to be consistent with
the model used in in_control().

MFC after:	6 weeks
2009-06-24 16:52:23 +00:00
Scott Long
cadd4fa0b4 fw_state ad cur_state are holding unsigned bitfields, so declare then
as unsigned as well.

Submitted by:	rdivacky
2009-06-24 16:11:29 +00:00
Andriy Gapon
f340e9fe71 dtrace/amd64: fix virtual address checks
On amd64 KERNBASE/kernbase does not mean start of kernel memory.
This should fix a KASSERT panic in dtrace_copycheck when copyin*()
is used in D program.
Also make checks for user memory a bit stricter.

Reported by:	Thomas Backman <serenity@exscape.org>
Submitted by:	wxs (kaddr part)
Tested by:	Thomas Backman (prototype), wxs
Reviewed by:	alc (concept), jhb, current@
Aprroved by:	jb (concept)
MFC after:	2 weeks
PR:		kern/134408
2009-06-24 16:03:57 +00:00
Rafal Jaworowski
b53ce17515 More precise description of the DS1553 driver.
Pointed out by:	stas
2009-06-24 15:48:20 +00:00
Rafal Jaworowski
9d02143909 Introduce ata(4) support for Marvell integrated SATA controllers (found on
88F5xxx, 88F6xxx and MV78xxx system on chip devices).

Reviewed by:	stas
Obtained from:	Semihalf
2009-06-24 15:41:18 +00:00
Rafal Jaworowski
93588d5c28 Move non-PCI prototypes from ata-pci.h -> ata-all.h.
This removes unnecessary PCI #includes dependency for systems with ATA
controllers living at non-PCI buses.

Submitted by:	Piotr Ziecik
Obtained from:	Semihalf
2009-06-24 15:38:17 +00:00
Jamie Gritton
ca00647742 Clean up struct prison, with the recent fields in more logical places,
and room for future expansion.

Approved by:	bz (mentor)
2009-06-24 15:32:57 +00:00
Jamie Gritton
bf8c1f990d Fix a race in vi_if_move, where a vnet is used after the prison that
referred to it has been released.

Approved by:	bz (mentor)
2009-06-24 15:29:36 +00:00
Robert Watson
f8574c7a22 Add missing unlock of if_addr_mtx when an unmatched ARP packet is received.
Reported by:	lstewart
MFC after:	6 weeks
2009-06-24 14:49:26 +00:00
Andrew Gallatin
f945302517 Allow admin to specify the initial mtu upon driver load
for mxge.
2009-06-24 14:47:32 +00:00
Robert Watson
19e5b0a797 Clear 'ia' after iterating if_addrhead for unicast address matching: since
'ifa' was used as the TAILQ_FOREACH() iterator argument, and 'ia' was just
derived form it, it could be left non-NULL which confused later
conditional freeing code.  This could cause kernel panics if multicast IP
packets were received.  [1]

Call 'struct in_ifaddr *' in ip_rtaddr() 'ia', not 'ifa' in keeping with
normal conventions.

When 'ipstealth' is enabled returns from ip_input early, properly release
the 'ia' reference.

Reported by:	lstewart, sam [1]
MFC after:	6 weeks
2009-06-24 14:29:40 +00:00