]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
15 years ago- Do aggresive saturation on various polynomial interpolators.
ariff [Tue, 14 Jul 2009 18:53:34 +0000 (18:53 +0000)]
- Do aggresive saturation on various polynomial interpolators.
  This dramatically pushing 99.9% interpolations and quantizations
  error _below_ -180dB on 32bit dynamic range, resulting extremely
  high quality conversion.
- Use BSPLINE interpolator for filter oversampling factor greater or
  equal than 64 (log2 6).

Approved by: re (kib)

15 years agoChange xpt_scan_bus to scsi_scan_bus and xpt_scan_lun to scsi_scan_lun
emaste [Tue, 14 Jul 2009 18:44:17 +0000 (18:44 +0000)]
Change xpt_scan_bus to scsi_scan_bus and xpt_scan_lun to scsi_scan_lun
in comments and printfs to match new function names after refacoring.

Approved by: re

15 years agoFix leaks in probestart, probedone, and scsi_scan_bus. Also free
emaste [Tue, 14 Jul 2009 17:26:37 +0000 (17:26 +0000)]
Fix leaks in probestart, probedone, and scsi_scan_bus.  Also free
page_list using the matching malloc type for the allocation.

Approved by: re
Reviewed by: scottl [1]
MFC after: 1 week

[1] Original patch was against xpt_cam.c, prior to the cam refactoring.

15 years agoUpdates, mostly to add 802.11s support:
sam [Tue, 14 Jul 2009 17:11:06 +0000 (17:11 +0000)]
Updates, mostly to add 802.11s support:
o add missing Status and Reason codes
o parse/display Action frames
o parse/display Mesh data frames
o parse/display BA frames

Reviewed by: rpaulo
Approved by: re (kib)

15 years agoFix a buglet that slipped into r195654. My buildworld/buildkernel sanity
lstewart [Tue, 14 Jul 2009 11:53:21 +0000 (11:53 +0000)]
Fix a buglet that slipped into r195654. My buildworld/buildkernel sanity
check missed this because cxgb's TOM is currently commented out of the build
system.

Submitted by: Navdeep Parhar <np at FreeBSD dot org>
Approved by: re (kensmith), kensmith (mentor temporarily unavailable)

15 years agoMake mklocale work again, now that fwrite()'s return codes are different.
ed [Tue, 14 Jul 2009 09:19:33 +0000 (09:19 +0000)]
Make mklocale work again, now that fwrite()'s return codes are different.

Submitted by: Navdeep Parhar <nparhar gmail com>
Approved by: re (kib)

15 years agoAdding hardware ID for RTL810x PCIe found on HP Pavilion DV2-1022AX.
avatar [Tue, 14 Jul 2009 04:35:13 +0000 (04:35 +0000)]
Adding hardware ID for RTL810x PCIe found on HP Pavilion DV2-1022AX.

Reviewed by: yongari
Approved by: re (kib, kensmith)

15 years agoMatch PCI Express root bridge _HID directly instead of
jkim [Mon, 13 Jul 2009 21:36:31 +0000 (21:36 +0000)]
Match PCI Express root bridge _HID directly instead of
relying on _CID.

Reviewed by: jhb
Approved by: re (kib)

15 years agoFix copy-paste bug, enabling SIM PMP support, when it was not really found.
mav [Mon, 13 Jul 2009 21:21:30 +0000 (21:21 +0000)]
Fix copy-paste bug, enabling SIM PMP support, when it was not really found.

Approved by: re (implicitly)

15 years agoRevert the CISS driver to 64K i/o, the previous change was in error and
scottl [Mon, 13 Jul 2009 20:19:29 +0000 (20:19 +0000)]
Revert the CISS driver to 64K i/o, the previous change was in error and
missing a lot of needed infrastructure.

Approved by: re

15 years agoFix a few language nits.
joel [Mon, 13 Jul 2009 18:55:46 +0000 (18:55 +0000)]
Fix a few language nits.

Submitted by: Ben Kaduk <minimarmot@gmail.com>
Approved by: re (blanket)

15 years agoFix inline function declaration and prototype.
rpaulo [Mon, 13 Jul 2009 18:23:58 +0000 (18:23 +0000)]
Fix inline function declaration and prototype.

Approved by: re (kensmith)

15 years agoCorrect an error of omission in r195649 ("Add support to the virtual memory
alc [Mon, 13 Jul 2009 18:11:59 +0000 (18:11 +0000)]
Correct an error of omission in r195649 ("Add support to the virtual memory
system for configuring machine-dependent memory attributes: ...").  In
r195649, the "vm_cache_mode_t/vm_memattr_t" parameter was removed from
vm_phys_alloc_contig().

Approved by: re (kensmith)

15 years agoFix Marvel SATA controllers operation, broken by rev. 188765,
mav [Mon, 13 Jul 2009 18:01:49 +0000 (18:01 +0000)]
Fix Marvel SATA controllers operation, broken by rev. 188765,
by using uninitialized variable.

Tested by: Chris Hedley
Approved by: re (kensmith)

15 years agoMove msg{snd,recv,get,ctl} manual pages from section 3 to 2.
trasz [Mon, 13 Jul 2009 12:53:43 +0000 (12:53 +0000)]
Move msg{snd,recv,get,ctl} manual pages from section 3 to 2.

Approved by: re (kib)

15 years agoFix a race in the manipulation of the V_tcp_sack_globalholes global variable,
lstewart [Mon, 13 Jul 2009 11:59:38 +0000 (11:59 +0000)]
Fix a race in the manipulation of the V_tcp_sack_globalholes global variable,
which is currently not protected by any type of lock. When triggered, the bug
would sometimes cause a panic when the TCP activity to an affected machine
eventually slowed during a lull. The panic only occurs if INVARIANTS is compiled
into the kernel, and has laid dormant for some time as a result of INVARIANTS
being off by default except in FreeBSD-CURRENT.

Switch to atomic operations in the locations where the variable is changed.
Reads have not been updated to be protected by atomics, so there is a
possibility of accounting errors in any given calculation where the variable is
read. This is considered unlikely to occur in the wild, and will not cause
serious harm on rare occasions where it does.

Thanks to Robert Watson for debugging help.

Reported by: Kamigishi Rei <spambox at haruhiism dot net>
Tested by: Kamigishi Rei <spambox at haruhiism dot net>
Reviewed by: silby
Approved by: re (rwatson), kensmith (mentor temporarily unavailable)

15 years agoReplace struct tcpopt with a proxy toeopt struct in the TOE driver interface to
lstewart [Mon, 13 Jul 2009 11:51:02 +0000 (11:51 +0000)]
Replace struct tcpopt with a proxy toeopt struct in the TOE driver interface to
the TCP syncache. This returns struct tcpopt to being private within the TCP
implementation, thus allowing it to be modified without ABI concerns.

The patch breaks the ABI. Bump __FreeBSD_version to 800103 accordingly. The cxgb
driver is the only TOE consumer affected by this change, and needs to be
recompiled along with the kernel.

Suggested by: rwatson
Reviewed by: rwatson, kmacy
Approved by: re (kensmith), kensmith (mentor temporarily unavailable)

15 years agoRename ATA probe driver to "aprobe" to resolve name conflict with SCSI
mav [Mon, 13 Jul 2009 06:12:21 +0000 (06:12 +0000)]
Rename ATA probe driver to "aprobe" to resolve name conflict with SCSI
and fix loading cam as module.

Approved by: re (implicitly)

15 years ago1) Use our vendor domain at the pool.
dwmalone [Mon, 13 Jul 2009 05:51:33 +0000 (05:51 +0000)]
1) Use our vendor domain at the pool.
2) Point people at the pool website and encourage
   people to provide a server in the pool (as a
   courtesy to the pool guys).
3) Fix a spelling.
4) Comment out the local clock and include a link
   to documentation for use of the local clock on
   the ntp.org site.

Approved by: re (kib)

15 years agoAdd support to the virtual memory system for configuring machine-
alc [Sun, 12 Jul 2009 23:31:20 +0000 (23:31 +0000)]
Add support to the virtual memory system for configuring machine-
dependent memory attributes:

Rename vm_cache_mode_t to vm_memattr_t.  The new name reflects the
fact that there are machine-dependent memory attributes that have
nothing to do with controlling the cache's behavior.

Introduce vm_object_set_memattr() for setting the default memory
attributes that will be given to an object's pages.

Introduce and use pmap_page_{get,set}_memattr() for getting and
setting a page's machine-dependent memory attributes.  Add full
support for these functions on amd64 and i386 and stubs for them on
the other architectures.  The function pmap_page_set_memattr() is also
responsible for any other machine-dependent aspects of changing a
page's memory attributes, such as flushing the cache or updating the
direct map.  The uses include kmem_alloc_contig(), vm_page_alloc(),
and the device pager:

  kmem_alloc_contig() can now be used to allocate kernel memory with
  non-default memory attributes on amd64 and i386.

  vm_page_alloc() and the device pager will set the memory attributes
  for the real or fictitious page according to the object's default
  memory attributes.

Update the various pmap functions on amd64 and i386 that map pages to
incorporate each page's memory attributes in the mapping.

Notes: (1) Inherent to this design are safety features that prevent
the specification of inconsistent memory attributes by different
mappings on amd64 and i386.  In addition, the device pager provides a
warning when a device driver creates a fictitious page with memory
attributes that are inconsistent with the real page that the
fictitious page is an alias for. (2) Storing the machine-dependent
memory attributes for amd64 and i386 as a dedicated "int" in "struct
md_page" represents a compromise between space efficiency and the ease
of MFCing these changes to RELENG_7.

In collaboration with: jhb

Approved by: re (kib)

15 years agoadd IEEE80211_SCAN_REQ
sam [Sun, 12 Jul 2009 20:17:31 +0000 (20:17 +0000)]
add IEEE80211_SCAN_REQ

Approved by: re (blanket)

15 years agofix Jouni's email address
sam [Sun, 12 Jul 2009 19:58:52 +0000 (19:58 +0000)]
fix Jouni's email address

Approved by: re (blanket)

15 years agoThis patch adds a host route to an interface address (that is assigned
qingli [Sun, 12 Jul 2009 19:20:55 +0000 (19:20 +0000)]
This patch adds a host route to an interface address (that is assigned
to a non loopback/ppp link type) through the loopback interface. Prior
to the new L2/L3 rewrite, this host route was explicitly created when
processing the IPv6 address assignment. This loopback host route is
deleted when that IPv6 address is removed from the interface.

Reviewed by: bz, gnn
Approved by: re

15 years agoAdd calls to the experimental nfs client for the case of an "intr" mount,
rmacklem [Sun, 12 Jul 2009 17:07:35 +0000 (17:07 +0000)]
Add calls to the experimental nfs client for the case of an "intr" mount,
so that signals that aren't supposed to terminate RPCs in progress are
masked off during the RPC.

Approved by: re (kensmith), kib (mentor)

15 years agoFix the handling of dotdot in lookup for the experimental nfs client
rmacklem [Sun, 12 Jul 2009 17:02:17 +0000 (17:02 +0000)]
Fix the handling of dotdot in lookup for the experimental nfs client
in a manner analagous to the change in r195294 for the regular nfs client.

Approved by: re (kensmith), kib (mentor)

15 years agoIsochronous transfers only have 1 frame buffer, but multiple
marcel [Sun, 12 Jul 2009 16:50:32 +0000 (16:50 +0000)]
Isochronous transfers only have 1 frame buffer, but multiple
frame lengths. The frame buffer is at index 0.

Approved by: re (kensmith)
Obtained from: HPS

15 years agoMFp4:
marcel [Sun, 12 Jul 2009 16:46:43 +0000 (16:46 +0000)]
MFp4:
      USB CORE: busdma improvement

      For single segment allocations the boundary field
      of the BUSDMA tag should be zero. Currently all
      single segment allocations are less than or equal
      to 4096 bytes, so the limit does not kick in. If
      any single segment USB allocations would be greater
      than 4K, then it would be a problem.

Approved by: re (kensmith)
Obtained from: HPS

15 years agoFix fwrite() to return 0 when size or nmemb are zero.
ed [Sun, 12 Jul 2009 13:09:43 +0000 (13:09 +0000)]
Fix fwrite() to return 0 when size or nmemb are zero.

Right now nmemb is returned when size is 0. In newer versions of the
standards, it is explicitly required that fwrite() should return 0.

Submitted by: Christoph Mallon
Approved by: re (kib)

15 years agoTest suite for the poll(2)/select(2) on fifos, pipes and sockets,
kib [Sun, 12 Jul 2009 12:50:43 +0000 (12:50 +0000)]
Test suite for the poll(2)/select(2) on fifos, pipes and sockets,
and recorded results for several operating systems.

Submitted by: bde
Approved by: re (kensmith)

15 years agoWhen VM_MAP_WIRE_HOLESOK is not specified and vm_map_wire(9) encounters
kib [Sun, 12 Jul 2009 12:37:38 +0000 (12:37 +0000)]
When VM_MAP_WIRE_HOLESOK is not specified and vm_map_wire(9) encounters
non-readable and non-executable map entry, the entry is skipped from
wiring and loop is aborted. But, since MAP_ENTRY_WIRE_SKIPPED was not
set for the map entry, its wired_count is later erronously decremented.
vm_map_delete(9) for such map entry stuck in "vmmaps".

Properly set MAP_ENTRY_WIRE_SKIPPED when aborting the loop.

Reported by: John Marshall <john.marshall riverwillow com au>
Approved by: re (kensmith)

15 years agoPad the following TCP related structs to allow MFCs of upcoming features/fixes
lstewart [Sun, 12 Jul 2009 09:14:28 +0000 (09:14 +0000)]
Pad the following TCP related structs to allow MFCs of upcoming features/fixes
back to the 8 branch:

tcp_var.h
- struct sackhint
- struct tcpcb
- struct tcpstat

The patch breaks the ABI. Bump __FreeBSD_version to 800102 accordingly. User
space tools that rely on the size of any of these structs (e.g. sockstat) need
to be recompiled.

Reviewed by: rpaulo, sam, andre, rwatson
Approved by: re & mentor (gnn)

15 years agoRename option USBVERBOSE to USB_VERBOSE for 2 reasons:
marcel [Sun, 12 Jul 2009 04:48:47 +0000 (04:48 +0000)]
Rename option USBVERBOSE to USB_VERBOSE for 2 reasons:
1.  USB_VERBOSE is more consistent with USB_DEBUG,
2.  sys/dev/usb/usb_device.c uses option USB_VERBOSE and
    not USBVERBOSE.

POLA with the USBVERBOSE option as it's found in 7-STABLE
has been considered but found insignificant in the face
of the USB stack overhaul.

Approved by: re (kensmith)

15 years agoIncrease the size of the page table on 64-bit PowerPC machines as a
nwhitehorn [Sun, 12 Jul 2009 04:07:52 +0000 (04:07 +0000)]
Increase the size of the page table on 64-bit PowerPC machines as a
bandaid to prevent exhaustion of the primary and secondary hash groups
in the event of extreme stress on the PMAP layer (e.g. a forkbomb). This
wastes memory, and should be revised to properly handle PTEG spills instead.

Suggested by: grehan
Approved by: re (kensmith)

15 years agoRevert rev 192323 (nfs_common.c only):
marcel [Sun, 12 Jul 2009 03:53:52 +0000 (03:53 +0000)]
Revert rev 192323 (nfs_common.c only):
The D-cache flushing added here was to deal with I-cache
incoherency observed on ia64. However, the problem was
in the implementation of pmap_enter_object() for ia64:
it was missing I-cache coherency logic for prefaulted
pages. After this got added in rev 195625, testing showed
that no D-cache flushing was required.

The SIGILL that was observed on Book-E (see commit log
for rev 192323) ended up not being related to I-cache
incoherency, but was found to be caused by bad memory.
This discovery further undermined the need for D-cache
flushing in the NFS I/O code, triggering the reversal.

Approved by: re (kensmith)

15 years agofirst cut at documenting ioctl api's for net80211
sam [Sun, 12 Jul 2009 03:19:25 +0000 (03:19 +0000)]
first cut at documenting ioctl api's for net80211
(replaces mostly incorrect information)

Approved by: re (blanket)

15 years agoIn nvpair_native_embedded_array(), meaningless pointers are zeroed.
marcel [Sat, 11 Jul 2009 22:43:20 +0000 (22:43 +0000)]
In nvpair_native_embedded_array(), meaningless pointers are zeroed.
The programmer was aware that alignment was not guaranteed in the
packed structure and used bzero() to NULL out the pointers.
However, on ia64, the compiler is quite agressive in finding ILP
and calls to bzero() are often replaced by simple assignments (i.e.
stores). Especially when the width or size in question corresponds
with a store instruction (i.e. st1, st2, st4 or st8).

The problem here is not a compiler bug. The address of the memory
to zero-out was given by '&packed->nvl_priv' and given the type of
the 'packed' pointer the compiler could assume proper alignment for
the replacement of bzero() with an 8-byte wide store to be valid.
The problem is with the programmer. The programmer knew that the
address did not have the alignment guarantees needed for a regular
assignment, but failed to inform the compiler of that fact. In
fact, the programmer told the compiler the opposite: alignment is
guaranteed.

The fix is to avoid using a pointer of type "nvlist_t *" and
instead use a "char *" pointer as the basis for calculating the
address. This tells the compiler that only 1-byte alignment can
be assumed and the compiler will either keep the bzero() call
or instead replace it with a sequence of byte-wise stores. Both
are valid.

Approved by: re (kib)

15 years agoRemove build timestamps from the following files:
cperciva [Sat, 11 Jul 2009 22:30:37 +0000 (22:30 +0000)]
Remove build timestamps from the following files:
/boot/kernel/hptrr.ko
/etc/mail/*.cf
/lib/libcrypto.so.5
/usr/bin/ntpq
/usr/sbin/amd
/usr/sbin/iasl
/usr/sbin/ntpd
/usr/sbin/ntpdate
/usr/sbin/ntpdc

There does not appear to be any purpose to having these timestamps, and
they have the irritating consequence that the aforementioned files will
be different every time they are rebuilt.

After this commit, the only remaining build timestamps are in the kernel,
the boot loaders, /usr/include/osreldate.h (the year in the copyright
notice), and lib*.a (the timestamps on all of the included .o files).

Reviewed by: scottl (hptrr), gshapiro (sendmail), simon (openssl),
roberto (ntp), jkim (acpica)
Approved by: re (kib)

15 years agoOn exec(2), when loading the ELF image, pmap_enter_object() is
marcel [Sat, 11 Jul 2009 22:27:20 +0000 (22:27 +0000)]
On exec(2), when loading the ELF image, pmap_enter_object() is
called to prefault pages. This is an obvious place for making
sure the I-cache is coherent. It was missing though. As such,
execution over NFS and ZFS file systems was failing. NFS was
fixed the wrong way (by flushing the D-cache as part of the
NFS code) in a previous commit. ZFS problems were encountered
after that and indicated that something else was wrong...

Approved by: re (kib)

15 years agoRe-factoring for adding weighted routes introduced a
kmacy [Sat, 11 Jul 2009 21:56:23 +0000 (21:56 +0000)]
Re-factoring for adding weighted routes introduced a
fairly irritating bug where the system will panic
when RADIX_MPATH is enabled. This change fixes this.

Approved by: re@

15 years agoFix typo: kproc_resume,.9 -> kproc_resume.9.
cperciva [Sat, 11 Jul 2009 17:36:59 +0000 (17:36 +0000)]
Fix typo: kproc_resume,.9 -> kproc_resume.9.

Approved by: re (kib)

15 years agoFix .Dd value -- our mdoc macros don't know how to parse the $Mdocdate$
cperciva [Sat, 11 Jul 2009 17:35:55 +0000 (17:35 +0000)]
Fix .Dd value -- our mdoc macros don't know how to parse the $Mdocdate$
tag, so the file was being treated as having no date (i.e., the current
date was being inserted).

Approved by: re (kib)

15 years agoFix something bogus deletion that got it during mesh commit.
rpaulo [Sat, 11 Jul 2009 16:02:06 +0000 (16:02 +0000)]
Fix something bogus deletion that got it during mesh commit.

Approved by: re (implicit)

15 years agoDocument the new multichannel support.
joel [Sat, 11 Jul 2009 15:25:13 +0000 (15:25 +0000)]
Document the new multichannel support.

Reviewed by: ariff
Approved by: re (blanket)

15 years agoImplementation of the upcoming Wireless Mesh standard, 802.11s, on the
rpaulo [Sat, 11 Jul 2009 15:02:45 +0000 (15:02 +0000)]
Implementation of the upcoming Wireless Mesh standard, 802.11s, on the
net80211 wireless stack. This work is based on the March 2009 D3.0 draft
standard. This standard is expected to become final next year.
This includes two main net80211 modules, ieee80211_mesh.c
which deals with peer link management, link metric calculation,
routing table control and mesh configuration and ieee80211_hwmp.c
which deals with the actually routing process on the mesh network.
HWMP is the mandatory routing protocol on by the mesh standard, but
others, such as RA-OLSR, can be implemented.

Authentication and encryption are not implemented.

There are several scripts under tools/tools/net80211/scripts that can be
used to test different mesh network topologies and they also teach you
how to setup a mesh vap (for the impatient: ifconfig wlan0 create
wlandev ... wlanmode mesh).

A new build option is available: IEEE80211_SUPPORT_MESH and it's enabled
by default on GENERIC kernels for i386, amd64, sparc64 and pc98.

Drivers that support mesh networks right now are: ath, ral and mwl.

More information at: http://wiki.freebsd.org/WifiMesh

Please note that this work is experimental. Also, please note that
bridging a mesh vap with another network interface is not yet supported.

Many thanks to the FreeBSD Foundation for sponsoring this project and to
Sam Leffler for his support.
Also, I would like to thank Gateworks Corporation for sending me a
Cambria board which was used during the development of this project.

Reviewed by: sam
Approved by: re (kensmith)
Obtained from: projects/mesh11s

15 years agoGet correct maxio from the controller and drop the tunable.
jkim [Sat, 11 Jul 2009 08:10:18 +0000 (08:10 +0000)]
Get correct maxio from the controller and drop the tunable.
The default (64K) is too pessimistic for "new comm" hardware.
Also, this is bad because multiple controllers get limited by
the global tunable.

Reviewed by: scottl
Approved by: re (kensmith)

15 years agoUpdate to tcsh 6.17.00.
mp [Sat, 11 Jul 2009 05:35:08 +0000 (05:35 +0000)]
Update to tcsh 6.17.00.

Approved by: re (kensmith)

15 years agoImport of tcsh-6.17.00
mp [Fri, 10 Jul 2009 21:47:20 +0000 (21:47 +0000)]
Import of tcsh-6.17.00

15 years agoFlatten vendor/tcsh/dist.
mp [Fri, 10 Jul 2009 21:00:38 +0000 (21:00 +0000)]
Flatten vendor/tcsh/dist.

15 years agoFix alignment issue with ATA IDENTIFY structure.
scottl [Fri, 10 Jul 2009 17:42:53 +0000 (17:42 +0000)]
Fix alignment issue with ATA IDENTIFY structure.

Approved by: re

15 years agoFor ic_opmode switch cases, provide a default label with a printf saying
rpaulo [Fri, 10 Jul 2009 15:28:33 +0000 (15:28 +0000)]
For ic_opmode switch cases, provide a default label with a printf saying
this opmode is not supported.

Approved by: re (kib)

15 years agomark struct ieee80211req_maclist packed so sizeof works as intended on arm;
sam [Fri, 10 Jul 2009 15:26:33 +0000 (15:26 +0000)]
mark struct ieee80211req_maclist packed so sizeof works as intended on arm;
fixes "list mac"

Approved by: re (kensmith)

15 years agoSync the libusb 1.0 exported api to the latest GSoC code.
thompsa [Fri, 10 Jul 2009 14:15:53 +0000 (14:15 +0000)]
Sync the libusb 1.0 exported api to the latest GSoC code.

 - Fix possible uninitialised variables and null derefs
 - Support big transfers
 - Various bug fixes and style changes

Submitted by: Sylvestre Gallon
Sponsored by: Google Summer of Code 2009
Approved by: re (kib)

15 years agoWhen amd64 CPU cannot load segment descriptor during trap return to
kib [Fri, 10 Jul 2009 10:29:16 +0000 (10:29 +0000)]
When amd64 CPU cannot load segment descriptor during trap return to
usermode, it generates GPF, that is mirrored to user mode as SIGSEGV.
The offending register in mcontext should contain the value loading of
which generated the GPF, and it is so on i386. On amd64, we currently
report segment descriptor in tf_err, while segment register contains the
corrected value loaded by trap handler.

Fix the issue by behaving like i386, reloading segment register in trap
frame after signal frame is pushed onto user stack.

Noted and tested by: pho
Approved by: re (kensmith)

15 years agoSeparate the parallel scsi knowledge out of the core of the XPT, and
scottl [Fri, 10 Jul 2009 08:18:08 +0000 (08:18 +0000)]
Separate the parallel scsi knowledge out of the core of the XPT, and
modularize it so that new transports can be created.

Add a transport for SATA

Add a periph+protocol layer for ATA

Add a driver for AHCI-compliant hardware.

Add a maxio field to CAM so that drivers can advertise their max
I/O capability.  Modify various drivers so that they are insulated
from the value of MAXPHYS.

The new ATA/SATA code supports AHCI-compliant hardware, and will override
the classic ATA driver if it is loaded as a module at boot time or compiled
into the kernel.  The stack now support NCQ (tagged queueing) for increased
performance on modern SATA drives.  It also supports port multipliers.

ATA drives are accessed via 'ada' device nodes.  ATAPI drives are
accessed via 'cd' device nodes.  They can all be enumerated and manipulated
via camcontrol, just like SCSI drives.  SCSI commands are not translated to
their ATA equivalents; ATA native commands are used throughout the entire
stack, including camcontrol.  See the camcontrol manpage for further
details.  Testing this code may require that you update your fstab, and
possibly modify your BIOS to enable AHCI functionality, if available.

This code is very experimental at the moment.  The userland ABI/API has
changed, so applications will need to be recompiled.  It may change
further in the near future.  The 'ada' device name may also change as
more infrastructure is completed in this project.  The goal is to
eventually put all CAM busses and devices until newbus, allowing for
interesting topology and management options.

Few functional changes will be seen with existing SCSI/SAS/FC drivers,
though the userland ABI has still changed.  In the future, transports
specific modules for SAS and FC may appear in order to better support
the topologies and capabilities of these technologies.

The modularization of CAM and the addition of the ATA/SATA modules is
meant to break CAM out of the mold of being specific to SCSI, letting it
grow to be a framework for arbitrary transports and protocols.  It also
allows drivers to be written to support discrete hardware without
jeopardizing the stability of non-related hardware.  While only an AHCI
driver is provided now, a Silicon Image driver is also in the works.
Drivers for ICH1-4, ICH5-6, PIIX, classic IDE, and any other hardware
is possible and encouraged.  Help with new transports is also encouraged.

Submitted by: scottl, mav
Approved by: re

15 years agocorrectly set the tailq ptr when removing the last item in the q
sam [Fri, 10 Jul 2009 02:19:57 +0000 (02:19 +0000)]
correctly set the tailq ptr when removing the last item in the q

Approved by: re (kensmith)

15 years agoRearrange shift operation to increase interpolation accuracy,
ariff [Thu, 9 Jul 2009 22:21:18 +0000 (22:21 +0000)]
Rearrange shift operation to increase interpolation accuracy,
further reducing conversion artifacts and better worst case SNR.

Approved by: re (kib)

15 years agoThe mutex_owned() macro should operate on kmutex_t and not on mutex_t.
pjd [Thu, 9 Jul 2009 20:22:05 +0000 (20:22 +0000)]
The mutex_owned() macro should operate on kmutex_t and not on mutex_t.
This fixes 'zdb <poolname>' crash.

Reported by: avg
Approved by: re (kib)

15 years agoFix cxgb(4) panic with jumbo frames.
np [Thu, 9 Jul 2009 19:27:58 +0000 (19:27 +0000)]
Fix cxgb(4) panic with jumbo frames.

Reviewed by: kmacy
Approved by: re (kib), gnn (mentor)

15 years agoSince the nfscl_getclose() function both decremented open counts and,
rmacklem [Thu, 9 Jul 2009 19:00:29 +0000 (19:00 +0000)]
Since the nfscl_getclose() function both decremented open counts and,
optionally, created a separate list of NFSv4 opens to be closed, it
was possible for the associated OpenOwner to be free'd before the Open
was closed. The problem was that the Open was taken off the OpenOwner
list before the Close RPC was done and OpenOwners can be free'd once the
list is empty. This patch separates out the case of doing the Close RPC
into a separate function called nfscl_doclose() and simplifies nfsrpc_doclose()
so that it closes a single open instead of a list of them. This avoids
removing the Open from the OpenOwner list before doing the Close RPC.

Approved by: re (kensmith), kib (mentor)

15 years agoThe control terminal revocation at the session leader exit does not
kib [Thu, 9 Jul 2009 18:54:38 +0000 (18:54 +0000)]
The control terminal revocation at the session leader exit does not
correctly checks for reclaimed vnode, possibly calling VOP_REVOKE for
such vnode. If the terminal is already revoked, or devfs mount was
forcibly unmounted, the revocation of doomed ctty vnode causes panic.

Reported and tested by: lstewart
Approved by: re (kensmith)
MFC after: 2 weeks

15 years agoExtend the cn_flags field of the struct componentname to 64 bits to have
kib [Thu, 9 Jul 2009 18:49:26 +0000 (18:49 +0000)]
Extend the cn_flags field of the struct componentname to 64 bits to have
more space for the flags, that is too close to be exhausted. While changing
the KBI for name(9), use unsigned int for symlinks count.

Suggested by: rwatson
Approved by: re (kensmith)

15 years agoAdjust the description of hw.snd.feeder_rate_polyphase_max and
joel [Thu, 9 Jul 2009 16:59:29 +0000 (16:59 +0000)]
Adjust the description of hw.snd.feeder_rate_polyphase_max and
hw.snd.compat_linux_mmap a bit.

Submitted by: ariff
Approved by: re (blanket)

15 years agoAdd manual page links to advertise procstat(1) a little better.
trasz [Thu, 9 Jul 2009 16:40:00 +0000 (16:40 +0000)]
Add manual page links to advertise procstat(1) a little better.

Approved by: re (kib)

15 years agoAdd support for Radeon HD 4770 (RV740) chips.
rnoland [Thu, 9 Jul 2009 16:39:28 +0000 (16:39 +0000)]
Add support for Radeon HD 4770 (RV740) chips.

Approved by: re@ (kib)
MFC after: 3 days

15 years agoRestore the segment registers and segment base MSRs for amd64 syscall
kib [Thu, 9 Jul 2009 09:34:11 +0000 (09:34 +0000)]
Restore the segment registers and segment base MSRs for amd64 syscall
return path only when neither thread was context switched while
executing syscall code nor syscall explicitely modified LDT or MSRs.

Save segment registers in trap handlers before interrupts are enabled,
to not allow context switches to happen before registers are saved.
Use separated byte in pcb for indication of fast/full return, since
pcb_flags are not synchronized with context switches.

The change puts back syscall microbenchmark numbers that were slowed
down after commit of the support for LDT on amd64.

Reviewed by: jeff
Tested (and tested, and tested ...) by: pho
Approved by: re (kensmith)

15 years agoMake xl(4) build with Tx checksum offload.
yongari [Thu, 9 Jul 2009 01:58:59 +0000 (01:58 +0000)]
Make xl(4) build with Tx checksum offload.

PR: kern/136409
Approved by: re (kib)

15 years agoRemove crcopy call from seteuid now that it calls crcopysafe.
jamie [Wed, 8 Jul 2009 21:45:48 +0000 (21:45 +0000)]
Remove crcopy call from seteuid now that it calls crcopysafe.

Reviewed by: brooks
Approved by: re (kib), bz (mentor)

15 years agoRegen the freebsd32 parts.
trasz [Wed, 8 Jul 2009 16:30:34 +0000 (16:30 +0000)]
Regen the freebsd32 parts.

Approved by: re (kib)

15 years agoFix freebsd32 version of lpathconf(2).
trasz [Wed, 8 Jul 2009 16:26:43 +0000 (16:26 +0000)]
Fix freebsd32 version of lpathconf(2).

Approved by: re (kib)

15 years agoGive a more expected behavior to -[hns] options, defaulting to all
jamie [Wed, 8 Jul 2009 15:57:22 +0000 (15:57 +0000)]
Give a more expected behavior to -[hns] options, defaulting to all
parameters instead of ignoring the options and giving the old-style
default output.

Approved by: re (kib), bz (mentor)

15 years agoFix a typo in the examples.
jamie [Wed, 8 Jul 2009 15:46:29 +0000 (15:46 +0000)]
Fix a typo in the examples.

Approved by: re (kib), bz (mentor)

15 years agoRegenerate after lpathconf(2) addition.
trasz [Wed, 8 Jul 2009 15:25:27 +0000 (15:25 +0000)]
Regenerate after lpathconf(2) addition.

Approved by: re (kib)

15 years agoThere is an optimization in chmod(1), that makes it not to call chmod(2)
trasz [Wed, 8 Jul 2009 15:23:18 +0000 (15:23 +0000)]
There is an optimization in chmod(1), that makes it not to call chmod(2)
if the new file mode is the same as it was before; however, this
optimization must be disabled for filesystems that support NFSv4 ACLs.
Chmod uses pathconf(2) to determine whether this is the case - however,
pathconf(2) always follows symbolic links, while the 'chmod -h' doesn't.

This change adds lpathconf(3) to make it possible to solve that problem
in a clean way.

Reviewed by: rwatson (earlier version)
Approved by: re (kib)

15 years agoFix regressions in return events of poll() on TTYs.
ed [Wed, 8 Jul 2009 10:21:52 +0000 (10:21 +0000)]
Fix regressions in return events of poll() on TTYs.

As pointed out, POLLHUP should be generated, even if it hasn't been
specified on input. It is also not allowed to return both POLLOUT and
POLLHUP at the same time.

Reported by: jilles
Approved by: re (kib)

15 years agoFix some uninitialise variables.
brian [Wed, 8 Jul 2009 10:16:16 +0000 (10:16 +0000)]
Fix some uninitialise variables.

PR: 136383
Submitted by: Ulrich Spoerlein - uqs at spoerlein dot net
Approved by: re (kib)
MFC after: 3 weeks

15 years agoAdd support for using a livefs from a USB disk.
cperciva [Wed, 8 Jul 2009 06:07:51 +0000 (06:07 +0000)]
Add support for using a livefs from a USB disk.

Submitted by: randi
Approved by: re (kensmith)

15 years agoRefactor code from installFixitCDROM into a new function, fixit_livefs_common.
cperciva [Wed, 8 Jul 2009 06:07:23 +0000 (06:07 +0000)]
Refactor code from installFixitCDROM into a new function, fixit_livefs_common.
While doing so, improve style and reword some comments.

This should not result in any functional changes, but the fixit_livefs_common
function will be used by future code.

Submitted by: randi
Approved by: re (kensmith)

15 years agoFix kernel panic, when ataahci driver is used on system with increased
mav [Wed, 8 Jul 2009 06:00:21 +0000 (06:00 +0000)]
Fix kernel panic, when ataahci driver is used on system with increased
MAXPHYS. Current ataahci driver memory allocation scheme includes only
64 items in DMA S/G table, and so not guarantied to support transactions
with more then 252K data.

Approved by:    re (kensmith)
MFC after:      2 weeks

15 years agoRevert revisions 188839 and 188868. Use of the ioctl in geom_dev.c
marcel [Wed, 8 Jul 2009 05:56:14 +0000 (05:56 +0000)]
Revert revisions 188839 and 188868. Use of the ioctl in geom_dev.c
is invalid because the ioctl happens without prior open. The ioctl
got introduced to provide backward compatibility for extended
partitions, but it ended up not being used because it didn't work
as expected. Since there are no consumers of the ioctl and the
implementation is broken, the best fix is to remove the code
entirely.

Spotted by: phk
Approved by: re (kensmith)

15 years agoIncrease HZ_VM from 10 to 100. While 10 hz saves cpu time
silby [Wed, 8 Jul 2009 01:09:12 +0000 (01:09 +0000)]
Increase HZ_VM from 10 to 100.  While 10 hz saves cpu time
under VM environments, it's too slow for FreeBSD to work
properly.  For example, ping at 10hz pings about every 600ms
instead of about every second.

Approved by: re (kib)

15 years agoFix ar5416 and later parts on big-endian platforms: setup the h/w byte
sam [Tue, 7 Jul 2009 18:11:05 +0000 (18:11 +0000)]
Fix ar5416 and later parts on big-endian platforms: setup the h/w byte
swizzler using the same technique used everywhere else.

Approved by: re (kib)

15 years agoFix two typos and sort sysctls.
joel [Tue, 7 Jul 2009 13:58:47 +0000 (13:58 +0000)]
Fix two typos and sort sysctls.

PR: docs/136408
Approved by: re (blanket)

15 years agoFix poll(2) and select(2) for named pipes to return "ready for read"
kib [Tue, 7 Jul 2009 09:43:44 +0000 (09:43 +0000)]
Fix poll(2) and select(2) for named pipes to return "ready for read"
when all writers, observed by reader, exited. Use writer generation
counter for fifo, and store the snapshot of the fifo generation in the
f_seqcount field of struct file, that is otherwise unused for fifos.
Set FreeBSD-undocumented POLLINIGNEOF flag only when file f_seqcount is
equal to fifo' fi_wgen, and revert r89376.

Fix POLLINIGNEOF for sockets and pipes, and return POLLHUP for them.
Note that the patch does not fix not returning POLLHUP for fifos.

PR: kern/94772
Submitted by: bde (original version)
Reviewed by: rwatson, jilles
Approved by: re (kensmith)
MFC after: 6 weeks (might be)

15 years agoBump for BETA1.
kensmith [Tue, 7 Jul 2009 00:02:26 +0000 (00:02 +0000)]
Bump for BETA1.

Approved by: re (implicit)

15 years agoFix AR5416 and later parts when building with AH_DEBUG or similar defined:
sam [Mon, 6 Jul 2009 20:51:54 +0000 (20:51 +0000)]
Fix AR5416 and later parts when building with AH_DEBUG or similar defined:
always define OS_REG_UNSWAPPED and use it in ath_hal_reg_{read,write}.

Approved by: re (kib)

15 years agoDocument the new EQ and VPC features along with a few loader tunables.
joel [Mon, 6 Jul 2009 19:32:13 +0000 (19:32 +0000)]
Document the new EQ and VPC features along with a few loader tunables.

Reviewed by: ariff
Approved by: re (blanket)

15 years agoWhen pmap_change_attr() changes the PAT setting on a kernel mapping, it has
alc [Mon, 6 Jul 2009 18:43:42 +0000 (18:43 +0000)]
When pmap_change_attr() changes the PAT setting on a kernel mapping, it has
to simultaneously change the PAT setting for the same pages within the
direct map region.  This may require the demotion of a 2MB page mapping and
the allocation of a page table page.  This revision gives the highest
possible priority (VM_ALLOC_INTERRUPT) to this page allocation, so that
pmap_change_attr() is less likely to fail.  (In general, kernel page table
page allocations have the highest priority, so this is not creating a new
precedent.)

(Demotion of 1GB page mappings within the direct map already specifies
VM_ALLOC_INTERRUPT to vm_page_alloc(), so only pmap_demote_pde() must be
changed.)

Approved by: re (kib)

15 years agoAfter the per-CPU IDT changes, the IDT vector of an interrupt could change
jhb [Mon, 6 Jul 2009 18:23:00 +0000 (18:23 +0000)]
After the per-CPU IDT changes, the IDT vector of an interrupt could change
when the interrupt was moved from one CPU to another.  If the interrupt was
enabled, then the old IDT vector needs to be disabled and the new IDT vector
needs to be enabled.  This was mostly masked prior to the recent MSI changes
since in the older code almost all allocated IDT vectors were already enabled
and the enabled vectors on the BSP during boot covered enough of the IDT
range.  However, after the MSI changes, MSI interrupts that were allocated
but not enabled (e.g. DRM with MSI) during boot could result in an allocated
IDT vector that wasn't enabled.  The round-robin at the end of boot could
place another interrupt at the same IDT vector without enabling the IDT
vector causing trap 30 faults.

Fix this by explicitly disabling/enabling the old and new IDT vectors for
enabled interrupt sources when moving an interrupt between CPUs via the
pic_assign_cpu() method.  While here, fix a bug in my earlier changes so
that an I/O APIC interrupt pin is left unchanged if ioapic_assign_cpu()
fails to allocate a new IDT vector and returns ENOSPC.

Approved by: re (kensmith)

15 years agoMFi386: Add a 'show idt' command to DDB to display the non-default function
jhb [Mon, 6 Jul 2009 18:10:27 +0000 (18:10 +0000)]
MFi386: Add a 'show idt' command to DDB to display the non-default function
pointers in the interrupt descriptor table.

Approved by: re (kensmith)

15 years agoThe new method of reading the mac address from the
jfv [Mon, 6 Jul 2009 17:23:48 +0000 (17:23 +0000)]
The new method of reading the mac address from the
RAR(0) register does not work on this old adapter,
provide a local routine that does it the older way.

Approved by:  re

15 years ago- pkg_install is maintained by portmgr.
flz [Mon, 6 Jul 2009 11:46:18 +0000 (11:46 +0000)]
- pkg_install is maintained by portmgr.
- BSD.x11{,-4}.dist aren't used anymore and BSD.local.dist now lives
in ports/Templates/. Most people apparently missed that move and still
commit to the src copy, so I'll have to remove it eventually but for
now, the MAINTAINERS line can go.

Approved by: re (kib)

15 years agoIn the current code, rdlock_count is not correctly handled for some cases.
attilio [Mon, 6 Jul 2009 09:31:04 +0000 (09:31 +0000)]
In the current code, rdlock_count is not correctly handled for some cases.
The most notable is that it is not bumped in rwlock_rdlock_common() when
the hard path (__thr_rwlock_rdlock()) returns successfully.
This can lead to deadlocks in libthr when rwlocks recursion in read mode
happens.
Fix the interested parts by correctly handling rdlock_count.

PR: threads/136345
Reported by: rink
Tested by: rink
Reviewed by: jeff
Approved by: re (kib)
MFC: 2 weeks

15 years agoThis addresses some issues with my earlier -R fix that
kientzle [Mon, 6 Jul 2009 02:02:45 +0000 (02:02 +0000)]
This addresses some issues with my earlier -R fix that
were pointed out by Brooks Davis and Alexey Dokuchaev:
* It now tries to lookup arguments as names first, then tries
   to parse them as numbers.  In particular, this makes the
   behavior consistent with POSIX conventions when usernames
   consist entirely of digits.
* It now uses strtoul() for the numeric parsing.

Finally, I've included an update to the test harness
to exercise the new numeric cases for -R.

Approved by: re (kib)

15 years agoPAE adds another level to the i386 page table. This level is a small
alc [Sun, 5 Jul 2009 21:40:21 +0000 (21:40 +0000)]
PAE adds another level to the i386 page table.  This level is a small
4-entry table that must be located within the first 4GB of RAM.  This
requirement is met by defining an UMA zone with a custom back-end
allocator function.  This revision makes two changes to this back-end
allocator function: (1) It replaces the use of contigmalloc() with the
use of kmem_alloc_contig().  This eliminates "double accounting", i.e.,
accounting by both the UMA zone and malloc tags.  (I made the same
change for the same reason to the zones supporting jumbo frames a week
ago.) (2) It passes through the "wait" parameter, i.e., M_WAITOK,
M_ZERO, etc. to kmem_alloc_contig() rather than ignoring it.
pmap_init() calls uma_zalloc() with both M_WAITOK and M_ZERO.  At the
moment, this is harmless only because the default behavior of
contigmalloc()/kmem_alloc_contig() is to wait and because pmap_init()
doesn't really depend on the memory being zeroed.

The back-end allocator function in the Xen pmap is dead code.  I am
changing it nonetheless because I don't want to leave any "bad examples"
in the source tree for someone to copy at a later date.

Approved by: re (kib)

15 years agocatchup with action+ageq additions
sam [Sun, 5 Jul 2009 21:19:10 +0000 (21:19 +0000)]
catchup with action+ageq additions

Submitted by: "Paul B. Mahol" <onemda@gmail.com>
Approved by: re (implicit)

15 years agoadd missing bit of r195379
sam [Sun, 5 Jul 2009 20:44:50 +0000 (20:44 +0000)]
add missing bit of r195379

Approved by: re (kensmith)

15 years ago- Don't suggest opening file for writing in preparation for fexecve(2).
pjd [Sun, 5 Jul 2009 20:20:09 +0000 (20:20 +0000)]
- Don't suggest opening file for writing in preparation for fexecve(2).
- execve(2)/fexecve(2) won't return ETXTBSY if file is open for reading.

Approved by: re (kib)

15 years agoAdd ieee80211_ageq; a facility for staging packets that require
sam [Sun, 5 Jul 2009 18:17:37 +0000 (18:17 +0000)]
Add ieee80211_ageq; a facility for staging packets that require
long-term work before they can be serviced.  Packets are tagged and
assigned an age (in seconds) at the point they are added to the
queue.  If a packet is not retrieved before it's age expires it is
reclaimed.  Tagging can take two forms: a reference to an ieee80211_node
(as happens in the tx path) or an opaque token in cases where there
is no reference or the node structure is not stable (i.e. it's going
to be destroyed).

o add ic_stageq to replace the per-node wds staging queue used for
  dynamic wds
o add ieee80211_mac_hash for building ageq tokens; this computes a
  32-bit hash from an 802.11 mac address (copied from the bridge)
o while here fix a stray ';' noticed in IEEE80211_PSQ_INIT

Reviewed by: rpaulo
Approved by: re (kensmith)

15 years ago- Increase dynamic range of filter coefficients from 28bit to 30bit.
ariff [Sun, 5 Jul 2009 18:15:06 +0000 (18:15 +0000)]
- Increase dynamic range of filter coefficients from 28bit to 30bit.
  This cause dramatic effect in overall precision and conversion quality
  by pushing down most aliasing artifacts around -180 dB.

  Spectrogram analysis/comparison:

   http://people.freebsd.org/~ariff/z_comparison/z_28vs30/

- Guard against possible 64bit overflow during accumulation process by
  slightly normalize and saturate sample and coefficient multiplication,
  possible during extreme 32bit downsampling (eg. 380KHz -> 8KHz) with
  custom preset that require more than ~7000 taps filter (which is
  overkill).

- Add knobs through FEEDER_RATE_PRESETS to set dynamic range of filter
  coefficients/accumulator and prefered polynomial interpolator:

   COEFFICIENT_BIT:X
(where 1 <= X <= 30, default: 30)

ACCUMULATOR_BIT:X
(where 32 <= X <=64, default: 58)

INTERPOLATOR:I
(where I = ZOH, LINEAR, QUADRATIC, HERMITE, BSPLINE,
             OPT32X, OPT16X, OPT8X, OPT4X, OPT2X)

Approved by: re (kib)

15 years agoRevamp 802.11 action frame handling:
sam [Sun, 5 Jul 2009 17:59:19 +0000 (17:59 +0000)]
Revamp 802.11 action frame handling:
o add a new facility for components to register send+recv handlers
o ieee80211_send_action and ieee80211_recv_action now use the registered
  handlers to dispatch operations
o rev ieee80211_send_action api to enable passing arbitrary data
o rev ieee80211_recv_action api to pass the 802.11 frame header as it may
  be difficult to locate
o update existing IEEE80211_ACTION_CAT_BA and IEEE80211_ACTION_CAT_HT handling
o update mwl for api rev

Reviewed by: rpaulo
Approved by: re (kensmith)