yongari [Mon, 9 Feb 2009 04:59:13 +0000 (04:59 +0000)]
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.
marcel [Sun, 8 Feb 2009 23:51:44 +0000 (23:51 +0000)]
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.
marcel [Sun, 8 Feb 2009 23:39:30 +0000 (23:39 +0000)]
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.
imp [Sun, 8 Feb 2009 22:54:58 +0000 (22:54 +0000)]
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
kientzle [Sun, 8 Feb 2009 22:02:46 +0000 (22:02 +0000)]
When copying file data to the archive, don't write more
than was read. This seems to have only affected the shar
writer, since other formats proactively truncate output
to the originally-advertised size.
thompsa [Sun, 8 Feb 2009 21:08:00 +0000 (21:08 +0000)]
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.
kib [Sun, 8 Feb 2009 20:39:17 +0000 (20:39 +0000)]
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().
kib [Sun, 8 Feb 2009 20:30:51 +0000 (20:30 +0000)]
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.
kib [Sun, 8 Feb 2009 20:23:46 +0000 (20:23 +0000)]
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
marcel [Sun, 8 Feb 2009 20:19:19 +0000 (20:19 +0000)]
Prefer the start and end attributes over the offset and size
attributes. The start and end more accurately describe the
space taken by a partition. The offset and size are used to
describe the effective (usable) storage of that partition.
marcel [Sun, 8 Feb 2009 20:15:08 +0000 (20:15 +0000)]
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.
kib [Sun, 8 Feb 2009 20:00:33 +0000 (20:00 +0000)]
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.
kib [Sun, 8 Feb 2009 19:55:03 +0000 (19:55 +0000)]
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.
kib [Sun, 8 Feb 2009 19:18:33 +0000 (19:18 +0000)]
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
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?
keramida [Sun, 8 Feb 2009 08:26:58 +0000 (08:26 +0000)]
Fix language on atol(3) manpage. Add a COMPATIBILITY section
stating that in FreeBSD the atol() and atoll() functions affect
errno in the same way as strtol() and stroll().
Named normally cannot be started chrooted inside a jail. Thus treat
the jail case specifically. In case we find a proper pre-seeded
devfs in the chroot path (mounted from the base system) permit
starting chrooted else give proper warn/error messages.
PR: conf/103489
Reviewed by: dougb
MFC after: 5 days
sam [Sat, 7 Feb 2009 05:03:25 +0000 (05:03 +0000)]
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
wkoszek [Sat, 7 Feb 2009 02:14:27 +0000 (02:14 +0000)]
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.
nwhitehorn [Sat, 7 Feb 2009 01:15:13 +0000 (01:15 +0000)]
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
sam [Sat, 7 Feb 2009 01:12:51 +0000 (01:12 +0000)]
Regulatory fixups:
o add missing channel flags for ECM, indoor, and outdoor constraints
o use HT capabilities to short-circuit HT20/HT40 channel construction
o rewrite 1/2 and 1/4 width channel handling yet again; previously
we assumed there was a full-width version of the channel in the
calibration table but that's not always true (e.g. for the Public
Safety Band), now we first check the calibration table for the
exact channel we want then fall back to the heuristics we used before
o fix HT channel construction; wasn't adjusting band edges for HT40
channel bandwidth requirements
wkoszek [Sat, 7 Feb 2009 00:15:30 +0000 (00:15 +0000)]
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.
wkoszek [Sat, 7 Feb 2009 00:06:13 +0000 (00:06 +0000)]
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.
wkoszek [Sat, 7 Feb 2009 00:01:10 +0000 (00:01 +0000)]
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.
jhb [Fri, 6 Feb 2009 22:24:03 +0000 (22:24 +0000)]
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.
wkoszek [Fri, 6 Feb 2009 22:22:08 +0000 (22:22 +0000)]
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.
jhb [Fri, 6 Feb 2009 20:09:14 +0000 (20:09 +0000)]
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.
jhb [Fri, 6 Feb 2009 20:06:48 +0000 (20:06 +0000)]
Tweak the output of VOP_PRINT/vn_printf() some.
- Align the fifo output in fifo_print() with other vn_printf() output.
- Remove the leading space from lockmgr_printinfo() so its output lines up
in vn_printf().
- lockmgr_printinfo() now ends with a newline, so remove an extra newline
from vn_printf().
trasz [Fri, 6 Feb 2009 17:14:07 +0000 (17:14 +0000)]
When a device containing mounted UFS filesystem disappears, the type
of devvp becomes VBAD, which UFS incorrectly interprets as snapshot
vnode, which in turns causes panic. Fix it by replacing '!= VCHR'
with '== VREG'.
With this fix in place, you should no longer be able to panic the system
by removing a device with an UFS filesystem mounted from it - assuming
you don't use softupdates.
jhb [Fri, 6 Feb 2009 15:09:31 +0000 (15:09 +0000)]
Note that the slave address passed to smb(4) commands must be left-justified
(LSB is 0). The iic(4) manpage probably needs similar language to describe
the format it expects.
jhb [Fri, 6 Feb 2009 14:51:32 +0000 (14:51 +0000)]
Expand the scope of the sysctllock sx lock to protect the sysctl tree itself.
Back in 1.1 of kern_sysctl.c the sysctl() routine wired the "old" userland
buffer for most sysctls (everything except kern.vnode.*). I think to prevent
issues with wiring too much memory it used a 'memlock' to serialize all
sysctl(2) invocations, meaning that only one user buffer could be wired at
a time. In 5.0 the 'memlock' was converted to an sx lock and renamed to
'sysctl lock'. However, it still only served the purpose of serializing
sysctls to avoid wiring too much memory and didn't actually protect the
sysctl tree as its name suggested. These changes expand the lock to actually
protect the tree.
Later on in 5.0, sysctl was changed to not wire buffers for requests by
default (sysctl_handle_opaque() will still wire buffers larger than a single
page, however). As a result, user buffers are no longer wired as often.
However, many sysctl handlers still wire user buffers, so it is still
desirable to serialize userland sysctl requests. Kernel sysctl requests
are allowed to run in parallel, however.
- Expose sysctl_lock()/sysctl_unlock() routines to exclusively lock the
sysctl tree for a few places outside of kern_sysctl.c that manipulate
the sysctl tree directly including the kernel linker and vfs_register().
- sysctl_register() and sysctl_unregister() require the caller to lock
the sysctl lock using sysctl_lock() and sysctl_unlock(). The rest of
the public sysctl API manage the locking internally.
- Add a locked variant of sysctl_remove_oid() for internal use so that
external uses of the API do not need to be aware of locking requirements.
- The kernel linker no longer needs Giant when manipulating the sysctl
tree.
- Add a missing break to the loop in vfs_register() so that we stop looking
at the sysctl MIB once we have changed it.
rodrigc [Fri, 6 Feb 2009 07:42:21 +0000 (07:42 +0000)]
Set NFSMNT_ACREGMIN, NFSMNT_ACREGMAX, and NFSMNT_ACDIRMIN flags
in fallback_mount() function.
Add a comment to indicate that the fallback_mount() function
should eventually go away.