]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
11 years agoFix an incorrect comparison.
adrian [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:
gonzo [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
alc [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.
alc [Wed, 15 Aug 2012 22:25:57 +0000 (22:25 +0000)]
Eliminate some unused declarations.

11 years agoCorrect a KASSERT message.
alc [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 [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
gonzo [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
gonzo [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
jceel [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:
kib [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 [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
jfv [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.
hselasky [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
kib [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
kib [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
kib [Wed, 15 Aug 2012 15:53:27 +0000 (15:53 +0000)]
Fix build

11 years agoRevert r239178 and implement two new functions, namely
hselasky [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.
hselasky [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.
kib [Wed, 15 Aug 2012 15:18:20 +0000 (15:18 +0000)]
Regenerate.

11 years agoProvide 32bit compat for truncate(2) and ftruncate(2).
kib [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.
obrien [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
ae [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.
ae [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).
ae [Wed, 15 Aug 2012 09:18:49 +0000 (09:18 +0000)]
Explicitly terminate the string after strncpy(3).

11 years agoUnbreak ATMEL kernel build
gonzo [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 [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 [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 [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 [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 [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 [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 [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
gonzo [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 [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
gonzo [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
gonzo [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
gonzo [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
gonzo [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
gonzo [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
gonzo [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
gonzo [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
gonzo [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
gonzo [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
gonzo [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
gonzo [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
gonzo [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
gonzo [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
gonzo [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
np [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
np [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 [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 [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 [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 [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.
np [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
np [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
jh [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.
des [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.
mav [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.
kan [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
kib [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
kib [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
kib [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.
kib [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
kib [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
kib [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
kib [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.
andreast [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:
jhb [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
dim [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.
emaste [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.
jhb [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.
hselasky [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.
hselasky [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".
hselasky [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.
hselasky [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
alc [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
jhb [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.
emaste [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.
wblock [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

11 years agoRestore the old behaviour. If requested partition is a BSD slice,
ae [Mon, 13 Aug 2012 13:33:21 +0000 (13:33 +0000)]
Restore the old behaviour. If requested partition is a BSD slice,
but d_partition isn't explicitly set, then try to open BSD label and its
first partition.

11 years agoRemove colons from the debug message, device name returned by the
ae [Mon, 13 Aug 2012 13:10:50 +0000 (13:10 +0000)]
Remove colons from the debug message, device name returned by the
disk_fmtdev() already has the colons.

11 years agoUnbreak booting from the true dedicated disks.
ae [Mon, 13 Aug 2012 13:08:30 +0000 (13:08 +0000)]
Unbreak booting from the true dedicated disks.
When we open the disk, check the type of partition table, that has
been detected. If this is BSD label, then we assume this is DD mode.

Reported by: dim@

11 years agoBuild modules along with the XENHVM kernels.
cperciva [Mon, 13 Aug 2012 07:36:57 +0000 (07:36 +0000)]
Build modules along with the XENHVM kernels.

No objections from: freebsd-xen mailing list
MFC after: 1 week

11 years agoRemove extraneous newline.
mjacob [Sun, 12 Aug 2012 20:49:25 +0000 (20:49 +0000)]
Remove extraneous newline.

MFC after: 1 month

11 years agoFix an oops where we wiped out DMA maps. Don't allocate extended
mjacob [Sun, 12 Aug 2012 20:45:47 +0000 (20:45 +0000)]
Fix an oops where we wiped out DMA maps. Don't allocate extended
command space for anything less than a 2300.

MFC after: 1 month
X-MFC: 238869

11 years ago- Fix source dataset snapshot name in Example 15.
gjb [Sun, 12 Aug 2012 20:30:15 +0000 (20:30 +0000)]
- Fix source dataset snapshot name in Example 15.
- Bump date.

MFC after: 3 days
X-MFC-With: r239216

11 years agoRemove a leading space that breaks rendering.
gjb [Sun, 12 Aug 2012 20:23:59 +0000 (20:23 +0000)]
Remove a leading space that breaks rendering.

MFC after: 3 days

11 years agoCompile fix.
hselasky [Sun, 12 Aug 2012 19:58:56 +0000 (19:58 +0000)]
Compile fix.

MFC after: 2 weeks

11 years agoAdd support for the so-called streams feature of BULK endpoints
hselasky [Sun, 12 Aug 2012 17:53:06 +0000 (17:53 +0000)]
Add support for the so-called streams feature of BULK endpoints
in SUPER-speed mode, USB 3.0.

This feature has not been tested yet, due to lack of hardware.

This feature is useful when implementing protocols like UASP,
USB attached SCSI which promises higher USB mass storage throughput.

This patch also implements support for hardware processing of endpoints
for increased performance. The switching to hardware processing
of an endpoint is done via a callback to the USB controller driver. The
stream feature is implemented like a variant of a hardware USB protocol.

USB controller drivers implementing device mode needs to be updated to
implement the new "xfer_stall" USB controller method and remove the
"xfer" argument from the "set_stall" method.

The API's toward existing USB drivers are preserved. To setup a USB transfer
in stream mode, set the "stream_id" field of the USB config structure to
the desired value.

The maximum number of BULK streams is currently hardcoded and limited to 8
via a define in usb_freebsd.h.

All USB drivers should be re-compiled after this change.

LibUSB will be updated next week to support streams mode. A new IOCTL to
setup BULK streams as already been implemented. The ugen device nodes
currently only supports stream ID zero.

The FreeBSD version has been bumped.

MFC after: 2 weeks

11 years ago1. Remove SEN support. I doubt there are any working examples
mjacob [Sun, 12 Aug 2012 17:01:07 +0000 (17:01 +0000)]
1. Remove SEN support. I doubt there are any working examples
of this hardware still running (close to twenty years now).

2. Quiesece and use ENC_VLOG instead of ENC_LOG for most
complaints. That is, they're visible with bootverbose, but
otherwise quiesced and not repeatedly spamming messages
with constant reminders that hardware in this space is
rarely fully compliant.

MFC after: 1 month

11 years agoAdd missing VERIFY_10 definition.
mjacob [Sun, 12 Aug 2012 16:58:38 +0000 (16:58 +0000)]
Add missing VERIFY_10 definition.

MFC after: 1 month

11 years agoAdd another debug message.
ae [Sun, 12 Aug 2012 14:32:30 +0000 (14:32 +0000)]
Add another debug message.

11 years agoAdd more debug messages.
ae [Sun, 12 Aug 2012 14:16:21 +0000 (14:16 +0000)]
Add more debug messages.

11 years agoDo defered mutex wakeup once.
davidxu [Sun, 12 Aug 2012 00:56:56 +0000 (00:56 +0000)]
Do defered mutex wakeup once.

11 years agoRevert the ath_tx_draintxq() method, and instead teach it the minimum
adrian [Sun, 12 Aug 2012 00:46:15 +0000 (00:46 +0000)]
Revert the ath_tx_draintxq() method, and instead teach it the minimum
necessary to "do" EDMA.

It was just using the TX completion status for logging information about
the descriptor completion.  Since with EDMA we don't know this without
checking the TX completion FIFO, we can't provide this information.
So don't.

11 years agoBreak out ath_draintxq() into a method and un-methodize ath_tx_processq().
adrian [Sun, 12 Aug 2012 00:37:29 +0000 (00:37 +0000)]
Break out ath_draintxq() into a method and un-methodize ath_tx_processq().

Now that I understand what's going on with this, I've realised that
it's going to be quite difficult to implement a processq method in
the EDMA case.  Because there's a separate TX status FIFO, I can't
just run processq() on each EDMA TXQ to see what's finished.
i have to actually run the TX status queue and handle individual
TXQs.

So:

* unmethodize ath_tx_processq();
* leave ath_tx_draintxq() as a method, as it only uses the completion status
  for debugging rather than actively completing the frames (ie, all frames
  here are failed);
* Methodize ath_draintxq().

The EDMA ath_draintxq() will have to take care of running the TX
completion FIFO before (potentially) freeing frames in the queue.

The only two places where ath_tx_draintxq() (on a single TXQ) are used:

* ath_draintxq(); and
* the CABQ handling in the beacon setup code - it drains the CABQ before
  populating the CABQ with frames for a new beacon (when doing multi-VAP
  operation.)

So it's quite possible that once I methodize the CABQ and beacon handling,
I can just drop ath_tx_draintxq() in its entirety.

Finally, it's also quite possible that I can remove ath_tx_draintxq()
in the future and just "teach" it to not check the status when doing
EDMA.

11 years agoSome style fixes inspired by @bde.
davidxu [Sat, 11 Aug 2012 23:48:39 +0000 (23:48 +0000)]
Some style fixes inspired by @bde.

11 years agoExtend the beacon code slightly to support AP mode beaconing for the
adrian [Sat, 11 Aug 2012 23:26:19 +0000 (23:26 +0000)]
Extend the beacon code slightly to support AP mode beaconing for the
EDMA HAL hardware.

* The EDMA HAL code assumes the nexttbtt and intval values are in TU/8
  units, rather than TU.  For now, just "hack" around that here, at least
  until I code up something to translate it in the HAL.
* Setup some different TXQ flags for EDMA hardware.
* The EDMA HAL doesn't support setting the first rate series via
  ath_hal_setuptxdesc() - instead, a call to ath_hal_set11nratescenario()
  is always required.  So for now, just do an 11n rate series setup
  for EDMA beacon frames.

This allows my AR9380 to successfully transmit beacon frames.

However, CABQ TX and all normal data frame TX and TX completion is
still not functional and will require some more significant code churn
to make work.

11 years agoMFp4:
davidxu [Sat, 11 Aug 2012 23:17:02 +0000 (23:17 +0000)]
MFp4:
Further decreases unexpected context switches by defering mutex wakeup
until internal sleep queue lock is released.