]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
11 years agoMerge ACPICA 20120816.
Jung-uk Kim [Thu, 16 Aug 2012 20:54:52 +0000 (20:54 +0000)]
Merge ACPICA 20120816.

11 years agoMake room for DDP page pods in the default configuration profile. While
Navdeep Parhar [Thu, 16 Aug 2012 20:30:14 +0000 (20:30 +0000)]
Make room for DDP page pods in the default configuration profile.  While
here, bump up the L2 table's size to 4K entries.

MFC after: 2 weeks

11 years agoAdd a routine (t4_set_tcb_field) to update arbitrary parts of a hardware
Navdeep Parhar [Thu, 16 Aug 2012 20:15:29 +0000 (20:15 +0000)]
Add a routine (t4_set_tcb_field) to update arbitrary parts of a hardware
TCB.  Filters are programmed by modifying the TCB too (via a different
routine) and the reply to any TCB update is delivered via a
CPL_SET_TCB_RPL.  Figure out whether the reply is for a filter-write or
something else and route it appropriately.

MFC after: 2 weeks

11 years ago- Typo fix
Oleksandr Tymoshenko [Thu, 16 Aug 2012 19:22:34 +0000 (19:22 +0000)]
- Typo fix
- style(9) fix

Spotted by: kib@, Andrey Zonov

11 years agoAllow for a different handler for each type of firmware message.
Navdeep Parhar [Thu, 16 Aug 2012 18:31:50 +0000 (18:31 +0000)]
Allow for a different handler for each type of firmware message.

MFC after: 2 weeks

11 years agoRemove D_NEEDGIANT from dead_devsw. biofinish() (and thus dead_strategy)
John Baldwin [Thu, 16 Aug 2012 18:04:33 +0000 (18:04 +0000)]
Remove D_NEEDGIANT from dead_devsw.  biofinish() (and thus dead_strategy)
does not need Giant.

MFC after: 1 month

11 years agoIts never a good idea to double free the same
Randall Stewart [Thu, 16 Aug 2012 17:55:16 +0000 (17:55 +0000)]
Its never a good idea to double free the same
address.

MFC after: 1 week (after the other commits ahead of this gets MFC'd)

11 years agoImport ACPICA 20120816.
Jung-uk Kim [Thu, 16 Aug 2012 17:26:22 +0000 (17:26 +0000)]
Import ACPICA 20120816.

11 years agoAdd locking for sscdisk(4) and mark it MPSAFE. Since this driver just
John Baldwin [Thu, 16 Aug 2012 17:17:08 +0000 (17:17 +0000)]
Add locking for sscdisk(4) and mark it MPSAFE.  Since this driver just
makes calls out to the emulator, the locking is fairly simple.  A global
mutex protects the list of ssc disks, and each ssc disk has a mutex
to protect it's bioq.

Approved by: marcel

11 years agoOn lun disable, complete all INOTs and ATIOs with CAM_REQ_ABORTED.
Matt Jacob [Thu, 16 Aug 2012 15:32:16 +0000 (15:32 +0000)]
On lun disable, complete all INOTs and ATIOs with CAM_REQ_ABORTED.

Reviewed by: ken (silently), chuck
MFC after: 3 weeks

11 years agoAs a safety measure, disable lowering pid_max too much.
Konstantin Belousov [Thu, 16 Aug 2012 13:04:21 +0000 (13:04 +0000)]
As a safety measure, disable lowering pid_max too much.

Requested by: Peter Jeremy <peter@rulingia.com>
MFC after: 1 week

11 years agoFix grammar.
Konstantin Belousov [Thu, 16 Aug 2012 13:01:56 +0000 (13:01 +0000)]
Fix grammar.

Submitted by: jh
MFC after: 1 week

11 years ago- When running out of swzone, instead of spewing an error message every
Dag-Erling Smørgrav [Thu, 16 Aug 2012 08:29:49 +0000 (08:29 +0000)]
- When running out of swzone, instead of spewing an error message every
  tick until the situation is resolved (if ever), just print a single
  message when running out and another when space becomes available.

- When adding more swap, warn if the total amount exceeds half the
  theoretical maximum we can handle.

11 years agoFix "speaker" volume control, broken at r230451.
Alexander Motin [Thu, 16 Aug 2012 07:43:15 +0000 (07:43 +0000)]
Fix "speaker" volume control, broken at r230451.

Reported and tested by: Slawa Olhovchenkov <slw@zxy.spb.ru>
MFC after: 1 month

11 years agoAdd comment why the code has been disabled.
Andrey V. Elsukov [Thu, 16 Aug 2012 06:45:58 +0000 (06:45 +0000)]
Add comment why the code has been disabled.

Requested by: rpaulo

11 years agoPreliminary Embest ATEB9200 support.
Warner Losh [Thu, 16 Aug 2012 05:03:59 +0000 (05:03 +0000)]
Preliminary Embest ATEB9200 support.

11 years agoHmmm, somehow this file was completely deleted, rather than just
Warner Losh [Thu, 16 Aug 2012 04:53:30 +0000 (04:53 +0000)]
Hmmm, somehow this file was completely deleted, rather than just
having the bogus lines being removed.

11 years agoRemove unused hints.
Warner Losh [Thu, 16 Aug 2012 04:49:23 +0000 (04:49 +0000)]
Remove unused hints.

11 years agoEliminate an unused parameter from init_pte_prot().
Alan Cox [Thu, 16 Aug 2012 04:41:15 +0000 (04:41 +0000)]
Eliminate an unused parameter from init_pte_prot().

Eliminate stray whitespace within init_pte_prot().

Eliminate a gratuitous variable initialization from pmap_enter().

11 years agoLimit popcorn limit to something sane (either 2ns or 2 ticks if that's
Warner Losh [Thu, 16 Aug 2012 02:35:44 +0000 (02:35 +0000)]
Limit popcorn limit to something sane (either 2ns or 2 ticks if that's
longer).

PR: 156481
Submitted by: Ian Lepore

11 years agoFix an incorrect comparison.
Adrian Chadd [Thu, 16 Aug 2012 00:53:23 +0000 (00:53 +0000)]
Fix an incorrect comparison.

PR: kern/170098

11 years agoMerge somewhat modified r230399 from projects/armv6:
Oleksandr Tymoshenko [Thu, 16 Aug 2012 00:51:50 +0000 (00:51 +0000)]
Merge somewhat modified r230399 from projects/armv6:

Add timeout to wait for network controllers to appear when netbooting.

USB ethernet adapter initialization usually is delayed and
they're not available immidiately after autoconfiguration. So we need
to wait a bit before giving up

Reviewed by: stas@

11 years agoReplace all uses of the vm page queues lock by a r/w lock that is private
Alan Cox [Wed, 15 Aug 2012 22:51:01 +0000 (22:51 +0000)]
Replace all uses of the vm page queues lock by a r/w lock that is private
to this pmap.

Tidy up the #include's.

Remove the (now) unused #define PMAP_SHPGPERPROC.  (This should have
been removed in r239236.)

Tested by: jchandra

11 years agoEliminate some unused declarations.
Alan Cox [Wed, 15 Aug 2012 22:25:57 +0000 (22:25 +0000)]
Eliminate some unused declarations.

11 years agoCorrect a KASSERT message.
Alan Cox [Wed, 15 Aug 2012 22:12:01 +0000 (22:12 +0000)]
Correct a KASSERT message.

Submitted by: bde

11 years agoDon't call the node iteration function inside the node table / node
Adrian Chadd [Wed, 15 Aug 2012 20:01:28 +0000 (20:01 +0000)]
Don't call the node iteration function inside the node table / node
iterate lock.

This causes LORs and deadlocks as some code paths will have the com lock
held when calling ieee80211_iterate_nodes().

Here, the comlock isn't held during the node table and node iteration
locks; and the callback isn't called with any (extra) lock held.

PR: kern/170098
Submitted by: moonlightakkiy@yahoo.ca
MFC after: 4 weeks

11 years agoFix argument type for bus_space_map
Oleksandr Tymoshenko [Wed, 15 Aug 2012 18:37:01 +0000 (18:37 +0000)]
Fix argument type for bus_space_map

11 years agoUnbreak build for the rest of AT91 platforms
Oleksandr Tymoshenko [Wed, 15 Aug 2012 18:33:58 +0000 (18:33 +0000)]
Unbreak build for the rest of AT91 platforms

11 years agoSwitch lpc initarm() to use struct arm_boot_params and therefore fix
Jakub Wojciech Klama [Wed, 15 Aug 2012 18:18:29 +0000 (18:18 +0000)]
Switch lpc initarm() to use struct arm_boot_params and therefore fix
EA3250 kernel build.

Approved by: gonzo

11 years agoSmall tweaks:
Konstantin Belousov [Wed, 15 Aug 2012 18:00:52 +0000 (18:00 +0000)]
Small tweaks:
- fix macro argument
- wrap long line
- be more explicit about old pid_t type.

MFC after: 1 week

11 years agoMinor mdoc fixes and language tweaks.
Joel Dahl [Wed, 15 Aug 2012 17:29:05 +0000 (17:29 +0000)]
Minor mdoc fixes and language tweaks.

11 years agoCustomer report of a panic on boot due to the old
Jack F Vogel [Wed, 15 Aug 2012 17:12:40 +0000 (17:12 +0000)]
Customer report of a panic on boot due to the old
"m_getjcl:invalid cluster type" that occurred some
time back with the igb driver. This happens often when
booting over the net. I believe the NIC hardware is left
in a warm state when handed over to the driver, and a stray
RX interrupt happens earlier than the code is prepared for
it to happen. This change was verified to fix the problem,
its kind of a bandaid... but it is similar to what was done
in the igb code.

11 years agoStreamline use of cdevpriv and correct some corner cases.
Hans Petter Selasky [Wed, 15 Aug 2012 16:19:39 +0000 (16:19 +0000)]
Streamline use of cdevpriv and correct some corner cases.

1) It is not useful to call "devfs_clear_cdevpriv()" from
"d_close" callbacks, hence for example read, write, ioctl and
so on might be sleeping at the time of "d_close" being called
and then then freed private data can still be accessed.
Examples: dtrace, linux_compat, ksyms (all fixed by this patch)

2) In sys/dev/drm* there are some cases in which memory will
be freed twice, if open fails, first by code in the open
routine, secondly by the cdevpriv destructor. Move registration
of the cdevpriv to the end of the drm open routines.

3) devfs_clear_cdevpriv() is not called if the "d_open" callback
registered cdevpriv data and the "d_open" callback function
returned an error. Fix this.

Discussed with: phk
MFC after: 2 weeks

11 years agoAdd a short man page describing how to run a.out binaries on the
Konstantin Belousov [Wed, 15 Aug 2012 16:01:45 +0000 (16:01 +0000)]
Add a short man page describing how to run a.out binaries on the
current kernels.

MFC after: 1 week

11 years agoAdd a sysctl kern.pid_max, which limits the maximum pid the system is
Konstantin Belousov [Wed, 15 Aug 2012 15:56:21 +0000 (15:56 +0000)]
Add a sysctl kern.pid_max, which limits the maximum pid the system is
allowed to allocate, and corresponding tunable with the same
name. Note that existing processes with higher pids are left intact.

MFC after: 1 week

11 years agoFix build
Konstantin Belousov [Wed, 15 Aug 2012 15:53:27 +0000 (15:53 +0000)]
Fix build

11 years agoRevert r239178 and implement two new functions, namely
Hans Petter Selasky [Wed, 15 Aug 2012 15:42:57 +0000 (15:42 +0000)]
Revert r239178 and implement two new functions, namely
"device_free_softc()" and "device_claim_softc()",
to allow USB serial drivers refcounting the softc.
These functions are used to grab the softc from
auto-free and to free the softc back to the correct
malloc type, respectivly.

Discussed with: jhb
MFC after: 2 weeks

11 years agoAdd new USB device quirk.
Hans Petter Selasky [Wed, 15 Aug 2012 15:35:20 +0000 (15:35 +0000)]
Add new USB device quirk.

Submitted by: Kra OTN
MFC after: 2 weeks

11 years agoRegenerate.
Konstantin Belousov [Wed, 15 Aug 2012 15:18:20 +0000 (15:18 +0000)]
Regenerate.

11 years agoProvide 32bit compat for truncate(2) and ftruncate(2).
Konstantin Belousov [Wed, 15 Aug 2012 15:17:56 +0000 (15:17 +0000)]
Provide 32bit compat for truncate(2) and ftruncate(2).

MFC after: 1 week

11 years agoDon't include opt_ddb.h & <ddb/ddb.h> twice.
David E. O'Brien [Wed, 15 Aug 2012 14:18:54 +0000 (14:18 +0000)]
Don't include opt_ddb.h & <ddb/ddb.h> twice.

11 years agoSome BIOSes return incorrect number of sectors, make checks less
Andrey V. Elsukov [Wed, 15 Aug 2012 12:01:13 +0000 (12:01 +0000)]
Some BIOSes return incorrect number of sectors, make checks less
strictly, to do not lost some partitions.

Reported by: swills@

11 years agoRework r239232 to unbreak ZFS detection on MBR slices.
Andrey V. Elsukov [Wed, 15 Aug 2012 10:11:29 +0000 (10:11 +0000)]
Rework r239232 to unbreak ZFS detection on MBR slices.

11 years agoExplicitly terminate the string after strncpy(3).
Andrey V. Elsukov [Wed, 15 Aug 2012 09:18:49 +0000 (09:18 +0000)]
Explicitly terminate the string after strncpy(3).

11 years agoUnbreak ATMEL kernel build
Oleksandr Tymoshenko [Wed, 15 Aug 2012 08:34:31 +0000 (08:34 +0000)]
Unbreak ATMEL kernel build

11 years agoExtend the non-aggregate TX descriptor chain routine to be aware of:
Adrian Chadd [Wed, 15 Aug 2012 08:14:16 +0000 (08:14 +0000)]
Extend the non-aggregate TX descriptor chain routine to be aware of:

* the descriptor ID, and
* the multi-buffer support that the EDMA chips support.

This is required for successful MAC transmission of multi-descriptor
frames.  The MAC simply hangs if there are NULL buffers + 0 length pointers,
but the descriptor did have TxMore set.

This won't be done for the 11n aggregate path, as that will be modified
to use the newer API (ie, ath_hal_filltxdesc() and then set first|middle|
last_aggr), which will deprecate some of the current code.

TODO:

* Populate the numTxMaps field in the HAL, then make sure that's fetched
  by the driver.  Then I can undo that hack.

Tested:

* AR9380, AP mode, TX'ing non-aggregate 802.11n frames;
* AR9280, STA/AP mode, doing aggregate and non-aggregate traffic.

11 years agoBump up the rate control table size to incorporate 3 stream entries.
Adrian Chadd [Wed, 15 Aug 2012 08:06:06 +0000 (08:06 +0000)]
Bump up the rate control table size to incorporate 3 stream entries.

11 years agoRemove this comment, it's no longer relevant.
Adrian Chadd [Wed, 15 Aug 2012 07:56:48 +0000 (07:56 +0000)]
Remove this comment, it's no longer relevant.

11 years agoExtend the duration calculations to work with three and four stream
Adrian Chadd [Wed, 15 Aug 2012 07:52:49 +0000 (07:52 +0000)]
Extend the duration calculations to work with three and four stream
rates.

11 years agoAdd a missing comma.
Adrian Chadd [Wed, 15 Aug 2012 07:50:42 +0000 (07:50 +0000)]
Add a missing comma.

Pointy hat to: me, for not doing a 'clean' build first.

11 years agoAdd 3 stream rates to the sample rate control module.
Adrian Chadd [Wed, 15 Aug 2012 07:32:34 +0000 (07:32 +0000)]
Add 3 stream rates to the sample rate control module.

11 years agoExtend the sample mask from 32 bits to 64 bits.
Adrian Chadd [Wed, 15 Aug 2012 07:10:10 +0000 (07:10 +0000)]
Extend the sample mask from 32 bits to 64 bits.

This is required to support > MCS15 as more than 32 bit rate entries are
suddenly available.

This is quite messy - instead of doing typecasts at each mask operation,
this should be migrated to use a macro and have that do the typecast.

11 years agoSpecify architecture for assembler
Oleksandr Tymoshenko [Wed, 15 Aug 2012 07:00:34 +0000 (07:00 +0000)]
Specify architecture for assembler

11 years agoImplement a sequential descriptor ID value and stuff it in the ath_buf.
Adrian Chadd [Wed, 15 Aug 2012 06:48:34 +0000 (06:48 +0000)]
Implement a sequential descriptor ID value and stuff it in the ath_buf.

This will be used by the EDMA TX code to assign descriptor IDs in order
to provide some debugging.

11 years agoMerging of projects/armv6, part 10
Oleksandr Tymoshenko [Wed, 15 Aug 2012 06:31:32 +0000 (06:31 +0000)]
Merging of projects/armv6, part 10

- Support for Texas Instruments SoCs:
- AM335x
- OMAP4

- Kernel configs, DTS for Beaglebone and Pandaboard

Submitted by: Ben Gray, Damjan Marion

11 years agoMerging of projects/armv6, part 9
Oleksandr Tymoshenko [Wed, 15 Aug 2012 06:06:43 +0000 (06:06 +0000)]
Merging of projects/armv6, part 9

Very basic support for Nvidia Tegra2: timer, interrupts, UART.

Submitted by: Damjan Marion <dmarion@freebsd.org>

11 years agoMerging of projects/armv6, intermission
Oleksandr Tymoshenko [Wed, 15 Aug 2012 05:55:16 +0000 (05:55 +0000)]
Merging of projects/armv6, intermission

Add configs missed in previous commits:
    - ARMADA XP
- Embedded Artists EA3250

11 years agoMerging of projects/armv6, part 8
Oleksandr Tymoshenko [Wed, 15 Aug 2012 05:37:10 +0000 (05:37 +0000)]
Merging of projects/armv6, part 8

r235162:

  Initial LPC32x0 support. Includes DTS file for Embedded Artists EA3250
  board.

  Peripherals currently supported:
  - Serial ports
  - Interrupt controller
  - Timers
  - Ethernet
  - USB host
  - Framebuffer (in conjunction with SSD1289 LCD controller)
  - RTC
  - SPI
  - GPIO

Submitted by: Jakub Wojciech Klama <jceel@freebsd.org>

11 years agoMerging of projects/armv6, part 7
Oleksandr Tymoshenko [Wed, 15 Aug 2012 05:15:49 +0000 (05:15 +0000)]
Merging of projects/armv6, part 7

Add Marvell ARMADA XP support

Obtained from: Marvell, Semihalf

11 years agoMerging of projects/armv6, part 6
Oleksandr Tymoshenko [Wed, 15 Aug 2012 04:07:18 +0000 (04:07 +0000)]
Merging of projects/armv6, part 6

r229271:
    Import files needed to build ARMADA XP kernel.

Submitted by: Grzegorz Bernacki

11 years agoMerging of projects/armv6, part 5
Oleksandr Tymoshenko [Wed, 15 Aug 2012 04:03:55 +0000 (04:03 +0000)]
Merging of projects/armv6, part 5

- Driver for SMSC LAN95XX and LAN8710A ethernet controllers
- Driver for LAN8710A PHY

Submitted by: Ben Gray, Damjan Marion, Tim Kientzle

11 years agoMerging of projects/armv6, part 4
Oleksandr Tymoshenko [Wed, 15 Aug 2012 03:49:10 +0000 (03:49 +0000)]
Merging of projects/armv6, part 4

r233822:
  Remove useless and wrong piece of code in fdt_get_range() which i
  overwrites passed phandle_t node. Modify debug printf in fdt_reg_to_rl()
  to be consistent (that is, print start and end *virtual* addresses).

r230560:
  Handle "ranges;"
  Make fdt_reg_to_rl() responsible for mapping the device memory, instead
  on just hoping that there's only one simplebus, and using fdt_immr_va as
  the base VA.

r230315
  Add a function to get the PA from range, instead of (ab)using
  fdt_immr_pa, and use it for the UART driver

11 years agoMerging of projects/armv6, part 4
Oleksandr Tymoshenko [Wed, 15 Aug 2012 03:33:57 +0000 (03:33 +0000)]
Merging of projects/armv6, part 4

r232281:
Fix byte order.

11 years agoMerging of projects/armv6, part 3
Oleksandr Tymoshenko [Wed, 15 Aug 2012 03:21:56 +0000 (03:21 +0000)]
Merging of projects/armv6, part 3

r238211:
Support TARGET_ARCH=armv6 and TARGET_ARCH=armv6eb

This adds a new TARGET_ARCH for building on ARM
processors that support the ARMv6K multiprocessor
extensions.  In particular, these processors have
better support for TLS and mutex operations.

This mostly touches a lot of Makefiles to extend
existing patterns for inferring CPUARCH from ARCH.
It also configures:
 * GCC to default to arm1176jz-s
 * GCC to predefine __FreeBSD_ARCH_armv6__
 * gas to default to ARM_ARCH_V6K
 * uname -p to return 'armv6'
 * make so that MACHINE_ARCH defaults to 'armv6'
It also changes a number of headers to use
the compiler __ARM_ARCH_XXX__ macros to configure
processor-specific support routines.

Submitted by: Tim Kientzle <kientzle@freebsd.org>

11 years agoMerging of projects/armv6, part 2
Oleksandr Tymoshenko [Wed, 15 Aug 2012 03:09:00 +0000 (03:09 +0000)]
Merging of projects/armv6, part 2

Handle TLS for ARMv6 and ARMv7

11 years agoMerging of projects/armv6, part 2
Oleksandr Tymoshenko [Wed, 15 Aug 2012 03:08:29 +0000 (03:08 +0000)]
Merging of projects/armv6, part 2

Handle TLS for ARMv6 and ARMv7

11 years agoMerging of projects/armv6, part 2
Oleksandr Tymoshenko [Wed, 15 Aug 2012 03:07:41 +0000 (03:07 +0000)]
Merging of projects/armv6, part 2

Handle TLS for ARMv6 and ARMv7

11 years agoMerging projects/armv6, part 1
Oleksandr Tymoshenko [Wed, 15 Aug 2012 03:03:03 +0000 (03:03 +0000)]
Merging projects/armv6, part 1

Cummulative patch of changes that are not vendor-specific:
- ARMv6 and ARMv7 architecture support
- ARM SMP support
- VFP/Neon support
- ARM Generic Interrupt Controller driver
- Simplification of startup code for all platforms

11 years agoThe size of the buffers in an Ethernet freelist has to be higher than the
Navdeep Parhar [Wed, 15 Aug 2012 01:03:13 +0000 (01:03 +0000)]
The size of the buffers in an Ethernet freelist has to be higher than the
interface's MTU.  Initialize such freelists with correct values.

This wasn't a problem for common MTUs (1500 and 9000) as the buffers (2048
and 9216 in size) happened to have enough spare room.  I ran into it when
playing around with unusual MTUs.

MFC after: 2 weeks

11 years agoAssume INET, INET6, and TCP_OFFLOAD when the driver is built out of tree and
Navdeep Parhar [Tue, 14 Aug 2012 23:08:49 +0000 (23:08 +0000)]
Assume INET, INET6, and TCP_OFFLOAD when the driver is built out of tree and
KERNBUILDDIR is not set.

MFC after: 2 weeks

11 years agoDump out the TX FIFO depth.
Adrian Chadd [Tue, 14 Aug 2012 22:34:22 +0000 (22:34 +0000)]
Dump out the TX FIFO depth.

11 years agoBreak out the TX completion code into a separate function, so it can be
Adrian Chadd [Tue, 14 Aug 2012 22:32:20 +0000 (22:32 +0000)]
Break out the TX completion code into a separate function, so it can be
re-used by the upcoming EDMA TX completion code.

Make ath_stoptxdma() public, again so the EDMA TX code can use it.

Don't check for the TXQ bitmap in the ISR when doing EDMA work as it
doesn't apply for EDMA.

11 years agoAdd an assertion to check that the given TXQ is _not_ locked.
Adrian Chadd [Tue, 14 Aug 2012 22:30:17 +0000 (22:30 +0000)]
Add an assertion to check that the given TXQ is _not_ locked.

11 years agoRename command defines to match names used in the datasheet, in order to
Gavin Atkinson [Tue, 14 Aug 2012 22:21:46 +0000 (22:21 +0000)]
Rename command defines to match names used in the datasheet, in order to
make maintaining this driver from the documentation easier in the future.
This is a mostly mechanical change.

In uslcom_param(), move the zeroing of the final two fields of the
flowctrl structure outside of the "if CRTSCTS" section - not only were
they being zeroed in both the clauses, but these two fields have nothing
to do with hardware flow control anyway.

11 years agoif_iqdrops should include frames truncated within the chip.
Navdeep Parhar [Tue, 14 Aug 2012 22:15:12 +0000 (22:15 +0000)]
if_iqdrops should include frames truncated within the chip.

MFC after: 2 weeks

11 years agoConvert some fixed parameters to tunables (with reasonable default
Navdeep Parhar [Tue, 14 Aug 2012 21:47:41 +0000 (21:47 +0000)]
Convert some fixed parameters to tunables (with reasonable default
values).

- cong_drop specifies what to do on congestion: nothing, backpressure,
  or drop.
- fl_pktshift specifies the padding before Ethernet payload.
- fl_pad specifies the boundary upto which to pad Ethernet payload.
- spg_len controls the length of the status page.

MFC after: 2 weeks

11 years agoReserve room for the terminating NUL when setting or getting kernel
Jaakko Heinonen [Tue, 14 Aug 2012 19:16:30 +0000 (19:16 +0000)]
Reserve room for the terminating NUL when setting or getting kernel
environment variables. KENV_MNAMELEN and KENV_MVALLEN doesn't include
space for the terminating NUL.

11 years agoAs discussed on -current, remove the hardcoded default maxswzone.
Dag-Erling Smørgrav [Tue, 14 Aug 2012 17:01:21 +0000 (17:01 +0000)]
As discussed on -current, remove the hardcoded default maxswzone.

MFC after: 3 weeks

11 years agoFix multichannel input signals tracing on some CODECs like ALC260.
Alexander Motin [Tue, 14 Aug 2012 14:07:34 +0000 (14:07 +0000)]
Fix multichannel input signals tracing on some CODECs like ALC260.

Reported and tested by: Slawa Olhovchenkov <slw@zxy.spb.ru>
MFC after: 1 month

11 years agoPospone the DF_1_NODELETE processing until object DAG is fully loaded.
Alexander Kabaev [Tue, 14 Aug 2012 13:28:30 +0000 (13:28 +0000)]
Pospone the DF_1_NODELETE processing until object DAG is fully loaded.

Trying to up the reference from the load loop risks missing dependencies
that have not been loaded yet.

MFC afer: 1 week
Reported by: nox
Reviewd by: kib

11 years agoAdd a hackish debugging facility to provide a bit of information about
Konstantin Belousov [Tue, 14 Aug 2012 12:15:01 +0000 (12:15 +0000)]
Add a hackish debugging facility to provide a bit of information about
reason for generated trap. The dump of basic signal information and 8
bytes of the faulting instruction are printed on the controlling
terminal of the process, if the machdep.uprintf_signal syscal is
enabled.

The print is the only practical way to debug traps from a.out
processes I am aware of. Because I have to reimplement it each time I
debug an issue with a.out support on amd64, commit the hack to main
tree.

MFC after: 1 week

11 years agoReal hardware, as opposed to QEMU, does not allow to have a call gate
Konstantin Belousov [Tue, 14 Aug 2012 12:13:27 +0000 (12:13 +0000)]
Real hardware, as opposed to QEMU, does not allow to have a call gate
in long mode which transfers control to 32bit code segment. Unbreak
the lcall $7,$0 implementation on amd64 by putting the 64bit user code
segment' selector into call gate, and execute the 64bit trampoline
which converts the return frame into 32bit format and switches back to
32bit mode for executing int $0x80 trampoline.

Note that all jumps over the hoops are performed in the user mode.

MFC after: 1 week

11 years agoFor old mmap syscall, when executing on amd64 or ia64, enforce the
Konstantin Belousov [Tue, 14 Aug 2012 12:11:48 +0000 (12:11 +0000)]
For old mmap syscall, when executing on amd64 or ia64, enforce the
PROT_EXEC if prot is non-zero, process is 32bit and
kern.elf32.i386_read_exec syscal is enabled. This workaround is needed
for old i386 a.out binaries, where dynamic linker did not specified
PROT_EXEC for mapping of the text.

The kern.elf32.i386_read_exec MIB name looks weird for a.out binaries,
but I reused the existing knob which already has the needed semantic.

MFC after: 1 week

11 years agoRegenerate.
Konstantin Belousov [Tue, 14 Aug 2012 12:09:36 +0000 (12:09 +0000)]
Regenerate.

11 years agoImplement the old mmap syscall for compat32, when COMPAT_43 option is
Konstantin Belousov [Tue, 14 Aug 2012 12:09:09 +0000 (12:09 +0000)]
Implement the old mmap syscall for compat32, when COMPAT_43 option is
enabled. The syscall is used by FreeBSD 1.1.5.1 dynamic linker.

MFC after: 1 week

11 years agoAdjust the r205536, by allowing a non-zero offset for anonymous
Konstantin Belousov [Tue, 14 Aug 2012 11:47:07 +0000 (11:47 +0000)]
Adjust the r205536, by allowing a non-zero offset for anonymous
mappings for a.out binaries. Apparently, a.out ld.so from FreeBSD
1.1.5.1 can issue such requests.

Reported and tested by: Dan Plassche <dplassche@gmail.com>
MFC after: 1 week

11 years agoDo not leave invalid pages in the object after the short read for a
Konstantin Belousov [Tue, 14 Aug 2012 11:45:47 +0000 (11:45 +0000)]
Do not leave invalid pages in the object after the short read for a
network file systems (not only NFS proper). Short reads cause pages
other then the requested one, which were not filled by read response,
to stay invalid.

Change the vm_page_readahead_finish() interface to not take the error
code, but instead to make a decision to free or to (de)activate the
page only by its validity. As result, not requested invalid pages are
freed even if the read RPC indicated success.

Noted and reviewed by: alc
MFC after: 1 week

11 years agoFix typo in comment.
Andreas Tobler [Tue, 14 Aug 2012 05:16:35 +0000 (05:16 +0000)]
Fix typo in comment.

11 years agoAdd locking to the twe(4) driver and make it MPSAFE:
John Baldwin [Mon, 13 Aug 2012 21:29:34 +0000 (21:29 +0000)]
Add locking to the twe(4) driver and make it MPSAFE:
- Add per-controller configuration (sx) and I/O (mutex) locks.  The
  configuration lock protects the relationship of volumes and drives
  while the I/O lock protects access to the controller's registers and
  the main I/O path.
- Remove some checks for M_WAITOK malloc()'s failing.
- Remove the explicit bus space tag/handle from the softc and use
  bus_*() rather than bus_space_*().
- Reuse the existing new-bus sysctl context instead of creating a
  new one.
- Remove compat shims for FreeBSD 4.x.
- Use pci_enable_busmaster() rather than doing it by hand, and rely
  on bus_alloc_resource() to enable PCI I/O decoding.

Tested by: Mike Tancsa  mike sentex net
Reviewed by: scottl (partially)
MFC after: 1 month

11 years agoAfter r239066, reinitialize v86.ctl and v86.addr for int 13 EDD probing
Dimitry Andric [Mon, 13 Aug 2012 21:04:01 +0000 (21:04 +0000)]
After r239066, reinitialize v86.ctl and v86.addr for int 13 EDD probing
in sys/boot/i386/libi386/biosdisk.c.  Otherwise, when DISK_DEBUG is
enabled, the DEBUG() macros will clobber those fields, and cause the
probing to always fail mysteriously when debugging is enabled.

11 years agoReword comment to try to improve clarity, and fix a typo.
Ed Maste [Mon, 13 Aug 2012 19:14:45 +0000 (19:14 +0000)]
Reword comment to try to improve clarity, and fix a typo.

11 years agoRemove the deassert INIT IPI from the IPI startup sequence for APs.
John Baldwin [Mon, 13 Aug 2012 18:52:51 +0000 (18:52 +0000)]
Remove the deassert INIT IPI from the IPI startup sequence for APs.
It is not listed in the boot sequence in the MP specification (1.4),
and it is explicitly ignored on modern CPUs.  It was only ever required
when bootstrapping systems with external APICs (that is, SMP machines
with 486s), which FreeBSD has never supported (and never will).

While here, tidy some comments and remove some banal ones.

11 years agoFix for missing locks due to recent change.
Hans Petter Selasky [Mon, 13 Aug 2012 18:34:04 +0000 (18:34 +0000)]
Fix for missing locks due to recent change.

PR: usb/170606
MFC after: 2 weeks

11 years agoAdd support for streams to LibUSB v2.0.
Hans Petter Selasky [Mon, 13 Aug 2012 18:10:52 +0000 (18:10 +0000)]
Add support for streams to LibUSB v2.0.

MFC after: 2 weeks

11 years agoRename new IOCTL to singular form of the noun "streams".
Hans Petter Selasky [Mon, 13 Aug 2012 18:09:19 +0000 (18:09 +0000)]
Rename new IOCTL to singular form of the noun "streams".

MFC after: 2 weeks

11 years agoImprove auto-quirks detection for certain Kingston memory sticks.
Hans Petter Selasky [Mon, 13 Aug 2012 18:00:34 +0000 (18:00 +0000)]
Improve auto-quirks detection for certain Kingston memory sticks.

MFC after: 2 weeks

11 years agoPort the new PV entry allocator from amd64/i386. This allocator has two
Alan Cox [Mon, 13 Aug 2012 17:38:38 +0000 (17:38 +0000)]
Port the new PV entry allocator from amd64/i386.  This allocator has two
advantages.  First, PV entries are roughly half the size.  Second, this
allocator doesn't access the paging queues, and thus it will allow for the
removal of the page queues lock from this pmap.

Fix a rather serious bug in pmap_remove_write().  After removing write
access from the specified page's first mapping, pmap_remove_write() then
used the wrong "next" pointer.  Consequently, the page's second, third,
etc. mappings were not write protected.

Tested by: jchandra

11 years agoAdd a 10 millisecond delay after sending the initial INIT IPI. This
John Baldwin [Mon, 13 Aug 2012 16:33:22 +0000 (16:33 +0000)]
Add a 10 millisecond delay after sending the initial INIT IPI.  This
matches the algorithm in the MP specification (1.4).  Previously we
were sending out the deassert INIT IPI immediately after the initial
INIT IPI was sent.

11 years agoUse array notation for consistency.
Ed Maste [Mon, 13 Aug 2012 16:03:30 +0000 (16:03 +0000)]
Use array notation for consistency.

11 years agoCorrect description of minfree to kilobytes rather than blocks.
Warren Block [Mon, 13 Aug 2012 15:16:25 +0000 (15:16 +0000)]
Correct description of minfree to kilobytes rather than blocks.

PR: 125921
Submitted by: Andre Albsmeier <Andre.Albsmeier@siemens.com>
MFC after: 3 days