]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
12 years agoAdd d, p and r switches for recording script sessions with timing data
Brian Somers [Mon, 30 Jul 2012 07:13:06 +0000 (07:13 +0000)]
Add d, p and r switches for recording script sessions with timing data
and playing sessions back with or without time delays.

PR: 114465
Submitted by: ighighi at gmail dot com
MFC after: 3 weeks

12 years agoFix a couple of comments about the rm9200, and fix a couple of indentation
Warner Losh [Mon, 30 Jul 2012 06:00:31 +0000 (06:00 +0000)]
Fix a couple of comments about the rm9200, and fix a couple of indentation
issues.  Add note that we need to implement at91sam9260 erratum workaround.

12 years agoRemove opt_enc.h from files committed with r235911. enc(4) is the
Bjoern A. Zeeb [Mon, 30 Jul 2012 03:00:58 +0000 (03:00 +0000)]
Remove opt_enc.h from files committed with r235911.  enc(4) is the
'encapsulating interface' used with IPsec and has nothing to do with
storage 'enclosure' services.

MFC after: 3 days
Noticed while: debugging why enc(4) is no longer automatically created

12 years agoBreak out the parsing code from main() and modularise things a little.
Adrian Chadd [Mon, 30 Jul 2012 01:42:22 +0000 (01:42 +0000)]
Break out the parsing code from main() and modularise things a little.

The eventual aim will be to support listing "one" and "all" stations for
the given ath device.

12 years agoPartially revert r238886 in part of GEOM_VFS spoiling.
Alexander Motin [Sun, 29 Jul 2012 20:04:09 +0000 (20:04 +0000)]
Partially revert r238886 in part of GEOM_VFS spoiling.

This change triggered interesting foot shooting condition in GEOM when
RW access to root partition by fsck spoils VFS geom there, which has it
opened RO at the same time.  Seems spoiling concept needs some rework.

12 years agoShave off a few more cycles from pmap_enter()'s critical section. In
Alan Cox [Sun, 29 Jul 2012 18:20:49 +0000 (18:20 +0000)]
Shave off a few more cycles from pmap_enter()'s critical section.  In
particular, do a little less work with the PV list lock held.

12 years agosh: Fix EINTR race condition in "wait" and "set -T" using sigsuspend().
Jilles Tjoelker [Sun, 29 Jul 2012 18:04:38 +0000 (18:04 +0000)]
sh: Fix EINTR race condition in "wait" and "set -T" using sigsuspend().

When waiting for child processes using "wait" or if "set -T" is in effect, a
signal interrupts the wait. Make sure there is no window where the signal
handler may be invoked (setting a flag) just before going to sleep.

There is a similar race condition in the shell language, but scripts can
avoid it by exiting from the trap handler or enforcing synchronization using
a fifo.

If SIGCHLD is not trapped, a signal handler must be installed for it. Only
install this handler for the duration of the wait to avoid triggering
unexpected [EINTR] errors elsewhere.

Note that for some reason only SIGINT and SIGQUIT interrupt a "wait"
command. This remains the case.

12 years agoGrr.!$()!$$ I missed checking this in even though I *did* run
Matt Jacob [Sun, 29 Jul 2012 14:21:42 +0000 (14:21 +0000)]
Grr.!$()!$$ I missed checking this in even though I *did* run
a tinderbox myself and caught the error.

Change to isp_send_cmd needs a final ecmd argument.

Sponsored by: Spectralogic
MFC after: 1 month
X-MFC: 238869

12 years agoImplement media change notification for DA and CD removable media devices.
Alexander Motin [Sun, 29 Jul 2012 11:51:48 +0000 (11:51 +0000)]
Implement media change notification for DA and CD removable media devices.
It includes three parts:
 1) Modifications to CAM to detect media media changes and report them to
disk(9) layer. For modern SATA (and potentially UAS) devices it utilizes
Asynchronous Notification mechanism to receive events from hardware.
Active polling with TEST UNIT READY commands with 3 seconds period is used
for incapable hardware. After that both CD and DA drivers work the same way,
detecting two conditions: "NOT READY: Medium not present" after medium was
detected previously, and "UNIT ATTENTION: Not ready to ready change, medium
may have changed". First one reported to disk(9) as media removal, second
as media insert/change. To reliably receive second event new
AC_UNIT_ATTENTION async added to make UAs broadcasted to all periphs by
generic error handling code in cam_periph_error().
 2) Modifications to GEOM core to handle media remove and change events.
Media removal handled by spoiling all consumers attached to the provider.
Media change event also schedules provider retaste after spoiling to probe
new media. New flag G_CF_ORPHAN was added to consumers to reflect that
consumer is in process of destruction. It allows retaste to create new
geom instance of the same class, while previous one is still dying.
 3) Modifications to some GEOM classes: DEV -- to report media change
events to devd; VFS -- to handle spoiling same as orphan to prevent
accessing replaced media. PART class already handles spoiling alike to
orphan.

Reviewed by: silence on geom@ and scsi@
Tested by: avg
Sponsored by: iXsystems, Inc. / PC-BSD
MFC after: 2 months

12 years agoShuffle the rate control call to be consistent with non-aggregate TX.
Adrian Chadd [Sun, 29 Jul 2012 09:23:32 +0000 (09:23 +0000)]
Shuffle the rate control call to be consistent with non-aggregate TX.

The correct ordering for non-aggregate TX is:

* call ath_hal_setuptxdesc() to setup the first TX descriptor complete
  with the first TX rate/try count;
* call ath_hal_setupxtxdesc() to setup the multi-rate retry;
* .. or for 802.11n NICs, call ath_hal_set11nratescenario() for MRR and
  802.11n flags;
* then call ath_hal_filltxdesc() to setup intermediary descriptors
  in a multi-descriptor single frame.

The call to ath_hal_filltxdesc() routines seem to correctly (consistently?)
handle the intermediary descriptor flags, including copying the rate
control information to the final descriptor in the frame.  That's used
by the rate control module rather than the hardware.

Tested:

* Only on AR9280 STA mode, however it should work on other chips in
  both STA and AP mode.

12 years agoFix breakage introduced in r238824 - correctly calculate the descriptor
Adrian Chadd [Sun, 29 Jul 2012 08:52:32 +0000 (08:52 +0000)]
Fix breakage introduced in r238824 - correctly calculate the descriptor
wrapping.

The previous code was only wrapping descriptor "block" boundaries rather
than individual descriptors.  It sounds equivalent but it isn't.

r238824 changed the descriptor allocation to enforce that an individual
descriptor doesn't wrap a 4KiB boundary rather than the whole block
of descriptors.  Eg, for TX descriptors, they're allocated in blocks
of 10 descriptors for each ath_buf (for scatter/gather DMA.)

12 years agoCatch up config_freebsd.h with libarchive 3.0.4
Martin Matuska [Sun, 29 Jul 2012 06:34:45 +0000 (06:34 +0000)]
Catch up config_freebsd.h with libarchive 3.0.4

12 years agoFix endless loop if reading unsupported ACL type.
Martin Matuska [Sun, 29 Jul 2012 06:33:27 +0000 (06:33 +0000)]
Fix endless loop if reading unsupported ACL type.
Apply fix from vendor's master branch.

References:
https://github.com/libarchive/libarchive/commit/d8b9dbd

Reported on: freebsd-current@
Obtained from: libarchive

12 years agoCommit the dci (gadget) support to the one ATMEL kernel config where
Warner Losh [Sun, 29 Jul 2012 04:28:29 +0000 (04:28 +0000)]
Commit the dci (gadget) support to the one ATMEL kernel config where
it might actually work.

12 years agoAdd usb_template for the gadget support. Even though this isn't a
Warner Losh [Sun, 29 Jul 2012 04:26:24 +0000 (04:26 +0000)]
Add usb_template for the gadget support.  Even though this isn't a
bootable kernel, its config will likely be copied to places that are.

Submitted by: Hans Petter Selasky

12 years agoAdd a couple of nice quotes from Edward Everett Hale
Doug Barton [Sun, 29 Jul 2012 01:01:35 +0000 (01:01 +0000)]
Add a couple of nice quotes from Edward Everett Hale

12 years agoFor consistency put the IPsec comment iside the #fidef section.
Bjoern A. Zeeb [Sun, 29 Jul 2012 00:45:24 +0000 (00:45 +0000)]
For consistency put the IPsec comment iside the #fidef section.

MFC after: 3 days

12 years agoFix a comment that we do not have an SA yet but need to acquire one.
Bjoern A. Zeeb [Sun, 29 Jul 2012 00:44:41 +0000 (00:44 +0000)]
Fix a comment that we do not have an SA yet but need to acquire one.

MFC after: 3 days

12 years agoAdd support for 88E1116R.
Hiroki Sato [Sat, 28 Jul 2012 21:59:12 +0000 (21:59 +0000)]
Add support for 88E1116R.

Sponsored by: Plat'Home, Co.,Ltd.

12 years agoAdd support for Marvell 88F6282.
Hiroki Sato [Sat, 28 Jul 2012 21:56:24 +0000 (21:56 +0000)]
Add support for Marvell 88F6282.

Sponsored by: Plat'Home, Co.,Ltd.

12 years agoHardcode the loopback rx/tx checkum options for IPv6 to on without
Bjoern A. Zeeb [Sat, 28 Jul 2012 20:31:39 +0000 (20:31 +0000)]
Hardcode the loopback rx/tx checkum options for IPv6 to on without
checking. This allows the FreeBSD 9.1 release process to move forward.
Work around the problem that loopback connections to local addresses
not on loopback interfaces and not on interfaces w/ IPv6 checksum offloading
enabled would not work.
A proper fix to allow us to disable the "checksum offload" on loopback
for testing, measurements, ... as we allow for IPv4 needs to put in
place later.

Reported by: tuexen, Matthew Seaman (m.seaman infracaninophile.co.uk)
Reported by: Mike Andrews (mandrews bit0.com), kib, ...
PR: kern/170070
MFC after: 1 day
X-MFC after: re approval

12 years agoHandle a case where we had an SRR that pushed back the
Matt Jacob [Sat, 28 Jul 2012 20:08:14 +0000 (20:08 +0000)]
Handle a case where we had an SRR that pushed back the
data pointer. This is a temp fix that resubmits the
command, adjusted, so that the backend can fetch the
data again.

Sponsored by: Spectralogic
MFC after: 1 month

12 years ago-----------
Matt Jacob [Sat, 28 Jul 2012 20:06:29 +0000 (20:06 +0000)]
-----------
MISC CHANGES

Add a new async event- ISP_TARGET_NOTIFY_ACK, that will guarantee
eventual delivery of a NOTIFY ACK. This is tons better than just
ignoring the return from isp_notify_ack and hoping for the best.

Clean up the lower level lun enable code to be a bit more sensible.

Fix a botch in isp_endcmd which was messing up the sense data.

Fix notify ack for SRR to use a sensible error code in the case
of a reject.

Clean up and make clear what kind of firmware we've loaded and
what capabilities it has.
-----------
FULL (252 byte) SENSE DATA

In CTIOs for the ISP, there's only a limimted amount of space
to load SENSE DATA for associated CHECK CONDITIONS (24 or 26
bytes). This makes it difficult to send full SENSE DATA that can
be up to 252 bytes.

Implement MODE 2 responses which have us build the FCP Response
in system memory which the ISP will put onto the wire directly.

On the initiator side, the same problem occurs in that a command
status response only has a limited amount of space for SENSE DATA.
This data is supplemented by status continuation responses that
the ISP pushes onto the response queue after the status response.
We now pull them all together so that full sense data can be
returned to the periph driver.

This is supported on 23XX, 24XX and 25XX cards.

This is also preparation for doing >16 byte CDBs.

-----------
FC TAPE

Implement full FC-TAPE on both initiator and target mode side.  This
capability is driven by firmware loaded, board type, board NVRAM
settings, or hint configuration options to enable or disable. This
is supported for 23XX, 24XX and 25XX cards.

On the initiator side, we pretty much just have to generate a command
reference number for each command we send out. This is FCP-4 compliant
in that we do this per ITL nexus to generate the allowed 1 thru 255
CRN.

In order to support the target side of FC-TAPE, we now pay attention
to more of the PRLI word 3 parameters which will tell us whether
an initiator wants confirmed responses. While we're at it, we'll
pay attention to the initiator view too and report it.

On sending back CTIOs, we will notice whether the initiator wants
confirmed responses and we'll set up flags to do so.

If a response or data frame is lost the initiator sends us an SRR
(Sequence Retransmit Request) ELS which shows up as an SRR notify
and all outstanding CTIOs are nuked with SRR Received status. The
SRR notify contains the offset that the initiator wants us to restart
the data transfer from or to retransmit the response frame.

If the ISP driver still has the CCB around for which the data segment
or response applies, it will retransmit.

However, we typically don't know about a lost data frame until we
send the FCP Response and the initiator totes up counters for data
moved and notices missing segments. In this case we've already
completed the data CCBs already and sent themn back up to the periph
driver.  Because there's no really clean mechanism yet in CAM to
handle this, a hack has been put into place to complete the CTIO
CCB with the CAM_MESSAGE_RECV status which will have a MODIFY DATA
POINTER extended message in it. The internal ISP target groks this
and ctl(8) will be modified to deal with this as well.

At any rate, the data is retransmitted and an an FCP response is
sent. The whole point here is to successfully complete a command
so that you don't have to depend on ULP (SCSI) to have to recover,
which in the case of tape is not really possible (hence the name
FC-TAPE).

Sponsored by: Spectralogic
MFC after: 1 month

12 years agoReorder things in g_gate_create() so at the moment when g_new_geomf()
Mikolaj Golub [Sat, 28 Jul 2012 16:30:50 +0000 (16:30 +0000)]
Reorder things in g_gate_create() so at the moment when g_new_geomf()
is called name is properly initialized.

Discussed with: pjd
MFC after: 2 weeks

12 years agosh: Do not ask for stopped/continued processes if we do not need them
Jilles Tjoelker [Sat, 28 Jul 2012 15:13:48 +0000 (15:13 +0000)]
sh: Do not ask for stopped/continued processes if we do not need them
rather than retrying wait3 if they happen.

12 years agosh: Inline waitproc() into its only caller.
Jilles Tjoelker [Sat, 28 Jul 2012 14:56:50 +0000 (14:56 +0000)]
sh: Inline waitproc() into its only caller.

12 years agosh: Track continued jobs (even if not continued by bg or fg).
Jilles Tjoelker [Sat, 28 Jul 2012 14:32:55 +0000 (14:32 +0000)]
sh: Track continued jobs (even if not continued by bg or fg).

This uses wait3's WCONTINUED flag.

There is no message for this. The change is visible in "jobs" or if the job
stops again.

12 years agoSimilar to what is already done for Linux, make clang not complain about
Dimitry Andric [Sat, 28 Jul 2012 13:12:57 +0000 (13:12 +0000)]
Similar to what is already done for Linux, make clang not complain about
unused -g, -emit-llvm or -w arguments when doing linking.  E.g. invoking
"clang -g foo.o -o foo" will now be silent.

Reported by: Jakub Lach <jakub_lach@mailplus.pl>
MFC after: 1 week

12 years agoSimilar to r238472, let clang pass --enable-new-dtags to the linker
Dimitry Andric [Sat, 28 Jul 2012 12:50:25 +0000 (12:50 +0000)]
Similar to r238472, let clang pass --enable-new-dtags to the linker
invocation by default.  Also make sure --hash-style=both is passed for
the same arches as gcc, e.g. arm, sparc and x86.

X-MFC-with: r238472

12 years agoMerge FreeBSD/beri Perforce change @211945 to head:
Robert Watson [Sat, 28 Jul 2012 11:09:03 +0000 (11:09 +0000)]
Merge FreeBSD/beri Perforce change @211945 to head:

Modify MIPS page table entry (PTE) initialisation so that cachability
bits are set only once, using is_cacheable_mem() to determine what
caching properties are required, rather than also unconditionally
setting PTE_C_CACHE in init_pte_prot().  As PTE_C_CACHE |
PTE_C_UNCACHED == PTE_C_CACHE, this meant that all userspace memory
mappings of device memory (incorrectly) used caching TLB entries.

This is arguably not quite what we want, even though it is (more)
consistent with the MIPS pmap design: PTE caching properties should
be derived from machine-independent page table attributes, but this
is a substantially more complex change as the MIPS pmap doesn't yet
know about page attributes, causing it to ignore requests by device
drivers that want uncached userspace memory mappings as they
describe memory-mapped FIFOs or shared memory with a device not
participating in the cache coherence scheme.

This fixes cacheability issues (specifically, undesired and
unrequested caching) seen in userspace memory mappings of Avalon SoC
bus device memory on BERI MIPS.

Discussed with: jmallett, alc
Sponsored by: DARPA, AFRL
MFC after: 3 days

12 years agoFlesh out the multi-rate retry capability.
Adrian Chadd [Sat, 28 Jul 2012 07:28:08 +0000 (07:28 +0000)]
Flesh out the multi-rate retry capability.

The existing method for testing for MRR is to call the "SetupXTXDesc"
HAL method and see if it returns AH_TRUE or AH_FALSE.  This capability
explicitly lists what number of multi-rate attempts are possible.

"1" means "one rate attempt supported".

12 years agoCommit missing #define from a previous check-in.
Adrian Chadd [Sat, 28 Jul 2012 07:25:00 +0000 (07:25 +0000)]
Commit missing #define from a previous check-in.

The AR9300 and later have an 8-deep TX FIFO for each hardware queue.

12 years agoUpdate libarchive to 3.0.4
Martin Matuska [Sat, 28 Jul 2012 06:38:44 +0000 (06:38 +0000)]
Update libarchive to 3.0.4

12 years agoFlesh out the initial TX FIFO storage for each hardware TX queue.
Adrian Chadd [Sat, 28 Jul 2012 04:42:05 +0000 (04:42 +0000)]
Flesh out the initial TX FIFO storage for each hardware TX queue.

12 years agoAdd a missing call to ath_txdma_teardown().
Adrian Chadd [Sat, 28 Jul 2012 04:40:52 +0000 (04:40 +0000)]
Add a missing call to ath_txdma_teardown().

12 years agoCorrect BUGS description of static buffer use
Ed Maste [Fri, 27 Jul 2012 21:38:14 +0000 (21:38 +0000)]
Correct BUGS description of static buffer use

Since r142667 strerror has unconditionally returned a pointer to a
static buffer.

MFC after: 1 week

12 years agoPull the tier-2 card and change the sparc64 ZFS loader to no longer probe
Marius Strobl [Fri, 27 Jul 2012 18:23:11 +0000 (18:23 +0000)]
Pull the tier-2 card and change the sparc64 ZFS loader to no longer probe
all diskN aliases for providers (which more or less corresponds to how the
x86 version behaves) but instead probe only those listed in the boot-device
OFW environment variable. This has the following advantages:
- avoids otherwise unavoidable OFW warnings about failures to open disks
  for which aliases exist but no actual hardware is connected
- avoids issues due to different diskN naming schemes
- aligns us with Solaris

MFC after: 3 days

12 years agoAdd gadget devices. Not yet added to the child lists, but here to
Warner Losh [Fri, 27 Jul 2012 17:32:01 +0000 (17:32 +0000)]
Add gadget devices.  Not yet added to the child lists, but here to
keep things from bit-rotting.

12 years agoAdd the usb device (gadget) side of things. Also add ehci bindings
Warner Losh [Fri, 27 Jul 2012 17:31:19 +0000 (17:31 +0000)]
Add the usb device (gadget) side of things.  Also add ehci bindings
while I'm here in anticipation of usb2 support for newer SoCs.

Requested by: Hans Petter Selasky

12 years agoMake this compile again. Also note that it is AT91RM9200+KB9202B
Warner Losh [Fri, 27 Jul 2012 17:28:11 +0000 (17:28 +0000)]
Make this compile again.  Also note that it is AT91RM9200+KB9202B
specific still and needs some love to make it work on anything else.

12 years agoNeither of these systems has PCI, but they do have ohci interface, so
Warner Losh [Fri, 27 Jul 2012 17:07:54 +0000 (17:07 +0000)]
Neither of these systems has PCI, but they do have ohci interface, so
fix comments.

12 years agoAdd new at91sam9g45 support and sn9g45 board to the ATMEL kernel.
Warner Losh [Fri, 27 Jul 2012 16:38:02 +0000 (16:38 +0000)]
Add new at91sam9g45 support and sn9g45 board to the ATMEL kernel.
Adapt SN9G45 board support to cope with multi-board.

12 years agoAdd version so others can depend on this module
Ed Maste [Fri, 27 Jul 2012 13:57:28 +0000 (13:57 +0000)]
Add version so others can depend on this module

12 years agoTidy up the TX status fields a little and add a couple new flags.
Adrian Chadd [Fri, 27 Jul 2012 12:08:49 +0000 (12:08 +0000)]
Tidy up the TX status fields a little and add a couple new flags.

* shuffle things around so things fall on natural padding boundaries;
* add a couple of new flags to specify LDPC and whether to switch to the
  low power RX chain configuration after this TX has completed.

Obtained from: Qualcomm Atheros

12 years agoAdd STBC TX support for AR5416 HAL chips.
Adrian Chadd [Fri, 27 Jul 2012 11:54:05 +0000 (11:54 +0000)]
Add STBC TX support for AR5416 HAL chips.

Specifically, however:

* AR9280 and later support 1-stream STBC RX;
* AR9280 and AR9287 support 1-stream STBC TX.

The STBC support isn't announced (yet) via net80211 and it isn't at all
chosen by the rate control code, so there's no real consumer of this
yet.

Obtained from: Qualcomm Atheros

12 years agoAdd a STBC TX flag.
Adrian Chadd [Fri, 27 Jul 2012 11:45:57 +0000 (11:45 +0000)]
Add a STBC TX flag.

Obtained from: Qualcomm Atheros

12 years agoAdd some comments about what the two fields mean.
Adrian Chadd [Fri, 27 Jul 2012 11:44:48 +0000 (11:44 +0000)]
Add some comments about what the two fields mean.

12 years agoIntroduce a couple more fields in the rate scenario setup as part of
Adrian Chadd [Fri, 27 Jul 2012 11:43:10 +0000 (11:43 +0000)]
Introduce a couple more fields in the rate scenario setup as part of
(future) TPC support in the AR9300 HAL.

This is effectively a no-op for the moment as (a) TPC isn't really
supported, (b) the AR9300 HAL isn't yet public, and (c) the existing
HAL code doesn't use these fields.

Obtained from: Qualcomm Atheros

12 years agoBring this API in line with what the reference driver and Linux ath9k
Adrian Chadd [Fri, 27 Jul 2012 11:23:24 +0000 (11:23 +0000)]
Bring this API in line with what the reference driver and Linux ath9k
was doing.

Obtained from: Qualcomm Atheros, Linux ath9k

12 years agouse __builtin_prefetch() for prefetch.
Luigi Rizzo [Fri, 27 Jul 2012 10:52:21 +0000 (10:52 +0000)]
use __builtin_prefetch() for prefetch.

merge in the remaining part of the linux-specific glue so i do not need
to maintain two different distributions.

12 years agoAllocate a descriptor ring for EDMA TX completion status.
Adrian Chadd [Fri, 27 Jul 2012 10:41:54 +0000 (10:41 +0000)]
Allocate a descriptor ring for EDMA TX completion status.

Configure the hardware with said ring physical address and size.

12 years agoDocument F_DUP2FD_CLOEXEC.
Konstantin Belousov [Fri, 27 Jul 2012 10:41:53 +0000 (10:41 +0000)]
Document F_DUP2FD_CLOEXEC.

MFC after: 1 week

12 years agoAdd F_DUP2FD_CLOEXEC. Apparently Solaris 11 already did this.
Konstantin Belousov [Fri, 27 Jul 2012 10:41:10 +0000 (10:41 +0000)]
Add F_DUP2FD_CLOEXEC.  Apparently Solaris 11 already did this.

Submitted by: Jukka A. Ukkonen <jau iki fi>
PR: standards/169962
MFC after: 1 week

12 years agoModify ath_descdma_cleanup() to handle ath_descdma instances with no
Adrian Chadd [Fri, 27 Jul 2012 10:38:17 +0000 (10:38 +0000)]
Modify ath_descdma_cleanup() to handle ath_descdma instances with no
buffers.

ath_descdma is now being used for things other than the classical
combination of ath_buf + ath_desc allocations.  In this particular case,
don't try to free and blank out the ath_buf list if it's not passed in.

12 years agoremove unused definition, whitespace cleanup
Luigi Rizzo [Fri, 27 Jul 2012 10:31:26 +0000 (10:31 +0000)]
remove unused definition, whitespace cleanup

12 years agoAdd assertion for refcount overflow.
Gleb Smirnoff [Fri, 27 Jul 2012 09:16:48 +0000 (09:16 +0000)]
Add assertion for refcount overflow.

Submitted by: Andrey Zonov <andrey zonov.org>
Reviewed by: kib

12 years agoUpdate information on obtaining libarchive sources and FreeBSD-Xlist
Martin Matuska [Fri, 27 Jul 2012 08:28:44 +0000 (08:28 +0000)]
Update information on obtaining libarchive sources and FreeBSD-Xlist

12 years agoUpdate libarchive's vendor dist to version 3.0.4 from release branch.
Martin Matuska [Fri, 27 Jul 2012 08:24:12 +0000 (08:24 +0000)]
Update libarchive's vendor dist to version 3.0.4 from release branch.

Git branch: release
Git commit: 8076b31490c90aaf0edccecf760004c30bd95edc

Obtained from: https://github.com/libarchive/libarchive.git

12 years agoMigrate the descriptor allocation function to not care about the number
Adrian Chadd [Fri, 27 Jul 2012 05:48:42 +0000 (05:48 +0000)]
Migrate the descriptor allocation function to not care about the number
of buffers, only the number of descriptors.

This involves:

* Change the allocation function to not use nbuf at all;
* When calling it, pass in "nbuf * ndesc" to correctly update how many
  descriptors are being allocated.

Whilst here, fix the descriptor allocation code to correctly allocate
a larger buffer size if the Merlin 4KB WAR is required.  It overallocates
descriptors when allocating a block that doesn't ever have a 4KB boundary
being crossed, but that can be fixed at a later stage.

12 years agoDocument the dataflash/mmc-sd issue. Add umass driver and usb. Boot
Warner Losh [Fri, 27 Jul 2012 05:37:01 +0000 (05:37 +0000)]
Document the dataflash/mmc-sd issue.  Add umass driver and usb.  Boot
off da0s1a instead of ate0.  Note that MMC/SD is slot B.  Until I
switch over to NAND boot, dataflash booting will preclude having SD
cards inserted at boot, so this last bit is untested.

My SAM9260-EK not boots to multi-user prompt.

12 years agoRefactor out the descriptor allocation code from the buffer allocation
Adrian Chadd [Fri, 27 Jul 2012 05:34:45 +0000 (05:34 +0000)]
Refactor out the descriptor allocation code from the buffer allocation
code.

The TX EDMA completion path is going to need descriptors allocated but
not any buffers.  This code will form the basis for that.

12 years agoTurns out the ETHERNUT5 isn't anything like the SAM9260-EK. Make this
Warner Losh [Fri, 27 Jul 2012 05:33:55 +0000 (05:33 +0000)]
Turns out the ETHERNUT5 isn't anything like the SAM9260-EK.  Make this
board init match better: UART1 instead of UART2, No RMMI, no SPI0, SPI1
comments.

12 years agoAdd (back?) ohci atmel attachment.
Warner Losh [Fri, 27 Jul 2012 05:28:02 +0000 (05:28 +0000)]
Add (back?) ohci atmel attachment.

12 years agoMinor style(9) nit.
Warner Losh [Fri, 27 Jul 2012 05:24:09 +0000 (05:24 +0000)]
Minor style(9) nit.

12 years agodefine prefetch as a noop on !x86
Luigi Rizzo [Thu, 26 Jul 2012 21:37:58 +0000 (21:37 +0000)]
define prefetch as a noop on !x86

12 years agoDocument -g option in the usage string.
Sergey Kandaurov [Thu, 26 Jul 2012 20:41:36 +0000 (20:41 +0000)]
Document -g option in the usage string.

12 years agoThe ad(4) driver no longer exists in FreeBSD CURRENT or 9, so change the
Isabell Long [Thu, 26 Jul 2012 17:30:34 +0000 (17:30 +0000)]
The ad(4) driver no longer exists in FreeBSD CURRENT or 9, so change the
references to it in gsched(8) to the existing ada(4) driver.

PR: docs/170085
Submitted by: olgeni
Approved by: gavin
MFC after: 5 days

12 years agoAdd support for VALE bridges to the netmap core, see
Luigi Rizzo [Thu, 26 Jul 2012 16:45:28 +0000 (16:45 +0000)]
Add support for VALE bridges to the netmap core, see

    http://info.iet.unipi.it/~luigi/vale/

VALE lets you dynamically instantiate multiple software bridges
that talk the netmap API (and are *extremely* fast), so you can test
netmap applications without the need for high end hardware.

This is particularly useful as I am completing a netmap-aware
version of ipfw, and VALE provides an excellent testing platform.

Also, I also have netmap backends for qemu mostly ready for commit
to the port, and this too will let you interconnect virtual machines
at high speed without fiddling with bridges, tap or other slow solutions.

The API for applications is unchanged, so you can use the code
in tools/tools/netmap (which i will update soon) on the VALE ports.

This commit also syncs the code with the one in my internal repository,
so you will see some conditional code for other platforms.
The code should run mostly unmodified on stable/9 so people interested
in trying it can just copy sys/dev/netmap/ and sys/net/netmap*.h
from HEAD

VALE is joint work with my colleague Giuseppe Lettieri, and
is partly supported by the EU Projects CHANGE and OPENLAB

12 years agoTrim read/write sizes to 128 bytes. Pages are only 128 bytes in size.
Warner Losh [Thu, 26 Jul 2012 16:34:21 +0000 (16:34 +0000)]
Trim read/write sizes to 128 bytes.  Pages are only 128 bytes in size.
Writes larger than this will wrap to the same page.  Reads larger than
this are permitted, but why take chances.

12 years agoDrop non-portable libedit's el_data_set() and el_data_get() for
Pedro F. Giffuni [Thu, 26 Jul 2012 15:48:07 +0000 (15:48 +0000)]
Drop non-portable libedit's el_data_set() and el_data_get() for
private data.

We can set/get private data with the documented el_get() and
el_set() so there's no need for our local extensions, which
never received much use anyway.

While here, also re-arrange the call to term_init_arrow. This
was left over from r89735 but is not required anymore.

This changes reduce differences against NetBSD's libedit.

MFC after: 2 months

12 years agoStart manpage with Dd macro and also remove a trailing whitespace
Joel Dahl [Thu, 26 Jul 2012 14:46:19 +0000 (14:46 +0000)]
Start manpage with Dd macro and also remove a trailing whitespace
while here.

12 years agoSwitch to using FC-Tape firmware.
Matt Jacob [Thu, 26 Jul 2012 13:58:43 +0000 (13:58 +0000)]
Switch to using FC-Tape firmware.
Sponsered by: Spectralogic
MFC after: 1 week

12 years agoRefactor enclosure manegement support in ahci(4). Move it out into separate
Alexander Motin [Thu, 26 Jul 2012 13:44:48 +0000 (13:44 +0000)]
Refactor enclosure manegement support in ahci(4). Move it out into separate
subdevice ahciem. Emulate SEMB SES device from AHCI LED interface to expose
it to users in form of ses(4) CAM device. If we ever see AHCI controllers
supporting SES of SAF-TE over I2C as described by specification, they should
fit well into this new picture.

Sponsored by: iXsystems, Inc.

12 years agoImprove descriptions for several devices supported by uslcom(4).
Gavin Atkinson [Thu, 26 Jul 2012 12:18:23 +0000 (12:18 +0000)]
Improve descriptions for several devices supported by uslcom(4).
Correct the spelling of the company Telegesis.
Move MpMan to the correct location alphabetically.

MFC after: 2 weeks

12 years agoAdd support for more devices to uslcom(4). This commit syncronises the
Gavin Atkinson [Thu, 26 Jul 2012 12:10:19 +0000 (12:10 +0000)]
Add support for more devices to uslcom(4).  This commit syncronises the
list of supported devices with the union of:

NetBSD  src/sys/dev/usb/uslsa.c 1.18
OpenBSD src/sys/dev/usb/uslcom.c 1.24
Linux   source/drivers/usb/serial/cp210x.c HEAD

Remove duplicate JABLOTRON PC60B entry.

Note that some of the devices added here are multi-port devices.  The
uslcom(4) driver currently only supports the first port on such devices.

Update the man page to reflect the full list of supported devices.
Remove two caveats from the CAVEATS section, as both listed caveats no
longer apply.  Add a caveat about multi-port devices.

MFC after: 2 weeks

12 years agoUpdate the 'C1x draft' reference to '.St -isoC-2011' mdoc macro.
Sergey Kandaurov [Thu, 26 Jul 2012 12:04:11 +0000 (12:04 +0000)]
Update the 'C1x draft' reference to '.St -isoC-2011' mdoc macro.

Reviewed by: theraven
MFC after: 1 week

12 years agoAdd OS X 10.8.
Sergey Kandaurov [Thu, 26 Jul 2012 11:51:29 +0000 (11:51 +0000)]
Add OS X 10.8.
Although they dropped the 'Mac' in this version,
prefer to stick with it for consistency.

Reviewed by: maxim

12 years agoPull up vendor changes to mdoc(7).
Ruslan Ermilov [Thu, 26 Jul 2012 11:12:38 +0000 (11:12 +0000)]
Pull up vendor changes to mdoc(7).

12 years agoBacked out r228904, and added libstdthreads support to mdoc(7) to where
Ruslan Ermilov [Thu, 26 Jul 2012 11:10:25 +0000 (11:10 +0000)]
Backed out r228904, and added libstdthreads support to mdoc(7) to where
it belongs.

12 years agoBacked out r236255, and added FreeBSD 9.1 support to mdoc(7) to where
Ruslan Ermilov [Thu, 26 Jul 2012 10:58:30 +0000 (10:58 +0000)]
Backed out r236255, and added FreeBSD 9.1 support to mdoc(7) to where
it belongs.

12 years agoCherry-pick vendor changes to mdoc:
Ruslan Ermilov [Thu, 26 Jul 2012 10:41:48 +0000 (10:41 +0000)]
Cherry-pick vendor changes to mdoc:

: 2012-07-17  Ingo Schwarze  <schwarze@usta.de>
:
:         [mdoc] Make `Fl' correctly restore fonts.
:
:         * tmac/doc.tmac (doc-flag-recursion): Do it.
:
: 2012-01-25  Ingo Schwarze  <schwarze@usta.de>
:
:         [mdoc] * tmac/doc-syms: Fix meaning of XBD acronym.
:
: 2012-01-03  Kristaps Dzonsons  <kristaps@bsd.lv>
:
:         [mdoc] Add `-isoC-2011'.
:
:         * tmac/doc-syms (doc-str-St--isoC-2011): Add it.
:         * tmac/groff_mdoc.man: Document it.

12 years agoTry to avoid all files dependence on the modification time of the large and
Andrey A. Chernov [Thu, 26 Jul 2012 10:10:54 +0000 (10:10 +0000)]
Try to avoid all files dependence on the modification time of the large and
often modified directory created symbolic links points to - it cause
unnecessary full rebuilds each time make runs when directory is changed.
So do it only if symbolic link does not exists, which usually means that
objdir is clean anyway.

MFC after:      1 week

12 years agoMFamd64 r238623:
Konstantin Belousov [Thu, 26 Jul 2012 09:11:37 +0000 (09:11 +0000)]
MFamd64 r238623:
Introduce curpcb magic variable.

Requested and reviewed by: bde
MFC after: 3 weeks

12 years agoDo not requeue held page or page for which locking failed, just leave
Konstantin Belousov [Thu, 26 Jul 2012 09:06:48 +0000 (09:06 +0000)]
Do not requeue held page or page for which locking failed, just leave
them alone.

Process the act_count updates for the held pages in the vm_pageout
loop over the inactive queue, instead of refusing to do anything with
such page.

Clarify the intent of the addl_page_shortage counter and change its
use for pages which are not processed in the loop according to the
description.

Reviewed by: alc
MFC after: 2 weeks

12 years agoFix the sctp_sockstore union such that userland programs don't depend
Michael Tuexen [Thu, 26 Jul 2012 08:10:29 +0000 (08:10 +0000)]
Fix the sctp_sockstore union such that userland programs don't depend
on INET and/or INET6 to be defined and in-tune with how the kernel
was compiled.

MFC after: 3 days
Discussed with: rrs

12 years agoAdd support for the DesignA Electronics Snapper9g45 System on Module.
Andrew Turner [Thu, 26 Jul 2012 08:05:28 +0000 (08:05 +0000)]
Add support for the DesignA Electronics Snapper9g45 System on Module.

Reviewed by: imp

12 years agoAdd support for the Atmel AT91SAM9G45 CPU.
Andrew Turner [Thu, 26 Jul 2012 08:01:25 +0000 (08:01 +0000)]
Add support for the Atmel AT91SAM9G45 CPU.

Reviewed by: imp

12 years agoSome models have 6 USARTS + DBGU. Set a consistent name.
Warner Losh [Thu, 26 Jul 2012 05:46:56 +0000 (05:46 +0000)]
Some models have 6 USARTS + DBGU.  Set a consistent name.

12 years agoFix typo in comment.
Warner Losh [Thu, 26 Jul 2012 05:37:36 +0000 (05:37 +0000)]
Fix typo in comment.
spibus uses cs= rather than addr=, so fix hints to use that (nop since
spibus cs defaults to 0, and at91_spi assumes 0).

12 years agoUpdate partitions to reflect "sam9 demo" defaults.
Warner Losh [Thu, 26 Jul 2012 05:35:10 +0000 (05:35 +0000)]
Update partitions to reflect "sam9 demo" defaults.
Update i2c devices to just include the eeprom.
Update dataflash chip select to be CS 1 (this doesn't work yet and
needs changes to at91_spi and the spibus infrastructure).
Fix typo in comment.

12 years agoReplace the macro name NUM with INTERVALS. This change provides
Steve Kargl [Thu, 26 Jul 2012 04:05:08 +0000 (04:05 +0000)]
Replace the macro name NUM with INTERVALS.  This change provides
compatibility with the INTERVALS macro used in the soon-to-be-commmitted
expm1l() and someday-to-be-committed log*l() functions.

Add a comment into ld128/s_expl.c noting at gcc issue that was
deleted when rewriting ld80/e_expl.c as ld128/s_expl.c.

Requested by: bde
Approved by: das (mentor)

12 years ago* ld80/expl.c:
Steve Kargl [Thu, 26 Jul 2012 03:59:33 +0000 (03:59 +0000)]
* ld80/expl.c:
  . Remove a few #ifdefs that should have been removed in the initial
    commit.
  . Sort fpmath.h to its rightful place.

* ld128/s_expl.c:
  . Replace EXPMASK with its actual value.
  . Sort fpmath.h to its rightful place.

Requested by: bde
Approved by: das (mentor)

12 years agoReplace code that toggles between 53 and 64 bits on i386
Steve Kargl [Thu, 26 Jul 2012 03:50:24 +0000 (03:50 +0000)]
Replace code that toggles between 53 and 64 bits on i386
class hardware with the ENTERI and RETURNI macros, which
are now available in math_private.h.

Suggested by: bde
Approved by: das (mentor)

12 years agoAdd a new man page containing details of new locale-specific functions for
Isabell Long [Wed, 25 Jul 2012 22:17:44 +0000 (22:17 +0000)]
Add a new man page containing details of new locale-specific functions for
wctype.h, iswalnum_l(3).  Add it and its functions to the Makefile.

Reviewed by: gavin, jilles
Approved by: theraven
MFC after: 5 days

12 years agofind: Implement real -ignore_readdir_race.
Jilles Tjoelker [Wed, 25 Jul 2012 21:59:10 +0000 (21:59 +0000)]
find: Implement real -ignore_readdir_race.

If -ignore_readdir_race is present, [ENOENT] errors caused by deleting a
file after find has read its name from a directory are ignored.

Formerly, -ignore_readdir_race did nothing.

PR: bin/169723
Submitted by: Valery Khromov and Andrey Ignatov

12 years agoAdd vendor.product for a mouse I have laying around
Gavin Atkinson [Wed, 25 Jul 2012 21:32:55 +0000 (21:32 +0000)]
Add vendor.product for a mouse I have laying around

12 years agoThe baud rate on CP1201/2/3 devices can be set in one of two ways:
Gavin Atkinson [Wed, 25 Jul 2012 20:46:22 +0000 (20:46 +0000)]
The baud rate on CP1201/2/3 devices can be set in one of two ways:
 - The USLCOM_SET_BAUD_DIV command (0x01)
 - The USLCOM_SET_BAUD_RATE command (0x13)

Devices based on the CP1204 will only accept the latter command, and ignore
the former.  As the latter command works on all chips that this driver
supports, switch to always using it.

A slight confusion here is that the previously used command was incorrectly
named USLCOM_BAUD_RATE - even though we no longer use it, rename it to
USLCOM_SET_BAUD_DIV to closer match the name used in the datasheet.

This change reflects a similar change made in the Linux driver, which was
submitted by preston.fick at silabs.com, and has been tested on all of the
uslcom(4) devices I have to hand.

MFC after: 2 weeks

12 years agoRevert previous commit. The bug was actually caused by an issue
George V. Neville-Neil [Wed, 25 Jul 2012 17:49:01 +0000 (17:49 +0000)]
Revert previous commit.  The bug was actually caused by an issue
in pre 1.8.5 versions of sudo which were sending too many
SIGINTs to processes when the user hit Ctrl-C.

Pointed out by: avg@, rpaulo@, sbruno@

12 years agoUpdate supported hardware list after r238766.
Gavin Atkinson [Wed, 25 Jul 2012 17:25:44 +0000 (17:25 +0000)]
Update supported hardware list after r238766.

MFC after: 1 week

12 years agoremove some extra testing code that slipped into the previous commit
Luigi Rizzo [Wed, 25 Jul 2012 12:51:33 +0000 (12:51 +0000)]
remove some extra testing code that slipped into the previous commit

Reported-by: Alexander Motin