]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
11 years ago- Fix off-by-one error when returning max pin number
Oleksandr Tymoshenko [Mon, 25 Feb 2013 08:04:47 +0000 (08:04 +0000)]
- Fix off-by-one error when returning max pin number
- Fix GPIOGET for output pins. Requesting state for
    output pin is valid operation, get the state from
    TI_GPIO_DATAOUTX register

11 years agokernacc() expects all KVAs to be covered in the kernel map. With the
Marcel Moolenaar [Mon, 25 Feb 2013 02:41:38 +0000 (02:41 +0000)]
kernacc() expects all KVAs to be covered in the kernel map. With the
introduction of the PBVM, this stopped being the case. Redefine the
VM parameters so that the PBVM is included in the kernel map. In
particular this introduces VM_INIT_KERNEL_ADDRESS to point to the base
of region 5 now that VM_MIN_KERNEL_ADDRESS points to the base of
region 4 to include the PBVM.
While here define KERNBASE to the actual link address of the kernel as
is intended.

PR: 169926

11 years agoFix the bug I introduced in r247045.
Tim Kientzle [Mon, 25 Feb 2013 01:50:04 +0000 (01:50 +0000)]
Fix the bug I introduced in r247045.
After digging through more carefully, it looks like there's
no real need to have the DTB in the module directory.
So we can simplify a lot:  Just copy DTB into local heap
for "fdt addr" and U-Boot integration, drop all the extra
COPYIN() calls.

I've left one final COPYIN() to update the in-kernel DTB
for consistency with how this code used to work, but I'm
no longer convinced it's appropriate here.

I've also remove the mem_load_raw() utility that I added
to boot/common/module.c with r247045 since it's no longer
necessary.

11 years agolibc/opendir: Improve behaviour of union uniquifier:
Jilles Tjoelker [Sun, 24 Feb 2013 20:53:32 +0000 (20:53 +0000)]
libc/opendir: Improve behaviour of union uniquifier:

* Reopen the directory using openat(fd, ".", ...) instead of opening the
  pathname again. This fixes a race condition where the meaning of the
  pathname changes and allows a reopen with fdopendir().
* Always reopen the directory for union stacks, not only when DTF_REWIND
  is passed. Applications should be able to fchdir(dirfd(dir)) and
  *at(dirfd(dir), ...). DTF_REWIND now does nothing.

11 years agoCatch up with internal API changes for initbarea() and getdatablk()
Sergey Kandaurov [Sun, 24 Feb 2013 19:32:43 +0000 (19:32 +0000)]
Catch up with internal API changes for initbarea() and getdatablk()
of fsck_ffs introduced with r247212.

Submitted by: David Wolfskill <david@catwhisker.org>

11 years agoMerge part of r1712 from elftoolchain, making it possible to resize ELF
Mark Johnston [Sun, 24 Feb 2013 15:15:50 +0000 (15:15 +0000)]
Merge part of r1712 from elftoolchain, making it possible to resize ELF
sections and indirectly change the layout of an ELF file when
ELF_F_LAYOUT is not set.

PR: bin/167103
Approved by: rstone (co-mentor)
Obtained from: elftoolchain
MFC after: 2 weeks

11 years agoWhen running with the -d option, instrument fsck_ffs to track the number,
Kirk McKusick [Sun, 24 Feb 2013 06:44:29 +0000 (06:44 +0000)]
When running with the -d option, instrument fsck_ffs to track the number,
data type, and running time of its I/O operations.

No functional changes.

11 years ago- Move dma, sdhci and mbox nodes down in dts in order to get them
Oleksandr Tymoshenko [Sat, 23 Feb 2013 23:22:48 +0000 (23:22 +0000)]
- Move dma, sdhci and mbox nodes down in dts in order to get them
    initialized after FPIO controller since they might rely on GPIO
    functionality

- Update interrupts property of dma node to contain all allocated
    interrupts

11 years agoBump per-device interrupt limit to more reasonable default.
Oleksandr Tymoshenko [Sat, 23 Feb 2013 22:58:04 +0000 (22:58 +0000)]
Bump per-device interrupt limit to more reasonable default.

Some hardware like DMA and GPIO controllers might require
more then 8 interrupts per device instance.

Submitted by: Daisuke Aoyama <aoyama at peach.ne.jp>
Discussed with: gber@, raj@

11 years agosh: If a SIGINT or SIGQUIT interrupts "wait", return status 128+sig.
Jilles Tjoelker [Sat, 23 Feb 2013 22:50:57 +0000 (22:50 +0000)]
sh: If a SIGINT or SIGQUIT interrupts "wait", return status 128+sig.

11 years agoPull in r175962 from upstream llvm trunk:
Dimitry Andric [Sat, 23 Feb 2013 22:48:12 +0000 (22:48 +0000)]
Pull in r175962 from upstream llvm trunk:

  X86: Disable cmov-memory patterns on subtargets without cmov.

  Fixes PR15115.

For the i386 arch, this should enable cmov instructions only on
-march=pentiumpro and higher.  Since our default CPU is i486, cmov
instructions will now be disabled by default.

MFC after: 1 week

11 years agoAdd macroses to properly map IO peripherals memory window from
Oleksandr Tymoshenko [Sat, 23 Feb 2013 22:46:26 +0000 (22:46 +0000)]
Add macroses to properly map IO peripherals memory window from
    ARM physical memory address space to VideoCore address space

11 years ago"fdt addr" gets run from loader.rc before the kernel is loaded.
Tim Kientzle [Sat, 23 Feb 2013 20:34:47 +0000 (20:34 +0000)]
"fdt addr" gets run from loader.rc before the kernel is loaded.
This was broken by r247045 which tried to copy the FDT into the
module directory immediately.
Instead, store the address and arrange for the FDT to get
copied into the module directory later when the usual
FDT initialization runs.

11 years agoPrint kernel args as late as possible before jumping into kernel.
Tim Kientzle [Sat, 23 Feb 2013 20:27:03 +0000 (20:27 +0000)]
Print kernel args as late as possible before jumping into kernel.

11 years agoEnable PREEMPTION by default now that PR 147501 has been fixed.
Marcel Moolenaar [Sat, 23 Feb 2013 19:27:53 +0000 (19:27 +0000)]
Enable PREEMPTION by default now that PR 147501 has been fixed.

11 years agoAdd basic and not very reliable protection against going to sleep with
Alexander Motin [Sat, 23 Feb 2013 18:32:42 +0000 (18:32 +0000)]
Add basic and not very reliable protection against going to sleep with
thread scheduled by interrupt fired after we entered critical section.
None of cpu_sleep() implementations on ARM check sched_runnable() now, so
put the first line of defence here.  This mostly fixes unexpectedly long
sleeps in synthetic tests of calloutng code and probably other situations.

11 years agosh: Test that the exit status is 1 if read encounters EOF.
Jilles Tjoelker [Sat, 23 Feb 2013 15:15:41 +0000 (15:15 +0000)]
sh: Test that the exit status is 1 if read encounters EOF.

11 years agoNow that qsort(3) has a sample comparison function, point to that
Giorgos Keramidas [Sat, 23 Feb 2013 12:31:52 +0000 (12:31 +0000)]
Now that qsort(3) has a sample comparison function, point to that
example from bsearch(3) too, so that we don't have to duplicate
the example code in both places.

PR: docs/176197
Reviewed by: stefanf
Approved by: remko (mentor), gjb (mentor)
MFC after: 1 week

11 years agoMFV r246653:
Martin Matuska [Sat, 23 Feb 2013 11:21:05 +0000 (11:21 +0000)]
MFV r246653:
Import vendor change to avoid "unitialized variable" warnings.

Illumos ZFS issues:
  3522 zfs module should not allow uninitialized variables

References:
  https://www.illumos.org/issues/3522

11 years agoPull in r172354 from upstream clang trunk:
Dimitry Andric [Fri, 22 Feb 2013 22:40:10 +0000 (22:40 +0000)]
Pull in r172354 from upstream clang trunk:

  Refactor the x86 CPU name logic in the driver and pass -march and -mcpu
  flag information down from the Clang driver into the Gold linker plugin
  for LTO. This allows specifying -march on the linker commandline and
  should hopefully have it pass all the way through to the LTO optimizer.

  Fixes PR14697.

Pull in r175919 from upstream clang trunk:

  Driver: Pass down the -march setting down to -cc1as on x86 too.

  The assembler historically didn't make use of any target features, but this has
  changed when support for old CPUs that don't support long nops was added.

This should fix the long nops that still occurred in crt*.o, and
possibly other object files, if the system was compiled for a CPU that
does not support those, such as Geode.

Note that gcc on i386 also does not pass through any -march, -mcpu or
-mtune setting to gas, but this has not caused any trouble yet, because
gas defaults to i386.

Reported by: lev
MFC after: 1 week

11 years agoFix command timeout caused by data underrun during fetching ATAPI sense
Alexander Motin [Fri, 22 Feb 2013 21:43:21 +0000 (21:43 +0000)]
Fix command timeout caused by data underrun during fetching ATAPI sense
data, introduced by r246713.  There are two places where ata_request is
filled in ATA_CAM: ata_cam_begin_transaction() and ata_cam_request_sense().
In the first case DMA should be done for addresses from the CCB. In second
case, DMA should be done to the different address, the address of the sense
buffer inside the CCB structure itself.

11 years agoDon't print an empty line for files with no attributes when -q is given for
Pawel Jakub Dawidek [Fri, 22 Feb 2013 20:49:50 +0000 (20:49 +0000)]
Don't print an empty line for files with no attributes when -q is given for
lsextattr(8).

11 years agoBack out prev. change preventing /sys/sys symlink. It appears my install
Andrey A. Chernov [Fri, 22 Feb 2013 19:57:18 +0000 (19:57 +0000)]
Back out prev. change preventing /sys/sys symlink. It appears my install
was not very recent and not acts like 'ln -h'

11 years agoHide SEMB port of the SiI3826 Port Multiplier by default to avoid extra
Alexander Motin [Fri, 22 Feb 2013 19:53:12 +0000 (19:53 +0000)]
Hide SEMB port of the SiI3826 Port Multiplier by default to avoid extra
errors while it tries to talk via I2C to usually missing external SEP.
There is tunable to enable it back when needed.

11 years agoBump mxge copyright.
Andrew Gallatin [Fri, 22 Feb 2013 19:23:33 +0000 (19:23 +0000)]
Bump mxge copyright.

Sponsored by: Myricom

MFC After: 7 days

11 years agoImprovements for newer mxge nics:
Andrew Gallatin [Fri, 22 Feb 2013 19:21:29 +0000 (19:21 +0000)]
Improvements for newer mxge nics:

- Some mxge nics may store the serial number in the SN2 field of the
  EEPROM.  These will also have an SN=0 field, so parse the SN2 field,
  and give it precedence.

- Skip MXGEFW_CMD_UNALIGNED_TEST on mxge nics which do not require it.
  This saves roughly 10ms per port at device attach time.

Sponsored by: Myricom

MFC After: 7 days

11 years agoAdd DA_Q_NO_PREVENT quirk for Kingston DataTraveler G3 1.00 USB flash.
Alexander Motin [Fri, 22 Feb 2013 17:45:32 +0000 (17:45 +0000)]
Add DA_Q_NO_PREVENT quirk for Kingston DataTraveler G3 1.00 USB flash.

PREVENT ALLOW MEDIUM REMOVAL commands return errors on these devices
without returning sense data. In some cases unrelated following commands
start to return errors too, that makes device to be dropped by CAM.

11 years agoEliminate an unused #define.
Alan Cox [Fri, 22 Feb 2013 16:59:52 +0000 (16:59 +0000)]
Eliminate an unused #define.

11 years agoTry harder to make mxge safe for all combinations of INET and INET6
Andrew Gallatin [Fri, 22 Feb 2013 16:46:28 +0000 (16:46 +0000)]
Try harder to make mxge safe for all combinations of INET and INET6

- Re-fix build by restoring local removed in r247151, but protected
  by #if defined(INET) || defined(INET6) so that the compile
  succeeds in the !(INET||INET6) case.

- Protect call to in_pseudo() with an #ifdef INET, to allow
  a kernel to link with mxge when INET is not compiled in.

- Also remove an errant (improperly commented) obsolete debugging printf

Thanks to Glebius for pointing out the !(INET||INET6) build issue.

Sponsored by: Myricom

MFC After: 7 days

11 years agoFix build.
Gleb Smirnoff [Fri, 22 Feb 2013 12:41:24 +0000 (12:41 +0000)]
Fix build.

11 years agoAdd a workaround for AR5416, AR9130 and AR9160 chipsets - work around
Adrian Chadd [Fri, 22 Feb 2013 07:07:11 +0000 (07:07 +0000)]
Add a workaround for AR5416, AR9130 and AR9160 chipsets - work around
an incorrectly calculated RTS duration value when transmitting aggregates.

These earlier 802.11n NICs incorrectly used the ACK duration time when
calculating what to put in the RTS of an aggregate frame.  Instead it
should have used the block-ack time.  The result is that other stations
may not reserve enough time and start transmitting _over_ the top of
the in-progress blockack field.  Tsk.

This workaround is to popuate the burst duration field with the delta
between the ACK duration the hardware is using and the required duration
for the block-ack.  The result is that the RTS field should now contain
the correct duration for the subsequent block-ack.

This doesn't apply for AR9280 and later NICs.

Obtained from: Qualcomm Atheros

11 years agoAdd the ability to have a 'fallback' search for memory ranges.
Peter Grehan [Fri, 22 Feb 2013 00:46:32 +0000 (00:46 +0000)]
Add the ability to have a 'fallback' search for memory ranges.
These set of ranges will be looked at if a standard memory
range isn't found, and won't be installed in the cache.
Use this to implement the memory behaviour of the PCI hole on
x86 systems, where writes are ignored and reads always return -1.
This allows breakpoints to be set when issuing a 'boot -d', which
has the side effect of accessing the PCI hole when changing the
PTE protection on kernel code, since the pmap layer hasn't been
initialized (a bug, but present in existing FreeBSD releases so
has to be handled).

Reviewed by: neel
Obtained from: NetApp

11 years agoDocument VFCF_SBDRY.
Sergey Kandaurov [Thu, 21 Feb 2013 22:21:45 +0000 (22:21 +0000)]
Document VFCF_SBDRY.

Reviewed by: jhb
X-MFC with: r247116

11 years agoDisable debugging entries about BAW issues. I haven't seen any issues
Adrian Chadd [Thu, 21 Feb 2013 21:47:35 +0000 (21:47 +0000)]
Disable debugging entries about BAW issues.  I haven't seen any issues
to do with BAW tracking in the last 9 months or so.

11 years agoReflect CARP media-type departure.
Sergey Kandaurov [Thu, 21 Feb 2013 21:35:09 +0000 (21:35 +0000)]
Reflect CARP media-type departure.

X-MFC after: never

11 years agoImprove mxge's receive performance for IPv6:
Andrew Gallatin [Thu, 21 Feb 2013 21:28:33 +0000 (21:28 +0000)]
Improve mxge's receive performance for IPv6:

- Add support for IPv6 rx csum offload
- Finally switch mxge from using its own driver lro, to
using tcp_lro

MFC after: 7 days
Sponsored by: Myricom Inc.

11 years agoSeparate items in the list of System values with .Pp to ease readability.
Sergey Kandaurov [Thu, 21 Feb 2013 20:45:19 +0000 (20:45 +0000)]
Separate items in the list of System values with .Pp to ease readability.

11 years agocxgbe(4): Add sysctls to extract debug information from the chip:
Navdeep Parhar [Thu, 21 Feb 2013 20:13:15 +0000 (20:13 +0000)]
cxgbe(4): Add sysctls to extract debug information from the chip:

dev.t4nex.X.misc.cim_la         logic analyzer dump
dev.t4nex.X.misc.cim_qcfg       queue configuration
dev.t4nex.X.misc.cim_ibq_xxx    inbound queues
dev.t4nex.X.misc.cim_obq_xxx    outbound queues

Obtained from: Chelsio
MFC after: 1 week

11 years agoreorder so all the flags are together and make the PCLMUL flag unique..
John-Mark Gurney [Thu, 21 Feb 2013 19:13:19 +0000 (19:13 +0000)]
reorder so all the flags are together and make the PCLMUL flag unique..

This fixes the problem on amd64 miscompiling mpboot.s causing boot
issues...  We are still using gas for a few files in the kernel...

Submitted by: kib
MFC after: 1 month

11 years agoFurther refine the handling of stop signals in the NFS client. The
John Baldwin [Thu, 21 Feb 2013 19:02:50 +0000 (19:02 +0000)]
Further refine the handling of stop signals in the NFS client.  The
changes in r246417 were incomplete as they did not add explicit calls to
sigdeferstop() around all the places that previously passed SBDRY to
_sleep().  In addition, nfs_getcacheblk() could trigger a write RPC from
getblk() resulting in sigdeferstop() recursing.  Rather than manually
deferring stop signals in specific places, change the VFS_*() and VOP_*()
methods to defer stop signals for filesystems which request this behavior
via a new VFCF_SBDRY flag.  Note that this has to be a VFC flag rather than
a MNTK flag so that it works properly with VFS_MOUNT() when the mount is
not yet fully constructed.  For now, only the NFS clients are set this new
flag in VFS_SET().

A few other related changes:
- Add an assertion to ensure that TDF_SBDRY doesn't leak to userland.
- When a lookup request uses VOP_READLINK() to follow a symlink, mark
  the request as being on behalf of the thread performing the lookup
  (cnp_thread) rather than using a NULL thread pointer.  This causes
  NFS to properly handle signals during this VOP on an interruptible
  mount.

PR: kern/176179
Reported by: Russell Cattelan (sigdeferstop() recursion)
Reviewed by: kib
MFC after: 1 month

11 years agosplsoftvm() is no longer in the tree. gc.
Warner Losh [Thu, 21 Feb 2013 17:54:14 +0000 (17:54 +0000)]
splsoftvm() is no longer in the tree. gc.

11 years agobus_dmamap_load_ccb doesn't exist on earlier versions of FreeBSD or
Warner Losh [Thu, 21 Feb 2013 17:50:21 +0000 (17:50 +0000)]
bus_dmamap_load_ccb doesn't exist on earlier versions of FreeBSD or
DragonFlyBSD, so it certainly doesn't need splsoftvm(). Remove it.

# I doubt this driver will now compile on older FreeBSD versions or DFBSD
# We should consider unifdefing it since that code seems unmaintained.

11 years agoRemove splsoftclock() since it is now gone.
Warner Losh [Thu, 21 Feb 2013 17:40:59 +0000 (17:40 +0000)]
Remove splsoftclock() since it is now gone.

11 years agoFix tcp_lro_rx_ipv4() for drivers that do not set CSUM_IP_CHECKED.
Andrew Gallatin [Thu, 21 Feb 2013 17:00:35 +0000 (17:00 +0000)]
Fix tcp_lro_rx_ipv4() for drivers that do not set CSUM_IP_CHECKED.
Specifcially, in_cksum_hdr() returns 0 (not 0xffff) when the IPv4
checksum is correct. Without this fix, the tcp_lro code will reject
good IPv4 traffic from drivers that do not implement IPv4 header
harder csum offload.

Sponsored by: Myricom Inc.

MFC after: 7 days

11 years agoIn the EXAMPLES section: append the subsystem regular expression with a
Sergey Kandaurov [Thu, 21 Feb 2013 15:41:09 +0000 (15:41 +0000)]
In the EXAMPLES section: append the subsystem regular expression with a
typical interface name pattern as devd(8) uses full string match.

Discussed with: avg, glebius

11 years agoUse critical_enter/critical_exit around the time sensitive part of
Warner Losh [Thu, 21 Feb 2013 15:35:48 +0000 (15:35 +0000)]
Use critical_enter/critical_exit around the time sensitive part of
this code to depessimize the worst case we've lived with silently and
uneventfully for the past 12 years. Add a comment about a refinement
for those needing more assurance of accuracy.

Fix ddb's show rtc command deadlock potential when debugging rtc code
by not taking the lock if we're in the debugger. If you need a thumb
to count the number of people that have encountered this, I'd be
surprised.

Submitted by: bde

11 years agoFix build.
Gleb Smirnoff [Thu, 21 Feb 2013 12:52:18 +0000 (12:52 +0000)]
Fix build.

11 years agoFix build.
Gleb Smirnoff [Thu, 21 Feb 2013 12:40:52 +0000 (12:40 +0000)]
Fix build.

11 years agoBe slightly more paranoid with the TX DMA buffer maximum threshold.
Adrian Chadd [Thu, 21 Feb 2013 08:42:40 +0000 (08:42 +0000)]
Be slightly more paranoid with the TX DMA buffer maximum threshold.

Specifically - never jack the TX FIFO threshold up to the absolute
maximum; always leave enough space for two DMA transactions to
appear.

This is a paranoia from the Linux ath9k driver.  It can't hurt.

Obtained from: Linux ath9k

11 years agoRemove incorrect comment about splsoftclock.
Warner Losh [Thu, 21 Feb 2013 07:19:50 +0000 (07:19 +0000)]
Remove incorrect comment about splsoftclock.

11 years agoLocking for todr got pushed down into inittodr and the client
Warner Losh [Thu, 21 Feb 2013 07:16:40 +0000 (07:16 +0000)]
Locking for todr got pushed down into inittodr and the client
libraries it calls (although some might not be doing it right). We are
serialized right now by giant as well. This means the splsoftclock are
now an anachronism that has no benefit, even marking where locking
needs to happen. Remove them.

11 years agoAdd an option to allow the minimum number of delimiters to be tweaked.
Adrian Chadd [Thu, 21 Feb 2013 06:38:49 +0000 (06:38 +0000)]
Add an option to allow the minimum number of delimiters to be tweaked.

This is primarily for debugging purposes.

Tested:

* AR5416, STA mode

11 years agoCorrect comment about use of pmtimer, and the real reason it isn't
Warner Losh [Thu, 21 Feb 2013 06:38:24 +0000 (06:38 +0000)]
Correct comment about use of pmtimer, and the real reason it isn't
used or desirable for amd64.

11 years agoAdd a new option to limit the maximum size of aggregates.
Adrian Chadd [Thu, 21 Feb 2013 06:18:40 +0000 (06:18 +0000)]
Add a new option to limit the maximum size of aggregates.
The default is to limit them to what the hardware is capable of.

Add sysctl twiddles for both the non-RTS and RTS protected aggregate
generation.

Whilst here, add some comments about stuff that I've discovered during
my exploration of the TX aggregate / delimiter setup path from the
reference driver.

11 years agoRemove this unneeded printf(), sorry!
Adrian Chadd [Thu, 21 Feb 2013 02:52:13 +0000 (02:52 +0000)]
Remove this unneeded printf(), sorry!

11 years agoThe request queue is already locked, so we don't need the splsofclock/splx
Warner Losh [Thu, 21 Feb 2013 02:43:44 +0000 (02:43 +0000)]
The request queue is already locked, so we don't need the splsofclock/splx
here to note future work.

11 years agoDon't worry if a module is already loaded when looking for a fstype to mount
Jamie Gritton [Thu, 21 Feb 2013 02:41:37 +0000 (02:41 +0000)]
Don't worry if a module is already loaded when looking for a fstype to mount
(possible in a race condition).

Reviewed by: kib
MFC after: 1 week

11 years agoMost other giant locked storage drivers in the tree don't use
Warner Losh [Thu, 21 Feb 2013 02:40:20 +0000 (02:40 +0000)]
Most other giant locked storage drivers in the tree don't use
splsoftclock to note the need for future locking, so remove it from
here.

11 years agoThe other giant locked storage drivers have removed splbio(), for the
Warner Losh [Thu, 21 Feb 2013 02:34:04 +0000 (02:34 +0000)]
The other giant locked storage drivers have removed splbio(), for the
most part, so remove it here too. Anybody locking this driver will need
far more than locks where splbio() were, so remove these nops.

11 years agoFix broken usage of splhigh() by removing it.
Warner Losh [Thu, 21 Feb 2013 00:40:08 +0000 (00:40 +0000)]
Fix broken usage of splhigh() by removing it.

11 years agoKill now-bogus splhigh() -- it is a nop
Warner Losh [Thu, 21 Feb 2013 00:36:12 +0000 (00:36 +0000)]
Kill now-bogus splhigh() -- it is a nop

11 years agoReplace splhigh() with critical_enter()/leave() to ensure we write the
Warner Losh [Thu, 21 Feb 2013 00:27:51 +0000 (00:27 +0000)]
Replace splhigh() with critical_enter()/leave() to ensure we write the
config mode unlock sequence quickly enough. This likely isn't too critical,
since splhigh() has been a noop for a decade...

11 years agoNo longer need splhigh() since locking was done, delete it and
Warner Losh [Thu, 21 Feb 2013 00:26:31 +0000 (00:26 +0000)]
No longer need splhigh() since locking was done, delete it and
comments about it.

11 years agoRefresh on the shared code for the E1000 drivers.
Jack F Vogel [Thu, 21 Feb 2013 00:25:45 +0000 (00:25 +0000)]
Refresh on the shared code for the E1000 drivers.
  - bear with me, there are lots of white space changes, I would not
    do them, but I am a mere consumer of this stuff and if these drivers
    are to stay in shape they need to be taken.

em driver changes: support for the new i217/i218 interfaces

igb driver changes:
  - TX mq start has a quick turnaround to the stack
  - Link/media handling improvement
  - When link status changes happen the current flow control state
    will now be displayed.
  - A few white space/style changes.

lem driver changes:
  - the shared code uncovered a bogus write to the RLPML register
    (which does not exist in this hardware) in the vlan code,this
    is removed.

11 years agocxgbe(4): Assume that CSUM_TSO in the transmit path implies CSUM_IP and
Navdeep Parhar [Wed, 20 Feb 2013 23:15:40 +0000 (23:15 +0000)]
cxgbe(4): Assume that CSUM_TSO in the transmit path implies CSUM_IP and
CSUM_TCP too.  They are all set explicitly by the kernel usually.

While here, fix an unrelated bug where hardware L4 checksum calculation
was accidentally disabled for some IPv6 packets.

Reported by: alfred@
MFC after: 3 days

11 years agoWhen porting XTS-related code from OpenBSD I forgot to update copyright (only
Pawel Jakub Dawidek [Wed, 20 Feb 2013 22:59:53 +0000 (22:59 +0000)]
When porting XTS-related code from OpenBSD I forgot to update copyright (only
OpenBSD was credited in one of two commits). Fix it.

Reported by: Theo de Raadt <deraadt@cvs.openbsd.org>
Reviewed by: Damien Miller <djm@mindrot.org>

11 years agoDo not use deprecated functions from libarchive
Baptiste Daroussin [Wed, 20 Feb 2013 22:51:42 +0000 (22:51 +0000)]
Do not use deprecated functions from libarchive

11 years agoRemove the unused spl functions: spl0, splsoftcam, splsofttty,
Warner Losh [Wed, 20 Feb 2013 22:20:49 +0000 (22:20 +0000)]
Remove the unused spl functions: spl0, splsoftcam, splsofttty,
splsofttq and splstatclock.

Other used spl functions to follow.

11 years agorevert 247035
Dag-Erling Smørgrav [Wed, 20 Feb 2013 21:16:50 +0000 (21:16 +0000)]
revert 247035

11 years agoFix parallel build race with DEBUG_FLAGS
Ed Maste [Wed, 20 Feb 2013 20:42:56 +0000 (20:42 +0000)]
Fix parallel build race with DEBUG_FLAGS

Reported by: Jan Beich on freebsd-current
Tested by: markj

11 years agoSupport hardlinks in manifest files by the same logic as the treewalk
Brooks Davis [Wed, 20 Feb 2013 19:32:31 +0000 (19:32 +0000)]
Support hardlinks in manifest files by the same logic as the treewalk
code.

Reviewed by: marcel
Sponsored by: DARPA, AFRL

11 years agoSort sections.
Joel Dahl [Wed, 20 Feb 2013 19:05:13 +0000 (19:05 +0000)]
Sort sections.

11 years agoVarious improvements to the qsort(3) usage example:
Giorgos Keramidas [Wed, 20 Feb 2013 18:31:55 +0000 (18:31 +0000)]
Various improvements to the qsort(3) usage example:

- Remove unused #include.
- Do not cast away const.
- Use the canonical idiom to compare two numbers.
- Use proper type for sizes, i.e. size_t instead of int.
- Correct indentation.
- Simplify printf("\n") to puts("").
- Use return instead of exit() in main().

Submitted by: Christoph Mallon, christoph.mallon at gmx.de
Approved by: gjb (mentor)
Reviewed by: stefanf
MFC after: 1 week

11 years agoAvoid panic when tearing down the DTrace pid provider for a
Justin T. Gibbs [Wed, 20 Feb 2013 17:55:17 +0000 (17:55 +0000)]
Avoid panic when tearing down the DTrace pid provider for a
process that has crashed.

sys/cddl/contrib/opensolaris/uts/common/dtrace/fasttrap.c:
In fasttrap_pid_disable(), we cannot PHOLD the proc
structure for a process that no longer exists, but
we still have other, fasttrap specific, state that
must be cleaned up for probes that existed in the
dead process.  Instead of returning early if the
process related to our probes isn't found,
conditionalize the locking and carry on with a NULL
proc pointer.  The rest of the fasttrap code already
understands that a NULL proc is possible and does
the right things in this case.

Sponsored by: Spectra Logic Corporation
Reviewed by: rpaulo, gnn
MFC after: 1 week

11 years agoOrphaned processes that are being traced are killed by the
Justin T. Gibbs [Wed, 20 Feb 2013 17:46:38 +0000 (17:46 +0000)]
Orphaned processes that are being traced are killed by the
kernel.  Properly restore, continue, and detach from processes
being DTraced when DTrace exits with an error so the program
being inspected is not terminated.

cddl/contrib/opensolaris/cmd/dtrace/dtrace.c:
In fatal(), the generic error handler, close the DTrace
handle as is done in the "probe/script" error handler
dfatal().  fatal() can be invoked after DTrace attaches
to processes (e.g. a script specified by command line
argument can't be found) and closing the handle will
release them.

Submitted by: Spectra Logic Corporation
Reviewed by: rpaulo, gnn

11 years agoConvert machine/elf.h, machine/frame.h, machine/sigframe.h,
Konstantin Belousov [Wed, 20 Feb 2013 17:39:52 +0000 (17:39 +0000)]
Convert machine/elf.h, machine/frame.h, machine/sigframe.h,
machine/signal.h and machine/ucontext.h into common x86 includes,
copying from amd64 and merging with i386.

Kernel-only compat definitions are kept in the i386/include/sigframe.h
and i386/include/signal.h, to reduce amd64 kernel namespace pollution.
The amd64 compat uses its own definitions so far.

The _MACHINE_ELF_WANT_32BIT definition is to allow the
sys/boot/userboot/userboot/elf32_freebsd.c to use i386 ELF definitions
on the amd64 compile host.  The same hack could be usefully abused by
other code too.

11 years agoInitialize vm_max_kernel_address on non-FDT platforms. (This should have
Alan Cox [Wed, 20 Feb 2013 16:48:52 +0000 (16:48 +0000)]
Initialize vm_max_kernel_address on non-FDT platforms.  (This should have
been included in r246926.)

The second parameter to pmap_bootstrap() is redundant.  Eliminate it.

Reviewed by: andrew

11 years agoFix "fdt addr" to accept literal addresses rather than va offsets.
Tim Kientzle [Wed, 20 Feb 2013 16:32:38 +0000 (16:32 +0000)]
Fix "fdt addr" to accept literal addresses rather than va offsets.
When initializing the fdt, query U-Boot as well.

With this change, it is now feasible to have U-Boot load
the FDT, ubldr will pull it from U-Boot and hand it to the
kernel.

11 years agoip_savecontrol() style fixes. No functional changes.
Sergey Kandaurov [Wed, 20 Feb 2013 15:44:40 +0000 (15:44 +0000)]
ip_savecontrol() style fixes. No functional changes.
- fix indentation
- put the operator at the end of the line for long statements
- remove spaces between the type and the variable in a cast
- remove excessive parentheses

Tested by: md5

11 years agoAllow '.' components in manifest paths. They are always the first
Brooks Davis [Wed, 20 Feb 2013 15:28:40 +0000 (15:28 +0000)]
Allow '.' components in manifest paths.  They are always the first
component of mtree -C and install -M output and are easily skipped.

Reviewed by: marcel
Sponsored by: DARPA, AFRL

11 years agoFix the -N option in manifest mode by using pwcache(3). This also
Brooks Davis [Wed, 20 Feb 2013 15:25:40 +0000 (15:25 +0000)]
Fix the -N option in manifest mode by using pwcache(3).  This also
speeds up image creation appreciably.

Reviewed by: marcel
Sponsored by: DARPA, AFRL

11 years agoAdd a -D flag that causes duplicate entries in an mtree manifest to be
Brooks Davis [Wed, 20 Feb 2013 15:18:42 +0000 (15:18 +0000)]
Add a -D flag that causes duplicate entries in an mtree manifest to be
treated as warnings rather than errors.

Reviewed by: marcel
Sponsored by: DARPA, AFRL

11 years agoFix several new & old style issues.
Alexander V. Chernikov [Wed, 20 Feb 2013 14:19:09 +0000 (14:19 +0000)]
Fix several new & old style issues.

Pointed by: ae, pluknet, zont
MFC with: r247036

11 years agoAdd interface name filtering via 'match' cmd.
Alexander V. Chernikov [Wed, 20 Feb 2013 13:47:05 +0000 (13:47 +0000)]
Add interface name filtering via 'match' cmd.
Add 'pps' cmd for switching beetween interface packets/bytes statistics.

Submitted by: vsevolod
MFC after: 2 weeks

11 years agoReduce excessive nesting.
Dag-Erling Smørgrav [Wed, 20 Feb 2013 12:59:21 +0000 (12:59 +0000)]
Reduce excessive nesting.

11 years agoCheck if the -sec option is given without an argument.
Sergey Kandaurov [Wed, 20 Feb 2013 12:40:26 +0000 (12:40 +0000)]
Check if the -sec option is given without an argument.

PR: bin/170413
Submitted by: Andrey Simonenko <simon@comsys.ntu-kpi.kiev.ua>
MFC after: 1 week

11 years agoConfigure larger TX FIFO default and maximum level values.
Adrian Chadd [Wed, 20 Feb 2013 12:14:49 +0000 (12:14 +0000)]
Configure larger TX FIFO default and maximum level values.

This has reduced the number of TX delimiter and data underruns when
doing large UDP transfers (>100mbit).

This stops any HAL_INT_TXURN interrupts from occuring, which is a good
sign!

Obtained from: Qualcomm Atheros

11 years agoIf any of the TX queues have underrun reporting enabled, enable
Adrian Chadd [Wed, 20 Feb 2013 11:24:11 +0000 (11:24 +0000)]
If any of the TX queues have underrun reporting enabled, enable
HAL_INT_TXURN in the interrupt mask register.

This should now allow for TXURN interrupts to be posted.

11 years agoA couple of quick tidyups:
Adrian Chadd [Wed, 20 Feb 2013 11:22:44 +0000 (11:22 +0000)]
A couple of quick tidyups:

* Delete this debugging print - I used it when debugging the initial
  TX descriptor chaining code.  It now works, so let's toss it.
  It just confuses people if they enable TX descriptor debugging as they
  get two slightly different versions of the same descriptor.

* Indenting.

11 years agoEnable TX FIFO underrun interrupts. This allows the TX FIFO threshold
Adrian Chadd [Wed, 20 Feb 2013 11:20:51 +0000 (11:20 +0000)]
Enable TX FIFO underrun interrupts.  This allows the TX FIFO threshold
adjustment code to now run.

Tested:

* AR5416, STA

TODO:

* Much more thorough testing on the other chips, AR5210 -> AR9287

11 years agooops, tab!
Adrian Chadd [Wed, 20 Feb 2013 11:17:29 +0000 (11:17 +0000)]
oops, tab!

11 years agoPost interrupts in the ath alq trace.
Adrian Chadd [Wed, 20 Feb 2013 11:17:03 +0000 (11:17 +0000)]
Post interrupts in the ath alq trace.

11 years agoCFG_ERR, DATA_UNDERRUN and DELIM_UNDERRUN are all flags, rather than
Adrian Chadd [Wed, 20 Feb 2013 11:14:55 +0000 (11:14 +0000)]
CFG_ERR, DATA_UNDERRUN and DELIM_UNDERRUN are all flags, rather than
part of ts_status. Thus:

* make sure we decode them from ts_flags, rather than ts_status;
* make sure we decode them regardless of whether there's an error or not.

This correctly exposes descriptor configuration errors, TX delimiter
underruns and TX data underruns.

11 years agoAdd a sample program that shows how a custom comparison function and
Giorgos Keramidas [Tue, 19 Feb 2013 23:57:39 +0000 (23:57 +0000)]
Add a sample program that shows how a custom comparison function and
qsort(3) can work together to sort an array of integers.

PR:             docs/176197
Submitted by:   Fernando, fapesteguia at opensistemas.com
Approved by:    gjb (mentor)
MFC after:      1 week

11 years agosh: Fix a crash with the stackmark code.
Jilles Tjoelker [Tue, 19 Feb 2013 23:46:51 +0000 (23:46 +0000)]
sh: Fix a crash with the stackmark code.

If a stack mark is set while the current stack block is empty, the stack
block may move later on (because of realloc()) and the stack mark needs to
be updated. This updating does not happen after popstackmark() has been
called; therefore, call setstackmark() again if the stack mark is still
being used.

For some reason, this only affects a few users. I cannot reproduce it. The
situation seems quite rare as well because an empty stack block would
usually be freed (by popstackmark()) before execution reaches a
setstackmark() call.

PR: 175922
Tested by: KT Sin

11 years agoadd support for AES and PCLMULQDQ instructions to binutils...
John-Mark Gurney [Tue, 19 Feb 2013 21:35:17 +0000 (21:35 +0000)]
add support for AES and PCLMULQDQ instructions to binutils...

Thanks to Mike Belopuhov for the pointer to the OpenBSD patch, though
OpenBSD's gcc is very different that it only helped w/ where to modify,
not how...  Thanks to jhb for some early reviews...

Reviewed by: imp, kib
MFC after: 1 month

11 years agoAdd support to mxge for IPv6 TX csum offload & IPv6 TSO.
Andrew Gallatin [Tue, 19 Feb 2013 21:33:21 +0000 (21:33 +0000)]
Add support to mxge for IPv6 TX csum offload & IPv6 TSO.

Sponsored by: Myricom, Inc.
MFC after: 7 days

11 years agoSpelling fixes
Oleksandr Tymoshenko [Tue, 19 Feb 2013 21:24:52 +0000 (21:24 +0000)]
Spelling fixes

Spotted by: N. J. Mann

11 years agoRoll back change of frequency for initialization sequence since it
Oleksandr Tymoshenko [Tue, 19 Feb 2013 20:33:55 +0000 (20:33 +0000)]
Roll back change of frequency for initialization sequence since it
seems to cause more problems then previous behavior: it either breaks
initilization sequence in other places or uncovers problems with
high-speed mode timing for SDHCI 3.0

11 years agoMFcalloutng:
Alexander Motin [Tue, 19 Feb 2013 19:25:50 +0000 (19:25 +0000)]
MFcalloutng:
Make led(4) fire callouts at 10Hz only when there is at least one LED that
is requested to blink.  Do not fire if all LEDs are static (usual case).