]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
12 years agoClarify hw.ti.%d.dac tunable.
yongari [Mon, 14 Nov 2011 22:16:12 +0000 (22:16 +0000)]
Clarify hw.ti.%d.dac tunable.

12 years agoDocument newly introduced a loader tunable and sysctl variables.
yongari [Mon, 14 Nov 2011 21:59:49 +0000 (21:59 +0000)]
Document newly introduced a loader tunable and sysctl variables.

12 years agoOverhaul bus_dma(9) usage in driver:
yongari [Mon, 14 Nov 2011 20:38:14 +0000 (20:38 +0000)]
Overhaul bus_dma(9) usage in driver:
 - Don't use a single big DMA block for all rings. Create separate
   DMA area for each ring instead.  Currently the following DMA
   areas are created:
Event ring, standard RX ring, jumbo RX ring, RX return ring,
hardware MAC statistics and producer/consumer status area.
   For Tigon II, mini RX ring and TX ring are additionally created.
 - Added missing bus_dmamap_sync(9) in various TX/RX paths.
 - TX ring is no longer created for Tigon 1 such that it saves more
   resources on Tigon 1.
 - Data sheet is not clear about alignment requirement of each ring
   so use 32 bytes alignment for normal DMA area but use 64 bytes
   alignment for jumbo RX ring where the extended RX descriptor
   size is 64 bytes.
 - For each TX/RX buffers use separate DMA tag(e.g. the size of a
   DMA segment, total size of DMA segments etc).
 - Tigon allows separate DMA area for event producer, RX return
   producer and TX consumer which is really cool feature.  This
   means TX and RX path could be independently run in parallel.
   However ti(4) uses a single driver lock so it's meaningless
   to have separate DMA area for these producer/consumer such that
   this change creates a single status DMA area.
 - It seems Tigon has no limits on DMA address space and I also
   don't see any problem with that but old comments in driver
   indicates there could be issues on descriptors being located in
   64bit region.  Introduce a tunable, dev.ti.%d.dac, to disable
   using 64bit DMA in driver. The default is 0 which means it would
   use full 64bit DMA.  If there are DMA issues, users can disable
   it by setting the tunable to 0.
 - Do not increase watchdog timer in ti_txeof(). Previously driver
   increased the watchdog timer whenever there are queued TX frames.
 - When stat ticks is set to 0, skip processing ti_stats_update(),
   avoiding bus_dmamap_sync(9) and updating if_collisions counter.
 - MTU does not include FCS bytes, replace it with
   ETHER_VLAN_ENCAP_LEN.

With these changes, ti(4) should work on PAE environments.
Many thanks to Jay Borkenhagen for remote hardware access.

12 years ago- add my co-mentors
rm [Mon, 14 Nov 2011 20:32:39 +0000 (20:32 +0000)]
- add my co-mentors

Approved by: novel (mentor)

12 years agoTemporary revert r227009 to fix freeze on UP systems without PREEMPTION.
mav [Mon, 14 Nov 2011 19:32:05 +0000 (19:32 +0000)]
Temporary revert r227009 to fix freeze on UP systems without PREEMPTION.

Before r215687, if some withered geom or provider could not be destroyed,
g_event thread went to sleep for 0.1s before retrying. After that change
it is just restarting immediately. r227009 made orphaned (withered) provider
to not detach immediately, but only after context switch. That made loop
inside g_event thread infinite on UP systems without PREEMPTION.

To address original problem with possible dead lock addressed by r227009
we have to fix r215687 change first, that needs some time to think and test.

12 years agoExport sysctl node for various interrupt moderation parameters and
yongari [Mon, 14 Nov 2011 19:10:20 +0000 (19:10 +0000)]
Export sysctl node for various interrupt moderation parameters and
have administrators control them.  ti(4) provides a character
device to control various other features of driver via ioctls but
users had to write their own code to manipulate these parameters.
It seems some default values for these parameters are not optimal
on today's system but leave it as it was and let administrators
change them.  The following parameters could be changed:

dev.ti.%d.rx_coal_ticks
dev.ti.%d.rx_max_coal_bds
dev.ti.%d.tx_coal_ticks
dev.ti.%d.tx_max_coal_bds
dev.ti.%d.tx_buf_ratio
dev.ti.%d.stat_ticks

The interface has to be brought down and up again before a change
takes effect.

ti(4) controller supports hardware MAC counters with additional
DMA statistics.  So it's doable to export these counters via
sysctl interface.  Unfortunately, these counters are cumulative
such that driver have to either send an explicit clear command to
controller after extracting them or have to maintain internal
counters to get actual changes.  Neither look good to me so
counters were not exported via sysctl.

12 years agoAdd DTS for the Freescale P1020RDB.
marcel [Mon, 14 Nov 2011 19:06:28 +0000 (19:06 +0000)]
Add DTS for the Freescale P1020RDB.

12 years agoFinish making 'wcommitsize' an NFS client mount option.
jhb [Mon, 14 Nov 2011 18:52:07 +0000 (18:52 +0000)]
Finish making 'wcommitsize' an NFS client mount option.

Reviewed by: rmacklem
MFC after: 1 week

12 years agoAdd DTS for the Freescale P3041DS.
marcel [Mon, 14 Nov 2011 18:51:39 +0000 (18:51 +0000)]
Add DTS for the Freescale P3041DS.

12 years agoIt's bad idea to allocate large memory, 4KB, from stack.
yongari [Mon, 14 Nov 2011 18:40:04 +0000 (18:40 +0000)]
It's bad idea to allocate large memory, 4KB, from stack.
Pre-allocate the memory in device attach time. While I'm here
remove unnecessary reassignment of error variable as it was already
initialized. Also added a missing driver lock in TIIOCSETTRACE
handler.

12 years agoSync with the old NFS client: Remove an obsolete comment.
jhb [Mon, 14 Nov 2011 18:23:50 +0000 (18:23 +0000)]
Sync with the old NFS client: Remove an obsolete comment.

12 years agoRemove a few bits of FreeBSD 2.x compatibility code.
rmh [Mon, 14 Nov 2011 18:21:27 +0000 (18:21 +0000)]
Remove a few bits of FreeBSD 2.x compatibility code.

Approved by: kib (mentor)

12 years ago- Split out a kern_posix_fadvise() from the posix_fadvise() system call so
jhb [Mon, 14 Nov 2011 18:00:15 +0000 (18:00 +0000)]
- Split out a kern_posix_fadvise() from the posix_fadvise() system call so
  it can be used by in-kernel consumers.
- Make kern_posix_fallocate() public.
- Use kern_posix_fadvise() and kern_posix_fallocate() to implement the
  freebsd32 wrappers for the two system calls.

12 years agomdoc fix for r227499.
andre [Mon, 14 Nov 2011 15:57:03 +0000 (15:57 +0000)]
mdoc fix for r227499.

Reported by: brueffer

12 years agoRemove mention of ss_fltsz and ss_fltsz_local which were retired in r226447.
andre [Mon, 14 Nov 2011 15:14:42 +0000 (15:14 +0000)]
Remove mention of ss_fltsz and ss_fltsz_local which were retired in r226447.

12 years agoNote the ip_len bug fixed in r226105 in the BUGS section.
andre [Mon, 14 Nov 2011 15:10:42 +0000 (15:10 +0000)]
Note the ip_len bug fixed in r226105 in the BUGS section.

12 years agoImport upstream changesets for the output of the "zpool" command:
mm [Mon, 14 Nov 2011 08:29:49 +0000 (08:29 +0000)]
Import upstream changesets for the output of the "zpool" command:

952 separate intent logs should be obvious in 'zpool iostat' output
1337 `zpool status -D' should tell if there are no DDT entries

References:
https://www.illumos.org/issues/952
https://www.illumos.org/issues/1337

Obtained from: Illumos (issues 952, 1337; changesets 13384, 13432)
MFC after: 1 week

12 years agoConstify args to copyiniov and copyinuio.
alfred [Mon, 14 Nov 2011 07:12:10 +0000 (07:12 +0000)]
Constify args to copyiniov and copyinuio.

12 years agoSince NFSv4 byte range locking only works for regular files,
rmacklem [Mon, 14 Nov 2011 00:10:11 +0000 (00:10 +0000)]
Since NFSv4 byte range locking only works for regular files,
add a sanity check for the vnode type to the NFSv4 client.

MFC after: 2 weeks

12 years agoMove the assignment of default values for some mount options
rmacklem [Sun, 13 Nov 2011 23:09:26 +0000 (23:09 +0000)]
Move the assignment of default values for some mount options
to before the nfs_decode_args() call in the new NFS client,
so they don't overwrite the value specified on the command line.

MFC after: 2 weeks

12 years ago- new sentence should start on new line.
eadler [Sun, 13 Nov 2011 17:07:43 +0000 (17:07 +0000)]
-  new sentence should start on new line.

PR: bin/146541
Submitted by: bjk
Approved by: bjk

12 years agoHide some more macros that will break C++ when compiling in C++ mode.
theraven [Sun, 13 Nov 2011 17:07:26 +0000 (17:07 +0000)]
Hide some more macros that will break C++ when compiling in C++ mode.

Approved by: dim (mentor)

12 years ago- fix duplicate "a a" in some comments
eadler [Sun, 13 Nov 2011 17:06:33 +0000 (17:06 +0000)]
- fix duplicate "a a" in some comments

Submitted by: eadler
Approved by: simon
MFC after: 3 days

12 years ago- add "check" option to MD5 and friends to compare files against known hash.
eadler [Sun, 13 Nov 2011 16:35:47 +0000 (16:35 +0000)]
- add "check" option to MD5 and friends to compare files against known hash.

PR: bin/146541
Submitted by: eadler
Reviewed by: jhell@dataix.net
Approved by: secteam (cperciva)
Approved by: cperciva
MFC after: 3 weeks

12 years agoThe spec says that FILE must be defined in wchar.h, but it wasn't. It
theraven [Sun, 13 Nov 2011 16:18:48 +0000 (16:18 +0000)]
The spec says that FILE must be defined in wchar.h, but it wasn't.  It
is now.  Also hide some macros in C++ mode that will break C++
namespaced calls.

Approved by: dim (mentor)

12 years agoDon't copy uninitialized memory. Also simplify the comparison
tuexen [Sun, 13 Nov 2011 11:53:18 +0000 (11:53 +0000)]
Don't copy uninitialized memory. Also simplify the comparison
of interface names.

MFC after: 3 days.

12 years agoTo limit amount of the kernel memory allocated, and to optimize the
kib [Sun, 13 Nov 2011 10:28:01 +0000 (10:28 +0000)]
To limit amount of the kernel memory allocated, and to optimize the
iteration over the fdsets, kern_select() limits the length of the
fdsets copied in by the last valid file descriptor index. If any bit
is set in a mask above the limit, current implementation ignores the
filedescriptor, instead of returning EBADF.

Fix the issue by scanning the tails of fdset before entering the
select loop and returning EBADF if any bit above last valid
filedescriptor index is set. The performance impact of the additional
check is only imposed on the (somewhat) buggy applications that pass
bad file descriptors to select(2) or pselect(2).

PR: kern/155606, kern/162379
Discussed with: cognet, glebius
Tested by: andreast (powerpc, all 64/32bit ABI combinations, big-endian),
       marius (sparc64, big-endian)
MFC after:    2 weeks

12 years agoFix spelling of extract.
alfred [Sun, 13 Nov 2011 06:39:49 +0000 (06:39 +0000)]
Fix spelling of extract.

Pointed out by: gcooper

12 years agoUtilize shell's IFS instead of forking ~6 processes to
alfred [Sun, 13 Nov 2011 03:18:57 +0000 (03:18 +0000)]
Utilize shell's IFS instead of forking ~6 processes to
handle splitting input files on a '|'.  This greatly
reduces the time taken to process several databases
during the update process.

Additionally add some more debug logging.

12 years agoThe default setting, daily_accounting_compress="NO", was causing
dougb [Sun, 13 Nov 2011 03:01:58 +0000 (03:01 +0000)]
The default setting, daily_accounting_compress="NO", was causing
only 1 old file to be saved, so fix this. Problem raised in the PR,
but actually required a different solution.

While I'm here, fix a very old off-by-one error causing 1 more file
than specified in daily_accounting_save to be saved because acct.0
was not taken into account (pun intended). Change that, and use a more
thorough method of finding old files to delete. Partly just because this
is the right thing to do, but also to silently fix the extra log that
would have been left behind forever with the previous method.

PR: conf/160848
Submitted by: Andrey Zonov <andrey@zonov.org>

12 years agoReturn the correct value for the IPV6_MULTICAST_HOPS getsockopt() call.
bz [Sun, 13 Nov 2011 02:32:10 +0000 (02:32 +0000)]
Return the correct value for the IPV6_MULTICAST_HOPS getsockopt() call.

Submitted by: rpaulo
MFC after: 3 days

12 years agoRevert 227466:
gjb [Sun, 13 Nov 2011 01:47:31 +0000 (01:47 +0000)]
Revert 227466:

- mvs.4 uses nested '.Bl' tags which appears to confuse man2hwnotes.pl
for hardware note generation

- mps.4 also breaks the build, but I haven't yet identified why

12 years agoBump date.
adrian [Sat, 12 Nov 2011 23:30:57 +0000 (23:30 +0000)]
Bump date.

12 years agoFix kernel build breakage after r227475. I had forgotten kernels are
dim [Sat, 12 Nov 2011 23:17:54 +0000 (23:17 +0000)]
Fix kernel build breakage after r227475.  I had forgotten kernels are
built with -Wundef, as opposed to world.

Additionally, cdefs.h tends to not use indentation for preprocessor
directives, so remove that too.

Pointy hat to: me

12 years agoAdd documentation for the new quiet time IE options.
adrian [Sat, 12 Nov 2011 23:17:01 +0000 (23:17 +0000)]
Add documentation for the new quiet time IE options.

Submitted by: Himali Patel <himali.patel@sibridgetech.com>
Sponsored by: Sibridge Technologies

12 years agoDon't expose the wctype.h macros in C++ mode. They cause problems when
theraven [Sat, 12 Nov 2011 20:45:10 +0000 (20:45 +0000)]
Don't expose the wctype.h macros in C++ mode.  They cause problems when
people try to invoke the namespaced versions of the functions of the
same names.

Approved by: dim (mentor)

12 years agoExpose all of the C99 limits.h stuff when we're in C++11 mode (or some approximation...
theraven [Sat, 12 Nov 2011 20:25:11 +0000 (20:25 +0000)]
Expose all of the C99 limits.h stuff when we're in C++11 mode (or some approximation thereof).  C++11 finally adds long long to C++.  Now even C++ programmers are allowed to use 64-bit integers!

Approved by: dim (mentor)

12 years agoFix SIGATOMIC_M{IN,AX} on x86-64. These are meant to be the minimum values that...
theraven [Sat, 12 Nov 2011 20:16:06 +0000 (20:16 +0000)]
Fix SIGATOMIC_M{IN,AX} on x86-64.  These are meant to be the minimum values that are allowed in a sig_atomic_t, but it looks like they were just copied from the x86 versions, so these definitions violate the C and C++ specs.  Mismatch was spotted by the libc++ test suite.

Approved by: dim (mentor)

12 years agoFix build on some archs after r227464.
mav [Sat, 12 Nov 2011 20:01:30 +0000 (20:01 +0000)]
Fix build on some archs after r227464.

12 years agoExpose the unimplemented libm functions in the math.h header. This allows C++'s...
theraven [Sat, 12 Nov 2011 19:55:48 +0000 (19:55 +0000)]
Expose the unimplemented libm functions in the math.h header.  This allows C++'s <cmath> to work without the compiler complaining that the C++ versions are calling implicitly-declared functions.  You will still get a linker error when they are called.  OpenBSD 5.0 claims to fully implement the C99 <math.h> stuff, so might be worth investigating...

Reviewed by: das
Approved by: dim (mentor)

12 years agoFix buildworld breakage due after r227464.
dim [Sat, 12 Nov 2011 19:45:56 +0000 (19:45 +0000)]
Fix buildworld breakage due after r227464.

Pointy hat to: mav

12 years agoReport the amount of memory from smbios data if provided.
emaste [Sat, 12 Nov 2011 19:02:55 +0000 (19:02 +0000)]
Report the amount of memory from smbios data if provided.

This should get the correct memory size even if a 32-bit image is running
on a machine with > 4GB of memory.  This can be useful is using a 32-bit
installer on a machine which will eventually run a 64-bit image.

Reviewed by: kmoore

12 years agoDisable writing to the extension CYCPWR1 register.
adrian [Sat, 12 Nov 2011 16:47:23 +0000 (16:47 +0000)]
Disable writing to the extension CYCPWR1 register.
This seems to make ANI behave better on the AR5416/AR5418.

Sponsored by: Hobnob, Inc.

12 years agoFix the number of decimal digits used for Swiss Francs (0 -> 2). Found by the libc...
theraven [Sat, 12 Nov 2011 14:39:20 +0000 (14:39 +0000)]
Fix the number of decimal digits used for Swiss Francs (0 -> 2).  Found by the libc++ test suite.  If there is some locale test suite somewhere, it might be worth running it...

Approved by: dim (mentor)

12 years agoAdded mps(4) and mvs(4).
brueffer [Sat, 12 Nov 2011 10:30:14 +0000 (10:30 +0000)]
Added mps(4) and mvs(4).

MFC after: 3 days

12 years agoGrammar and mdoc cleanup.
brueffer [Sat, 12 Nov 2011 10:17:23 +0000 (10:17 +0000)]
Grammar and mdoc cleanup.

MFC after: 3 days

12 years agoMajor GEOM MULTIPATH class rewrite:
mav [Sat, 12 Nov 2011 09:52:27 +0000 (09:52 +0000)]
Major GEOM MULTIPATH class rewrite:
 - Improved locking and destruction process to fix crashes.
 - Improved "automatic" configuration method to make it consistent and safe
by reading metadata back from all specified paths after writing to one.
 - Added provider size check to reduce chance of ordering conflict with
other GEOM classes.
 - Added "manual" configuration method without using on-disk metadata.
 - Added "add" and "remove" commands to allow manage paths manually.
 - Failed paths are no longer dropped from geom, but only marked as FAIL
and excluded from I/O operations.
 - Automatically restore failed paths when all others paths are marked
as failed, for example, because of device-caused (not transport) errors.
 - Added "fail" and "restore" commands to manually control FAIL flag.
 - geom is now destroyed on last path disconnection.
 - Added optional Active/Active mode support. Unlike Active/Passive
mode, load evenly distributed between all working paths. If supported by
the device, it allows to significantly improve performance, utilizing
bandwidth of all paths. It is controlled by -A option during creation.
Disabled by default now.
 - Improved `status` and `list` commands output.

Sponsored by: iXsystems, inc.
MFC after: 1 month

12 years ago- This patch adds custom IOCTLs to read and write the 4 GPIO pins on the
hselasky [Sat, 12 Nov 2011 08:40:52 +0000 (08:40 +0000)]
- This patch adds custom IOCTLs to read and write the 4 GPIO pins on the
cp2103 usb-to-serial chip.
- This patch also makes the line status polling asynchronous, to reduce
the time needed to change the GPIO pins.

Submitted by: JD Louw
MFC after: 1 week

12 years agoEnable power save mode for the USB storage device driver.
hselasky [Sat, 12 Nov 2011 08:19:36 +0000 (08:19 +0000)]
Enable power save mode for the USB storage device driver.

MFC after: 1 week

12 years agoStyle change.
hselasky [Sat, 12 Nov 2011 08:16:45 +0000 (08:16 +0000)]
Style change.
- Make it easier to port the USB code to other platforms by only using
one set of memory functions for clearing and copying memory. None of
the memory copies are overlapping. This means using bcopy() is not
required.
- Fix a compile warning when USB_HAVE_BUSDMA=0
- Add missing semicolon in avr32dci.
- Update some comments.

MFC after: 1 week

12 years agoA default route learned from the RAs could be deleted manually
qingli [Fri, 11 Nov 2011 23:22:38 +0000 (23:22 +0000)]
A default route learned from the RAs could be deleted manually
after its installation. This removal may be accidental and can
prevent the default route from being installed in the future if
the associated default router has the best preference. The cause
is the lack of status update in the default router on the state
of its route installation in the kernel FIB. This patch fixes
the described problem.

Reviewed by: hrs, discussed with hrs
MFC after: 5 days

12 years agoIn r191367 the need for if_free_type() was removed and a new member
brooks [Fri, 11 Nov 2011 22:57:52 +0000 (22:57 +0000)]
In r191367 the need for if_free_type() was removed and a new member
if_alloctype was used to store the origional interface type.  Take
advantage of this change by removing all existing uses of if_free_type()
in favor of if_free().

MFC after: 1 Month

12 years ago- add a missing "be" and "in"
eadler [Fri, 11 Nov 2011 22:27:09 +0000 (22:27 +0000)]
- add a missing "be" and "in"
- fix other errors introduced when committing r226436
- add 'function' to a sentence where it makes sense

Submitted by: delphij
Submitted by: dougb
Submitted by: jhb
Approved by: dougb
Approved by: jhb

12 years ago- add support for CP-104EL-A and CP-104JU to puc
eadler [Fri, 11 Nov 2011 22:24:16 +0000 (22:24 +0000)]
- add support for CP-104EL-A and CP-104JU to puc

PR: 151365
Submitted by: Joerg Niendorf <f5d10a@internode.on.net>
Approved by: jhb

12 years agoUse __packed to prevent alignment from taking place, which otherwise may
delphij [Fri, 11 Nov 2011 20:31:48 +0000 (20:31 +0000)]
Use __packed to prevent alignment from taking place, which otherwise may
change the on-disk format in an incompatible way.  Without this change,
msdosfs created on FreeBSD/arm would not be mountable.

PR: bin/162486
Submitted by: Ian Lepore <freebsd damnhippie dyndns org>
Reported by: Mattia Rossi <mrossi at swin.edu.au>
MFC after: 3 days

12 years agoAdded myself to committers-src.dot
theraven [Fri, 11 Nov 2011 20:13:24 +0000 (20:13 +0000)]
Added myself to committers-src.dot

Approved by: dim (mentor)

12 years agoTo send a frame, controller requires a prepended TX header and
yongari [Fri, 11 Nov 2011 19:15:32 +0000 (19:15 +0000)]
To send a frame, controller requires a prepended TX header and
the length of frame should be treated as multiple of 4. Actual
frame length is set in the TX header. The TX header position
should be aligned on 4 byte boundary and actual frame start
position should be aligned on 4 byte boundary as well. This means
we need 4(TX header length) + 3(frame length fixup) additional free
space in TX buffer in addition to actual frame length.
Make sure TX handler check these additional bytes.
ae_tx_avail_size() returns actual free space in TX buffer to ease
the calculation of available TX buffer space in caller. While I'm
here, replace magic number to appropriate sizeof operator to
enhance readability.

This change should fix controller lockup issue happened under
certain conditions but it still does not fix watchdog timeout. It
seems the watchdog timeout is side-effect of TxS and TxD
mismatches. The root cause of TxD/TxD mismatch is not known yet but
it looks like silicon bug. I guess driver may have to reinitialize
controller whenever it sees TxS and TxD mismatches but leave it as
it was at this moment.

PR: kern/145918

12 years agoFix false positive EADDRINUSE that could be returned by bind, due to
trociny [Fri, 11 Nov 2011 14:09:09 +0000 (14:09 +0000)]
Fix false positive EADDRINUSE that could be returned by bind, due to
the typo made in r227207.

Reported by: kib
Tested by: kib

12 years agoReword a sentence in the HARDWARE section a little to make it more suitable
brueffer [Fri, 11 Nov 2011 12:06:09 +0000 (12:06 +0000)]
Reword a sentence in the HARDWARE section a little to make it more suitable
for automatic hardware notes generation.

MFC after: 3 days

12 years agostruct timespec32: change types of tv_sec and tv_nsec fields to signed
pluknet [Fri, 11 Nov 2011 07:17:00 +0000 (07:17 +0000)]
struct timespec32: change types of tv_sec and tv_nsec fields to signed
to match native struct timespec ABI on __LP32__.

This change is a prerequisite for upcoming futimens()/utimensat() in whose
implementations it is assumed that timespec32 can take a negative value.

MFC after: 1 week

12 years agoStyle.
kib [Fri, 11 Nov 2011 04:13:47 +0000 (04:13 +0000)]
Style.

MFC after: 1 week

12 years agoGuard against the unlikely case of the alias path containing the '%' symbols.
kib [Fri, 11 Nov 2011 04:12:58 +0000 (04:12 +0000)]
Guard against the unlikely case of the alias path containing the '%' symbols.

Reported by: arundel
MFC after: 1 week

12 years agoWeaken the part of assertions added in the r227394. Only check that the
kib [Fri, 11 Nov 2011 04:10:36 +0000 (04:10 +0000)]
Weaken the part of assertions added in the r227394. Only check that the
process state is stopped.

MFC after: 1 week

12 years agoCorrect the types of the arguments to return probes of the syscall
rstone [Fri, 11 Nov 2011 03:49:42 +0000 (03:49 +0000)]
Correct the types of the arguments to return probes of the syscall
provider.  Previously we were erroneously supplying the argument types of
the corresponding entry probe.

Reviewed by: rpaulo
MFC after: 1 week

12 years agoConverting int to wint_t leads to broekn comparison of raw char
kevlo [Fri, 11 Nov 2011 01:35:07 +0000 (01:35 +0000)]
Converting int to wint_t leads to broekn comparison of raw char
and encoded wint_t.

Spotted by: ache

12 years agoCorrect device id comments.
adrian [Fri, 11 Nov 2011 00:48:41 +0000 (00:48 +0000)]
Correct device id comments.

12 years agoRevert this previous commit for now - although this override unfortunately
adrian [Thu, 10 Nov 2011 23:16:59 +0000 (23:16 +0000)]
Revert this previous commit for now - although this override unfortunately
results in the HAL being built without HAL debugging/diagnostic support,
the module building process needs to be somehow taught to not build AR5416+
NICs if AH_SUPPORT_AR5416 isn't defined in opt_ah.h .

12 years agoRemove dead ifdef. Driver should always check raised interrupt is
yongari [Thu, 10 Nov 2011 23:14:04 +0000 (23:14 +0000)]
Remove dead ifdef.  Driver should always check raised interrupt is
for the device.

12 years agostyle.
yongari [Thu, 10 Nov 2011 22:15:11 +0000 (22:15 +0000)]
style.
No functional changes.

12 years agoOn i386, fbt probes are implemented by writing an invalid opcode over
rstone [Thu, 10 Nov 2011 22:03:35 +0000 (22:03 +0000)]
On i386, fbt probes are implemented by writing an invalid opcode over
certain instructions in a function prologue or epilogue.  DTrace has a
hook into the invalid opcode fault handler that checks whether the fault
was due to an probe and if so, runs the DTrace magic.

Upon returning from an invalid opcode fault caused by a probe, DTrace must
emulate the instruction that was replaced with the invalid opcode and then
return control to the instruction following the invalid opcode.

There were a pair of related bugs in the emulation for the leave
instruction.  The leave instruction is used to pop off a stack frame prior
to returning from a function.  The emulation for this instruction must
move the trap frame for the invalid opcode fault down the stack to the
bottom of the stack frame that is being removed, and then execute an iret.

At two points in this process, the emulation code was storing values above
the current value of the stack pointer.  This opened up a window in which
if we were two take an interrupt, the trap frame for the interrupt would
overwrite the values stored on the stack, causing the system to panic
later.

The first bug was that at one point the emulation code saves the new value
for $esp above the current stack pointer value.  The fix is to save this
value instead inside of the original trap frame.  At this point we do
not need the original trap frame so this is safe.

The second bug is that when the emulate code loads $esp from the stack, it
points part-way through the new trap frame instead of at its beginning.
The emulation code adjusts the stack pointer to the correct value
immediately afterwards, but this still leaves a one instruction window in
which an interrupt would corrupt this trap frame.  Fix this by adjusting
the stack frame value before loading it into $esp.

This fixes panics in invop_leave on i386 when using fbt return probes.

Reviewed by: rpaulo, attilio
MFC after: 1 week

12 years agoThe generated Makefile for the kernel was not running ctfconvert on
rstone [Thu, 10 Nov 2011 21:07:14 +0000 (21:07 +0000)]
The generated Makefile for the kernel was not running ctfconvert on
object files corresponding to source files that had the compile-with
option set in conf/files.  This means that any fbt probes for functions
in that object file would not have correct argument types.

The fix is to run ctfconvert on any target file that does not have the
no-obj option set in files.

PR: bin/160275
Reported by: Paul Ambrose (ambrosehua AT gmail DOT com)
MFC after: 1 week

12 years agoRevert r227403 for now. Since the cross-tools stage purposefully
dim [Thu, 10 Nov 2011 20:15:35 +0000 (20:15 +0000)]
Revert r227403 for now.  Since the cross-tools stage purposefully
doesn't have ${WORLDTMP}/usr/bin in its PATH, if you build world with
CC=clang, tblgen tools from /usr/bin will be used instead of the ones
built under ${WORLDTMP}.  This can lead to various errors, especially if
you upgrade from an older clang.

Note that building world with gcc would not experience these problems,
because it only uses the tblgen tools in the world stage, where PATH
does contain ${WORLDTMP}/usr/bin.

Pointy hat to: dim

12 years agoAdd a missing reference to AR9287.
adrian [Thu, 10 Nov 2011 17:01:34 +0000 (17:01 +0000)]
Add a missing reference to AR9287.

Sponsored by: Hobnob, Inc.

12 years agoNote that NAT instance argument can be tablearg.
glebius [Thu, 10 Nov 2011 12:05:26 +0000 (12:05 +0000)]
Note that NAT instance argument can be tablearg.

PR: misc/162265
Submitted by: Paul Procacci <pprocacci gmail.com>

12 years agoSync definitions with <sys/mtio.h> header.
pluknet [Thu, 10 Nov 2011 11:17:40 +0000 (11:17 +0000)]
Sync definitions with <sys/mtio.h> header.

12 years agoFix date of commit bit proposing (s/2010/2011/)
rm [Thu, 10 Nov 2011 08:03:31 +0000 (08:03 +0000)]
Fix date of commit bit proposing (s/2010/2011/)

Spotted by:    pluknet
Approved by:   novel (mentor)

12 years agoDocument that flock can return ENOLCK
dougb [Thu, 10 Nov 2011 06:20:18 +0000 (06:20 +0000)]
Document that flock can return ENOLCK

12 years agoAdd myself.
rm [Thu, 10 Nov 2011 06:19:18 +0000 (06:19 +0000)]
Add myself.

Approved by: novel (mentor)

12 years ago- Don't handle out-of-memory condition
kevlo [Thu, 10 Nov 2011 01:44:05 +0000 (01:44 +0000)]
- Don't handle out-of-memory condition
- Fix types of function arguments match their declaration

Reviewed by: delphij
Obtained from: NetBSD

12 years agoSince these include wlan/ath/ah headers and these can change
adrian [Wed, 9 Nov 2011 23:53:13 +0000 (23:53 +0000)]
Since these include wlan/ath/ah headers and these can change
definitions based on the state of the kernel compile environment,
ensure the opt_*.h files are available.

12 years agoUse the system-provided opt_ah.h if one is provided.
adrian [Wed, 9 Nov 2011 23:37:13 +0000 (23:37 +0000)]
Use the system-provided opt_ah.h if one is provided.

This implies that users who are building the driver do so with
KERNBUILDDIR set to the compile/CONFIG directory so the various
opt_* sources can be pulled in.

12 years agoBump this up to where it used to be.
adrian [Wed, 9 Nov 2011 23:28:47 +0000 (23:28 +0000)]
Bump this up to where it used to be.

I need to investigate this a little closer, but it seems that in noisy
environments the NF load takes longer than 5 * DELAY(10) and this is
messing up future NF calibrations. (The background: NF calibrations
begin at the value programmed in after the load has completed, so
if this is never loaded in, the NF calibrations only ever start at
the currently calibrated NF value, rather than starting at something
high (say -50.)

More investigation about the effect on 11n RX and calibration results
are needed.

Sponsored by: Hobnob, Inc.

12 years agoIntroduce a work-around for issues with the AR5416 based MAC on SMP devices.
adrian [Wed, 9 Nov 2011 22:39:44 +0000 (22:39 +0000)]
Introduce a work-around for issues with the AR5416 based MAC on SMP devices.

The AR5416 MAC (which shows up in the AR5008, AR9001, AR9002 devices) has
issues with PCI transactions on SMP machines. This work-around enforces
that register access is serialised through a (global for now) spinlock.

This should stop the hangs people have seen with the AR5416 PCI devices
on SMP hosts.

Obtained by: Linux, Atheros

12 years agoDo a dummy read to flush the interrupt ACK that we just performed,
delphij [Wed, 9 Nov 2011 21:53:49 +0000 (21:53 +0000)]
Do a dummy read to flush the interrupt ACK that we just performed,
ensuring that everything is really, truly consistent.

This fixes certain cases where one will see various:

mfi0: COMMAND 0xffffffXXXXXXXXXX TIMEOUT AFTER XX SECONDS

MFC after: 3 days
Submitted by: scottl
Ok'ed by: jhb

12 years agoCommit a missing fix - the AR_SREV_KIWI_10_OR_LATER() check.
adrian [Wed, 9 Nov 2011 21:41:18 +0000 (21:41 +0000)]
Commit a missing fix - the AR_SREV_KIWI_10_OR_LATER() check.

12 years agoRemove trailing whitespace.
ed [Wed, 9 Nov 2011 21:01:50 +0000 (21:01 +0000)]
Remove trailing whitespace.

12 years agoEven though the HAL doesn't currently support Kiwi 1.0/1.1,
adrian [Wed, 9 Nov 2011 19:09:03 +0000 (19:09 +0000)]
Even though the HAL doesn't currently support Kiwi 1.0/1.1,
be "more correct" about the Kiwi setup.

Obtained from: Atheros

12 years agoAdd definition of some USB 3.0 descriptors to libusb 1.0 and libusb 2.0.
hselasky [Wed, 9 Nov 2011 19:03:26 +0000 (19:03 +0000)]
Add definition of some USB 3.0 descriptors to libusb 1.0 and libusb 2.0.
Some header file parts of this patch were taken from a patch submitted
by Maya Erez <merez@codeaurora.org> to the LibUSB developers list.

MFC after: 1 week

12 years agoMove building of clang's tblgen tools (and required libraries) from the
dim [Wed, 9 Nov 2011 19:00:27 +0000 (19:00 +0000)]
Move building of clang's tblgen tools (and required libraries) from the
bootstrap-tools stage to the cross-tools stage.  These tools are only
needed for generating llvm/clang include files, and are not necessary
for bootstrapping the build itself.

This shaves off some build time, because the required libraries are now
just built twice (during the cross-tools and world stages), instead of
three times.

Also, if you build world using WITHOUT_CLANG= in src.conf(5), no llvm or
clang code will be compiled at all anymore.

MFC after: 1 week

12 years agoFix size of USB 3.0 descriptor field.
hselasky [Wed, 9 Nov 2011 18:48:36 +0000 (18:48 +0000)]
Fix size of USB 3.0 descriptor field.

MFC after: 3 days

12 years agoAttempt to improve formatting and content of several comments for
kib [Wed, 9 Nov 2011 18:25:50 +0000 (18:25 +0000)]
Attempt to improve formatting and content of several comments for
amd64 and i386 MD code.

Based on suggestions by: bde
MFC after: 1 week

12 years agoIf software retransmit occurs with an ath_buf marked ATH_BUF_BUSY,
adrian [Wed, 9 Nov 2011 18:24:20 +0000 (18:24 +0000)]
If software retransmit occurs with an ath_buf marked ATH_BUF_BUSY,
it's cloned and that clone is retransmitted. This means that the
ath_buf pointer squirreled away on the baw window array is suddenly
wrong and was causing all kinds of console output.

This updates the pointer in that particular BAW slot to the new
ath_buf after ensuring that:

* the new and old buffers have the same seqno;
* the current slot pointer matches the old buffer pointer.

This quietens the debugging output (again), restoring said debugging
to only signify when a broken condition has occured.

Sponsored by: Hobnob, Inc.

12 years agoFix size of USB 3.0 descriptor field.
hselasky [Wed, 9 Nov 2011 18:11:29 +0000 (18:11 +0000)]
Fix size of USB 3.0 descriptor field.

MFC after: 3 days

12 years agoFlip on processing interrupt profile events for mips24k.
adrian [Wed, 9 Nov 2011 17:38:27 +0000 (17:38 +0000)]
Flip on processing interrupt profile events for mips24k.

This is a bit hackish and should be made more generic (ie, support more than
two hard-coded performance counter+config register pairs) so it can be used
for mips74k and other chips.

All this does is process the initial interrupt event. It doesn't (yet) handle
callgraph events, so even if you route the exception/interrupt to this routine
and flip the bit on, it will hang and crash pmc unless you disable callgraph
support when you enable a sample based PMC.

12 years agoStopped process may legitimately have some threads sleeping and not
kib [Wed, 9 Nov 2011 17:25:43 +0000 (17:25 +0000)]
Stopped process may legitimately have some threads sleeping and not
suspended, if the sleep is uninterruptible.

Reported and tested by: pho
MFC after: 1 week

12 years agoLock the thread lock around block that retrieves td_wmesg. Otherwise,
kib [Wed, 9 Nov 2011 17:15:51 +0000 (17:15 +0000)]
Lock the thread lock around block that retrieves td_wmesg. Otherwise,
procfs could see a thread with assigned td_wchan but still NULL td_wmesg.

Reported and tested by: pho
MFC after: 1 week

12 years agoAssert that _PRELE() is done for the held process.
kib [Wed, 9 Nov 2011 17:13:41 +0000 (17:13 +0000)]
Assert that _PRELE() is done for the held process.

Tested by: pho
MFC after: 1 week

12 years agoImport gcc fix for -fstack-protector that produces segfaulting
fabient [Wed, 9 Nov 2011 15:59:02 +0000 (15:59 +0000)]
Import gcc fix for -fstack-protector that produces segfaulting
binaries on arm/armel.

Related gcc bug:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35965

PR: 161128
MFC after: 1 week

12 years agoAdd myself.
jpaetzel [Wed, 9 Nov 2011 15:21:48 +0000 (15:21 +0000)]
Add myself.

Approved by: kib (mentor)

12 years agoRevert some debugging printfs that crept into 223695.
jhb [Wed, 9 Nov 2011 14:37:47 +0000 (14:37 +0000)]
Revert some debugging printfs that crept into 223695.