Remove duplicate assertion from tdsendsignal.

MFC after:	2 weeks


git-svn-id: svn+ssh://svn.freebsd.org/base/head@253537 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Remove cr_prison NULL check from proc_to_reap.

Userspace processes always have a prison.

MFC after:	2 weeks


git-svn-id: svn+ssh://svn.freebsd.org/base/head@253538 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
This file isn't derived from anything delivered by Berkeley, so remove
this statement.


git-svn-id: svn+ssh://svn.freebsd.org/base/head@253539 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
5725 family of devices corrupts TSO packets when TSO DMA buffers
cross into regions which are within MSS bytes of a 4GB boundary.
If we encounter the condition, drop the packet.

Reviewed by:	Geans Pin geanspin@Broacom


git-svn-id: svn+ssh://svn.freebsd.org/base/head@253540 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Remove weirdly-named autofoo file.  This is not needed for the (FreeBSD)
build, and freebsd-update chokes on it.

9.2-RELEASE candidate.

Approved by:	rwatson
MFC after:	3 days


git-svn-id: svn+ssh://svn.freebsd.org/base/head@253541 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
For consistency with previous releases, name the cdrom install
cd 'disc1.iso'.

Discussed with:	re@ team
Approved by:	kib (mentor)
MFC after:	3 days
X-MFC-To:	stable/9 only


git-svn-id: svn+ssh://svn.freebsd.org/base/head@253542 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Update mirror list to more closely match
http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/mirrors-ftp.html

MFC after:	1 week


git-svn-id: svn+ssh://svn.freebsd.org/base/head@253543 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Add some USB gadget example drivers for USB audio, USB keyboard,
USB mouse and USB modem classes. Hopefully someone will find
these examples useful when implementing USB device side drivers
using the FreeBSD USB stack.


git-svn-id: svn+ssh://svn.freebsd.org/base/head@253544 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Sync-up with bsdinstall(8) FTP mirrorselect changes.

SVN r224656:
Add back ftp4, a new machine has taken its place. ftp2 and ftp8 are both
IPv6 capable mirrors.  cvsup4/ftp4 have already been added to the handbook.

NOTE: Except put IPv6 entries in IPv6 section at the top of the list

SVN r225467:
Add ftp4.se.freebsd.org to the IPv4 and IPv6 mirror lists.

SVN r235228:
Add the IPv6 tag to ftp4.fr.freebsd.org.

NOTE: Except dup entry into IPv6 section.

SVN r243832:
- Remove snapshots.se.freebsd.org [1]
- Add ftp6.se.freebsd.org

SVN r243854:
Remove snapshots.jp.freebsd.org. It stopped working years ago.

SVN r253543:
Update mirror list to more closely match
http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/mirrors-ftp.html

MFC after:	1 week


git-svn-id: svn+ssh://svn.freebsd.org/base/head@253545 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Fix build.


git-svn-id: svn+ssh://svn.freebsd.org/base/head@253546 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Document EINVAL error return from PT_LWPINFO


git-svn-id: svn+ssh://svn.freebsd.org/base/head@253548 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
CAM and mps(4) driver scanning changes.

Add a PIM_NOSCAN flag to the CAM path inquiry CCB.  This tells CAM
not to perform a rescan on a bus when it is registered.

We now use this flag in the mps(4) driver.  Since it knows what
devices it has attached, it is more efficient for it to just issue
a target rescan on the targets that are attached.

Also, remove the private rescan thread from the mps(4) driver in
favor of the rescan thread already built into CAM.  Without this
change, but with the change above, the MPS scanner could run before
or during CAM's initial setup, which would cause duplicate device
reprobes and announcements.

sys/param.h:
	Bump __FreeBSD_version to 1000039 for the inclusion of the
	PIM_RESCAN CAM path inquiry flag.

sys/cam/cam_ccb.h:
sys/cam/cam_xpt.c:
	Added a PIM_NOSCAN flag.  If a SIM sets this in the path
	inquiry ccb, then CAM won't rescan the bus in
	xpt_bus_regsister.

sys/dev/mps/mps_sas.c
	For versions of FreeBSD that have the PIM_NOSCAN path
	inquiry flag, don't freeze the sim queue during scanning,
	because CAM won't be scanning this bus.  Instead, hold
	up the boot.  Don't call mpssas_rescan_target in
	mpssas_startup_decrement; it's redundant and I don't
	know why it was in there.

	Set PIM_NOSCAN in path inquiry CCBs.

	Remove methods related to the internal rescan daemon.

	Always use async events to trigger a probe for EEDP support.
	In older versions of FreeBSD where AC_ADVINFO_CHANGED is
	not available, use AC_FOUND_DEVICE and issue the
	necessary READ CAPACITY manually.

	Provide a path to xpt_register_async() so that we only
	receive events for our own SCSI domain.

	Improve error reporting in cases where setup for EEDP
	detection fails.

sys/dev/mps/mps_sas.h:
	Remove softc flags and data related to the scanner thread.

sys/dev/mps/mps_sas_lsi.c:
	Unconditionally rescan the target whenever a device is added.

Sponsored by:	Spectra Logic
MFC after:	1 week


git-svn-id: svn+ssh://svn.freebsd.org/base/head@253549 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Merge in phase 14+ -> 16 mps driver fixes from LSI:

---------------------------------------------------------------
System panics during a Port reset with ouststanding I/O
---------------------------------------------------------------
It is possible to call mps_mapping_free_memory after this
memory is already freed, causing a panic. Removed this extra
call to mps_mappiing_free_memory and call mps_mapping_exit
in place of the mps_mapping_free_memory call so that any
outstanding mapping items can be flushed before memory is
freed.

---------------------------------------------------------------
Correct memory leak during a Port reset with ouststanding I/O
---------------------------------------------------------------
In mps_reinit function, the mapping memory was not being
freed before being re-allocated. Added line to call the
memory free function for mapping memory.

---------------------------------------------------------------
Use CAM_SIM_QUEUED flag in Driver IO path.
---------------------------------------------------------------
This flag informs the XPT that successful abort of a CCB
requires an abort ccb to be issued to the SIM.  While
processing SCSI IO's, set the CAM_SIM_QUEUED flag in the
status for the IO. When the command completes, clear this
flag.

---------------------------------------------------------------
Check for CAM_REQ_INPROG in I/O path.
---------------------------------------------------------------
Added a check in mpssas_action_scsiio for the In Progress
status for the IO. If this flag is set, the IO has already
been aborted by the upper layer (before CAM_SIM_QUEUED was
set) and there is no need to send the IO. The request will
be completed without error.

---------------------------------------------------------------
Improve "doorbell handshake method" for mps_get_iocfacts
---------------------------------------------------------------
Removed call to get Port Facts since this information is
not used currently.

Added mps_iocfacts_allocate function to allocate memory
that is based on IOC Facts data.  Added mps_iocfacts_free
function to free memory that is based on IOC Facts data.
Both of the functions are used when a Diag Reset is performed
or when the driver is attached/detached. This is needed in
case IOC Facts changes after a Diag Reset, which could
happen if FW is upgraded.

Moved call of mps_bases_static_config_pages from the attach
routine to after the IOC is ready to process accesses based
on the new memory allocations (instead of polling through
the Doorbell).

---------------------------------------------------------------
Set TimeStamp in INIT message in millisecond format Set the IOC
---------------------------------------------------------------

---------------------------------------------------------------
Prefer mps_wait_command to mps_request_polled
---------------------------------------------------------------
Instead of using mps_request_polled, call mps_wait_command
whenever possible. Change the mps_wait_command function to
check the current context and either use interrupt context
or poll if required by using the pause or DELAY function.
Added a check after waiting 50mSecs to see if the command
has timed out. This is only done if polliing, the msleep
command will automatically timeout if the command has taken
too long to complete.

---------------------------------------------------------------
Integrated RAID: Volume Activation Failed error message is
displayed though the volume has been activated.
---------------------------------------------------------------
Instead of failing an IOCTL request that does not have a
large enough buffer to hold the complete reply, copy as
much data from the reply as possible into the user's buffer
and log a message saying that the user's buffer was smaller
than the returned data.

---------------------------------------------------------------
mapping_add_new_device failure due to persistent table FULL
---------------------------------------------------------------
When a new device is added, if it is determined that the
device persistent table is being used and is full, instead
of displaying a message for this condition every time, only
log a message if the MPS_INFO bit is set in the debug_flags.

Submitted by:	LSI
MFC after:	1 week


git-svn-id: svn+ssh://svn.freebsd.org/base/head@253550 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Update chipset support list for ath_hal.
This adds "device ath_ar9300".

PR:		docs/180743
Reviewed by:	adrian


git-svn-id: svn+ssh://svn.freebsd.org/base/head@253551 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Add TP-LINK TL-WDN4800.

PR:		docs/180743
Reviewed by:	adrian


git-svn-id: svn+ssh://svn.freebsd.org/base/head@253552 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Fix a panic in the racct code when munlock(2) is called with incorrect values.

The racct code in sys_munlock() assumed that the boundaries provided by the
userland were correct as long as vm_map_unwire() returned successfully.
However the latter contains its own logic and sometimes manages to do something
out of those boundaries, even if they are buggy.  This change makes the racct
code to use the accounting done by the vm layer, as it is done in other places
such as vm_mlock().

Despite fixing the panic, Alan Cox pointed that this code is still race-y
though: two simultaneous callers will produce incorrect values.

Reviewed by:	alc
MFC after:	7 days


git-svn-id: svn+ssh://svn.freebsd.org/base/head@253554 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Fix previous commit when option RACCT is not used.

MFC after:	7 days


git-svn-id: svn+ssh://svn.freebsd.org/base/head@253556 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
In pmap_mapdev(), if the physical memory range is not covered by an EFI
memory descriptor, don't return NULL as the virtual address, return the
direct-mapped uncacheable virtual address for it. At first, this was
needed only for the Altix 350, but now even some high-end HP machines
have devices mapped to physical addresses that aren't covered by the
EFI memory map.


git-svn-id: svn+ssh://svn.freebsd.org/base/head@253558 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
In ia64_mca_init(), don't limit the allocation of the info block to
fall within the first 256MB of memory. The origin/reason for that
limitation is not known, but it's not believed to be required for
proper initialization. What is known is that the Altix 350 does not
have physical memory at that address (by virtue of the address space
bits).

Keep the boundary at 256MB so that the info block will be covered
by a single direct-mapped translation.

While here, change the flags to M_NOWAIT to eliminate confusion. It
does not change the behaviour of contigmalloc(). What is does is
makes the flags argument explicitly say what the actual behaviour
is.


git-svn-id: svn+ssh://svn.freebsd.org/base/head@253559 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
In pci_cfgregread() and pci_cfgregwrite(), multiplex the domain and
bus number into the bus argument. The bus number occupies the least
significant 8 bits. The PCI domain occupies the most significant 24
bits.

On the Altix 350, the PCI domain is a required parameter, but
changing the prototype of the pci_cfgreg*() functions to include a
separate domain argument has wide-spread consequences across the
supported architectures. We'd be changing a known interface.

Multiplexing is an acceptable kluge to give us what we need with
manageable impact. Note that the PCI bus number fits in 8 bits,
so the multiplexing of the domain is a backward compatible change.


git-svn-id: svn+ssh://svn.freebsd.org/base/head@253560 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f