]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
13 years agoMerge ACPICA 20110211.
Jung-uk Kim [Sat, 12 Feb 2011 01:03:15 +0000 (01:03 +0000)]
Merge ACPICA 20110211.

13 years agoRetire VFS_BIO_DEBUG. Convert those checks that were still valid into
Alan Cox [Sat, 12 Feb 2011 01:00:00 +0000 (01:00 +0000)]
Retire VFS_BIO_DEBUG.  Convert those checks that were still valid into
KASSERT()s and eliminate the rest.

Replace excessive printf()s and a panic() in bufdone_finish() with a
KASSERT() in vm_page_io_finish().

Reviewed by: kib

13 years agoFix the shared code to be consistent with Intel-internal,
Jack F Vogel [Sat, 12 Feb 2011 00:07:40 +0000 (00:07 +0000)]
Fix the shared code to be consistent with Intel-internal,
and now build.

13 years agoRestore 2 prototypes that seem to have been mistakenly removed in r218582.
Doug Barton [Fri, 11 Feb 2011 23:08:34 +0000 (23:08 +0000)]
Restore 2 prototypes that seem to have been mistakenly removed in r218582.

I've manually twiddled the whitespace for e1000_commit_fc_settings_generic
to match the others in the file.

Submitted by: dim
Tested by: me

13 years agoImport ACPICA 20110211.
Jung-uk Kim [Fri, 11 Feb 2011 22:56:14 +0000 (22:56 +0000)]
Import ACPICA 20110211.

13 years agoWith smp_topo_none, set cg_mask to all_cpus rather than setting the mp_ncpus
Juli Mallett [Fri, 11 Feb 2011 22:43:10 +0000 (22:43 +0000)]
With smp_topo_none, set cg_mask to all_cpus rather than setting the mp_ncpus
low bits.

Submitted by: Bhanu Prakash
Reviewed by: jeffr

13 years agoSomehow the RX ring depletion fix got partially removed,
Jack F Vogel [Fri, 11 Feb 2011 19:49:07 +0000 (19:49 +0000)]
Somehow the RX ring depletion fix got partially removed,
replace the missing pieces.

13 years agoRevert changes made here, they will cause a conflict
Jack F Vogel [Fri, 11 Feb 2011 19:03:00 +0000 (19:03 +0000)]
Revert changes made here, they will cause a conflict
later on with our shared code.

13 years agoInconsistencies in the updated igb shared code and the older
Jack F Vogel [Fri, 11 Feb 2011 17:18:42 +0000 (17:18 +0000)]
Inconsistencies in the updated igb shared code and the older
em/lem, breaking the build, correcting that.

13 years agoAdd release notes for xz update to 5.0.0.
Martin Matuska [Fri, 11 Feb 2011 14:55:17 +0000 (14:55 +0000)]
Add release notes for xz update to 5.0.0.

13 years agoMfp4 CH=177255:
Bjoern A. Zeeb [Fri, 11 Feb 2011 14:17:58 +0000 (14:17 +0000)]
Mfp4 CH=177255:

  Resort the CURVNET_SET* macros in the non-VNET_DEBUG case to match
  the call order of the VNET_DEBUG case.

  Add the VNET_ASSERT() to the non-VNET_DEBUG case as well so that
  INVARIANTS will still catch problems.

  Sponsored by: The FreeBSD Foundation
  Sponsored by: CK Software GmbH
  Reviewed by:  jhb

MFC after: 2 weeks

13 years ago.. how'd this compile before I commit it and then not now?
Adrian Chadd [Fri, 11 Feb 2011 14:07:27 +0000 (14:07 +0000)]
.. how'd this compile before I commit it and then not now?

Fixed.

13 years agoMfp4 CH=177255:
Bjoern A. Zeeb [Fri, 11 Feb 2011 13:27:00 +0000 (13:27 +0000)]
Mfp4 CH=177255:

  Make VNET_ASSERT() available with either VNET_DEBUG or INVARIANTS.

  Change the syntax to match KASSERT() to allow more flexible panic
  messages rather than having a printf with hardcoded arguments
  before panic.

  Adjust the few assertions we have to the new format (and enhance
  the output).

  Sponsored by: The FreeBSD Foundation
  Sponsored by: CK Software GmbH
  Reviewed by: jhb

MFC after: 2 weeks

13 years agoAdd support to write boot menu.
Yoshihiro Takahashi [Fri, 11 Feb 2011 13:18:00 +0000 (13:18 +0000)]
Add support to write boot menu.

13 years agoAdd the pc98boot image which concatenates boot0 and boot0.5.
Yoshihiro Takahashi [Fri, 11 Feb 2011 13:14:17 +0000 (13:14 +0000)]
Add the pc98boot image which concatenates boot0 and boot0.5.
It's required by the gpart to write bootcode.

13 years agoThe last parameter to ath_computedur_ht() is short-GI, not short-preamble.
Adrian Chadd [Fri, 11 Feb 2011 13:05:15 +0000 (13:05 +0000)]
The last parameter to ath_computedur_ht() is short-GI, not short-preamble.

13 years agoMfp4 CH=177255:
Bjoern A. Zeeb [Fri, 11 Feb 2011 12:56:05 +0000 (12:56 +0000)]
Mfp4 CH=177255:

  Use __func__ rather than __FUNCTION__.

MFC after: 2 weeks

13 years agoFor UIO_NOCOPY case of reading request on zfs vnode, which has vm object
Konstantin Belousov [Fri, 11 Feb 2011 10:46:15 +0000 (10:46 +0000)]
For UIO_NOCOPY case of reading request on zfs vnode, which has vm object
attached, activate the page after the successful read, and free the page
if read was unsuccessfull.

Freshly allocated page is not on any queue yet, and not activating (or
deactivating) the page leaves it on no queue, excluding the page from
pagedaemon scans and making the memory disappeared until the vnode
reclaimed.

Reviewed by: avg
MFC after: 1 week

13 years agoAfter r218530 export several functions which are no longer private to
Bjoern A. Zeeb [Fri, 11 Feb 2011 09:58:38 +0000 (09:58 +0000)]
After r218530 export several functions which are no longer private to
e1000_mac.c but part of the e1000_api.

X-MFC with: 218530 by jfv

13 years agoAdd an example Khelp module, which will be referenced in the forthcoming Khelp
Lawrence Stewart [Fri, 11 Feb 2011 07:26:17 +0000 (07:26 +0000)]
Add an example Khelp module, which will be referenced in the forthcoming Khelp
documentation.

Sponsored by: FreeBSD Foundation
Discussed with: David Hayes <dahayes at swin edu au>
MFC after: 5 weeks
X-MFC with: r216615

13 years agoGenerate MACHINE= and MACHINE_ARCH= lines based on the machine
Warner Losh [Fri, 11 Feb 2011 06:35:53 +0000 (06:35 +0000)]
Generate MACHINE= and MACHINE_ARCH= lines based on the machine
directive.  Once this is MFC'd, we can move these out of the template
files where they are (incosnsitently) defined.

MFC after: 1 week

13 years agowhitespace nit.
Warner Losh [Fri, 11 Feb 2011 05:50:28 +0000 (05:50 +0000)]
whitespace nit.

13 years agoSynthesize the change from NetBSD's 1.33:
Doug Barton [Fri, 11 Feb 2011 05:33:35 +0000 (05:33 +0000)]
Synthesize the change from NetBSD's 1.33:

"Do not crash if a date cannot be represented (localtime returning
NULL), use the Epoch value instead."

Obtained from:  njoly@NetBSD.org

13 years agoHmmm, specifying TARGET and TARGET_ARCH in the environment doesn't
Warner Losh [Fri, 11 Feb 2011 04:03:39 +0000 (04:03 +0000)]
Hmmm, specifying TARGET and TARGET_ARCH in the environment doesn't
seem to work when building xdev anymore (most likely my changes lately
moving the TARGET guessing stuff to Makefile from Makefile.inc1, but I
really don't grok why).  Fix make xdev by putting them on the command
line.  This will work either way while I try to figure it out.

13 years agoCPUTYPE is now a required define for calling Makefile.inc1 diretly, so
Warner Losh [Fri, 11 Feb 2011 02:37:47 +0000 (02:37 +0000)]
CPUTYPE is now a required define for calling Makefile.inc1 diretly, so
make sure we define it for the xdev stuff.

Move xdev stuff to be last again in this file.

# xdev-build works now, but xdev-install appears to be broken though.

13 years agoRevert last commit: CPUTYPE will be defined here
Warner Losh [Fri, 11 Feb 2011 02:34:26 +0000 (02:34 +0000)]
Revert last commit: CPUTYPE will be defined here

13 years agoDon't require CPUTYPE to be defined for ARM, but use it if it is.
Warner Losh [Fri, 11 Feb 2011 02:24:04 +0000 (02:24 +0000)]
Don't require CPUTYPE to be defined for ARM, but use it if it is.

13 years agoAdd support for the new I350 family of 1G interfaces.
Jack F Vogel [Fri, 11 Feb 2011 01:00:26 +0000 (01:00 +0000)]
Add support for the new I350 family of 1G interfaces.
    - this also includes virtualization support on these devices

Correct some vlan issues we were seeing in test, jumbo frames on vlans
did not work correctly, this was all due to confused logic around HW
filters, the new code should now work for all uses.

Important fix: when mbuf resources are depeleted, it was possible to
completely empty the RX ring, and then the RX engine would stall
forever. This is fixed by a flag being set whenever the refresh code
fails due to an mbuf shortage, also the local timer now makes sure
that all queues get an interrupt when it runs, the interrupt code
will then always call rxeof, and in that routine the first thing done
is now to check the refresh flag and call refresh_mbufs. This has been
verified to fix this type 'hang'. Similar code will follow in the other
drivers.

Finally, sync up shared code for the I350 support.

Thanks to everyone that has been reporting issues, and helping in the
debug/test process!!

13 years ago- Updated firmware which improves small packet performance.
David Christensen [Fri, 11 Feb 2011 00:41:49 +0000 (00:41 +0000)]
- Updated firmware which improves small packet performance.

MFC after: 2 weeks

13 years agoAdd 'generic' flash images. This is for projects producing generic
Warner Losh [Thu, 10 Feb 2011 23:36:39 +0000 (23:36 +0000)]
Add 'generic' flash images.  This is for projects producing generic
images that are of a certain size.  The geometery is bogus, but that
doesn't matter since the new packet mode onviates the need to get the
geometry right.

13 years ago- Added error checking to nvram read functions.
David Christensen [Thu, 10 Feb 2011 22:36:23 +0000 (22:36 +0000)]
- Added error checking to nvram read functions.
- Minor style updates.

Submitted by: gcooper@freebsd.org
MFC after: 2 weeks

13 years agoYou are now *REQUIRED* to pass both TARGET and TARGET_ARCH to any
Warner Losh [Thu, 10 Feb 2011 19:58:21 +0000 (19:58 +0000)]
You are now *REQUIRED* to pass both TARGET and TARGET_ARCH to any
invocations of Makefile.inc1 (since that's supposed to be an internal
interface for world and related targets).  Document this with a .error
message.  For a transition period, support passing in just TARGET, but
give a .warning for that case: I plan on removing it in 9.0...

13 years agoAdd LIBEXECDIR to the bsd.own.mk vars, pointing to /usr/libexec by default
Giorgos Keramidas [Thu, 10 Feb 2011 19:13:54 +0000 (19:13 +0000)]
Add LIBEXECDIR to the bsd.own.mk vars, pointing to /usr/libexec by default

Some of the patches we are preparing for porting ATF from NetBSD
refer to '/usr/libexec' several times.  Instead of repeating the
path all over the place, add ${LIBEXECDIR} to match ${LIBDATADIR}
and reduce the redundancy of the relevant makefiles.

Submitted by: Garrett Cooper <yanegomi@gmail.com>
Approved by: ru
MFC after: 1 month

13 years ago- Add a new UNIVERSE_TARGET variable for 'make universe'. If it is set,
John Baldwin [Thu, 10 Feb 2011 18:54:52 +0000 (18:54 +0000)]
- Add a new UNIVERSE_TARGET variable for 'make universe'.  If it is set,
  then that target is invoked for each architecture rather than the
  default action of building world and kernels for each architecture.
- Add a 'make toolchains' wrapper which uses UNIVERSE_TARGET to build
  toolchains for all architectures.
- Document JFLAG, MAKE_JUST_KERNELS, and MAKE_JUST_WORLDS variables for
  'make universe'.

Reviewed by: bz
MFC after: 1 week

13 years agoNetgear renamed the WG311 to the WG311v1 after they released a second
Josh Paetzel [Thu, 10 Feb 2011 15:41:32 +0000 (15:41 +0000)]
Netgear renamed the WG311 to the WG311v1 after they released a second
version of it.  There is also a WG311v3 which uses a chipset covered by
malo(4). Along the way add the WG311T to the list which is also an
atheros chipset.

PR: docs/154589
Approved by: kib (mentor)
MFC after: 3 days

13 years agoRemove addresses from endpoint when there are no associations.
Michael Tuexen [Thu, 10 Feb 2011 14:46:37 +0000 (14:46 +0000)]
Remove addresses from endpoint when there are no associations.
This fixes a bug reported by brucec@.

MFC after: 3 months.

13 years agoWrap long line.
Alexander Leidinger [Thu, 10 Feb 2011 08:06:56 +0000 (08:06 +0000)]
Wrap long line.

Noticed by: bz

13 years agoFix a bug where the wrong argument was passed to SET_FLOAT_WORD().
David Schultz [Thu, 10 Feb 2011 07:38:38 +0000 (07:38 +0000)]
Fix a bug where the wrong argument was passed to SET_FLOAT_WORD().
This bug results in a type mismatch that happens to be harmless
because of the way SET_FLOAT_WORD() works.

Submitted by: bde

13 years agoFix a bug where the wrong argument was passed to INSERT_WORDS().
David Schultz [Thu, 10 Feb 2011 07:38:13 +0000 (07:38 +0000)]
Fix a bug where the wrong argument was passed to INSERT_WORDS().
This bug results in a type mismatch that happens to be harmless
because of the way INSERT_WORDS() works.

Submitted by: bde

13 years agoFor small arguments, these functions use simple approximations,
David Schultz [Thu, 10 Feb 2011 07:37:50 +0000 (07:37 +0000)]
For small arguments, these functions use simple approximations,
e.g. cos(small) = 1, sin(small) = small.  This commit tightens
the thresholds at which the simple approximations are used.

Reviewed by: bde

13 years agoFix a bogus threshold that was copied from the double precision version.
David Schultz [Thu, 10 Feb 2011 07:37:29 +0000 (07:37 +0000)]
Fix a bogus threshold that was copied from the double precision version.
This commit should have no effect on correctness; it merely changes the
threshold at which a simpler approximation can be used.

Reviewed by: bde

13 years agoAdd tmpfs(5) to NOTES
Kevin Lo [Thu, 10 Feb 2011 05:33:40 +0000 (05:33 +0000)]
Add tmpfs(5) to NOTES

13 years agoDocument requirement that sys/types.h be included before rman.h.
Warner Losh [Thu, 10 Feb 2011 04:55:51 +0000 (04:55 +0000)]
Document requirement that sys/types.h be included before rman.h.

Submitted by: Raphael Kubo da Costa
MFC after: 2 weeks

13 years agosys/rman.h now requires sys/types.h. Include it to make the API match
Warner Losh [Thu, 10 Feb 2011 04:53:09 +0000 (04:53 +0000)]
sys/rman.h now requires sys/types.h.  Include it to make the API match
the man page again.

Submitted by: Raphael Kubo da Costa
MFC after: 2 weeks

13 years agoAs info.rti_info[RTAX_DST] can point inside of rtm we must not free the rtm
Max Laier [Thu, 10 Feb 2011 01:24:09 +0000 (01:24 +0000)]
As info.rti_info[RTAX_DST] can point inside of rtm we must not free the rtm
until rt_dispatch is done with the sockaddr.

Found by: memguard
MFC after: 3 days

13 years agoLinux' shm_open() fails because it wants to find some funky shmfs
Alexander Leidinger [Wed, 9 Feb 2011 20:23:22 +0000 (20:23 +0000)]
Linux' shm_open() fails because it wants to find some funky shmfs
to construct the full pathname. It starts to search at the default
mountpoint which is /dev/shm. If this fails it runs through fstab
and searches for shmfs and tmpfs. Whatever it finds will be
statfs()'ed to be checked for Linux' fs magic for shmfs (0x01021994).

Ideally our tmpfs should deliver this fs magic to Linux processes, but
as our tmpfs is considered to be an experimental feature we can not
assume that there is always a tmpfs available.

To make shared memory work in the Linuxulator, force the fs type of
/dev/shm (which can be a symlink) to match what Linux expects. The user
is responsible (info has to be added to the linux base ports and the docs)
to setup a suitable link for /dev/shm.

Noticed by: Andre Albsmeier <Andre.Albsmeier@siemens.com>
Submitted by: Andre Albsmeier <Andre.Albsmeier@siemens.com>
MFC after: 1 month

13 years agoUse the preload_fetch_addr() and preload_fetch_size() convenience
Marcel Moolenaar [Wed, 9 Feb 2011 19:31:10 +0000 (19:31 +0000)]
Use the preload_fetch_addr() and preload_fetch_size() convenience
functions and only create the MD device when we have a non-zero
pointer and size.

Sponsored by: Juniper Networks

13 years agoProvide convenience function for obtaining MODINFO_ADDR and MODINFO_SIZE
Marcel Moolenaar [Wed, 9 Feb 2011 19:08:21 +0000 (19:08 +0000)]
Provide convenience function for obtaining MODINFO_ADDR and MODINFO_SIZE
attributes for preloaded modules/images. In particular, MODINFO_ADDR has
the added complexity of not always being relocated properly. Rather than
kluging this in the various components that are affected, we handle it
in a centralized place (preload_fetch_addr()). To that end, expose a new
variable, preload_addr_relocate, that MD initialization code can set and
that turns the address attribute into a valid kernel VA.

Architectures that need the relocation: arm & powerpc (at least).
Components that can utilize this: acpi(4), md(4), fb(4), pci(4), ZFS, geli.

Sponsored by: Juniper Networks

13 years agoSetting VV_TEXT here is redundant. It is already set by do_execve().
Alan Cox [Wed, 9 Feb 2011 18:45:33 +0000 (18:45 +0000)]
Setting VV_TEXT here is redundant.  It is already set by do_execve().

Reviewed by: kib

13 years agoRework beacon handling re-enable run_updateslot().
Bernhard Schmidt [Wed, 9 Feb 2011 18:09:27 +0000 (18:09 +0000)]
Rework beacon handling re-enable run_updateslot().

Drivers which rely on net80211 to create the beacon need to call
ieee80211_beacon_update() on iv_update_beacon() calls. This is required
that certain bits, e.g. TIM, get updated. A call to ieee80211_beacon_alloc()
is not enough because it does not care about flags which can only change
during runtime. By design a beacon is supposed to be allocated only once
while moving into RUN state.

To handle all possible calls to iv_update_beacon() the run_updateslot()
function has been revived and run_updateprot() has been added.
run_updateslot() handles slot time changes and run_updateprot() changes
to protection, both can change while nodes associate/leave.

Submitted by: Alexander Zagrebin <alex at zagrebin.ru>,
PseudoCylon <moonlightakkiy atyahoo.ca>
MFC after: 3 weeks

13 years agoExpose the 4k transaction workaround hooks to the driver, but don't (yet)
Adrian Chadd [Wed, 9 Feb 2011 16:37:29 +0000 (16:37 +0000)]
Expose the 4k transaction workaround hooks to the driver, but don't (yet)
fix the descriptor allocation.

13 years agoAdd in the (very!) optional glue to flip the 11n bits for if_ath.
Adrian Chadd [Wed, 9 Feb 2011 15:43:38 +0000 (15:43 +0000)]
Add in the (very!) optional glue to flip the 11n bits for if_ath.

There's still a lot of random issues to sort out with the radio side of
things and AMPDU RX handling (and completely missing AMPDU TX handling!)
but if people wish to give this a go and assist in debugging the
issues, they can define ATH_DO_11N to enable it.

I'm just re-iterating - this is here to allow people to assist in
further 11n development; it is not any indication that the 11n support
is complete and functional.

Important notes:

* This doesn't support 1-stream cards yet - (eg AR9285) - the various bits
  that negotiate TX/RX MCS don't know not to try >1 stream TX or negotiate
  1-stream RX; so don't enable 11n unless you've first taught the rate
  control module and the net80211 stack to negotiate 1-stream stuff;

* The only rate control module minimally 11n aware is ath_rate_sample;

* ath_rate_sample doesn't know about HT/40; so airtime will be incorrectly
  calculated;

* The AR9160 and AR9280 radio code is unreliable at the higher MCS rates for
  some reason; this will definitely impact 11n performance;

* AMPDU-TX isn't yet implemented;

* AMPDU-RX may be a bit buggy still and will definitely suffer from the
  radio unreliability mentioned above (ie, don't expect 150/300mbit
  RX just yet.)

13 years agoAdd some FEATURE macros for some UFS features.
Alexander Leidinger [Wed, 9 Feb 2011 15:33:13 +0000 (15:33 +0000)]
Add some FEATURE macros for some UFS features.

SU+J is not included as a FEATURE macro:
 - it was not in the tree during the GSoC
 - I do not see an option to en-/disable it in NOTES

Two minor changes where made during the review compared to what was developed
during GSoC 2010.

No FreeBSD version bump, the userland application to query the features will
be committed last and can serve as an indication of the availablility if
needed.

Sponsored by: Google Summer of Code 2010
Submitted by: kibab
Reviewed by: kib
X-MFC after: to be determined in last commit with code from this project

13 years agoFix the keycache behaviour for multicast keycache search.
Adrian Chadd [Wed, 9 Feb 2011 15:23:16 +0000 (15:23 +0000)]
Fix the keycache behaviour for multicast keycache search.

The correct bit to set is 0x1 in the high MAC address byte, not 0x80.
The hardware isn't programmed with that bit (which is the multicast
adress bit.)

The linux ath9k keycache code uses that bit in the MAC as a "this is
a multicast key!" and doesn't set the AR_KEYTABLE_VALID bit.
This tells the hardware the MAC isn't to be used for unicast destination
matching but it can be used for multicast bssid traffic.

This fixes some encryption problems in station mode.

PR: kern/154598

13 years agoWhitespace tweak.
John Baldwin [Wed, 9 Feb 2011 14:37:33 +0000 (14:37 +0000)]
Whitespace tweak.

13 years agoCorrect signedness and off-by-one issues in parameters used for DMA tag
Marius Strobl [Wed, 9 Feb 2011 11:28:57 +0000 (11:28 +0000)]
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

13 years agoFix termcap entry typo.
Ulrich Spörlein [Wed, 9 Feb 2011 10:06:31 +0000 (10:06 +0000)]
Fix termcap entry typo.

MFC after: 2 weeks

13 years agoUse sigsetjmp/siglongjmp with disabled signal mask access for
Konstantin Belousov [Wed, 9 Feb 2011 09:20:27 +0000 (09:20 +0000)]
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.

13 years agoMinor cleanup:
Hans Petter Selasky [Wed, 9 Feb 2011 08:01:45 +0000 (08:01 +0000)]
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)

13 years agoWhen we decide to unlink socket file, sun_path must be set. If it is set,
Pawel Jakub Dawidek [Wed, 9 Feb 2011 08:01:10 +0000 (08:01 +0000)]
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

13 years agoAlways convert Paskha day from Julian (old) to Gregorian (new) style by
Sergey A. Osokin [Wed, 9 Feb 2011 06:38:32 +0000 (06:38 +0000)]
Always convert Paskha day from Julian (old) to Gregorian (new) style by
adding 13 days.  Bug introduced in 1.13 revision.

13 years agoFix Paskha and Paskha-specific holidays.
Sergey A. Osokin [Wed, 9 Feb 2011 05:30:38 +0000 (05:30 +0000)]
Fix Paskha and Paskha-specific holidays.

13 years agosh: Add tests for new features in arithmetic.
Jilles Tjoelker [Tue, 8 Feb 2011 23:23:55 +0000 (23:23 +0000)]
sh: Add tests for new features in arithmetic.

13 years agoSet td_kstack_pages for thread0.
Marius Strobl [Tue, 8 Feb 2011 23:21:35 +0000 (23:21 +0000)]
Set td_kstack_pages for thread0.

13 years agosh(1): Update description of arithmetic.
Jilles Tjoelker [Tue, 8 Feb 2011 23:19:40 +0000 (23:19 +0000)]
sh(1): Update description of arithmetic.

13 years agosh: Import arithmetic expression code from dash.
Jilles Tjoelker [Tue, 8 Feb 2011 23:18:06 +0000 (23:18 +0000)]
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

13 years agoExplicitly include <sys/types.h> as suggested by getpid(2) and don't rely on
Pawel Jakub Dawidek [Tue, 8 Feb 2011 23:16:19 +0000 (23:16 +0000)]
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

13 years agoUnlink UNIX domain socket file only if:
Pawel Jakub Dawidek [Tue, 8 Feb 2011 23:08:20 +0000 (23:08 +0000)]
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

13 years agoImprove the error interrupt handler. In particular, read the
Marcel Moolenaar [Tue, 8 Feb 2011 22:16:29 +0000 (22:16 +0000)]
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.

13 years agoTake advantage of accessing the kernel TSB via ASI_ATOMIC_QUAD_LDD_PHYS
Marius Strobl [Tue, 8 Feb 2011 21:58:13 +0000 (21:58 +0000)]
Take advantage of accessing the kernel TSB via ASI_ATOMIC_QUAD_LDD_PHYS
on SPARC64-V, too. Tested by: Michael Moll

13 years agonet80211 really doesn't want A_MPDU to appear on non-11n station node mbufs.
Adrian Chadd [Tue, 8 Feb 2011 20:16:43 +0000 (20:16 +0000)]
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.

13 years agoCommit some missing bits to the sample rate module to (more) correctly calculate...
Adrian Chadd [Tue, 8 Feb 2011 18:31:28 +0000 (18:31 +0000)]
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.

13 years agoI missed this commit - enable 4k transaction support for the ar5416+ar9160.
Adrian Chadd [Tue, 8 Feb 2011 14:15:46 +0000 (14:15 +0000)]
I missed this commit - enable 4k transaction support for the ar5416+ar9160.

13 years agoAfter reading a bitmap block for i-nodes or blocks, recheck the count of
John Baldwin [Tue, 8 Feb 2011 13:02:25 +0000 (13:02 +0000)]
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

13 years agoThere's apparently a bug with Merlin (AR9280) and later chipsets where
Adrian Chadd [Tue, 8 Feb 2011 12:49:01 +0000 (12:49 +0000)]
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.

13 years agoDon't consider ioctl returning error as a fatal error and move on to next
Xin LI [Tue, 8 Feb 2011 11:32:22 +0000 (11:32 +0000)]
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

13 years agoIn arm_get_next_irq(), use the last IRQ argument in order to prevent
Marcel Moolenaar [Tue, 8 Feb 2011 01:49:30 +0000 (01:49 +0000)]
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.

13 years agoo Make sure to mask off timer1 interrupts. It's not necessarily
Marcel Moolenaar [Tue, 8 Feb 2011 01:43:45 +0000 (01:43 +0000)]
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

13 years agoRemove the uio_yield prototype and symbol. This function has been
Matthew D Fleming [Tue, 8 Feb 2011 00:36:46 +0000 (00:36 +0000)]
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.

13 years agoBased on discussions on the svn-src mailing list, rework r218195:
Matthew D Fleming [Tue, 8 Feb 2011 00:16:36 +0000 (00:16 +0000)]
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.

13 years ago- Added systcls for header splitting, RX/TX buffer count, interrupt
David Christensen [Mon, 7 Feb 2011 23:00:24 +0000 (23:00 +0000)]
- 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

13 years agoCuritel UM150 needs a quirk to stop it from detaching straight after
Nick Hibma [Mon, 7 Feb 2011 22:37:27 +0000 (22:37 +0000)]
Curitel UM150 needs a quirk to stop it from detaching straight after
attach (resetting actually).

Submitted by: Oleg Nauman
MFC after: 1 week

13 years agoUpdate manpage to remove CRT reference.
Glen Barber [Mon, 7 Feb 2011 22:33:39 +0000 (22:33 +0000)]
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

13 years agoAdd in some AR9280 specific board configuration options.
Adrian Chadd [Mon, 7 Feb 2011 22:00:31 +0000 (22:00 +0000)]
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

13 years agoBring over some AR9280-specific v14 additions that exist in ath9k.
Adrian Chadd [Mon, 7 Feb 2011 21:48:26 +0000 (21:48 +0000)]
Bring over some AR9280-specific v14 additions that exist in ath9k.

Obtained from: Linux ath9k

13 years agoFix the previous commit of pthread_getthreadid_np(3).
Jung-uk Kim [Mon, 7 Feb 2011 21:31:21 +0000 (21:31 +0000)]
Fix the previous commit of pthread_getthreadid_np(3).

13 years agoUse analog delay macro for modifying an analog register.
Adrian Chadd [Mon, 7 Feb 2011 21:30:56 +0000 (21:30 +0000)]
Use analog delay macro for modifying an analog register.

13 years agoAdd a new RMW macro for analog register writes which implements the needed
Adrian Chadd [Mon, 7 Feb 2011 21:30:13 +0000 (21:30 +0000)]
Add a new RMW macro for analog register writes which implements the needed
wait period between operations.

13 years agoIntroduce a non-portable function pthread_getthreadid_np(3) to retrieve
Jung-uk Kim [Mon, 7 Feb 2011 21:26:46 +0000 (21:26 +0000)]
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

13 years ago- Use LINE_MAX from limits.h as the maximum line length instead of
Jaakko Heinonen [Mon, 7 Feb 2011 18:10:18 +0000 (18:10 +0000)]
- 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

13 years agoHandle EOF when skipping lines.
Jaakko Heinonen [Mon, 7 Feb 2011 18:05:56 +0000 (18:05 +0000)]
Handle EOF when skipping lines.

13 years agoFix typo in SIFS setup
Adrian Chadd [Mon, 7 Feb 2011 17:04:31 +0000 (17:04 +0000)]
Fix typo in SIFS setup

13 years agoAdd in a per phy error sysctl.
Adrian Chadd [Mon, 7 Feb 2011 15:09:13 +0000 (15:09 +0000)]
Add in a per phy error sysctl.

13 years agoFix bugs related to M_FLOWID:
Michael Tuexen [Mon, 7 Feb 2011 15:04:23 +0000 (15:04 +0000)]
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.

13 years agoMinor grammar fix. s/cores'/core's/
Glen Barber [Mon, 7 Feb 2011 11:20:58 +0000 (11:20 +0000)]
Minor grammar fix.  s/cores'/core's/

Approved by: keramida (mentor)
MFC after: 3 days

13 years agoAdd "iface name" and "iface description" commands.
Brian Somers [Mon, 7 Feb 2011 11:18:18 +0000 (11:18 +0000)]
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

13 years agoIf not set (due to some error Michael is working on
Randall Stewart [Mon, 7 Feb 2011 08:12:24 +0000 (08:12 +0000)]
If not set (due to some error Michael is working on
fixing) set it for the net.

MFC after: 3 months

13 years ago1) Track when flowid does get set.
Randall Stewart [Mon, 7 Feb 2011 08:10:29 +0000 (08:10 +0000)]
1) Track when flowid does get set.
MFC after: 3 months

13 years agoMFi386: revision 218329
Yoshihiro Takahashi [Mon, 7 Feb 2011 07:52:53 +0000 (07:52 +0000)]
MFi386: revision 218329

  Fix linking of the kernel without device npx.

13 years agoMFi386: revision 218327
Yoshihiro Takahashi [Mon, 7 Feb 2011 07:51:31 +0000 (07:51 +0000)]
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.