Commit Graph

161337 Commits

Author SHA1 Message Date
Marius Strobl
1115e138a9 Correct signedness and off-by-one issues in parameters used for DMA tag
creation.

PR:		154259
Submitted by:	Vladislav Movchan (partially)
MFC after:	3 days
2011-02-09 11:28:57 +00:00
Ulrich Spörlein
7e7f412139 Fix termcap entry typo.
MFC after:	2 weeks
2011-02-09 10:06:31 +00:00
Konstantin Belousov
a7bc470a84 Use sigsetjmp/siglongjmp with disabled signal mask access for
lock upgrade in rtld. There is no need to care about the mask,
which causes a lot of unneeded sigprocmask(2) calls during each
symbol lookup.
2011-02-09 09:20:27 +00:00
Hans Petter Selasky
8833442863 Minor cleanup:
- use device_printf() instead of printf() to give more accurate warnings.
 - use memcpy() instead of bcopy().
 - add missing #if's for non-FreeBSD compilation.

Approved by:	thompsa (mentor)
2011-02-09 08:01:45 +00:00
Pawel Jakub Dawidek
493812ee6e When we decide to unlink socket file, sun_path must be set. If it is set,
but there is problem unlinking the file, log a warning.

MFC after:	1 week
2011-02-09 08:01:10 +00:00
Sergey A. Osokin
b24cc00190 Always convert Paskha day from Julian (old) to Gregorian (new) style by
adding 13 days.  Bug introduced in 1.13 revision.
2011-02-09 06:38:32 +00:00
Sergey A. Osokin
2aa2451972 Fix Paskha and Paskha-specific holidays. 2011-02-09 05:30:38 +00:00
Jilles Tjoelker
f01be3fe53 sh: Add tests for new features in arithmetic. 2011-02-08 23:23:55 +00:00
Marius Strobl
42b9a96080 Set td_kstack_pages for thread0. 2011-02-08 23:21:35 +00:00
Jilles Tjoelker
075b72ef01 sh(1): Update description of arithmetic. 2011-02-08 23:19:40 +00:00
Jilles Tjoelker
6262b84eee sh: Import arithmetic expression code from dash.
New features:
* proper lazy evaluation of || and &&
* ?: ternary operator
* executable is considerably smaller (8K on i386) because lex and yacc are
  no longer used

Differences from dash:
* arith_t instead of intmax_t
* imaxdiv() not used
* unset or null variables default to 0
* let/exp builtin (undocumented, will probably be removed later)

Obtained from:	dash
2011-02-08 23:18:06 +00:00
Pawel Jakub Dawidek
0d8d37212b Explicitly include <sys/types.h> as suggested by getpid(2) and don't rely on
<sys/un.h> including what's needed.

MFC after:	1 week
2011-02-08 23:16:19 +00:00
Pawel Jakub Dawidek
f431ab182a Unlink UNIX domain socket file only if:
1. The descriptor is the one we are listening on (not the one when we connect
   as a client and not the one which is created on accept(2)).
2. Descriptor was created by us (PID matches with the PID stored on bind(2)).

Reported by:	Mikolaj Golub <to.my.trociny@gmail.com>
MFC after:	1 week
2011-02-08 23:08:20 +00:00
Marcel Moolenaar
6a9f4949fb Improve the error interrupt handler. In particular, read the
error address on a decoding error to unlatch it and to allow
us to print a better diagnostics message. This also has the
side effect of clearing the condition, which prevents an
interrupt storm.
2011-02-08 22:16:29 +00:00
Marius Strobl
a66410ec84 Take advantage of accessing the kernel TSB via ASI_ATOMIC_QUAD_LDD_PHYS
on SPARC64-V, too. Tested by: Michael Moll
2011-02-08 21:58:13 +00:00
Adrian Chadd
00fc87059c net80211 really doesn't want A_MPDU to appear on non-11n station node mbufs.
Revert back to the previous method of doing it for where a node can be
identified and it's an 11n node.

I'll have to do some further research into exactly what is being messed up
with the sequence number matching and I'll then revisit this.
2011-02-08 20:16:43 +00:00
Adrian Chadd
5e9608093f Commit some missing bits to the sample rate module to (more) correctly calculate 802.11n packet duration.
This doesn't yet take into account HT40 packet durations as the node info
(needed to know if it's a HT20 or HT40 node) isn't available everywhere
it needs to be.
2011-02-08 18:31:28 +00:00
Adrian Chadd
bd7ea37bac I missed this commit - enable 4k transaction support for the ar5416+ar9160. 2011-02-08 14:15:46 +00:00
John Baldwin
73dd6d1f8f After reading a bitmap block for i-nodes or blocks, recheck the count of
free i-nodes or blocks to handle a race where another thread might have
allocated the last i-node or block while we were waiting for the buffer.

Tested by:	dougb
2011-02-08 13:02:25 +00:00
Adrian Chadd
e0e5b8b471 There's apparently a bug with Merlin (AR9280) and later chipsets where
putting descriptors (not buffers) across a 4k page boundary can cause issues.
I've not seen it in production myself but it apparently can cause problems.

So, in preparation for addressing this workaround, (re)-expose the particular
HAL capability bit which marks whether the chipset has support for cross-4k-
boundary transactions or not.

A subsequent commit will modify the descriptor allocation to avoid allocating
descriptor entries that straddle a 4k page boundary.
2011-02-08 12:49:01 +00:00
Xin LI
f5d62d03ad Don't consider ioctl returning error as a fatal error and move on to next
disk.  When multiple devices are specified, a non-supporting ioctl will
cause diskinfo(8) to stop at the point which does not seem to be necessary.

Ok'ed by:	phk
MFC after:	1 month
2011-02-08 11:32:22 +00:00
Marcel Moolenaar
078b894c69 In arm_get_next_irq(), use the last IRQ argument in order to prevent
a hard hang due to an interrupt storm or stuck interrupt pin. We
return the next IRQ that is larger than the last one returned and
in doing so give all interrupts a fair chance of being handled.
Consequently, we're able to break into the kernel debugger in such
an event.
2011-02-08 01:49:30 +00:00
Marcel Moolenaar
292e1140d1 o Make sure to mask off timer1 interrupts. It's not necessarily
masked-off by the firmware.
o   In DELAY(). Make sure we have an inner-loop body that the compiler
    cannot eliminate. While timing does not have to be perfect, the
    loops must be there to have at least some notion of delay.

Obtained from: Juniper Networks
2011-02-08 01:43:45 +00:00
Matthew D Fleming
13434232a6 Remove the uio_yield prototype and symbol. This function has been
misnamed since it was introduced and should not be globally exposed
with this name.  The equivalent functionality is now available using
kern_yield(curthread->td_user_pri).  The function remains
undocumented.

Bump __FreeBSD_version.
2011-02-08 00:36:46 +00:00
Matthew D Fleming
e7ceb1e99b Based on discussions on the svn-src mailing list, rework r218195:
- entirely eliminate some calls to uio_yeild() as being unnecessary,
   such as in a sysctl handler.

 - move should_yield() and maybe_yield() to kern_synch.c and move the
   prototypes from sys/uio.h to sys/proc.h

 - add a slightly more generic kern_yield() that can replace the
   functionality of uio_yield().

 - replace source uses of uio_yield() with the functional equivalent,
   or in some cases do not change the thread priority when switching.

 - fix a logic inversion bug in vlrureclaim(), pointed out by bde@.

 - instead of using the per-cpu last switched ticks, use a per thread
   variable for should_yield().  With PREEMPTION, the only reasonable
   use of this is to determine if a lock has been held a long time and
   relinquish it.  Without PREEMPTION, this is essentially the same as
   the per-cpu variable.
2011-02-08 00:16:36 +00:00
David Christensen
2306fc3f4c - Added systcls for header splitting, RX/TX buffer count, interrupt
coalescing, strict RX MTU, verbose output, and shared memory debug.
- Added additional debug counters (VLAN tags and split header frames).
- Updated debug counters to 64 bit definitions.
- Updated l2fhdr bit definitions.
- Combined RX buffer sizing into a single function.
- Added buffer size and interrupt coalescing settings to adapter info
  printout.

Submitted by:	davidch
MFC after:	2 weeks
2011-02-07 23:00:24 +00:00
Nick Hibma
3b8227640a Curitel UM150 needs a quirk to stop it from detaching straight after
attach (resetting actually).

Submitted by:	Oleg Nauman
MFC after:	1 week
2011-02-07 22:37:27 +00:00
Glen Barber
252b39bfa2 Update manpage to remove CRT reference.
PR:		154441
Submitted by:	Ben Haga (bhaga of absoludicrous com)
Suggestion by:	pluknet
Approved by:	keramida (mentor)
MFC after:	3 days
2011-02-07 22:33:39 +00:00
Adrian Chadd
8f6997190b Add in some AR9280 specific board configuration options.
* The existing radio config code was for the AR5416/AR9160 and missed out
  on some of the AR9280 specific stuff. Include said stuff from ath9k.

* Refactor out the gain control settings into a new function, again pilfered
  from ath9k.

* Use the analog register RMW macro when touching analog registers.

Obtained from:	Linux ath9k
2011-02-07 22:00:31 +00:00
Adrian Chadd
1a506b1a27 Bring over some AR9280-specific v14 additions that exist in ath9k.
Obtained from:	Linux ath9k
2011-02-07 21:48:26 +00:00
Jung-uk Kim
e0e9e0d819 Fix the previous commit of pthread_getthreadid_np(3). 2011-02-07 21:31:21 +00:00
Adrian Chadd
806099d3d5 Use analog delay macro for modifying an analog register. 2011-02-07 21:30:56 +00:00
Adrian Chadd
d9a80efdc2 Add a new RMW macro for analog register writes which implements the needed
wait period between operations.
2011-02-07 21:30:13 +00:00
Jung-uk Kim
678b238c85 Introduce a non-portable function pthread_getthreadid_np(3) to retrieve
calling thread's unique integral ID, which is similar to AIX function of
the same name.  Bump __FreeBSD_version to note its introduction.

Reviewed by:	kib
2011-02-07 21:26:46 +00:00
Jaakko Heinonen
96a7586b7d - Use LINE_MAX from limits.h as the maximum line length instead of
BUFSIZ. Use LINE_MAX * 2 as the buffer size (BSIZE).
- Error out if we encounter a line longer than LINE_MAX. The previous
  behavior was to silently split long lines and produce corrupted
  output.

PR:		bin/151384
2011-02-07 18:10:18 +00:00
Jaakko Heinonen
a373cd6a6f Handle EOF when skipping lines. 2011-02-07 18:05:56 +00:00
Adrian Chadd
3118fac370 Fix typo in SIFS setup 2011-02-07 17:04:31 +00:00
Adrian Chadd
ec165c61b1 Add in a per phy error sysctl. 2011-02-07 15:09:13 +00:00
Michael Tuexen
4c97400f86 Fix bugs related to M_FLOWID:
* Store the flowid when receiving an SCTP/IPv6 packet.
* Store the flowid when receiving an SCTP packet with wrong CRC.
* Initilize flowid correctly.
* Put test code under INVARIANTS.
MFC after: 3 months.
2011-02-07 15:04:23 +00:00
Glen Barber
f6e6bb86df Minor grammar fix. s/cores'/core's/
Approved by:	keramida (mentor)
MFC after:	3 days
2011-02-07 11:20:58 +00:00
Brian Somers
f2f5156f21 Add "iface name" and "iface description" commands.
PR:		151400
Submitted by:	Aragon Gouveia - aragon at phat dot za dot net with minor fixes
MFC after:	3 weeks
2011-02-07 11:18:18 +00:00
Randall Stewart
f8140f7291 If not set (due to some error Michael is working on
fixing) set it for the net.

MFC after:	3 months
2011-02-07 08:12:24 +00:00
Randall Stewart
73403d4141 1) Track when flowid does get set.
MFC after:	3 months
2011-02-07 08:10:29 +00:00
Yoshihiro Takahashi
89dc00d201 MFi386: revision 218329
Fix linking of the kernel without device npx.
2011-02-07 07:52:53 +00:00
Yoshihiro Takahashi
c2478adab5 MFi386: revision 218327
Clear the padding when returning context to the usermode, for
  MI ucontext_t and x86 MD parts.
  Kernel allocates the structures on the stack, and not clearing
  reserved fields and paddings causes leakage.
2011-02-07 07:51:31 +00:00
Yoshihiro Takahashi
31c16d56d2 MFi386: revision 217886
Set td_kstack_pages for thread0.
2011-02-07 07:39:09 +00:00
Marcel Moolenaar
0d838e9ed0 Remove use_high from the softc and simply check the number of GPIO
pins to determine whether there's a high register set or not. This
allows platform_gpio_init() to work without duplicating the work
done in the attach method.
2011-02-07 05:36:32 +00:00
Bernd Walter
57abf9f47b unbreak mutlicast hash creation for the second time.
at91_emac hardware is *not* using ether_crc32_be algorithm!
2011-02-07 01:13:57 +00:00
Edward Tomasz Napierala
dc7a965673 Make it impossible to clear the MNT_NFS4ACLS flag on ZFS filesystem
by using "mount -uw".

Reviewed by:	pjd
MFC after:	2 weeks
2011-02-06 23:34:09 +00:00
Jilles Tjoelker
2fee45fd74 rfork_thread(3): Mark deprecated in favor of pthread_create(3). 2011-02-06 23:26:14 +00:00