Commit graph

70957 commits

Author SHA1 Message Date
Andrew Thompson 24ef070126 Check the exit flag at the start of the taskqueue loop rather than the end. It
is possible to tear down the taskqueue before the thread has run and the
taskqueue loop would sleep forever.

Reviewed by:	sam
MFC after:	1 week
2009-02-13 01:16:51 +00:00
Robert Watson 86c2bc49cc Remove unused ifaddr local variable in ioctl routine.
MFC after:	3 days
2009-02-13 00:01:11 +00:00
Robert Watson 6d0147064d Remove unused ifaddr and ifreq local variables.
MFC after:	3 days
2009-02-12 23:55:35 +00:00
Sam Leffler 47a7b0fa21 o replace ieee80211_node_reclaim by individual operations to release the
references to iv_bss and the sta table; this is equivalent and causes
  direct reclaim of the old bss node when any references in packets inflight
  are reclaimed (previously the old node would sit in the bss table until
  the inactivity processing reclaimed it)
o remove ieee80211_node_reclaim now that it's only use is gone

Reviewed by:	avatar, cbzimmer
2009-02-12 23:34:58 +00:00
Olivier Houchard a43268a746 To prevent various race conditions in the RAS code, store and restore the
values in ARM_RAS_START and ARM_RAS_END at context switch time.

MFC after:	1 week
2009-02-12 23:23:30 +00:00
Olivier Houchard b2e1580e4d Do not set thread0.td_frame to a bogus value, as it's going to overwrite the
thread0 pcb, while the board-dependant code already set a good trapframe.

Reported by:	Mark Tinguely <tinguely at casselton d0t net>

MFC after:	1 week
2009-02-12 22:55:39 +00:00
Olivier Houchard 5c07a1719c Unbreak build by making svr4 conditional on i386. 2009-02-12 21:01:16 +00:00
Andrew Thompson ae55932e23 Add a ieee80211_waitfor_parent() function that will wait for all deferred
parent interface tasks to complete. This had been added to the ioctl path but
it is also need elsewhere like detach so its safe to teardown.

Reported by:	Hans Petter Selasky
Submitted by:	sam
2009-02-12 18:57:18 +00:00
Roman Divacky 0d15110307 Remove obsolete C preprocessor assertions.
Approved by:    kib (mentor)
2009-02-12 18:33:56 +00:00
Nick Hibma 999d258466 Fix a few problems related to building modules in /sys/modules (not
checked whether this applies to builds in /sys/*/compile/* as well):

- Create empty opt_*.h files were missing
- Hook up svr4 to the build. It compiles fine here, so no reason to
  disconnect it in the Makefile. were missing
  - Hook up svr4 to the build. It compiles fine here, so no reason to
    disconnect it in the Makefile.
2009-02-12 14:44:15 +00:00
Kevin Lo 13ae6dce6d Add support for the Sunix SUN1889-based dual parallel port card.
PR: kern/128219
Submitted by: Thinker K.F. Li <thinker at branda dot to>
2009-02-12 10:39:19 +00:00
Alexander Motin c7a5ac775b s/succeded/succeeded/ in comments. 2009-02-12 09:37:45 +00:00
Sean Bruno 373d922731 Enhance debug messages and attempt to unify them into one format where possible.
Reviewed by:	scottl
2009-02-12 03:26:05 +00:00
Sean Bruno d717909f5a Update comments around various structs.
Add speeds S800, S1600 and S3200
2009-02-12 03:05:42 +00:00
Warner Losh f3e39d2a7b Rewrite get_pv_entry() to match expectations of the rest of the
kernel.  Rather than just kick off the page daemon, we actively retire
more mappings.  The inner loop now looks a lot like the inner loop of
pmap_remove_all.

Also, get_pv_entry can't return NULL now, so remove panic if it did.

Reviewed by:	alc@
2009-02-12 01:14:49 +00:00
Warner Losh 6bf6f10d24 pmap_kenrel() was recently deleted from pmap.h. It was still used
here, but inconsistently.  Change all instances of it to kernel_pmap
to match rest of code.
2009-02-12 01:10:53 +00:00
Sam Leffler 9f5967652f fix ARM_USE_SMALL_ALLOC after memory layout changes
Submitted by:	cognet
2009-02-11 22:34:50 +00:00
Sam Leffler 4a7019252b fix both instances of name
Pointy hat:	sam
2009-02-11 22:34:22 +00:00
John Baldwin be246f9e94 Reorder dacleanup() and cdcleanup() slightly so that the sysctl context is
freed while the periph lock is not held.  While here, wait until after
freeing the softc before reacquiring the periph lock.

Tested by:	sbruno
2009-02-11 22:29:09 +00:00
John Baldwin 0b2ab5ec8e - Consolidate error handling in the cd9660 and udf mount routines.
- Always read the character device pointer while the associated devfs vnode
  is locked.  Also, use dev_ref() to obtain a new reference on the vnode for
  the mountpoint.  This reference is released on unmount.  This mirrors the
  earlier fix to FFS.

Reviewed by:	kib
2009-02-11 22:22:26 +00:00
John Baldwin ee445a69c5 - If the g_access() call for the initial root mount fails, then fully
cleanup.  Before the GEOM consumer would not have been closed.
- Bump the reference on the character device being mounted while the
  associated devfs vnode is locked.

Reviewed by:	kib
2009-02-11 22:19:54 +00:00
Sam Leffler d34b671cda fix typo in AH_CHIP definition
Submitted by:	Pavel Roskin <proski@gnu.org>
2009-02-11 22:18:03 +00:00
Sam Leffler 71a3564e5f gcc 4.3.2 examines getLowerUpperIndex() and concludes that it's not
guaranteed to initialize its two last arguments.  Therefore, there is a
warning in the subsequent caller ar5416FillVpdTable(), which doesn't
initialize those arguments.

Change getLowerUpperIndex() to assign values to indexL and indexR even
in the case of assertion failure.

Submitted by:	Pavel Roskin <proski@gnu.org>
2009-02-11 22:15:37 +00:00
Sam Leffler 73bac36f82 improve key index map reclaim debug msg 2009-02-11 18:40:09 +00:00
Sam Leffler 965c230342 oops, fix octal escape sequence 2009-02-11 18:39:20 +00:00
Ulf Lilleengen af2c6a1332 - Use the correct argument when determining the buffer size.
PR:		kern/131575
MFC after:	2 days
2009-02-11 18:13:20 +00:00
Sam Leffler 577a7bcce8 remove bogus reference reclaim on the slave-side bss node on beacon miss 2009-02-11 17:30:36 +00:00
Sam Leffler 5b61057321 fix mis-numbering of IEEE80211_MSG_BITS 2009-02-11 17:26:47 +00:00
Ed Schouten c0086bf202 Serialize write() calls on TTYs.
Just like the old TTY layer, the current MPSAFE TTY layer does not make
any attempt to serialize calls of write(). Data is copied into the
kernel in 256 (TTY_STACKBUF) byte chunks. If a write() call occurs at
the same time, the data may interleave. This is especially likely when
the TTY starts blocking, because the output queue reaches the high
watermark.

I've implemented this by adding a new flag, TTY_BUSY_OUT, which is used
to mark a TTY as having a thread stuck in write(). Because I don't want
non-blocking processes to be possibly blocked by a sleeping thread, I'm
still allowing it to bypass the protection. According to this message,
the Linux kernel returns EAGAIN in such cases, but I think that's a
little too restrictive:

	http://kerneltrap.org/index.php?q=mailarchive/linux-kernel/2007/5/2/85418/thread

PR:		kern/118287
2009-02-11 16:28:49 +00:00
Robert Watson 54fffe2d67 Modify fdcopy() so that, during fork(2), it won't copy file descriptors
from the parent to the child process if they have an operation vector
of &badfileops.  This narrows a set of races involving system calls that
allocate a new file descriptor, potentially block for some extended
period, and then return the file descriptor, when invoked by a threaded
program that concurrently invokes fork(2).  Similar approches are used
in both Solaris and Linux, and the wideness of this race was introduced
in FreeBSD when we moved to a more optimistic implementation of
accept(2) in order to simplify locking.

A small race necessarily remains because the fork(2) might occur after
the finit() in accept(2) but before the system call has returned, but
that appears unavoidable using current APIs.  However, this race is
vastly narrower.

The fix can be validated using the newfileops_on_fork regression test.

PR:		kern/130348
Reported by:	Ivan Shcheklein <shcheklein at gmail dot com>
Reviewed by:	jhb, kib
MFC after:	1 week
2009-02-11 15:22:01 +00:00
John Baldwin 84f9a0e5c5 Fix lptopen() and lptclose() to not trash the state of the HAVEBUS flag
in 'sc_state'.  This allows the lpt_release_ppbus() calls in those two
routines to actually release the ppbus and thus fixes the hangs noticed
with the lpt(4) driver since the recent ppbus changes.  The old lpt(4)
driver didn't actually check the HAVEBUS flag in lpt_release_ppbus() which
is why these bugs weren't noticed before.
2009-02-11 14:25:09 +00:00
Alexander Leidinger 3141a8dcd1 All open fixes and improvements from Konstantin for which users had to
use patches so far:
 + Envy24:
   - fix: broken init data for M Audio Delta DiO 2496
   - add: support for M Audio Delta 44
   - add: support for M Audio Delta 1010LT
     Tested by:	Dominique Goncalves, dominique.goncalves at gmail.com
   - add: support for Terratec EWX 2496
     Tested by:	Stefan Sperling, stsp at stsp.name
   - add: support for M Audio Delta 66
     Tested by:	Richard Bown, richard.bown at blueyonder.co.uk
   - add: support for M Audio Delta 1010
     Tested by:	Andrew Reilly, areilly at bigpond.net.au
 + Envy24HT:
   - add: support for Terrasoniq TS22PCI
   - fix: M-Audio Revolution 5.1 sound volume is very low
     Reported by:	Oliver Hartmann, ohartman at zedat.fu-berlin.de
                 	Andrey Slusar, anrays at gmail.com
     Tested by:		Andrey Slusar, anrays at gmail.com
               		Rusu Silviu, arol.the at gmail.com
   - fix: M-Audio Revolution 7.1 sound is distorted and very quiet
     Reported by:	Olev Hannula, hannula at gmail.com
     Tested by:		Olev Hannula, hannula at gmail.com
               		Stanislav Belansky, stanislav at icmail.ru
   - fix: Terratec PHASE 22 codec is power-off due to wrong init data
     Reported by:	Philipp Ost, pj at smo.de
     Tested by:		Philipp Ost, pj at smo.de
 + SpicDS:
   - fix: AK4381 produce hiss sound on 192kHz sample rate
   - fix: stupid bug with volume control for AK4396

Submitted by:	 	Konstantin Dimitrov <kosio.dimitrov@gmail.com>
2009-02-11 10:29:45 +00:00
Marius Strobl 638ed2cf8e - Use the generally more appropriate PROM base rather than the
kernel one as the non-faulting flush address in the loader so
  we can can change KERNBASE and VM_MIN_KERNEL_ADDRESS if we
  ever want to without needing to worry about using a compatible
  loader.
- Correctly check for LOADER_DEBUG.
- Add a missing const for page_sizes[].

This file was missed in r188455.
2009-02-11 07:50:07 +00:00
Warner Losh c9584ebe61 o Use NULL in pereference to 0 in pointer contexts.
o Use newly minted KOBJMETHOD_END as appropriate
o fix prototype for root_setup_intr.
2009-02-11 04:54:02 +00:00
Warner Losh 6354e4f0ed o Introduce KOBJMETHOD_END for the end of the kobj list.
o Fix a minor indentation problem.
o Put in the extra-strict KOBJMETHOD define, but commented out since
  the tree isn't yet ready.

Reviewed by:	(1) was posted to arch@ without objection (and 1 go for it)
2009-02-11 04:52:46 +00:00
Pyun YongHyeon f1bb696a81 Allocating 2 MSI messages do not seem to work on certain controllers
so use just 1 MSI message. This fixes regression introduced in
r188381.

Tested by:	many
2009-02-11 00:23:56 +00:00
Kai Wang 64fc5491db Added entries for Lava SP-PCI (1 serial + 1 parallel) PCI card. The
card is a multifunction PCI and report itself as two logical devices.
2009-02-11 00:08:03 +00:00
Sam Leffler 60d5654464 when operating as a slave, clear neighbor entries and the peer bss node
on beacon miss

while here, remove a stray pointless write of iv_bmiss_count
2009-02-10 23:52:28 +00:00
Sam Leffler f09cf33f40 clean neighbor entries on beacon miss 2009-02-10 23:51:18 +00:00
Sam Leffler 59fbb2570a don't do phantom beacon miss checking for s/w beacon miss handling,
this can mistakenly drop events that cause the s/w bmiss timer to
never get re-armed
2009-02-10 23:48:29 +00:00
Alexander Motin e05e00bcae Check for device_set_devclass() errors and skip driver probe/attach if any.
Attach call without devclass set crashes the system.

On resume AHCI driver sometimes tries to create duplicate adX device.
It is surely his own problem, but IMHO it is not a reason to crash here.
Other reasons are also possible.
2009-02-10 23:22:29 +00:00
Warner Losh e436c38238 Fix shutdown prototypes. 2009-02-10 23:17:20 +00:00
Warner Losh 507a69a927 Fix read_ivar prototype. 2009-02-10 23:13:48 +00:00
Warner Losh b23193a559 Fix iicbus_intr, iicbus_write and device_read_ivar prototypes... 2009-02-10 22:50:23 +00:00
Warner Losh f2aa0e9f88 fix arcmsr_attach, probe, detach, and shutdown prototypes to match newbus. 2009-02-10 22:46:36 +00:00
John Baldwin b7208da623 Adding dynamic sysctls no longer requires Giant.
Submitted by:	rdivacky
2009-02-10 22:39:44 +00:00
Marius Strobl 4012d104cd Don't reset the PHY probe retry counter within the loop so
it will eventually terminate as intended.

Submitted by:	Helen Zhang
2009-02-10 21:54:23 +00:00
Marius Strobl 9223a606d0 Improve r185008 so the streaming cache is only flushed when
a mapping actually met the threshold.
2009-02-10 21:51:33 +00:00
Marius Strobl ceab1bee37 - Use the generally more appropriate PROM base rather than the
kernel one as the non-faulting flush address in the loader so
  we can can change KERNBASE and VM_MIN_KERNEL_ADDRESS if we
  ever want to without needing to worry about using a compatible
  loader.
- Correctly check for LOADER_DEBUG.
- Add a missing const for page_sizes[].
2009-02-10 21:48:42 +00:00
Marcel Moolenaar 5d1df4b56d Mark the BSP as being awake. This supresses the message
that not all usable CPUs could be woken up...
2009-02-10 20:29:57 +00:00
Maksim Yevmenkin 320a819087 Update comment. soalloc() is no longer performing M_WAITOK memory allocations.
Submitted by:	ru
MFC after:	3 days
2009-02-10 20:27:05 +00:00
Sam Leffler 330528331c mark the CLR key installed for open auth stations such that it is reclaimed
when net80211 tears down station state; without this we leak keycache slots
2009-02-10 19:27:50 +00:00
Sam Leffler a32ac9d3a9 add hw.ath.bstuck to control the stuck beacon threshold 2009-02-10 19:26:42 +00:00
Sam Leffler 054d7b6979 on resume ah_curchan may be NULL if no channel change has been done;
workaround this by passing net80211's channel as we know it'll never
be null

Submitted by:	trasz
2009-02-10 19:25:11 +00:00
Sam Leffler 41576ce6db consolidate conditional code 2009-02-10 19:23:25 +00:00
Attilio Rao a1d7ce03ea Scanning all the formats for binary translation of modules loading can
result in errors for a format loading but subsequent correct recognizing
for another format.

File format loading functions should avoid printing any additional
informations but just returning appropriate (and different between each
other) error condition, characterizing different informations.
Additively, the linker should handle appropriately different format
loading errors.

While a general mechanism is desired, fix a simple and common case on
amd64: file type is not recognized for link elf and confuses the linker.
Printout an error if all the registered linker classes can't recognize
and load the module.

Reviewed by:	jhb
Sponsored by:	Sandvine Incorporated
2009-02-10 15:50:19 +00:00
Alan Cox 11bd9105b6 Eliminate an unused definition. 2009-02-10 06:08:28 +00:00
Warner Losh 51f53a08e0 Fix g_part_dumpconf and g_part_name prototpyes.
Submitted by:	marcel@
2009-02-10 02:43:07 +00:00
Sam Leffler 24a90e6b81 correctly fixup iv_des_chan after installing a new channel table; if the
previous channel is now invalid we must set it to IEEE80211_CHAN_ANYC
2009-02-10 01:37:55 +00:00
Marcel Moolenaar 91e1be8baf Add option GEOM_PART_EBR by default on amd64 and i386. 2009-02-10 00:08:39 +00:00
Olivier Houchard cd5c163926 Hmm... "base? base : 0" and "base" should be equivalent.
Pointy hat to:	cognet

MFC after:	3 days
2009-02-09 22:59:22 +00:00
Andrew Thompson 2a1eb33aac Hook uslcom2 up to the build. 2009-02-09 22:38:55 +00:00
Andrew Thompson 78ba73614f Remove usb2_config_td.[ch], they are no longer used. 2009-02-09 22:23:01 +00:00
Andrew Thompson 41f3098786 MFp4 //depot/projects/usb; 157429, 157433, 157443
Various changes wrt. usb procs and tasks.

Submitted by:	Hans Petter Selasky
2009-02-09 22:18:11 +00:00
Andrew Thompson 1b216d3626 Correct sources for r188417
MFp4 //depot/projects/usb; 157412

Sync from svn.freebsd.org/base/user/thompsa/usb which is a minimal changeset
from oldUSB (no config_td).

This excludes the taskqueue changes (for the moment) as requested.
2009-02-09 22:14:38 +00:00
Andrew Thompson caba0185f0 MFp4 //depot/projects/usb; 157412
Sync from svn.freebsd.org/base/user/thompsa/usb which is a minimal changeset
from oldUSB (no config_td).

This excludes the taskqueue changes (for the moment) as requested.
2009-02-09 22:12:47 +00:00
Andrew Thompson 3630903af2 MFp4 //depot/projects/usb; 157069, 157255
- Change "usb2_pause_mtx" so that it takes the timeout value in ticks
 - Make sure that attach waits for the generic probe to leave room for firware
   loader drivers and device specific USB Audio drivers like USB phone adapters

Submitted by:	Hans Petter Selasky
2009-02-09 22:11:02 +00:00
Andrew Thompson d102bcfd1b MFp4 //depot/projects/usb; 157203
- Remove CAM layer quirks

Submitted by:	Hans Petter Selasky
2009-02-09 22:09:21 +00:00
Andrew Thompson fc7ca11552 MFp4 //depot/projects/usb; 157069
- Change "usb2_pause_mtx" so that it takes the timeout value in ticks

Submitted by:	Hans Petter Selasky
2009-02-09 22:06:52 +00:00
Andrew Thompson 1c39f075ce MFp4 //depot/projects/usb; 157069, 157136, 157143, 157145, 157429
- USB serial drivers cleanup, factor out code
 - Simplify line state programming
 - Integrate uslcom from old USB stack

Submitted by:	Hans Petter Selasky
2009-02-09 22:05:25 +00:00
Andrew Thompson 9b90005109 MFp4 //depot/projects/usb; 157100
1. Move most of the ifnet logic into the usb2_ethernet module, this includes,
 - make all usb ethernet interfaces named ue%d
 - handle all threading in usb2_ethernet
 - provide default ioctl handler
 - handle mbuf rx
 - provide locked callbacks for init,start,stop,etc

2. Cleanup CDC-Ethernet driver.

Submitted by:	Hans Petter Selasky
Obtained from:	svn.freebsd.org/base/user/thompsa/usb [1]
2009-02-09 22:02:38 +00:00
Andrew Thompson 559f11917d MFp4 //depot/projects/usb; 157069, 157429, 157430
- Change "usb2_pause_mtx" so that it takes the timeout value in ticks
 - Factor out USB ethernet and USB serial driver specific control request.
 - USB process naming cleanup.

Submitted by:	Hans Petter Selasky
2009-02-09 21:56:33 +00:00
Andrew Thompson 8259ac9313 MFp4 //depot/projects/usb
- Bring in ehci2_ixp4xx.c and ehci2_mbus.c from dev/usb.

Submitted by:	Hans Petter Selasky
2009-02-09 21:50:04 +00:00
Andrew Thompson 81fe4e1110 MFp4 //depot/projects/usb; 157069,157296,157375,157384,157430
- Change "usb2_pause_mtx" so that it takes the timeout value in ticks
 - USB controller: EHCI High Speed Interrupt endpoint fix.
 - Fix OHCI and EHCI counting bug when multiple TD's are involved in
   a short USB transfer and a short packet happens on the non-last TD in the
   USB transfer frame.
 - USB process naming cleanup.

Submitted by:	Hans Petter Selasky
2009-02-09 21:47:39 +00:00
John Baldwin 4ad0d60bb8 Mark udf(4) MPSAFE and add support for shared vnode locks during pathname
lookups:
- Honor the caller's locking flags in udf_root() and udf_vget().
- Set VV_ROOT for the root vnode in udf_vget() instead of only doing it in
  udf_root().
- Honor the requested locking flags during pathname lookups in udf_lookup().
- Release the buffer holding the directory data before looking up the vnode
  for a given file to avoid a LOR between the "udf" vnode locks and
  "bufwait".
- Use vn_vget_ino() to handle ".." lookups.
- Special case "." lookups instead of calling udf_vget().  We have to do
  extra checking for the vnode lock for "." lookups.
2009-02-09 20:50:23 +00:00
John Baldwin a40ad858de Use the same style as the rest of the file for the optional data string
after each path component rather than a GCC-ism.
2009-02-09 20:42:51 +00:00
Robert Watson e2757609ec Remove extra 'comma = 0' in socket state printing code, which otherwise
could lead to an extra comma in output.

Submitted by:   Christoph Mallon <christoph dot mallon at gmx dot de>
2009-02-09 18:19:58 +00:00
Olivier Houchard 96c7367b9e The bounce zone sees its page number increased if multiple dma maps use it in
the same dma tag. However, it can happen multiple dma tags share the same
bounce zone too, so add a per-bounce zone map counter, and check it instead of
the dma tag map counter, to know if we have to alloc more pages.

Reported by:	miwi
Reviewed by:	scottl
2009-02-09 18:03:31 +00:00
Randall Stewart 11b14db397 Add padding to then end of the xsctp_xxx structures to
allow future changes to be able to maintain ABI compatibility
2009-02-09 17:37:17 +00:00
Max Khon 7c9d6ad424 tulip_busdma_cleanup: pass correct vaddr (2nd arg) to bus_dmamem_free()
Found with:	Coverity Prevent(tm)
CID:		1998
2009-02-09 17:07:29 +00:00
Max Khon aa812d9e2a cam_periph_alloc: fix "invalid periph name" error condition
Found with:	Coverity Prevent(tm)
CID:		130
2009-02-09 17:02:54 +00:00
Max Khon 0a5eaa9d0e Do not self-initialize a variable.
Found with:	Coverity Prevent(tm)
CID:		3864, 3865
2009-02-09 16:58:18 +00:00
Max Khon 166366b5cd Remove unused variable.
Found with:	Coverity Prevent(tm)
CID:		3693
2009-02-09 16:57:07 +00:00
Max Khon ca9e8f68b8 Destroy TX tag outside of loop scope.
Found with:	Coverity Prevent(tm)
CID:		3886
2009-02-09 16:53:37 +00:00
Ed Schouten 3b31c19691 Properly implement GIO_ATTR and CONS_GETINFO.
It seems I didn't implement these two ioctl()'s properly, which meant
vidcontrol couldn't properly obtain certain terminal parameters.
2009-02-09 15:55:21 +00:00
Martin Blapp 37e399b26e s/SS_FDREF/SS_NOFDREF/ 2009-02-09 13:29:01 +00:00
Randall Stewart 74246b2734 Fix minor spacing problem found by s9indent from last
commit.
2009-02-09 11:42:23 +00:00
Randall Stewart a1f2f7a5a0 Fix INET only build breakage with SCTP - pointy hat to me :-) 2009-02-09 11:41:54 +00:00
Konstantin Belousov cb61d6987e Comment out the assertion from r188321. It is not valid for nfs.
Reported by:	alc
2009-02-09 11:32:23 +00:00
Ed Schouten 89d647cb30 Remove a stale comment from the clists code.
We don't support quote bits.
2009-02-09 11:27:56 +00:00
Alan Cox c722e407dc Avoid some cases of unnecessary page queues locking by vm_fault's delete-
behind heuristic.
2009-02-09 06:23:21 +00:00
Pyun YongHyeon c2d2e19cb7 Reclaim transmitted frames in re_tick(). This is for PCIe
controllers that lose Tx completion interrupts under certain
conditions. With this change it's safe to use MSI on PCIe
controllers so enable MSI on these controllers.
2009-02-09 04:59:13 +00:00
Weongyo Jeong 51cec12145 mark M_LASTFRAG at the last fragment.
Reviewed by:	sam
MFC after:	3 weeks
2009-02-09 04:39:16 +00:00
Marcel Moolenaar 5d68db5bc8 Add the EBR scheme. The EBR scheme supports the Extended Boot Records
found inside extended partitions and used to create logical partitions.
At this time write/modify support is not (yet) present.
The EBR and MBR schemes both check the parent scheme. The MBR will
back-off when nested under another MBR, whereas the EBR only nests
under a MBR.
2009-02-08 23:51:44 +00:00
Oleksandr Tymoshenko 5defb9db6b - Fix in_cksum for big-endian MIPS: use correct compile-time check. 2009-02-08 23:43:36 +00:00
Marcel Moolenaar 665557a4ec Allow gpe_offset to be set by the scheme. When gpe_offset is zero,
or invalid, initialize it to the start of the partition. Adjust
the mediasize when the offset lies somewhere inside the partition.
2009-02-08 23:39:30 +00:00
Warner Losh 047e5fdabc When bouncing pages, allow a new option to preserve the intra-page
offset.  This is needed for the ehci hardware buffer rings that assume
this behavior.

This is an interim solution, and a more general one is being worked
on.  This solution doesn't break anything that doesn't ask for it
directly.  The mbuf and uio variants with this flag likely don't work
and haven't been tested.

Universe builds with these changes.  I don't have a huge-memory
machine to test these changes with, but will be happy to work with
folks that do and hps if this changes turns out not to be sufficient.

Submitted by:	alfred@ from Hans Peter Selasky's original
2009-02-08 22:54:58 +00:00
Alan Cox 7b54b1a9f5 Eliminate OBJ_NEEDGIANT. After r188331, OBJ_NEEDGIANT's only use is by a
redundant assertion in vm_fault().

Reviewed by:	kib
2009-02-08 22:17:24 +00:00
Edward Tomasz Napierala a8d4700dbb Remove an overzealous check.
Submitted by:	das
Reviewed by:	scottl
Approved by:	rwatson (mentor, implicit)
Sponsored by:	FreeBSD Foundation
2009-02-08 22:08:48 +00:00
Kip Macy ffc4f90610 Don't try to directly update page tables 2009-02-08 21:54:51 +00:00
Konstantin Belousov 2fada4c2b3 Remove no longer valid comment.
Submitted by:	alc
2009-02-08 21:20:13 +00:00
Andrew Thompson 0ac54a56b8 The NRL value in the queue head must be zero for interrupt transfers. This was
diagnosed using a USB analyser obtained through a FreeBSD Foundation grant.

Thanks to:	FreeBSD Foundation
2009-02-08 21:08:00 +00:00
Konstantin Belousov b0994946c7 Improve comments, correct English.
Submitted by:	alc
2009-02-08 20:52:09 +00:00
Konstantin Belousov 897d81a020 Do not call vm_object_deallocate() from vm_map_delete(), because we
hold the map lock there, and might need the vnode lock for OBJT_VNODE
objects. Postpone object deallocation until caller of vm_map_delete()
drops the map lock. Link the map entries to be freed into the freelist,
that is released by the new helper function vm_map_entry_free_freelist().

Reviewed by:	tegge, alc
Tested by:	pho
2009-02-08 20:39:17 +00:00
Konstantin Belousov e53fa61bf2 In vm_map_sync(), do not call vm_object_sync() while holding map lock.
Reference object, drop the map lock, and then call vm_object_sync().
The object sync might require vnode lock for OBJT_VNODE type objects.

Reviewed by:	tegge
Tested by:	pho
2009-02-08 20:30:51 +00:00
Sam Leffler 26b3568c2f fix typo
Submitted by:	Christoph Mallon <christoph.mallon@gmx.de>
2009-02-08 20:29:37 +00:00
Konstantin Belousov d2bf64c309 Do not sleep for vnode lock while holding map lock in vm_fault. Try to
acquire vnode lock for OBJT_VNODE object after map lock is dropped.
Because we have the busy page(s) in the object, sleeping there would
result in deadlock with vnode resize. Try to get lock without sleeping,
and, if the attempt failed, drop the state, lock the vnode, and restart
the fault handler from the start with already locked vnode.

Because the vnode_pager_lock() function is inlined in vm_fault(),
axe it.

Based on suggestion by:	alc
Reviewed by:	tegge, alc
Tested by:	pho
2009-02-08 20:23:46 +00:00
Marcel Moolenaar 165651a553 o Add the "PART::scheme" attribute that returns the name of the
underlying partitioning scheme.
o  Put the start and end of the partition in the XML configuration.
   The start and end are the LBAs of the first and last sector
   (resp.) of the partition. They are currently identical to the
   offset and size attributes, which describe the partition as an
   offset and size in bytes, but may not in the future. The start
   and end will be used for the logical partition boundaries and
   may include metadata. The offset and size will always represent
   the useful storage space within the partition. Typically these
   two notions are the same, but for logical partitions in an
   extended partition, the EBR is more naturally treated as being
   part of the partition.
2009-02-08 20:15:08 +00:00
Konstantin Belousov 7fd10fb3c7 Add the comments to vm_map_simplify_entry() and vmspace_fork(),
describing why several calls to vm_deallocate_object() with locked map
do not result in the acquisition of the vnode lock after map lock.

Suggested and reviewed by:	tegge
2009-02-08 20:00:33 +00:00
Konstantin Belousov 1fac7d7f35 Lock the new map in vmspace_fork(). The newly allocated map should not
be accessible outside vmspace_fork() yet, but locking it would satisfy
the protocol of the vm_map_entry_link() and other functions called
from vmspace_fork().

Use trylock that is supposedly cannot fail, to silence WITNESS warning
of the nested acquisition of the sx lock with the same name.

Suggested and reviewed by:	tegge
2009-02-08 19:55:03 +00:00
Konstantin Belousov 705f0a82c2 Assert that vnode is exclusively locked when its vm object is resized.
Reviewed by:	tegge
2009-02-08 19:44:50 +00:00
Konstantin Belousov 9f6acfd1a8 Do not leak the MAP_ENTRY_IN_TRANSITION flag when copying map entry
on fork. Otherwise, copied entry cannot be removed in the child map.

Reviewed by:	tegge
MFC after:	2 weeks
2009-02-08 19:41:08 +00:00
Konstantin Belousov 0d0be82a5d Style. 2009-02-08 19:37:01 +00:00
Konstantin Belousov e3c7e75305 Lookup up the directory entry for the tmpfs node that are deleted by
both node pointer and name component. This does the right thing for
hardlinks to the same node in the same directory.

Submitted by:	Yoshihiro Ota <ota j email ne jp>
PR:	kern/131356
MFC after:	2 weeks
2009-02-08 19:18:33 +00:00
Robert Watson 8f8dedbed8 Set the lower bound on queue size for an audit pipe to 1 instead of 0,
as an audit pipe with a queue length of 0 is less useful.

Obtained from:	TrustedBSD Project
Sponsored by:	Apple, Inc.
MFC after:	1 week
2009-02-08 15:38:31 +00:00
Wojciech A. Koszek 2656fef981 Fix several filenames for "make clean" target. 2009-02-08 14:43:20 +00:00
Robert Watson f4f93a63f5 Change various routines that are responsible for transforming audit
event IDs based on arguments to return au_event_t rather than int.

Obtained from:	TrustedBSD Project
Sponsored by:	Apple, Inc.
MFC after:	1 week
2009-02-08 14:39:35 +00:00
Robert Watson 8b14aeee4b Audit AUE_MAC_EXECVE; currently just the standard AUE_EXECVE arguments
and not the label.

Obtained from:	TrustedBSD Project
Sponsored by:	Apple, Inc.
MFC after:	1 week
2009-02-08 14:24:35 +00:00
Robert Watson 4ba1f444c5 Audit the flag argument to the nfssvc(2) system call.
Obtained from:	TrustedBSD Project
Sponsored by:	Apple, Inc.
2009-02-08 14:04:08 +00:00
Wojciech A. Koszek d2a4cd29be si(4) seems to build without a problem. However, since noone noticed lack
of this driver, put it in a comment.
2009-02-08 12:40:33 +00:00
Wojciech A. Koszek 1c6c2ef5a9 Further NOTES cleanup -- following drivers didn't survive TTY-ng
and aren't included in NOTES anyway: cy(4), rc(4), rp(4).

si(4) doesn't belong to global NOTES.
2009-02-08 12:33:05 +00:00
Wojciech A. Koszek 1caef33247 Add missing pcfclock description. 2009-02-08 12:12:19 +00:00
Wojciech A. Koszek 61682d5df6 Bring missing comments on EPSON_BOUNCEDMA and EPSON_MEMWIN flags.
Submitted by:	nyan
2009-02-08 10:21:25 +00:00
Bjoern A. Zeeb 97aa4a517a Try to remove/assimilate as much of formerly IPv4/6 specific
(duplicate) code in sys/netipsec/ipsec.c and fold it into
common, INET/6 independent functions.

The file local functions ipsec4_setspidx_inpcb() and
ipsec6_setspidx_inpcb() were 1:1 identical after the change
in r186528. Rename to ipsec_setspidx_inpcb() and remove the
duplicate.

Public functions ipsec[46]_get_policy() were 1:1 identical.
Remove one copy and merge in the factored out code from
ipsec_get_policy() into the other. The public function left
is now called ipsec_get_policy() and callers were adapted.

Public functions ipsec[46]_set_policy() were 1:1 identical.
Rename file local ipsec_set_policy() function to
ipsec_set_policy_internal().
Remove one copy of the public functions, rename the other
to ipsec_set_policy() and adapt callers.

Public functions ipsec[46]_hdrsiz() were logically identical
(ignoring one questionable assert in the v6 version).
Rename the file local ipsec_hdrsiz() to ipsec_hdrsiz_internal(),
the public function to ipsec_hdrsiz(), remove the duplicate
copy and adapt the callers.
The v6 version had been unused anyway. Cleanup comments.

Public functions ipsec[46]_in_reject() were logically identical
apart from statistics. Move the common code into a file local
ipsec46_in_reject() leaving vimage+statistics in small AF specific
wrapper functions. Note: unfortunately we already have a public
ipsec_in_reject().

Reviewed by:	sam
Discussed with:	rwatson (renaming to *_internal)
MFC after:	26 days
X-MFC:		keep wrapper functions for public symbols?
2009-02-08 09:27:07 +00:00
Warner Losh 3beb4f7ed3 Retire NO_DMA completely. 2009-02-08 08:13:36 +00:00
Warner Losh f4fddf53c7 Fix g_part_*dumpconf to return void to match kobj definition.
Fix g_part_*name to return a const char * rather than a char *.
2009-02-08 07:05:23 +00:00
Warner Losh 3282e64ac0 Companion for r188301: fix the prototypes. 2009-02-08 07:03:34 +00:00
Warner Losh d9d53b2a54 Correct parameter types for pcib_{read,write}_config by fixing the
protptyoes for the legacy_* impelemtnations of these kobj methods.
2009-02-08 07:02:42 +00:00
Paolo Pisati e13710afbd Silent LINT: add 2 stubs (update_crc32 and sctp_finalize_crc32) to fix LIBALIAS + SCTP_NO_CSUM case. 2009-02-08 03:03:55 +00:00
Paolo Pisati 603cb5d530 Fix LIBALIAS option for a static kernel. 2009-02-08 03:02:06 +00:00
Wojciech A. Koszek 36782d14ca Resort NOTES a bit to easily distinguish, which comments are actual and
refer to used options, and which comments are obseleted.

Reviewed by:	imp
2009-02-08 00:16:24 +00:00
Paolo Pisati 37ce2656ec Add SCTP NAT support.
Submitted by: CAIA (http://caia.swin.edu.au)
2009-02-07 18:49:42 +00:00
Andrew Thompson 3e1c5e2b56 Fix build, sigh. 2009-02-07 15:51:32 +00:00
Wojciech A. Koszek eb0a4a4b80 Don't forget to create opt_agp.h on ia64, which also uses agp(4). 2009-02-07 09:57:14 +00:00
Andrew Thompson 875d039fd8 Dont hold the lock over the controller init, we are still attaching. 2009-02-07 06:27:16 +00:00
Sam Leffler c2e344594e count stuck beacon events 2009-02-07 05:34:41 +00:00
Sam Leffler 9313bae41d fix building w/o CFI_ARMEDANDDANGEROUS 2009-02-07 05:32:19 +00:00
Sam Leffler bd8c9fc04d expand CFI_ARMEDANDDANGEROUS to include writing the user segment
of the PR; this register is actually write-once so deserves the
safety-belt as much as the PLR
2009-02-07 05:03:25 +00:00
Wojciech A. Koszek e54815ad40 si_cmdname() is defined only when SI_DEBUG is enabled, thus
using this function in simple printf() causes compile-time
problems. Use conditionally enabled DPRINT() macro instead.
2009-02-07 02:14:27 +00:00
Sam Leffler b2e73ce955 fix 11n channel construction 2009-02-07 01:54:57 +00:00
Sam Leffler 58ae70168f add macro for future regulatory mods 2009-02-07 01:53:44 +00:00
Nathan Whitehorn 9772bc0bec Rearrange this code slightly to pass softcs around instead of device_t,
solving a possible panic when snd_ai2s is loaded at boot time. Also change
the device setup to indicate to the pcm layer that the device is MPSAFE.

Submitted by:	Marco Trillo
Suggestions by: Ariff Abdullah
2009-02-07 01:15:13 +00:00
Wojciech A. Koszek 1447dcd435 Tidy NOTES a bit:
- ath(4) is the last listed device, so make it's comment last as well
- since we have hints for le(4), bring it back by inserting commented
  out line until I check, if it can be safely enabled.
- bring snc(4) explanation
- put pmtimer comment together with other drivers' comments in a block
- bring comments for canbus, canbepm, pmc

olpt comment has been left blank, since I don't know how does this
driver differ from other printer drivers.
2009-02-07 00:15:30 +00:00
Wojciech A. Koszek f832501537 Tidy NOTES a bit:
- leave pmtimer comment that is common to other architectures.
- bring pbio explanation to the block comment relating to other
  drivers in the same block.
2009-02-07 00:06:13 +00:00
Wojciech A. Koszek c4ce3ea6eb Tidy NOTES a bit:
- remove misleading nve/nfe comments, which make it hard to
  distinguish those two at a first glance
- bring pbio documentation to the block comment together with
  other drivers

I also brought commented out line responsible for si(4), since it
seems to compile and already has respective comment in this file.
2009-02-07 00:01:10 +00:00
John Baldwin e3024df2e0 Add rudimentary support for symbolic links on UDF. Links are stored as a
sequence of pathname components.  We walk the list building a string in
the caller's passed in buffer.  Currently this only handles path names
in CS8 (character set 8) as that is what mkisofs generates for UDF images.

MFC after:	1 month
2009-02-06 22:24:03 +00:00
Wojciech A. Koszek 643f85c491 Comment about ural(4) isn't approprate here, since the driver is present in
global NOTES file.

cx(4) driver isn't present in this file, though it could be. However, cx(4)
seems to be more or less dead -- it hasn't been linked to the modules build,
and after TTY-ng transformations it doesn't compile.

Remove it until cx(4) is broken.
2009-02-06 22:22:08 +00:00
Wojciech A. Koszek bc4c1ddaf9 ural(4) is already present in global NOTES, thus there is no
need to explicitly list it here once again. This removes:

	WARNING: duplicate option `DEV_URAL' encountered.
	WARNING: duplicate device `ural' encountered.

Warnings when compiling LINT on amd64.
2009-02-06 21:56:55 +00:00
Wojciech A. Koszek c353491ad3 Fix AGP debugging code:
- correct format strings
- fill opt_agp.h if AGP_DEBUG is defined
- bring AGP_DEBUG to LINT by mentioning it in NOTES

This should hopefully fix a warning that was...

Found by:	Coverity Prevent(tm)
CID:		3676
Tested on:	amd64, i386
2009-02-06 20:57:10 +00:00
John Baldwin 61e69c80e4 Add support for fifos to UDF:
- Add a separate set of vnode operations that inherits from the fifo ops
  and use it for fifo nodes.
- Add a VOP_SETATTR() method that allows setting the size (by silently
  ignoring the requests) of fifos.  This is to allow O_TRUNC opens of
  fifo devices (e.g. I/O redirection in shells using ">").
- Add a VOP_PRINT() handler while I'm here.
2009-02-06 20:09:14 +00:00