Commit Graph

87166 Commits

Author SHA1 Message Date
Adrian Chadd
b9ea0ceed7 Link in the new RX EDMA routines. 2012-07-03 07:01:12 +00:00
Adrian Chadd
f8cc9b09b0 Begin abstracting out the RX path in preparation for RX EDMA support.
The RX EDMA support requires a modified approach to the RX descriptor
handling.

Specifically:

* There's now two RX queues - high and low priority;
* The RX queues are implemented as FIFOs; they're now an array of pointers
  to buffers;
* .. and the RX buffer and descriptor are in the same "buffer", rather than
  being separate.

So to that end, this commit abstracts out most of the RX related functions
from the bulk of the driver.  Notably, the RX DMA/buffer allocation isn't
updated, primarily because I haven't yet fleshed out what it should look
like.

Whilst I'm here, create a set of matching but mostly unimplemented EDMA
stubs.

Tested:

  * AR9280, station mode

TODO:

  * Thorough AP and other mode testing for non-EDMA chips;
  * Figure out how to allocate RX buffers suitable for RX EDMA, including
    correctly setting the mbuf length to compensate for the RX descriptor
    and completion status area.
2012-07-03 06:59:12 +00:00
Navdeep Parhar
9a0b948f98 Fix inverted test that resulted in incorrect multicast hw programming. 2012-07-03 06:56:11 +00:00
David E. O'Brien
cd95660f26 Revert r222186 per instructions for FreeBSD 10.
(a 10-CURRENT share/mk is already required to build a 10-CURRENT kernel
 on 9-STABLE)
2012-07-03 05:01:00 +00:00
Marcel Moolenaar
7c45c9e4b5 Add a driver for the Freescale FCM module in the localbus controller.
This driver does not yet handle multiple chip selects properly.

Note that the NAND infrastructure does not perform full page
reads or writes, which means that this driver cannot make use
of the hardware ECC that is otherwise present.
2012-07-03 01:00:29 +00:00
Marcel Moolenaar
23fbc06bfc Support lbc interrupts:
o   Save and clear the LTESR register in the interrupt handler.
o   In lbc_read_reg(), return the saved LTESR register value if applicable
    (i.e. when the saved value is not invalid (read: ~0U)).
o   In lbc_write_reg(), clear the bits in the saved register when when it's
    written to and when the asved value is not invalid.
o   Also in lbc_write_reg(), the LTESR register is unlocked (in H/W) when
    bit 1 of LTEATR is cleared. We use this to invalidate our saved LTESR
    register value. Subsequent reads and write go to H/W directly.

While here:
o   In lbc_read_reg() & lbc_write_reg(), add some belts and suspenders to
    catch when register offsets are out of range.
o   In lbc_attach(), initialize completely and don't leave something left
    for lbc_banks_enable().
2012-07-03 00:06:14 +00:00
Marcel Moolenaar
120c7e2eb7 Simplify simplebus_setup_intr and don't call MD code directly. We can
(and have to) trust our parent to handle interrupt configuration.
2012-07-02 23:53:08 +00:00
Marcel Moolenaar
8c4c7216e6 Properly implement bus_setup_intr so that it handles the configuration
of interrupts of direct children. Have the bus_config_intr and
bus_teardown_intr methods implemented by bus_generic_config_intr and
bus_generic_teardown_intr (resp) as we don't need to do anything
special outselves.

This removes all the ``#ifdef $arch'' code that was there because powerpc
didn't have a proper nexus and people tend to copy and paste stuff.
2012-07-02 23:49:29 +00:00
Marcel Moolenaar
8609d8293d Properly implement the bus_config_intr, bus_setup_intr and bus_teardown_intr
methods so that MI drvers can depend on us doing the right thing instead
of having to go around us and call MD code directly. See the FDT code for
example (not for long though).
2012-07-02 23:41:56 +00:00
Doug Barton
1e8e2a9d7d Unfortunately the change in r237958 resulted in s/install/instclean/ due to
the aggressive pattern matching of the :C modifier. I tested build and
install in 2 phases, however with different solutions, resulting in the
breakage. Mea culpa.

The solution is to break out the all: target. This causes a few lines of
code duplication, but now the all: target works as it should, and the
other targets continue to work as they did before.

While I'm here, add a ===> header line to the start of each port build
to make it easier to find/more clear in the logs.
2012-07-02 22:14:58 +00:00
Marcel Moolenaar
f25e72cbb8 Remove device uart_z8530 and options GEOM_PART_APM from DEFAULTS and instead
add them to GENERIC and GENERIC64. They are applicable to Apple H/W and not
at all for Book-E platforms.
2012-07-02 21:25:24 +00:00
Marcel Moolenaar
8ab303584d Fix a typo that resulted in or-ing PTE_UW twice whrn PTE_SW was needed.
Note that setting the PTE_MODIFIED bit based on whether write is possible
is incorrect. We should set PTE_MODIFIED based on whether the access
is a write operation.
2012-07-02 21:21:12 +00:00
Marcel Moolenaar
863fcb91a4 Handle traps from the debugger. We need to catch them and re-enter
the debugger where they're being taken care of.
2012-07-02 21:18:09 +00:00
Marcel Moolenaar
816da2204a Invalidate any TLB1 entries we don't need. The firmware (e.g. U-Boot)
may have added entries that conflict with TLB0 entries.
2012-07-02 21:15:56 +00:00
Marcel Moolenaar
ab83b69996 Implement cpu_flush_dcache(). This allows us to optimize __syncicache()
for the common case in chich D-caches are coherent by virtue of busdma.
2012-07-02 21:11:01 +00:00
Konstantin Belousov
c5c1199c83 Extend the KPI to lock and unlock f_offset member of struct file. It
now fully encapsulates all accesses to f_offset, and extends f_offset
locking to other consumers that need it, in particular, to lseek() and
variants of getdirentries().

Ensure that on 32bit architectures f_offset, which is 64bit quantity,
always read and written under the mtxpool protection. This fixes
apparently easy to trigger race when parallel lseek()s or lseek() and
read/write could destroy file offset.

The already broken ABI emulations, including iBCS and SysV, are not
converted (yet).

Tested by:	pho
No objections from:	jhb
MFC after:    3 weeks
2012-07-02 21:01:03 +00:00
Navdeep Parhar
9f1dae79da Instruct the firmware not to provision resources for TCP offload if the
kernel is being built without TCP_OFFLOAD.  But never override
toecaps_allowed if it has been set manually.
2012-07-02 20:42:43 +00:00
Marcel Moolenaar
097f09bb98 There's no need to make filemon specific to i386 and amd64. All
LP64 architectures define elf64_freebsd_sysvec and all ILP32
architectures define elf32_freebsd_sysvec.
2012-07-02 20:36:26 +00:00
Alexander Motin
52ce0de418 Remove 14 not very useful characters " HDA CODEC PCM" from HDA pcm device
names to shorten them. PulseAudio reported to have problems with names
longer then 63 chars and at least in XMMS long names are inconvinient.

Reported by:	hselasky
MFC after:	3 days
2012-07-02 20:25:50 +00:00
Gleb Smirnoff
3df6468a2d Remove route caching from IP multicast routing code. There is no
reason to do that, and also, cached route never got unreferenced,
which meant a reference leak.

Reviewed by:	bms
2012-07-02 19:44:18 +00:00
Alexander Motin
f0d0cee0be Add IDs for some USB controllers I have around. Just a cosmetics.
MFC after:	3 days
2012-07-02 19:35:56 +00:00
Alexander Motin
3c461fd01b Restore GPIO config quirks handling, lost during last big refactoring.
Tested by:	hselasky
MFC after:	3 days
2012-07-02 18:35:08 +00:00
Sean Bruno
55fb7f3673 Revert r238004 as more review has come in and there is now a discussion
on how to best proceed.
2012-07-02 17:55:29 +00:00
Sean Bruno
7402aad3c7 Cosmetic display change of Cx states via cx_supported sysctl entries.
Adjust power_profile script to handle the new world order as well.

Some vendors are opting out of a C2 state and only defining C1 & C3.  This
leads the acpi_cpu display to indicate that the machine supports C1 & C2
which is caused by the (mis)use of the index of the cx_state array as the
ACPI_STATE_CX value.

e.g. the code was pretending that cx_state[i] would
always convert to i by subtracting 1.

cx_state[2] == ACPI_STATE_C3
cx_state[1] == ACPI_STATE_C2
cx_state[0] == ACPI_STATE_C1

however, on certain machines this would lead to
cx_state[1] == ACPI_STATE_C3
cx_state[0] == ACPI_STATE_C1

This didn't break anything but led to a display of:
 * dev.cpu.0.cx_supported: C1/1 C2/96

Instead of
 * dev.cpu.0.cx_supported: C1/1 C3/96

MFC after:	2 weeks
2012-07-02 16:57:13 +00:00
Michael Tuexen
a8775ad93d Move common code parts to sctp_common_input_processing().
MFC after: 3 days
2012-07-02 16:44:09 +00:00
Michael Tuexen
d8d544892c Remove dead code (on FreeBSD) as suggested by glebius@.
MFC after: 3 days
2012-07-02 16:40:11 +00:00
John Baldwin
687c94aac9 Honor db_pager_quit in 'show uma' and 'show malloc'.
MFC after:	1 month
2012-07-02 16:14:52 +00:00
Christian Brueffer
87e5ba0b54 Fix XEN build, broken in r237924.
Reported by:	gcooper
Pointy hat:	brueffer
2012-07-02 14:03:19 +00:00
Konstantin Belousov
9d232eec30 Do not override an error from uiomove() with (non-)error result from
bwrite().  VFS needs to know about EFAULT from uiomove() and does not
care much that partially filled block writeback after EFAULT was
successfull.  Early return without error causes short write to be
reported to usermode.

Reported and tested by:	andreast
MFC after:	3 weeks
2012-07-02 09:53:08 +00:00
Alexander Motin
461a98a279 Add acpi_asus_wmi(4) -- driver for random extras found on WMI-compatible
Asus laptops. It is alike to acpi_asus(4), but uses WMI interface instead
of separate ACPI device.

On Asus EeePC T101MT netbook it allows to handle hotkeys and on/off WLAN,
Bluetooth, LCD backlight, camera, cardreader and touchpad.

On Asus UX31A ultrabook it allows to handle hotkeys, on/off WLAN, Bluetooth,
Wireless LED, control keyboard backlight brightness, monitor temperature
and fan speed. LCD brightness control doesn't work now for unknown reason,
possibly requiring some video card initialization.

Sponsored by:	iXsystems, Inc.
2012-07-02 08:31:29 +00:00
Gleb Smirnoff
35d393bf63 - Call bus_generic_attach() at end of hdspe_attach().
- Use own devclass_t in DRIVER_MODULE().

This fixes operation of hdspe(4) when built as loadable module.

Submitted by:	Ruslan Bukin <br bsdpad.com>
2012-07-02 07:39:55 +00:00
Martin Matuska
a6a8d8377f Expose scrub and resilver tunables.
This allows the user to tune the priority trade-off between scrub/resilver
and other ZFS I/O.

MFC after:	2 weeks
Discussed with:	pjd
2012-07-02 07:27:14 +00:00
Doug Barton
cea039dae1 For the ports modules building code, clean WRKDIR before building. This is
important for those that use -DNO_CLEAN routinely, since it will prevent
installing stale stuff, and even more important when the port is upgraded
to a newer version. When the user doesn't use -DNO_CLEAN, this will create
an infinitesimal amount of extra work, but won't hurt anything.

This is necessary because the ports tree has flags that prevent the ususal
'update the build if newer source files exist' logic from doing what it
would do in the base.
2012-07-02 06:22:20 +00:00
Adrian Chadd
f9c15ba003 .. And fix another typo. Grr. 2012-07-02 06:07:46 +00:00
Adrian Chadd
5cc9e9aef6 Fix another typo. 2012-07-02 06:06:27 +00:00
Adrian Chadd
69bc6f4f0c Fix typo. 2012-07-02 06:05:25 +00:00
Adrian Chadd
577cd9a9b2 Bring over some further HAL capabilities from the Atheros HAL, as well
as an EDMA check function.

For the AR9003 and later NICs, different TX/RX DMA and descriptor handling
code will be conditional on the EDMA check.

Obtained from:	Qualcomm Atheros
2012-07-02 06:02:12 +00:00
Rui Paulo
9e731915eb Remove bogus __unused attribute from hrowpic_eoi(). 2012-07-01 19:07:45 +00:00
Gleb Smirnoff
d89862ac87 Make geom_mirror more friendly to SSDs. To properly support TRIM,
we need to pass BIO_DELETE requests down to providers that support
it. Also, we need to announce our support for BIO_DELETE to upper
consumer. This requires:

- In g_mirror_start() return true for "GEOM::candelete" request.
- In g_mirror_init_disk() probe below provider for "GEOM::candelete"
  attribute, and mark disk with a flag if it does support BIO_DELETE.
- In g_mirror_register_request() distribute BIO_DELETE requests only
  to those disks, that do support it.

Note that we announce "GEOM::candelete" as true unconditionally of
whether we have TRIM-capable media down below or not. This is made
intentionally, because upper consumer (usually UFS) requests the
attribite only once at mount time. And if user ever migrates his
mirror from HDDs to SSDs, then he/she would get TRIM working without
remounting filesystem.

Reviewed by:	pjd
2012-07-01 15:43:52 +00:00
Gleb Smirnoff
b0ae63ca25 In g_mirror_regular_request() upon successful delivery treat
BIO_DELETE requests same way as BIO_WRITE removing them from
queue. This fixes panic with BIO_DELETE operations on geom_mirror.

Reviewed by:	pjd
2012-07-01 15:30:43 +00:00
Christian Brueffer
593a9dc9b8 Replace an unreachable panic() in vm86_getptr (been there for 13 years) with
a KASSERT() behind the functions's only consumer.

Suggested by:	kib
Reviewed by:	kib
CID:		4494
Found with:	Coverity Prevent(tm)
MFC after:	2 weeks
2012-07-01 12:59:00 +00:00
Xin LI
309dca0171 tws(4) is interfaced with CAM so move it to the same section.
Reported by:	joel
MFC after:	3 days
2012-07-01 08:10:49 +00:00
Warner Losh
ba1227af3f Create a pseudo-lint kernel for all at91 SoCs. This kernel will not
currently boot, but will serve as a good linting.  make universe could
now be altered to skip building all the other at91 kernels...
2012-07-01 06:56:41 +00:00
Warner Losh
bb64064e5d Opt-in rather than opt-out of the SoC. We don't really support
running with multiple SoCs compiled in very well anyway, so this just
wastes space.  As more and more SoCs arrive in the tree, it is better
to edit one master file that builds them all than many board files.
2012-07-01 06:34:17 +00:00
Kenneth D. Merry
a77d787342 Now that the mps(4) driver is endian-safe, add it to the powerpc 32-bit
GENERIC config file.

MFC after:	3 days
Reqested by:	nwhitehorn
2012-07-01 05:32:26 +00:00
Warner Losh
a920522660 Use %j to match intmax_t. 2012-07-01 05:22:13 +00:00
Adrian Chadd
c9914f098f Add in some further changes from the AR9300 HAL:
* Add a new ANI variable, for AR9003 and later chips;
* The AR9003 and later series chips support two RX queues now, so start
  down the road of supporting that;
* Add some new TX queue types - uAPSD is possible on earlier chips,
  but PAPRD is relevant to AR9003 and later.

Obtained from:	Qualcomm Atheros, Linux ath9k
2012-07-01 05:14:24 +00:00
Adrian Chadd
64f3cab069 Add a check for dynamic OFDM/CCK channel types. 2012-07-01 04:25:49 +00:00
Adrian Chadd
df91468216 Migrate the MAC/BB hang structures out from ar5416_misc.h into the HAL.
The ar9300 HAL also uses these types, so it makes no sense to duplicate
them.
2012-07-01 03:15:18 +00:00
Adrian Chadd
7eee712c27 Bring over capabilities for the AR9300 and later HAL. 2012-07-01 02:44:36 +00:00