]> CyberLeo.Net >> Repos - FreeBSD/stable/9.git/log
FreeBSD/stable/9.git
11 years agoClean some 'svn:executable' properties in the tree.
pfg [Tue, 29 Jan 2013 13:49:08 +0000 (13:49 +0000)]
Clean some 'svn:executable' properties in the tree.

Submitted by: Christoph Mallon

While here, merge some other mergeinfo properties that
were left behind from my commits

/head/include:r241008,241141,241181
/head/contrib/gcc:r244776,244792
/head/cddl:r238457,238509,238558

git-svn-id: svn://svn.freebsd.org/base/stable/9@246069 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r245820, r245844, r245950:
pfg [Tue, 29 Jan 2013 01:44:13 +0000 (01:44 +0000)]
MFC r245820, r245844, r245950:

ext2fs: make some inode fields match the ext2 spec.

Ext2fs uses unsigned fields in its dinode struct.
FreeBSD can have negative values in some of those
fields and the inode is meant to interact with the
system so we have never respected the unsigned
nature of most of those fields.

Block numbers and the generation number do
not need to be signed so redefine them as
unsigned to better match the on-disk information.

Include some fixes proposed by bde@.

While here add a lot of svn mergeinfo that was missing
in /sys:

r239963,240060,240880,241007,241141,241143,241181,243641,
243652,244475,245121,245612,245817

git-svn-id: svn://svn.freebsd.org/base/stable/9@246049 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC: r245314 and r245315:
imp [Mon, 28 Jan 2013 23:16:47 +0000 (23:16 +0000)]
MFC: r245314 and r245315:
     r245315 | imp | 2013-01-11 14:42:23 -0700 (Fri, 11 Jan 2013) | 4 lines

     Pass the device_t into atkbd_{probe,attach}_unit and get the
     controller unit and keyboard unit from there. It will be needed
     for other things in the future as well...

     r245314 | imp | 2013-01-11 14:19:45 -0700 (Fri, 11 Jan 2013) | 2 lines

     style(9) changes before I do more real changes.

git-svn-id: svn://svn.freebsd.org/base/stable/9@246045 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoAdd pointer from recent breakage to old breakage.
imp [Mon, 28 Jan 2013 22:53:08 +0000 (22:53 +0000)]
Add pointer from recent breakage to old breakage.

git-svn-id: svn://svn.freebsd.org/base/stable/9@246044 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoAdd notes for breakage points for traditional building of the kernel
imp [Mon, 28 Jan 2013 22:50:54 +0000 (22:50 +0000)]
Add notes for breakage points for traditional building of the kernel
as a guide to others. buildkernel, etc was not broken at these points,
so document that as well.

git-svn-id: svn://svn.freebsd.org/base/stable/9@246043 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r245725:
hselasky [Mon, 28 Jan 2013 07:26:45 +0000 (07:26 +0000)]
MFC r245725:
Add new quirk and correct old one.

PR: usb/175454
MFC after: 1 week

git-svn-id: svn://svn.freebsd.org/base/stable/9@246022 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC: r245923
marius [Mon, 28 Jan 2013 00:31:32 +0000 (00:31 +0000)]
MFC: r245923

- Check the return value of taskqueue_start_threads().
- At least the Saturn chips of 501-6738 cards need a delay after freezing
  the external GMII pins before the internal PHY is accessible again. So
  wait a bit after (un)freezing these. Also don't touch the other bits of
  that configuration register. [1]
- Take advantage of nitems().

Reported and tested by: Paul Keusemann [1]

git-svn-id: svn://svn.freebsd.org/base/stable/9@246018 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC: r245850
marius [Sun, 27 Jan 2013 23:21:47 +0000 (23:21 +0000)]
MFC: r245850

Revert the part of r239864 (MFC'ed to stable/9 in r241681) which removed
obtaining the SMP mutex around reading registers from other CPUs. As it
turns out, the hardware doesn't really like concurrent IPI'ing causing
adverse effects. Also the thought deadlock when using this spin lock here
and the targeted CPU(s) are also holding or in case of nested locks can't
actually happen. This is due to the fact that on sparc64, spinlock_enter()
only raises the PIL but doesn't disable interrupts completely. Thus direct
cross calls as used for the register reading (and all other MD IPI needs)
still will be executed by the targeted CPU(s) in that case.

git-svn-id: svn://svn.freebsd.org/base/stable/9@246014 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC: r245017
marius [Sun, 27 Jan 2013 23:08:51 +0000 (23:08 +0000)]
MFC: r245017

Revert bogus part of r241740 (MFC'ed to stable/9 in r241878).
Reported by: Michael Moll

git-svn-id: svn://svn.freebsd.org/base/stable/9@246011 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC: r244993
marius [Sun, 27 Jan 2013 23:05:21 +0000 (23:05 +0000)]
MFC: r244993

Remove files not connected to the build. It's confusing enough that
we still have two not quite the same evtchn.c left over.

git-svn-id: svn://svn.freebsd.org/base/stable/9@246009 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC: r244991
marius [Sun, 27 Jan 2013 23:02:33 +0000 (23:02 +0000)]
MFC: r244991

- Replace partially incorrect function names in panic(9) strings with
  __func__ and add some missing ones.
- Remove a stale comment.
- Remove unused NUM_ELEMENTS macro.
- Remove extra empty lines.
- Use DEVMETHOD_END.
- Use NULL rather than 0 for pointers.

git-svn-id: svn://svn.freebsd.org/base/stable/9@246007 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC: r244990
marius [Sun, 27 Jan 2013 22:59:59 +0000 (22:59 +0000)]
MFC: r244990

- Fix !SMP build.
- Replace incorrect function names in printf(9) strings with __func__.
- Make xctrl_shutdown_reasons table const.
- Use nitems() rather than rolling an own version.
- Use DEVMETHOD_END.
- Use NULL rather than 0 for pointers.

git-svn-id: svn://svn.freebsd.org/base/stable/9@246005 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC: r244987
marius [Sun, 27 Jan 2013 22:50:36 +0000 (22:50 +0000)]
MFC: r244987

Fix !INVARIANTS && !SMP build.

git-svn-id: svn://svn.freebsd.org/base/stable/9@246003 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r245057, r245688
gabor [Sun, 27 Jan 2013 19:44:41 +0000 (19:44 +0000)]
MFC r245057, r245688

  - Fix handling of the case when multiple patterns are specified in a single
    command line argument, separated by newlines

git-svn-id: svn://svn.freebsd.org/base/stable/9@245996 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC: r244986
marius [Sun, 27 Jan 2013 17:41:26 +0000 (17:41 +0000)]
MFC: r244986

Remove bogus '-' from getopt(3) string hit when porting daemon(8) to
GNU/Linux *duck*.

git-svn-id: svn://svn.freebsd.org/base/stable/9@245993 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoRevert r237842 (MFC'ed to stable/9 in r238012) and switch back to
marius [Sun, 27 Jan 2013 17:38:29 +0000 (17:38 +0000)]
Revert r237842 (MFC'ed to stable/9 in r238012) and switch back to
SCHED_ULE. All problems I encountered with the latter have been
fixed with r241780 (MFC'ed to stable/9 in r245981).

git-svn-id: svn://svn.freebsd.org/base/stable/9@245992 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC: r244307
marius [Sun, 27 Jan 2013 17:33:22 +0000 (17:33 +0000)]
MFC: r244307

Restore pre-r234898 (MFC'ed to stable/9 in r236076) printing of boot loader
and path.

git-svn-id: svn://svn.freebsd.org/base/stable/9@245990 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC: r241875
marius [Sun, 27 Jan 2013 17:15:56 +0000 (17:15 +0000)]
MFC: r241875

Remove support for using Giant for locking within mpt(4). Finer grained
locking has been working fine for ~5.5 years by now.

git-svn-id: svn://svn.freebsd.org/base/stable/9@245986 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC: r241874
marius [Sun, 27 Jan 2013 17:13:11 +0000 (17:13 +0000)]
MFC: r241874

After r241858 (MFC'ed to stable/9 in r242286), remove the remainder of
FreeBSD ~4 support from mpt(4).

git-svn-id: svn://svn.freebsd.org/base/stable/9@245983 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC: 241780
marius [Sun, 27 Jan 2013 16:49:11 +0000 (16:49 +0000)]
MFC: 241780

- Give PIL_PREEMPT the lowest priority just above low/stray interrupts.
  The reason for this is that the SPARC v9 architecture allows nested
  interrupts of higher priority/level than that of the current interrupt
  to occur (and we can't just entirely bypass this model, also, at least
  for tick interrupts, this also wouldn't be wise). However, when a
  preemption interrupt interrupts another interrupt of lower priority,
  f.e. PIL_ITHREAD, and that one in turn is nested by a third interrupt,
  f.e. PIL_TICK, with SCHED_ULE the execution of interrupts higher than
  PIL_PREEMPT may be migrated to another CPU. In particular, tl1_ret(),
  which is responsible for restoring the state of the CPU prior to entry
  to the interrupt based on the (also migrated) trap frame, then is run
  on a CPU which actually didn't receive the interrupt in question,
  causing an inappropriate processor interrupt level to be "restored".
  In turn, this causes interrupts of the first level, i.e. PIL_ITHREAD
  in the above scenario, to be blocked on the target of the migration
  until the correct PIL happens to be restored again on that CPU again.
  Making PIL_PREEMPT the lowest real priority, this effectively prevents
  this scenario from happening, as preemption interrupts no longer can
  interrupt any other interrupt besides stray ones (which is no issue).
  Thanks to attilio@ and especially mav@ for helping me to understand
  this problem at the 201208DevSummit.
- Give PIL_STOP (which is also used for IPI_STOP_HARD, given that there's
  no real equivalent to NMIs on SPARC v9) the highest possible priority
  just below the hardwired PIL_TICK, so it has a chance to interrupt
  more things.

git-svn-id: svn://svn.freebsd.org/base/stable/9@245981 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r245697: zfs/sparc64 boot: fix booting after r242230
avg [Sat, 26 Jan 2013 09:55:51 +0000 (09:55 +0000)]
MFC r245697: zfs/sparc64 boot: fix booting after r242230

git-svn-id: svn://svn.freebsd.org/base/stable/9@245943 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r240104:
delphij [Sat, 26 Jan 2013 05:23:17 +0000 (05:23 +0000)]
MFC r240104:

Add hpt27xx to GENERIC kernel for amd64 and i386 systems.

git-svn-id: svn://svn.freebsd.org/base/stable/9@245939 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r245768:
delphij [Sat, 26 Jan 2013 05:20:09 +0000 (05:20 +0000)]
MFC r245768:

 - Don't include date and time the driver is built, this is useful for
   generating binary diffs.
 - Constify a few strings used in the driver.
 - Style changes to make the driver compile with default clang settings.

Approved by: HighPoint Technologies

git-svn-id: svn://svn.freebsd.org/base/stable/9@245938 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r245918:
gjb [Sat, 26 Jan 2013 00:39:52 +0000 (00:39 +0000)]
MFC r245918:
 - Fix update method (s/SUP/CVS) warning.

git-svn-id: svn://svn.freebsd.org/base/stable/9@245929 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r245612:
pfg [Fri, 25 Jan 2013 03:38:02 +0000 (03:38 +0000)]
MFC r245612:

ext2fs: temporarily disable the reallocation code.

Testing with fsx has revealed problems and in order to
hunt the bugs properly we need reduce the complexity.

This seems to help but doesn't work around all the issues.

While here add missing merginfo for r245762 which somehow
got lost.

git-svn-id: svn://svn.freebsd.org/base/stable/9@245897 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r245757:
gjb [Fri, 25 Jan 2013 00:45:46 +0000 (00:45 +0000)]
MFC r245757:
  - If update method is SUP_UPDATE or CVS, warn that those
    update methods are deprecated.
  - While here, remove bogus NO_WWWUPDATE.

git-svn-id: svn://svn.freebsd.org/base/stable/9@245895 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r244482:
yongari [Thu, 24 Jan 2013 02:19:38 +0000 (02:19 +0000)]
MFC r244482:
  Recognize 5720S PHY and treat it as 5708S PHY.
  Unfortunately 5720S uses 5709S PHY id so add a hack to detect 5720S
  PHY by checking parent device name.  5720S PHY does not support 2500SX.

git-svn-id: svn://svn.freebsd.org/base/stable/9@245865 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r240252, r241541, r241543, r245756:
gjb [Thu, 24 Jan 2013 01:40:47 +0000 (01:40 +0000)]
MFC r240252, r241541, r241543, r245756:

r240252: (eadler)
 - Remove documentation and www cvsup files as they are no longer
   useful with the switch to subversion.

r241541: (joel)
 - Minor mdoc improvements. Also remove unnecessary csup reference.

r241543: (eadler)
 - Bump .Dd

r245756:
 - Mark SUP_UPDATE as deprecated in make.conf(5), providing
   instructions to use SVN_UPDATE or freebsd-update(8).
 - While here, remove bogus NO_WWWUPDATE.

git-svn-id: svn://svn.freebsd.org/base/stable/9@245863 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r244481:
yongari [Thu, 24 Jan 2013 01:31:22 +0000 (01:31 +0000)]
MFC r244481:
  For fiber PHYs, BRGPHY_MII_1000CTL register is not defined at all
  so do not touch it.

git-svn-id: svn://svn.freebsd.org/base/stable/9@245861 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r245487:
yongari [Thu, 24 Jan 2013 01:12:55 +0000 (01:12 +0000)]
MFC r245487:
  Add D-Link DFE-520TX (rev. C1) to HARDWARE section.

git-svn-id: svn://svn.freebsd.org/base/stable/9@245859 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r245485:
yongari [Thu, 24 Jan 2013 01:07:34 +0000 (01:07 +0000)]
MFC r245485:
  Add D-Link DFE-520TX rev C1.

git-svn-id: svn://svn.freebsd.org/base/stable/9@245857 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoRemove bogus mergeinfo introduced with r240545.
gjb [Thu, 24 Jan 2013 00:45:53 +0000 (00:45 +0000)]
Remove bogus mergeinfo introduced with r240545.

git-svn-id: svn://svn.freebsd.org/base/stable/9@245855 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r239132:
scottl [Wed, 23 Jan 2013 22:56:03 +0000 (22:56 +0000)]
MFC r239132:

Clone BIO_ORDERED flag, for disk drivers (namely CAM) that try to
 consume it.

git-svn-id: svn://svn.freebsd.org/base/stable/9@245851 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMerge r245841:
glebius [Wed, 23 Jan 2013 10:52:36 +0000 (10:52 +0000)]
Merge r245841:
  posix_fadvise(2) first appeared in FreeBSD 9.1

git-svn-id: svn://svn.freebsd.org/base/stable/9@245842 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r245648;
pfg [Tue, 22 Jan 2013 22:30:17 +0000 (22:30 +0000)]
MFC    r245648;

Missing mergeinfo.

Noticed by: kib

git-svn-id: svn://svn.freebsd.org/base/stable/9@245826 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r245446:
mav [Tue, 22 Jan 2013 17:08:09 +0000 (17:08 +0000)]
MFC r245446:
In case somebody still use it, fix legacy ataraid(4) to work on combined
PATA+AHCI controllers, such as JMicron JMB363.

PR: kern/159271

git-svn-id: svn://svn.freebsd.org/base/stable/9@245798 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r244146:
mav [Tue, 22 Jan 2013 17:06:42 +0000 (17:06 +0000)]
MFC r244146:
Add IDs for SATA controllers on AMD Hudson-2 series chipsets.
I am not exactly sure about the naming due to lack of specs on AMD site,
but it is better to have some identification then none at all.

git-svn-id: svn://svn.freebsd.org/base/stable/9@245797 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r241402:
mav [Tue, 22 Jan 2013 17:05:26 +0000 (17:05 +0000)]
MFC r241402:
Add checks for ata_sata_scr_read() return statuses. It is mostly to silence
Clang Static Analyzer warnings as errors there are usually unlikely.

git-svn-id: svn://svn.freebsd.org/base/stable/9@245795 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r245458:
zont [Tue, 22 Jan 2013 12:09:43 +0000 (12:09 +0000)]
MFC r245458:
- Use standard RETURN VALUES section.

git-svn-id: svn://svn.freebsd.org/base/stable/9@245788 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r240145:
zont [Tue, 22 Jan 2013 12:05:53 +0000 (12:05 +0000)]
MFC r240145:
- Simplify VM code by using vmspace_wired_count() for counting wired
memory of a process.

MFC r245255:
- Reduce kernel size by removing unnecessary pointer indirections.

GENERIC kernel size reduced in 16 bytes and RACCT kernel in 336 bytes.

MFC r245296:
- Improve readability of sys_obreak().

MFC r245421:
- Get rid of unused function vmspace_wired_count().

git-svn-id: svn://svn.freebsd.org/base/stable/9@245787 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r243018:
scottl [Tue, 22 Jan 2013 07:40:38 +0000 (07:40 +0000)]
MFC r243018:

 - Fix a truncation bug with softdep journaling that could leak blocks on
   crash.  When truncating a file that never made it to disk we use the
   canceled allocation dependencies to hold the journal records until
   the truncation completes.  Previously allocdirect dependencies on
   the id_bufwait list were not considered and their journal space
   could expire before the bitmaps were written.  Cancel them and attach
   them to the freeblks as we do for other allocdirects.
 - Add KTR traces that were used to debug this problem.
 - When adding jsegdeps, always use jwork_insert() so we don't have more
   than one segdep on a given jwork list.

git-svn-id: svn://svn.freebsd.org/base/stable/9@245779 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r243017:
scottl [Tue, 22 Jan 2013 07:38:43 +0000 (07:38 +0000)]
MFC r243017:

 - blk_equals() is too strict.  If the journal entry defines more frags
   than we're claiming it should still be considered an exact match.  This
   would previously leak frags that had been extended.
 - If there is a sequence number problem in the journal print the sequence
   numbers we've seen so far for debugging.
 - Clean up the block mask related debuging printfs.  Some are redundant.

git-svn-id: svn://svn.freebsd.org/base/stable/9@245778 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r245133:
kib [Tue, 22 Jan 2013 07:32:26 +0000 (07:32 +0000)]
MFC r245133:
Only assign the environ in the startup code when environ is NULL.

Note that this is not the merge, but a reimplementation of the fix,
done for the not-consolidated code in the stable/9.

git-svn-id: svn://svn.freebsd.org/base/stable/9@245777 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r242924:
scottl [Tue, 22 Jan 2013 07:22:58 +0000 (07:22 +0000)]
MFC r242924:

 - Fix a bug that has existed since the original softdep implementation.
   When a background copy of a cg is written we complete any work associated
   with that bmsafemap.  If new work has been added to the non-background
   copy of the buffer it will be completed before the next write happens.
   The solution is to do the rollbacks when we make the copy so only those
   dependencies that were present at the time of writing will be completed
   when the background write completes.  This would've resulted in various
   bitmap related corruptions and panics.  It also would've expired journal
   entries early causing journal replay to miss some records.

git-svn-id: svn://svn.freebsd.org/base/stable/9@245776 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r242734, 242815:
scottl [Tue, 22 Jan 2013 07:18:33 +0000 (07:18 +0000)]
MFC r242734, 242815:

 - Implement BIO_FLUSH support around journal entries.  This will not 100%
   solve power loss problems with dishonest write caches.  However, it
   should improve the situation and force a full fsck when it is unable
   to resolve with the journal.
 - Resolve a case where the journal could wrap in an unsafe way causing
   us to prematurely lose journal entries in very specific scenarios.

 - Correct rev 242734, segments can sometimes get stuck.  Be a bit more
   defensive with segment state.

git-svn-id: svn://svn.freebsd.org/base/stable/9@245775 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r242492:
scottl [Tue, 22 Jan 2013 07:10:26 +0000 (07:10 +0000)]
MFC r242492:

 - In cancel_mkdir_dotdot don't panic if the inodedep is not available.  If
   the previous diradd had already finished it could have been reclaimed
   already.  This would only happen under heavy dependency pressure.

git-svn-id: svn://svn.freebsd.org/base/stable/9@245774 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r245648:
pfg [Tue, 22 Jan 2013 03:39:55 +0000 (03:39 +0000)]
MFC r245648:

newfs_msdos: cosmetical cleanups

- Simplify diagnostic messages.
- Adopt lowercase first letters to make the messages
  more canonical.

PR: bin/175404
Submitted by: Christoph Mallon
Reviewed by: bde

git-svn-id: svn://svn.freebsd.org/base/stable/9@245763 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r245612:
pfg [Tue, 22 Jan 2013 03:32:13 +0000 (03:32 +0000)]
MFC r245612:

ext2fs: Add some DOINGASYNC checks to match ffs.
This is mostly cosmetical.

Reviewed by:    bde

git-svn-id: svn://svn.freebsd.org/base/stable/9@245762 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r245249:
hselasky [Mon, 21 Jan 2013 07:31:15 +0000 (07:31 +0000)]
MFC r245249:

Bugfix: Fix sizeof() argument.
Found by:     Haakon Loevdal

git-svn-id: svn://svn.freebsd.org/base/stable/9@245734 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r245248:
hselasky [Mon, 21 Jan 2013 07:28:46 +0000 (07:28 +0000)]
MFC r245248:
Fix detection of Razer Copperhead as a USB mouse.
Factor out USB mouse and keyboard detection logic.
Reject USB keyboards which have mouse alike HID items
in their HID descriptors.

Submitted by: Matthew W

git-svn-id: svn://svn.freebsd.org/base/stable/9@245733 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r245132 and r245175:
hselasky [Mon, 21 Jan 2013 07:25:38 +0000 (07:25 +0000)]
MFC r245132 and r245175:
Optimise the XHCI interrupt handling.
This patch will save CPU time when the XHCI interrupt is
shared with other devices.
Only check event rings when interrupt bits are set.
Otherwise would indicate hiding possible hardware fault(s).

Tested by: sos @
Submitted by: sos @

git-svn-id: svn://svn.freebsd.org/base/stable/9@245732 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r243780:
hselasky [Mon, 21 Jan 2013 07:22:45 +0000 (07:22 +0000)]
MFC r243780:
- Add support for Etron EJ168 USB 3.0 Host Controllers.
This brand of controllers expects that the number of
contexts specified in the input slot context points
to an active endpoint context, else it refuses to
operate.

- Wrap one or two long lines.

Tested by: Markus Pfeiffer (DragonFlyBSD)

git-svn-id: svn://svn.freebsd.org/base/stable/9@245731 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r245047:
hselasky [Mon, 21 Jan 2013 07:16:29 +0000 (07:16 +0000)]
MFC r245047:
Fix for "run0: wcid=xx out of range" error message.

PR: usb/174963
Submitted by: PseudoCylon <moonlightakkiy@yahoo.ca>

git-svn-id: svn://svn.freebsd.org/base/stable/9@245729 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r244957:
hselasky [Mon, 21 Jan 2013 07:14:06 +0000 (07:14 +0000)]
MFC r244957:
Add missing dependancy.

Submitted by: Michael Butler

git-svn-id: svn://svn.freebsd.org/base/stable/9@245728 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r244837 and r245427:
hselasky [Mon, 21 Jan 2013 07:10:27 +0000 (07:10 +0000)]
MFC r244837 and r245427:
Add new USB IDs.

PR: usb/174814
Submitted by: Andy Balholm,  Lowell Gilbert

git-svn-id: svn://svn.freebsd.org/base/stable/9@245727 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r244627: lock.9: fix incorrect descriptions of LK_SHARED and
avg [Sun, 20 Jan 2013 16:23:37 +0000 (16:23 +0000)]
MFC r244627: lock.9: fix incorrect descriptions of LK_SHARED and
LK_DOWNGRADE behavior

git-svn-id: svn://svn.freebsd.org/base/stable/9@245694 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r243518: add zfs_bmap to aid vnode_pager_haspage
avg [Sun, 20 Jan 2013 16:15:30 +0000 (16:15 +0000)]
MFC r243518: add zfs_bmap to aid vnode_pager_haspage

git-svn-id: svn://svn.freebsd.org/base/stable/9@245693 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r243763: zfs_getpages: make use of vm_page_readahead_finish
avg [Sun, 20 Jan 2013 16:07:00 +0000 (16:07 +0000)]
MFC r243763: zfs_getpages: make use of vm_page_readahead_finish

git-svn-id: svn://svn.freebsd.org/base/stable/9@245692 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r243517: zfs_getpages: optimize for large block sizes
avg [Sun, 20 Jan 2013 16:03:51 +0000 (16:03 +0000)]
MFC r243517: zfs_getpages: optimize for large block sizes

git-svn-id: svn://svn.freebsd.org/base/stable/9@245691 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r245382: sh: Fix crash when parsing '{ } &'.
jilles [Sun, 20 Jan 2013 14:22:21 +0000 (14:22 +0000)]
MFC r245382: sh: Fix crash when parsing '{ } &'.

git-svn-id: svn://svn.freebsd.org/base/stable/9@245690 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMerge r243568 from head:
glebius [Sun, 20 Jan 2013 07:45:04 +0000 (07:45 +0000)]
Merge r243568 from head:
  Fix typo in weekly line which made it to rotated after reaching > 1 Kb.

  PR: conf/173857
  Submitted by: Matt Smith <matt xtaz.co.uk>

git-svn-id: svn://svn.freebsd.org/base/stable/9@245683 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMerge r243860 from head:
glebius [Sun, 20 Jan 2013 07:38:38 +0000 (07:38 +0000)]
Merge r243860 from head:
  Flush stdout after RTM_IFANNOUNCE message.

  PR: bin/151600
  Submitted by: Eric van Gyzen <eric vangyzen.net>

git-svn-id: svn://svn.freebsd.org/base/stable/9@245682 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r245495:
kib [Sat, 19 Jan 2013 06:39:49 +0000 (06:39 +0000)]
MFC r245495:
Remove the filtering of the acceptable mount options for nullfs, added
in r245004.

git-svn-id: svn://svn.freebsd.org/base/stable/9@245665 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r245409:
kib [Sat, 19 Jan 2013 06:37:12 +0000 (06:37 +0000)]
MFC r245409:
For zfs vnodes, use the standard inode number based hash algorithm.

git-svn-id: svn://svn.freebsd.org/base/stable/9@245664 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r245408:
kib [Sat, 19 Jan 2013 06:34:41 +0000 (06:34 +0000)]
MFC r245408:
Size the nullfs hashtbl based on the current value of
desiredvnodes. Use vfs_hash_index() to calculate the hash bucket for a
given vnode.

git-svn-id: svn://svn.freebsd.org/base/stable/9@245663 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r245407,245411:
kib [Sat, 19 Jan 2013 06:31:37 +0000 (06:31 +0000)]
MFC r245407,245411:
Set the v_hash for a new vnode in the getnewvnode() to the value
calculated based on the vnode structure address.

git-svn-id: svn://svn.freebsd.org/base/stable/9@245662 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r245406:
kib [Sat, 19 Jan 2013 06:27:39 +0000 (06:27 +0000)]
MFC r245406:
Add vfs_hash_index().

git-svn-id: svn://svn.freebsd.org/base/stable/9@245661 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r245405:
kib [Sat, 19 Jan 2013 06:24:17 +0000 (06:24 +0000)]
MFC r245405:
Rename vfs_hash_index() to vfs_hash_bucket().

git-svn-id: svn://svn.freebsd.org/base/stable/9@245660 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r245072:
kib [Sat, 19 Jan 2013 06:17:27 +0000 (06:17 +0000)]
MFC r245072:
Do not round up the size of the UFS filesystem to the fragment size
when comparing its size with the size of the media, to determine if
the last disk block is unused.

MFC r245074:
Use tabs for indentation.

git-svn-id: svn://svn.freebsd.org/base/stable/9@245659 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC: r245412
bapt [Fri, 18 Jan 2013 17:49:00 +0000 (17:49 +0000)]
MFC: r245412
Directly uses calloc(3) instread of malloc(3) + memset(3)

Reported by: Jeremy Chadwick <jdc@koitsu.org>

git-svn-id: svn://svn.freebsd.org/base/stable/9@245609 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoBelatedly merge etc part of r229850. pfsync.ko is working.
glebius [Fri, 18 Jan 2013 13:16:02 +0000 (13:16 +0000)]
Belatedly merge etc part of r229850. pfsync.ko is working.

Noticed by: des

git-svn-id: svn://svn.freebsd.org/base/stable/9@245604 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r243102:
pluknet [Fri, 18 Jan 2013 08:34:50 +0000 (08:34 +0000)]
MFC r243102:
 Sort SEE ALSO xrefs by the manual section number and add a missing comma.

git-svn-id: svn://svn.freebsd.org/base/stable/9@245593 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r245268:
pluknet [Fri, 18 Jan 2013 08:27:12 +0000 (08:27 +0000)]
MFC r245268:
The Giant lock is no longer used in the vm_map(9) part of the VM.
While here, document that the process lock is acquired in vm_map_stack, too.

git-svn-id: svn://svn.freebsd.org/base/stable/9@245591 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r243373:
jh [Fri, 18 Jan 2013 08:10:00 +0000 (08:10 +0000)]
MFC r243373:

Print correct unit number when attaching preloaded memory disks.
Retire now unused mdunits variable.

git-svn-id: svn://svn.freebsd.org/base/stable/9@245590 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r245003:
kib [Fri, 18 Jan 2013 04:23:54 +0000 (04:23 +0000)]
MFC r245003:
Enable the UFS quotas for big-iron GENERIC kernels.

git-svn-id: svn://svn.freebsd.org/base/stable/9@245587 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r245230: Add no_prefer_iface option.
ume [Thu, 17 Jan 2013 16:39:21 +0000 (16:39 +0000)]
MFC r245230: Add no_prefer_iface option.
It stops treating the address on the interface as special by source
address selection rule even when the interface is outgoing interface.
This is desired in some situation.

git-svn-id: svn://svn.freebsd.org/base/stable/9@245555 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r245225, r245256: Restrict use of source address selection
ume [Thu, 17 Jan 2013 16:11:38 +0000 (16:11 +0000)]
MFC r245225, r245256: Restrict use of source address selection
of getipnodebyname(1) only to IPv6 address.

git-svn-id: svn://svn.freebsd.org/base/stable/9@245553 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r245345:
mjg [Thu, 17 Jan 2013 02:42:08 +0000 (02:42 +0000)]
MFC r245345:
procstat: only one mode flag can be specified, but required check for 'i'
and 'j' modes was missing. Fix that.

git-svn-id: svn://svn.freebsd.org/base/stable/9@245530 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r245006:
delphij [Thu, 17 Jan 2013 00:42:30 +0000 (00:42 +0000)]
MFC r245006:

Sync with driver.

git-svn-id: svn://svn.freebsd.org/base/stable/9@245521 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r244975:
delphij [Wed, 16 Jan 2013 00:45:05 +0000 (00:45 +0000)]
MFC r244975:

Indicate that we are using OpenSSL with some local modifications.

git-svn-id: svn://svn.freebsd.org/base/stable/9@245482 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r244973:
delphij [Wed, 16 Jan 2013 00:42:25 +0000 (00:42 +0000)]
MFC r244973:

Integrate OpenSSL changeset 22950 (appro):

bn_word.c: fix overflow bug in BN_add_word.

git-svn-id: svn://svn.freebsd.org/base/stable/9@245481 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r244562,245241,245435
brooks [Tue, 15 Jan 2013 16:46:51 +0000 (16:46 +0000)]
MFC r244562,245241,245435

Add NetBSD's mtree to the tree and install it as nmtree.

Always install our mtree as /usr/sbin/fmtree and link it as
/usr/sbin/mtree by default.

Add a src.conf option WITH_NMTREE that causes NetBSD's mtree to be linked
as /usr/sbin/mtree as well as /usr/sbin/nmtree.

Sponsored by: DARPA, AFRL

git-svn-id: svn://svn.freebsd.org/base/stable/9@245462 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r244557:
brooks [Tue, 15 Jan 2013 16:41:52 +0000 (16:41 +0000)]
MFC r244557:

Add libnetbsd, a thin compatibility layer intended to allow a limited
set of NetBSD software to compile as part of the FreeBSD build with
little or no modification.  It is built as a static library and not
installed for general use.  Likewise, its header files are not
installed.

Sponsored by: DARPA, AFRL

git-svn-id: svn://svn.freebsd.org/base/stable/9@245461 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r244553,244594,244608,244639
bapt [Tue, 15 Jan 2013 09:14:18 +0000 (09:14 +0000)]
MFC r244553,244594,244608,244639

In preparation for making 'pkg -N' the one true method of determining
whether a system has been configured to use pkgng, cause /usr/sbin/pkg
recognise a -n option and exit with a failure code when the pkg port
is not installed

Submitted by: matthew

git-svn-id: svn://svn.freebsd.org/base/stable/9@245451 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoRevert the MFC to sys/dev/ath/ath_hal/ar9002/ar9285_attach.c again,
dim [Tue, 15 Jan 2013 07:41:50 +0000 (07:41 +0000)]
Revert the MFC to sys/dev/ath/ath_hal/ar9002/ar9285_attach.c again,
since it does not compile on stable/9.  During testing, I had a
different local fix, so I failed to notice this did not work.  Apologies
for the breakage.

Pointy hat to: dim

git-svn-id: svn://svn.freebsd.org/base/stable/9@245449 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r244401,245305,245308:
brooks [Mon, 14 Jan 2013 22:00:43 +0000 (22:00 +0000)]
MFC r244401,245305,245308:

Replace our implementation of the vis(3) and unvis(3) APIs with
NetBSD's.  This output size limited versions of vis and unvis functions
as well as a set of vis variants that allow arbitrary characters to be
specified for encoding.

Finally, MIME Quoted-Printable encoding as described in RFC 2045 is
supported.

git-svn-id: svn://svn.freebsd.org/base/stable/9@245439 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoOops, r186202 (4 years ago) forgot to remove Tape from the F1 Help file.
dteske [Mon, 14 Jan 2013 21:31:27 +0000 (21:31 +0000)]
Oops, r186202 (4 years ago) forgot to remove Tape from the F1 Help file.

git-svn-id: svn://svn.freebsd.org/base/stable/9@245438 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoUse a direct commit to fix a minor mistake in r245431, before it spreads
dim [Mon, 14 Jan 2013 20:26:50 +0000 (20:26 +0000)]
Use a direct commit to fix a minor mistake in r245431, before it spreads
too far: use the correct FreeBSD version in clang's target triple.  That
is, $ARCH-unknown-freebsd9.1 instead of $ARCH-unknown-freebsd9.2.

This will be bumped again for the 9.2 release, when it branches off.

git-svn-id: svn://svn.freebsd.org/base/stable/9@245432 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r244628:
dim [Mon, 14 Jan 2013 19:51:26 +0000 (19:51 +0000)]
MFC r244628:

  Upgrade our copy of llvm/clang to 3.2 release.

  Release notes for llvm:
  http://llvm.org/releases/3.2/docs/ReleaseNotes.html

  Release notes for clang:
  http://llvm.org/releases/3.2/tools/clang/docs/ReleaseNotes.html

git-svn-id: svn://svn.freebsd.org/base/stable/9@245431 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoPartial MFC of r234508 (by adrian):
dim [Mon, 14 Jan 2013 19:31:44 +0000 (19:31 +0000)]
Partial MFC of r234508 (by adrian):

  "Upgrade" the AR9285 code to support PCI/ART EEPROM on flash.

  I've just verified that this boots on an Atheros AP91. I haven't verified
  it with traffic though, so YMMV.

(This is a prerequisite for the coming clang 3.2 upgrade.)

git-svn-id: svn://svn.freebsd.org/base/stable/9@245429 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years ago- Fix r245416.
zont [Mon, 14 Jan 2013 11:13:31 +0000 (11:13 +0000)]
- Fix r245416.
  Turn unprivileged mlock off for compatibility.  Exactly this behaviour
  was approved by kib (mentor).

This is a direct commit.

Approved by: kib (mentor)

git-svn-id: svn://svn.freebsd.org/base/stable/9@245420 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r244679:
zont [Mon, 14 Jan 2013 11:00:06 +0000 (11:00 +0000)]
MFC r244679:
- Update manual pages accordingly to r244384 and r244385.

Approved by: kib (mentor)

git-svn-id: svn://svn.freebsd.org/base/stable/9@245417 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r244384:
zont [Mon, 14 Jan 2013 10:58:55 +0000 (10:58 +0000)]
MFC r244384:
- Fix locked memory accounting for maps with MAP_WIREFUTURE flag.
- Add sysctl vm.old_mlock which may turn such accounting off.

MFC r244385:
- Add sysctl to allow unprivileged users to call mlock(2)-family system
  calls and turn it off for compatibility.
- Do not allow to call them inside jail.

Approved by: kib (mentor)

git-svn-id: svn://svn.freebsd.org/base/stable/9@245416 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r244383:
zont [Mon, 14 Jan 2013 10:58:20 +0000 (10:58 +0000)]
MFC r244383:
- Set memorylocked limit to 64Kb for default login class.
  This prevents unprivileged users to lock too much memory.
- Set memorylocked limit to 64Mb for daemon login class.
  Some daemons such as amd(8) and watchdogd(8) calls mlockall(2) on
  startup, they are run from init(8) which uses daemon login class.
- Set memorylocked limit to unlimited for root login class.

Approved by: kib (mentor)

git-svn-id: svn://svn.freebsd.org/base/stable/9@245415 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC: r243883
bapt [Sun, 13 Jan 2013 22:37:45 +0000 (22:37 +0000)]
MFC: r243883

if PACKAGESITE url scheme is not 'file://', always try to revolv SRV records and
use them if any. It allows the bootstrap to use directly pkg.FreeBSD.org instead
of pkgbeta.FreeBSD.org

git-svn-id: svn://svn.freebsd.org/base/stable/9@245394 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r245272:
dim [Sun, 13 Jan 2013 20:35:08 +0000 (20:35 +0000)]
MFC r245272:

Add an ugly hack to libgcc's unwind code, to make it behave properly at
runtime on amd64, when it is compiled by clang.  Some versions of clang
don't save and restore all callee registers, if a __builtin_eh_return()
intrinsic is used in a function.  This is particularly bad on amd64.

Until the problem gets fixed by upstream, use an asm statement to force
clang to assume the registers in question are clobbered, when invoking
__builtin_eh_return(), so it will emit code to save and restore them.

This should fix the crashes reported on -current with some C++ programs,
particularly those that throw exceptions over multiple function
boundaries.

Reported by: stefanf

git-svn-id: svn://svn.freebsd.org/base/stable/9@245384 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r244995 r244996 r244997.
markj [Sun, 13 Jan 2013 04:14:46 +0000 (04:14 +0000)]
MFC r244995 r244996 r244997.

MFC r244995:
  Fix a typo in an error message.

MFC r244996:
  Have -n imply -r, since dry-run mode obviously doesn't require root
  privileges.

MFC r244997:
  Make sure to update the mtime of a logfile after archiving it. This
  ensures that the next rotation happens at the correct time when using
  interval-based rotations.

Approved by: rstone (co-mentor)

git-svn-id: svn://svn.freebsd.org/base/stable/9@245360 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r244719:
markj [Sun, 13 Jan 2013 04:13:45 +0000 (04:13 +0000)]
MFC r244719:
  Add the NO_SYNC_CACHE quirk for all Apple USB MSC devices, as they
  typically do not handle the SYNCHRONIZE_CACHE command - they either
  return an error or the firmware enters a reset loop.

Approved by: rstone (co-mentor)

git-svn-id: svn://svn.freebsd.org/base/stable/9@245358 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoext2fs: cleanup the dinode structure.
pfg [Sun, 13 Jan 2013 01:26:50 +0000 (01:26 +0000)]
ext2fs: cleanup the dinode structure.

It was plagued with style errors and the offsets had been lost.
While here took the time to update the fields according to the
latest ext4 documentation.

Reviewed by: bde

git-svn-id: svn://svn.freebsd.org/base/stable/9@245356 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r245005:
kib [Sun, 13 Jan 2013 00:58:02 +0000 (00:58 +0000)]
MFC r245005:
Allow to specify "cache" and "nocache" as an option for
mount_nullfs(8).

git-svn-id: svn://svn.freebsd.org/base/stable/9@245354 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f