]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
11 years agoBump date missed in r202756
Eitan Adler [Fri, 14 Sep 2012 17:50:42 +0000 (17:50 +0000)]
Bump date missed in r202756

PR: docs/171624
Submitted by: bdrewery
Approved by: gabor
MFC after: 3 days

11 years agosh: Reduce code duplication: use setinputfile instead of open/setinputfd
Jilles Tjoelker [Fri, 14 Sep 2012 15:22:15 +0000 (15:22 +0000)]
sh: Reduce code duplication: use setinputfile instead of open/setinputfd
combination.

MFC after: 2 weeks

11 years agoMinor mdoc fix.
Joel Dahl [Fri, 14 Sep 2012 13:14:48 +0000 (13:14 +0000)]
Minor mdoc fix.

11 years agoUse libmd if and only if OpenSSL is not available.
Dag-Erling Smørgrav [Fri, 14 Sep 2012 13:00:43 +0000 (13:00 +0000)]
Use libmd if and only if OpenSSL is not available.

PR: bin/171402
MFC after: 3 days

11 years agoAdding missing return statements during error conditions.
Eitan Adler [Fri, 14 Sep 2012 12:15:13 +0000 (12:15 +0000)]
Adding missing return statements during error conditions.

PR: kern/171187
Submitted by: Mark Johnston <markjdb@gmail.com>
Reviewed by: des
Approved by: cperciva
MFC after: 2 weeks

11 years agoo Create directory sys/netpfil, where all packet filters should
Gleb Smirnoff [Fri, 14 Sep 2012 11:51:49 +0000 (11:51 +0000)]
o Create directory sys/netpfil, where all packet filters should
  reside, and move there ipfw(4) and pf(4).

o Move most modified parts of pf out of contrib.

Actual movements:

sys/contrib/pf/net/*.c -> sys/netpfil/pf/
sys/contrib/pf/net/*.h -> sys/net/
contrib/pf/pfctl/*.c -> sbin/pfctl
contrib/pf/pfctl/*.h -> sbin/pfctl
contrib/pf/pfctl/pfctl.8 -> sbin/pfctl
contrib/pf/pfctl/*.4 -> share/man/man4
contrib/pf/pfctl/*.5 -> share/man/man5

sys/netinet/ipfw -> sys/netpfil/ipfw

The arguable movement is pf/net/*.h -> sys/net. There are
future plans to refactor pf includes, so I decided not to
break things twice.

Not modified bits of pf left in contrib: authpf, ftp-proxy,
tftp-proxy, pflogd.

The ipfw(4) movement is planned to be merged to stable/9,
to make head and stable match.

Discussed with: bz, luigi

11 years agoImplement MSI support.
Grzegorz Bernacki [Fri, 14 Sep 2012 10:06:56 +0000 (10:06 +0000)]
Implement MSI support.

MSI are implemented via Inbound Shared Doorbell 1 interrupts. Interrupts
are triggered by writing to Software Triggered Interrupt registeri (PCIe
card using physical address of this register in BAR0 space). There are 32
interrupts available. It can be increased by using Doorbell 2 and
Doorbell 3 registers to 96 interrupts.

Obtained from: Marvell, Semihalf

11 years agoAdd support for MSI in interrupt controlller.
Grzegorz Bernacki [Fri, 14 Sep 2012 10:05:01 +0000 (10:05 +0000)]
Add support for MSI in interrupt controlller.

MSI are implemented via software interrupt. PCIe cards will write
into software interrupt register which will cause inbound shared
interrupt which will be interpreted as a MSI.

Obtained from: Marvell, Semihalf

11 years agoRemove unused structure fields
Grzegorz Bernacki [Fri, 14 Sep 2012 10:01:52 +0000 (10:01 +0000)]
Remove unused structure fields

Obtained from: Semihalf

11 years agoEnable PCI for Armada XP
Grzegorz Bernacki [Fri, 14 Sep 2012 09:59:27 +0000 (09:59 +0000)]
Enable PCI for Armada XP

Obtained from: Semihalf

11 years agopci: Implement new memory and io space allocator for PCI.
Grzegorz Bernacki [Fri, 14 Sep 2012 09:57:41 +0000 (09:57 +0000)]
pci: Implement new memory and io space allocator for PCI.

Cleanup code and move initializing bridge into separate function.
Add checking of PCI mode (RC or endpoint).

Obtained from: Semihalf

11 years agoAdd support for Armada XP A0.
Grzegorz Bernacki [Fri, 14 Sep 2012 09:55:19 +0000 (09:55 +0000)]
Add support for Armada XP A0.

- Add functions to calculate clocks instead using hardcoded values
- Update reset and timers functions
- Update number of interrupts
- Change name of platform from db88f78100 to db78460
- Correct DRAM size and PCI IRQ routing in dts file.

Obtained from: Semihalf

11 years agoIf virtual addresses are not set use one to one mapping.
Grzegorz Bernacki [Fri, 14 Sep 2012 09:45:13 +0000 (09:45 +0000)]
If virtual addresses are not set use one to one mapping.
Do not map memory and IO space at address 0.

Obtained from: Semihalf

11 years agoSupport identification of new PJ4B cores.
Grzegorz Bernacki [Fri, 14 Sep 2012 09:38:54 +0000 (09:38 +0000)]
Support identification of new PJ4B cores.

Obtained from: Semihalf

11 years agoAdd fdt_get_unit() function.
Grzegorz Bernacki [Fri, 14 Sep 2012 09:36:35 +0000 (09:36 +0000)]
Add fdt_get_unit() function.

Obtained from: Semihalf

11 years agoSet busaddr and bussize to 0 when fdt_get_range() fails.
Grzegorz Bernacki [Fri, 14 Sep 2012 09:33:35 +0000 (09:33 +0000)]
Set busaddr and bussize to 0 when fdt_get_range() fails.

Obtained from: Semihalf

11 years agoAdd basic USB support to Raspberry PI target.
Hans Petter Selasky [Fri, 14 Sep 2012 08:11:59 +0000 (08:11 +0000)]
Add basic USB support to Raspberry PI target.

11 years agoDWC OTG improvements. Implement full support for SPLIT transactions, in other
Hans Petter Selasky [Fri, 14 Sep 2012 07:52:57 +0000 (07:52 +0000)]
DWC OTG improvements. Implement full support for SPLIT transactions, in other
words FULL/LOW speed devices through HIGH speed HUBs. Improve support for
suspend and resume in host mode.

11 years agoThe MBR data is not necessarily aligned. This is a problem on ARM.
Tim Kientzle [Fri, 14 Sep 2012 05:24:06 +0000 (05:24 +0000)]
The MBR data is not necessarily aligned.  This is a problem on ARM.

11 years agoBelatedly add myself
Eitan Adler [Fri, 14 Sep 2012 01:23:28 +0000 (01:23 +0000)]
Belatedly add myself

MFC after: 3 days

11 years agoDo not change owner, group, or mode when package database directory and
Jung-uk Kim [Fri, 14 Sep 2012 00:19:06 +0000 (00:19 +0000)]
Do not change owner, group, or mode when package database directory and
its contents are created with pkg_add(1).  It may happen when the packing
list contains @owner, @group, or @mode.

Reported by: Donald Bostrom (dbostrom at niksun dot com)
Reviewed by: portmgr (bapt)

11 years agoRemove all the checks on curthread != NULL with the exception of some MD
Attilio Rao [Thu, 13 Sep 2012 22:26:22 +0000 (22:26 +0000)]
Remove all the checks on curthread != NULL with the exception of some MD
trap checks (eg. printtrap()).

Generally this check is not needed anymore, as there is not a legitimate
case where curthread != NULL, after pcpu 0 area has been properly
initialized.

Reviewed by: bde, jhb
MFC after: 1 week

11 years ago- Denote PCI-e endpoints that support FLR.
John Baldwin [Thu, 13 Sep 2012 19:08:31 +0000 (19:08 +0000)]
- Denote PCI-e endpoints that support FLR.
- Make parsing of PCI-e extended capabilities assume that future version
  numbers are backwards compatible.
- Add new AER error descriptions.
- Add descriptions for more PCI-e extended capabilities.

MFC after: 1 week

11 years ago- Add some registers defined in PCI 3.0 including new AER bits.
John Baldwin [Thu, 13 Sep 2012 19:05:24 +0000 (19:05 +0000)]
- Add some registers defined in PCI 3.0 including new AER bits.
- Add constants for the rest of the fields in the PCI-express device
  capability and control registers.
- Tweak some of the recently added PCI-e capability constants (always
  use hex for offsets in config space, and include a shortened
  version of the relevant register in the name of field constants).

MFC after: 1 week

11 years agoDon't use AR_PHY_MODE to setup half/quarter rate.
Adrian Chadd [Thu, 13 Sep 2012 18:24:13 +0000 (18:24 +0000)]
Don't use AR_PHY_MODE to setup half/quarter rate.

I'm not sure where in the deep, distant past I found the AR_PHY_MODE
registers for half/quarter rate mode, but unfortunately that doesn't
seem to work "right" for non-AR9280 chips.

Specifically:

* don't touch AR_PHY_MODE
* set the PLL bits when configuring half/quarter rate

I've verified this on the AR9280 (5ghz fast clock) and the AR5416.

The AR9280 works in both half/quarter rate; the AR5416 unfortunately
only currently works at half rate.  It fails to calibrate on quarter rate.

11 years agoRemove scripts and tools which only functioned when src was using CVS
Eitan Adler [Thu, 13 Sep 2012 17:49:11 +0000 (17:49 +0000)]
Remove scripts and tools which only functioned when src was using CVS

Approved by: cperciva
MFC after: 1 week

11 years agoMinor mdoc fix.
Joel Dahl [Thu, 13 Sep 2012 16:59:20 +0000 (16:59 +0000)]
Minor mdoc fix.

11 years agoIntroduce a new make variable COMPILER_TYPE that specifies what
Brooks Davis [Thu, 13 Sep 2012 16:00:46 +0000 (16:00 +0000)]
Introduce a new make variable COMPILER_TYPE that specifies what
type of compiler is being used (currently clang or gcc).  COMPILER_TYPE
is set in the new bsd.compiler.mk file based on the value of the CC
variable or, should it prove informative, by running ${CC} --version
and examining the output.

To avoid negative performance impacts in the default case and correct
value for COMPILER_TYPE type is determined and passed in the environment
of submake instances while building world.

Replace adhoc attempts at determining the compiler type by examining
CC or MK_CLANG_IS_CC with checks of COMPILER_TYPE.  This eliminates
bootstrapping complications when first setting WITH_CLANG_IS_CC.

Sponsored by: DARPA, AFRL
Reviewed by: Yamaya Takashi <yamayan@kbh.biglobe.ne.jp>, imp, linimon
(with some modifications post review)
MFC after: 2 weeks

11 years agoIgnore stop and continue signals sent to an exiting process. Stop signals
John Baldwin [Thu, 13 Sep 2012 15:51:18 +0000 (15:51 +0000)]
Ignore stop and continue signals sent to an exiting process.  Stop signals
set p_xstat to the signal that triggered the stop, but p_xstat is also
used to hold the exit status of an exiting process.  Without this change,
a stop signal that arrived after a process was marked P_WEXIT but before
it was marked a zombie would overwrite the exit status with the stop signal
number.

Reviewed by: kib
MFC after: 1 week

11 years agoDefine missing DEBUGOUT# macros. DEBUGOUT[45] are not yet used but are
Eitan Adler [Thu, 13 Sep 2012 14:40:24 +0000 (14:40 +0000)]
Define missing DEBUGOUT# macros. DEBUGOUT[45] are not yet used but are
being defined pre-emptively to avoid future build breakage

PR: kern/168967
Submitted by: fuzhli <fuzl@arraynetworks.com.cn>
Approved by: cperciva
MFC after: 1 week

11 years agoAdd global and per-module sysctls/tunables to enable/disable metadata taste.
Alexander Motin [Thu, 13 Sep 2012 13:27:09 +0000 (13:27 +0000)]
Add global and per-module sysctls/tunables to enable/disable metadata taste.
That should help to handle some cases when disk has some RAID metadata that
should be ignored, especially during boot.

MFC after: 3 days

11 years agoThe deadfs VOPs for vop_ioctl and vop_bmap call itself recursively,
Konstantin Belousov [Thu, 13 Sep 2012 13:05:45 +0000 (13:05 +0000)]
The deadfs VOPs for vop_ioctl and vop_bmap call itself recursively,
which is an elaborate way to cause kernel panic. Change the VOPs
implementation to return EBADF for a reclaimed vnode.

While the calls to vop_bmap should not reach deadfs, it is indeed
possible for vop_ioctl, because the VOP locking protocol is to pass
the vnode to VOP unlocked. The actual panic was observed when ioctl
was called on procfs filedescriptor which pointed to an exited
process.

Reported by: zont
Tested by: pho
MFC after: 1 week

11 years ago- Fix a typo in debug message.
Andrey Zonov [Thu, 13 Sep 2012 12:55:10 +0000 (12:55 +0000)]
- Fix a typo in debug message.

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

11 years agoDocument the *_chroot, *_user, *_group and *_nice knobs for services started
Ivan Voras [Thu, 13 Sep 2012 10:26:55 +0000 (10:26 +0000)]
Document the *_chroot, *_user, *_group and *_nice knobs for services started
by rcng.

Reviewed by: wblock, dougb

11 years agoMFV of 240454, tzdata2012f
Edwin Groothuis [Thu, 13 Sep 2012 10:17:01 +0000 (10:17 +0000)]
MFV of 240454, tzdata2012f

- Pacific/Fiji will go into DST from 21 October 2012 till 20 January 2013.
- Fix offset for Pacific/Tokelau.
- Gaza and West Bank had DST from 29 March to 28 September 2012.
- Syria has DST from April till October
- Morocco had DST from April to September 2012 except for 20 July to 20 August.
- Cuba changed to DST from 1 April 2012 only.
- Haiti has DST between 8 March and 1 November in 2012.

Obtained from: ftp://ftp.iana.org/tz/releases/

11 years agoRename the IVY_RNG option to RDRAND_RNG.
Konstantin Belousov [Thu, 13 Sep 2012 10:12:16 +0000 (10:12 +0000)]
Rename the IVY_RNG option to RDRAND_RNG.

Based on submission by: Arthur Mesh <arthurmesh@gmail.com>
MFC after: 2 weeks

11 years agoVendor import of tzdata2012f
Edwin Groothuis [Thu, 13 Sep 2012 10:11:40 +0000 (10:11 +0000)]
Vendor import of tzdata2012f

- Pacific/Fiji will go into DST from 21 October 2012 till 20 January 2013.
- Fix offset for Pacific/Tokelau.
- Gaza and West Bank had DST from 29 March to 28 September 2012.
- Syria has DST from April till October
- Morocco had DST from April to September 2012 except for 20 July to 20 August.
- Cuba changed to DST from 1 April 2012 only.
- Haiti has DST between 8 March and 1 November in 2012.

Obtained from: ftp://ftp.iana.org/tz/releases/

11 years agoInstall interrupt handlers early, during attach, for the reason
Navdeep Parhar [Thu, 13 Sep 2012 09:18:13 +0000 (09:18 +0000)]
Install interrupt handlers early, during attach, for the reason
explained in r239913 by jhb.

MFC after: 1 week

11 years agoUse native FreeBSD facilities everywhere except the shared code in common/
Navdeep Parhar [Thu, 13 Sep 2012 09:10:10 +0000 (09:10 +0000)]
Use native FreeBSD facilities everywhere except the shared code in common/

MFC after: 1 week

11 years agoAllow cxgbe to be built into a kernel with "device cxgbe."
Navdeep Parhar [Thu, 13 Sep 2012 09:01:52 +0000 (09:01 +0000)]
Allow cxgbe to be built into a kernel with "device cxgbe."

MFC after: 1 week

11 years agoRename __member2struct() to __containerof().
Ed Schouten [Thu, 13 Sep 2012 08:13:01 +0000 (08:13 +0000)]
Rename __member2struct() to __containerof().

Compared to __member2struct(), this macro has the following advantages:

- It ensures that the type of the pointer is compatible with the member
  field of the structure (or a void pointer).
- It works properly in combination with volatile and const, though
  unfortunately it drops these qualifiers from the returned value.

mdf@ proposed to add the container_of() macro, just like Linux has.
Eventually I decided against this, as <sys/param.h> is included all over
the place. It seems container_of() on Linux is specific to the kernel,
not userspace. I'd rather not pollute userspace with this.

I also thought about adding __container_of(), but this would have two
advantages. Xorg seems to already have a __container_of(), which is not
compatible with this version. Also, the underscore in the middle
conflicts with our existing macros (__offsetof, __rangeof, etc).

I'm changing member2struct() to use its old code, as the extra
strictness of this new macro conflicts with existing code (read: cxgb).

MFC after: 1 month

11 years agoEnable fractional 5G mode on half/quarter rate channels.
Adrian Chadd [Thu, 13 Sep 2012 07:25:41 +0000 (07:25 +0000)]
Enable fractional 5G mode on half/quarter rate channels.

Obtained from: Linux ath9k

11 years agoFlip on half/quarter rate support.
Adrian Chadd [Thu, 13 Sep 2012 07:24:14 +0000 (07:24 +0000)]
Flip on half/quarter rate support.

No, this isn't HT/5 and HT/10 support.  This is the 11a half/quarter
rate support primarily used by the 4.9GHz and GSM band regulatory
domains.

This is definitely a work in progress.

TODO:

* everything in the last commit;
* lots more interoperability testing with the AR5212 half/quarter rate
  support for the relevant chips;
* Do some interop testing on half/quarter rate support between _all_
  the 11n chips - AR5416, AR9160, AR9280 (and AR9285/AR9287 when 2GHz
  half/quarter rate support is coded up.)

11 years agoIntroduce an AR5416 flavour of the IFS and mac usec/timing configuration
Adrian Chadd [Thu, 13 Sep 2012 07:22:40 +0000 (07:22 +0000)]
Introduce an AR5416 flavour of the IFS and mac usec/timing configuration
used when running the chips in half/quarter rate.

This sets up some default parameters which are then overridden by the
driver (which manually configures things like slot timing at interface
start time.)

Although this is a copy-and-modify from the AR5212 HAL, I did peek
at the reference HAL and the ath9k driver to see what they did.
Ath9k in particular doesn't hard-code this - instead, their version
of ar5416InitUserSettings() does all of the relevant math.

TODO:

* do the math, not hard code things!
* fix the mac clock calculation for the AR9287; since it runs the
  MAC clock at a higher rate, requiring all the duration calculations
  to change;
* Do a whole lot more validation for half/quarter rates.

Obtained from: Qualcomm Atheros, Linux ath9k

11 years agoCall the ar5212SetCoverageClass() function for now.
Adrian Chadd [Thu, 13 Sep 2012 07:19:53 +0000 (07:19 +0000)]
Call the ar5212SetCoverageClass() function for now.

Some of the math is a little wrong thanks to clocks in 11a mode running
at 44MHz when in fast clock mode (rather than 40MHz, which the chips
before AR9280 ran 11a in).  That'll have to be addressed in a future commit.

11 years agoAdd register defintions for the AR5416 TX/RX latency fields.
Adrian Chadd [Thu, 13 Sep 2012 07:17:58 +0000 (07:17 +0000)]
Add register defintions for the AR5416 TX/RX latency fields.

Obtained from: Qualcomm Atheros

11 years agoCompensate for half/quarter rate differences in MAC clock speed.
Adrian Chadd [Thu, 13 Sep 2012 07:17:29 +0000 (07:17 +0000)]
Compensate for half/quarter rate differences in MAC clock speed.

This fixes the incorrect slot (and likely ACK/RTS timeout) values
which I see when enabling half/quarter rate support on the AR9280.

The resulting math matches the expected calculated default values.

11 years agoUpdate interface to firmware 1.6.2 and include the firmware in the driver.
Navdeep Parhar [Thu, 13 Sep 2012 06:32:52 +0000 (06:32 +0000)]
Update interface to firmware 1.6.2 and include the firmware in the driver.

Obtained from: Chelsio
MFC after: 1 week

11 years agoSimplify the kernel pmap locking in pmap_enter_pv(). While I'm here, tidy
Alan Cox [Thu, 13 Sep 2012 06:16:49 +0000 (06:16 +0000)]
Simplify the kernel pmap locking in pmap_enter_pv().  While I'm here, tidy
up the comments and whitespace.

Tested by: cognet

11 years agoNo need to leak these into the includer's namespace.
Peter Grehan [Thu, 13 Sep 2012 00:42:56 +0000 (00:42 +0000)]
No need to leak these into the includer's namespace.

Submitted by: Bryan Venteicher bryanv at daemoninthecloset org

11 years agoRelax requirement of certain mb()s
Peter Grehan [Thu, 13 Sep 2012 00:36:46 +0000 (00:36 +0000)]
Relax requirement of certain mb()s

Submitted by: Bryan Venteicher bryanv at daemoninthecloset org

11 years agoCorrectness: use __member2struct() on the correct fields.
Ed Schouten [Wed, 12 Sep 2012 22:54:11 +0000 (22:54 +0000)]
Correctness: use __member2struct() on the correct fields.

The prev-pointers point to the next-pointers of the previous element --
not the ENTRY structure. The next-pointers are stored in the ENTRY
structures first, so the code would already work correctly. Still, it is
more accurate to use the next-fields.

To prevent misuse of __member2struct() in the future, I've got a patch
that requires the pointer to be passed to this macro to be compatible
with the member of the structure. I'll commit this patch after I've
tested it properly.

MFC after: 1 month.

11 years agoSwitch batch to an SLIST.
Ed Schouten [Wed, 12 Sep 2012 22:16:31 +0000 (22:16 +0000)]
Switch batch to an SLIST.

This code requires none of the features of LIST.

11 years agoImprove check coverage about idle threads.
Attilio Rao [Wed, 12 Sep 2012 22:10:53 +0000 (22:10 +0000)]
Improve check coverage about idle threads.

Idle threads are not allowed to acquire any lock but spinlocks.
Deny any attempt to do so by panicing at the locking operation
when INVARIANTS is on. Then, remove the check on blocking on a
turnstile.
The check in sleepqueues is left because they are not allowed to use
tsleep() either which could happen still.

Reviewed by: bde, jhb, kib
MFC after: 1 week

11 years agoTweak the commit message in case of panic for sleeping from threads
Attilio Rao [Wed, 12 Sep 2012 22:05:54 +0000 (22:05 +0000)]
Tweak the commit message in case of panic for sleeping from threads
with TDP_NOSLEEPING on.

The current message has no informations on the thread and wchan
involed, which may be useful in case where dumps have mangled dwarf
informations.

Reported by:    kib
Reviewed by: bde, jhb, kib
MFC after: 1 week

11 years agoImplement LIST_PREV().
Ed Schouten [Wed, 12 Sep 2012 21:03:48 +0000 (21:03 +0000)]
Implement LIST_PREV().

Regular LISTs have been implemented in such a way that the prev-pointer
does not point to the previous element, but to the next-pointer stored
in the previous element. This is done to simplify LIST_REMOVE(). This
macro can be implemented without knowing the address of the list head.

Unfortunately this makes it harder to implement LIST_PREV(), which is
why this macro was never here. Still, it is possible to implement this
macro. If the prev-pointer points to the list head, we return NULL.
Otherwise we simply subtract the offset of the prev-pointer within the
structure.

It's not as efficient as traversing forward of course, but in practice
it shouldn't be that bad. In almost all use cases, people will want to
compare the value returned by LIST_PREV() against NULL, so an optimizing
compiler will not emit code that does more branching than TAILQs.

While there, make the code a bit more readable by introducing
__member2struct(). This makes STAILQ_LAST() far more readable.

MFC after: 1 month

11 years agoMake pxe device in lsdev really include device name, looking like this:
Alexander Motin [Wed, 12 Sep 2012 21:00:37 +0000 (21:00 +0000)]
Make pxe device in lsdev really include device name, looking like this:
    pxe0:    192.168.3.1:/storage/nfsroot/amd64
, instead of confusing and less useful:
      192.168.3.1:pxeboot

11 years agoRemove some trailing whitespace.
Jim Harris [Wed, 12 Sep 2012 19:36:54 +0000 (19:36 +0000)]
Remove some trailing whitespace.

11 years agoFix TX FIFO sizes. Correct FIFO handling in Host mode.
Hans Petter Selasky [Wed, 12 Sep 2012 19:15:29 +0000 (19:15 +0000)]
Fix TX FIFO sizes. Correct FIFO handling in Host mode.

11 years agoMerge recent zfs vendor changes, sync code and adjust userland DEBUG.
Martin Matuska [Wed, 12 Sep 2012 18:05:43 +0000 (18:05 +0000)]
Merge recent zfs vendor changes, sync code and adjust userland DEBUG.

Illumos issued covered:
1884 Empty "used" field for zfs *space commands
3006 VERIFY[S,U,P] and ASSERT[S,U,P] frequently check if first argument
     is zero
3028 zfs {group,user}space -n prints (null) instead of numeric GID/UID
3048 zfs {user,group}space [-s|-S] is broken
3049 zfs {user,group}space -t doesn't really filter the results
3060 zfs {user,group}space -H output isn't tab-delimited
3061 zfs {user,group}space -o doesn't use specified fields order
3064 usr/src/cmd/zpool/zpool_main.c misspells "successful"
3093 zfs {user,group}space's -i is noop
3098 zfs userspace/groupspace fail without saying why when run as non-root

References:
  https://www.illumos.org/issues/ + [issue_id]

Obtained from: illumos (vendor/illumos, vendor/illumos-sys)
MFC after: 2 weeks

11 years agoAccording to a clarification at http://austingroupbugs.net/view.php?id=503
Ed Maste [Wed, 12 Sep 2012 17:54:09 +0000 (17:54 +0000)]
According to a clarification at http://austingroupbugs.net/view.php?id=503
ptsname may set errno, so avoid saving and restoring errno across the
function.

PR: standards/171572

11 years agoAvoid mapping ENOENT to ENOTDIR for non-existent path components.
Ed Maste [Wed, 12 Sep 2012 17:05:39 +0000 (17:05 +0000)]
Avoid mapping ENOENT to ENOTDIR for non-existent path components.

The ENOTDIR mapping was introduced in r235266 for kern/128933 based on
an interpretation of the somewhat ambiguous language in the POSIX realpath
specification.  The interpretation is inconsistent with Solaris and Linux,
a regression from 9.0, and does not appear to be permitted by the
description of ENOTDIR:

     20 ENOTDIR Not a directory.  A component of the specified pathname
             existed, but it was not a directory, when a directory was
             expected.

PR: standards/171577
MFC after: 3 days

11 years agoAdd documentation for IPv6 support
Eitan Adler [Wed, 12 Sep 2012 16:58:42 +0000 (16:58 +0000)]
Add documentation for IPv6 support

PR: docs/171580
Submitted by: bdrewery
Reviewed by: wblock
Approved by: gjb
MFC after: 1 month
X-MFC-With: r240389

11 years agoRemove needless (int) casts of write(2)'s 3rd argument.
David E. O'Brien [Wed, 12 Sep 2012 15:36:44 +0000 (15:36 +0000)]
Remove needless (int) casts of write(2)'s 3rd argument.
Also change blwrite() 'size' parameter to a ssize_t to better match
write(2).

11 years agoSimply printf-like strings and outdent strings so that it is easy to see
David E. O'Brien [Wed, 12 Sep 2012 14:59:57 +0000 (14:59 +0000)]
Simply printf-like strings and outdent strings so that it is easy to see
if they fit on a standard terminal.

11 years agoAdd MK_KDUMP.
David E. O'Brien [Wed, 12 Sep 2012 14:58:07 +0000 (14:58 +0000)]
Add MK_KDUMP.

11 years agoNot all Pmake derivatives silently handle empty shell output, so ensure there
David E. O'Brien [Wed, 12 Sep 2012 14:44:25 +0000 (14:44 +0000)]
Not all Pmake derivatives silently handle empty shell output, so ensure there
is something for make(1) to consume.  Bmake gives output such as:
   "warning: Couldn't read shell's output for "/bin/sh -c true"
Note we parted from traditional Pmake behavior in r18864 / r18255.

11 years agoRemove duplication and centralize testing of various config(8)ed features.
David E. O'Brien [Wed, 12 Sep 2012 14:19:40 +0000 (14:19 +0000)]
Remove duplication and centralize testing of various config(8)ed features.

11 years agoNot all Pmake derived makes quietly tolerate assignment from shell commands
David E. O'Brien [Wed, 12 Sep 2012 14:17:11 +0000 (14:17 +0000)]
Not all Pmake derived makes quietly tolerate assignment from shell commands
with no output.  Add "echo" at the end these shell commands whose output is
assigned to a variable's value to ensure there is some output.

Submitted by: John Van Horne <jvanhorne@juniper.net>

11 years agoReplace a bare use of 'objcopy' with ${OBJCOPY} for easier cross compilation
David E. O'Brien [Wed, 12 Sep 2012 13:58:18 +0000 (13:58 +0000)]
Replace a bare use of 'objcopy' with ${OBJCOPY} for easier cross compilation
in environments where 'objcopy' is spelled differently.

Submitted by: John Van Horne <jvanhorne@juniper.net>

11 years ago- Fix detaching under some circumstances.
Andrey Zonov [Wed, 12 Sep 2012 13:06:57 +0000 (13:06 +0000)]
- Fix detaching under some circumstances.

  When truss is detaching from very active process it is possible to
  hang on waitpid(2) in restore_proc() forever, because
  ptrace(PT_SYSCALL) must be called before detaching, to allow the
  debugging process to continue execution.  Also when truss called with
  '-c' argument, it does not print anything after detach, because it
  immediately exits from restore_proc().

  To fix these two problems make detaching deferred, but then it is
  impossible to detach from a process which does not do any system call.
  To fix this issue use sigaction(2) instead of signal(3) to disable
  SA_RESTART flag for waitpid(2) that makes it non-restartable.  Remove
  global variable child_pid, because now detaching is handled in context
  where child's pid is known.

Reported by: mjg
Tested by: mjg, swills
Approved by: kib (mentor)
MFC after: 2 weeks

11 years agoIn NAT-T transport mode, allow a client to open a new connection just after
VANHULLEBUS Yvan [Wed, 12 Sep 2012 12:14:50 +0000 (12:14 +0000)]
In NAT-T transport mode, allow a client to open a new connection just after
closing another.
It worked only in tunnel mode before.

Submitted by: Andreas Longwitz <longwitz@incore.de>
MFC after: 1M

11 years agoFix IEC / SI binary prefixes (Ki, Mi, Gi, etc) production by humanize_number(3)
Baptiste Daroussin [Wed, 12 Sep 2012 11:41:03 +0000 (11:41 +0000)]
Fix IEC / SI binary prefixes (Ki, Mi, Gi, etc) production by humanize_number(3)

PR: bin/171487
Submitted by: matthew
MFC after: 1 week

11 years agoAdd support for ipv6 addresses as destination
Baptiste Daroussin [Wed, 12 Sep 2012 10:39:47 +0000 (10:39 +0000)]
Add support for ipv6 addresses as destination

PR: bin/150530
Submitted by: andy white <andywhite@gmail.com>
Tested by: Olivier Cochard-Labbe <olivier@cochard.me>
MFC after: 1 month

11 years agoAdd missing braces
Kevin Lo [Wed, 12 Sep 2012 10:16:39 +0000 (10:16 +0000)]
Add missing braces

Obtained from: DragonFly

11 years agoRemove redundant check
Kevin Lo [Wed, 12 Sep 2012 10:12:03 +0000 (10:12 +0000)]
Remove redundant check

11 years agoDocument conditions for IP_SENDSRCADDR socket option.
Gleb Smirnoff [Wed, 12 Sep 2012 10:09:34 +0000 (10:09 +0000)]
Document conditions for IP_SENDSRCADDR socket option.

Obtained from: r167342 commit message

11 years agoDescribe in detail required conditions for receiving the SCM_CREDS
Gleb Smirnoff [Wed, 12 Sep 2012 09:50:17 +0000 (09:50 +0000)]
Describe in detail required conditions for receiving the SCM_CREDS
control message and suggest to use LOCAL_CREDS setsockopt() for
reliability.

11 years agoFix AHCI 1.2 version checks. This should be mostly cosmetic.
Alexander Motin [Wed, 12 Sep 2012 09:20:37 +0000 (09:20 +0000)]
Fix AHCI 1.2 version checks. This should be mostly cosmetic.

Submitted by: Dmitry Luhtionov <dmitryluhtionov@gmail.com>
MFC after: 1 week

11 years agoRestart the USB transfer if the error is not USB_ERR_CANCELLED.
Kevin Lo [Wed, 12 Sep 2012 07:59:28 +0000 (07:59 +0000)]
Restart the USB transfer if the error is not USB_ERR_CANCELLED.

11 years agoReduce DWC OTG polling rate by using the SOF interrupt.
Hans Petter Selasky [Wed, 12 Sep 2012 07:34:09 +0000 (07:34 +0000)]
Reduce DWC OTG polling rate by using the SOF interrupt.

11 years agoAdd VFCF_READONLY flag that indicates ntfs and xfs file systems are
Kevin Lo [Wed, 12 Sep 2012 03:42:52 +0000 (03:42 +0000)]
Add VFCF_READONLY flag that indicates ntfs and xfs file systems are
only supported as read-only.

11 years agoAdd references to VFS_SET(9) and VOP_VPTOFH(9)
Kevin Lo [Wed, 12 Sep 2012 03:39:32 +0000 (03:39 +0000)]
Add references to VFS_SET(9) and VOP_VPTOFH(9)

11 years agor235638 is not the clean way to add support for building on ancient FreeBSD
David E. O'Brien [Tue, 11 Sep 2012 22:38:33 +0000 (22:38 +0000)]
r235638 is not the clean way to add support for building on ancient FreeBSD
versions.  Instead use Imp's good work on "legacy" and follow the outcome
of the previous TRB discussions on this topic.

Now use the libc getline() if it exists, and only where it doesn't
create a bootstraping version.

11 years agoAdd device entry for DWC OTG.
Hans Petter Selasky [Tue, 11 Sep 2012 22:13:37 +0000 (22:13 +0000)]
Add device entry for DWC OTG.

11 years agoAdd device entry for DWC OTG.
Hans Petter Selasky [Tue, 11 Sep 2012 22:10:36 +0000 (22:10 +0000)]
Add device entry for DWC OTG.

11 years agoFix missing parts of DWC OTG host mode support. The host mode support
Hans Petter Selasky [Tue, 11 Sep 2012 22:08:19 +0000 (22:08 +0000)]
Fix missing parts of DWC OTG host mode support. The host mode support
of the DWC OTG is very simple in PIO mode, and we need to re-transmit
data when NAK is received among other things. We probably will need
to implement some kind of rate limitation on the NAK-ing.

11 years agoRemove a few files that are not needed for FreeBSD.
Xin LI [Tue, 11 Sep 2012 21:16:22 +0000 (21:16 +0000)]
Remove a few files that are not needed for FreeBSD.

PR: bin/171555
Approved by: obrien

11 years agoWARNS is now default to 6.
Xin LI [Tue, 11 Sep 2012 21:13:18 +0000 (21:13 +0000)]
WARNS is now default to 6.

11 years ago When synchronizing, include in the config dump amount of
Gleb Smirnoff [Tue, 11 Sep 2012 20:20:13 +0000 (20:20 +0000)]
  When synchronizing, include in the config dump amount of
bytes syncronized.
  The rationale behind this is the following: for large disks the
percent synchronisation counter ticks too seldom, and monitoring
software (as well as human operator) can't tell whether
synchronisation goes on or one of disks got stuck. On an idle
server one can look into gstat and see whether synchronisation goes
on or not, but on a busy server that won't work. Also, new value
monitored can be differentiated obtaining the synchronisation speed
quite precisely.

Submitted by: Konstantin Kukushkin <dark ramtel.ru>
Reviewed by: pjd

11 years agoMinor mdoc fix.
Joel Dahl [Tue, 11 Sep 2012 19:25:59 +0000 (19:25 +0000)]
Minor mdoc fix.

11 years agoMinor mdoc fix.
Joel Dahl [Tue, 11 Sep 2012 17:57:03 +0000 (17:57 +0000)]
Minor mdoc fix.

11 years agoMinor mdoc fix.
Joel Dahl [Tue, 11 Sep 2012 17:40:06 +0000 (17:40 +0000)]
Minor mdoc fix.

11 years agorevert r240344: cpu_devices[] is used in other functions and must be kept
Andriy Gapon [Tue, 11 Sep 2012 17:21:25 +0000 (17:21 +0000)]
revert r240344: cpu_devices[] is used in other functions and must be kept

Reported by: gjb, glebius
Pointyhat to: avg
MFC after: 1 day
X-MFC note: fake MFC, reminder to never MFC r240344

11 years agoRemove a prefetch() directive that, after careful testing, does more harm
Scott Long [Tue, 11 Sep 2012 16:59:04 +0000 (16:59 +0000)]
Remove a prefetch() directive that, after careful testing, does more harm
than good.

Submitted by: Fabien Thomas
Reviewed by: jfv

11 years agoEnsure mkcsmapper and mkesdb compile with clang, if WITH_ICONV is
Dimitry Andric [Tue, 11 Sep 2012 16:32:31 +0000 (16:32 +0000)]
Ensure mkcsmapper and mkesdb compile with clang, if WITH_ICONV is
defined.

Submitted by: zeising
PR: bin/167481
MFC after: 3 days
X-MFC-With: r238197

11 years ago- Remove unused variables.
Andrey Zonov [Tue, 11 Sep 2012 16:30:26 +0000 (16:30 +0000)]
- Remove unused variables.
- Remove redundant return after err(3) call.

Approved by: kib (mentor)

11 years ago- Add myself to calendar.freebsd
Jason E. Hale [Tue, 11 Sep 2012 13:29:50 +0000 (13:29 +0000)]
- Add myself to calendar.freebsd
- Add my mentor relationships to committers-ports.dot

Approved by: makc (mentor)

11 years agoAdd the same warning to rand48(3) as to rand(3) and random(3).
Dag-Erling Smørgrav [Tue, 11 Sep 2012 12:55:15 +0000 (12:55 +0000)]
Add the same warning to rand48(3) as to rand(3) and random(3).

MFC after: 3 days

11 years agoPrevent nump NULL pointer dereference in bmap_getlbns()
Kevin Lo [Tue, 11 Sep 2012 09:38:32 +0000 (09:38 +0000)]
Prevent nump NULL pointer dereference in bmap_getlbns()