Commit graph

163501 commits

Author SHA1 Message Date
Adrian Chadd 94c389c61b Introduce AR9287 support to the FreeBSD HAL. 2011-05-26 20:31:08 +00:00
Adrian Chadd 8d01245e7e Fix a macro name - it's currently unused in this file however, but
keep it consistent with ar9280.c.
2011-05-26 20:22:10 +00:00
Adrian Chadd a3906079d2 Revert this erroneous commit and re-disable the AR9285 combined antenna
diversity.
2011-05-26 20:17:59 +00:00
Adrian Chadd 775b7a6663 Include an EEPROM dump program for the AR9287 EEPROM format. 2011-05-26 19:49:32 +00:00
Edward Tomasz Napierala b8fdb0d94d Fix support for RACCT_CORE by merging forgotten file. 2011-05-26 18:54:07 +00:00
Kirk McKusick 20f2694aa9 Raise the default blocksize for UFS/FFS filesystems from
16K to 32K and the default fragment size from 2K to 4K.

The rational is that most disks are now running with 4K
sectors.  While they can (slowly) simulate 512-byte sectors
by doing a read-modify-write, it is desirable to avoid this
functionality.  By raising the minimum filesystem allocation
to 4K, the filesystem will never trigger the small sector
emulation.

Also, the growth of disk sizes has lead us to double the
default block size about every ten years.  The rise from 8K
to 16K blocks was done in 2001.  So, by the 10-year metric,
the time has come for 32K blocks.

Discussed at: May 2011 BSDCan Developer Summit
Reference: http://wiki.freebsd.org/201105DevSummit/FileSystems
2011-05-26 18:22:49 +00:00
Marcel Moolenaar 5bdddc29c2 Ignore MCR[6] during the probe to fix a false negative. Bit 6 of the
MCR register on the Sunix Sun1699 chip tends to be set but doesn't
seem to have a function. That is, FreeBSD just works (provided the
correct RCLK is used) regardless.

PR:		kern/129663
Diagnostics:	Eygene Ryabinkin <rea-fbsd at codelabs.ru>
MFC after:	3 days
2011-05-26 17:02:56 +00:00
Adrian Chadd 0c50156f91 Remove the three-chain scaled power check for the AR9287 - it isn't
needed.
2011-05-26 16:59:42 +00:00
Adrian Chadd 1ecf8ddf5a Make sure only two chains are calibrated for the AR9287. 2011-05-26 16:55:44 +00:00
Adrian Chadd fe5237edef Add some open-loop TX power debugging for AR9287. 2011-05-26 16:52:37 +00:00
Will Andrews a194c9f709 Close a race between libzfs and mountd when updating NFS exports.
- Flush the file descriptor for the new ZFS exports file before
  sending a SIGHUP to mountd.

Reviewed by:	pjd
Approved by:	ken
MFC after:	3 days
2011-05-26 16:27:00 +00:00
Adrian Chadd f1285519e2 Bring over the AR5416 per-rate TX power code, modified to use the
AR9287 EEPROM layout.

The AR9287 only supports 2ghz, so I've removed the 5ghz code (but left
the 5ghz edge flags in there for now) and hard-coded the 2ghz-only
path.

Whilst I'm there, fix a typo (ar9285->ar9287.)

This meets basic TX throughput testing - iperf TX tests == 27-28mbit in 11g,
matching the rest of my 11g kit.
2011-05-26 15:55:27 +00:00
Adrian Chadd ea18ed263e Flesh out ar9287SetTransmitPower() based on the AR9285 routine.
Hard-code the per-rate TX power at 5dBm for now so testing can be done.

This passes initial TX testing in 11g mode (but, obviously, at 5dBm.)
2011-05-26 15:01:37 +00:00
Nathan Whitehorn 2ec6a5984c Add a missing isync. 2011-05-26 14:34:22 +00:00
Adrian Chadd 4551052dbe Flesh out the TX power calibration for the AR9287.
I'm assuming for now that the AR9287 is only open-loop TX power control
(as mine is) so I've hard-coded the attach path to fail if the NIC is
not open-loop.

This greatly simplifies the TX calibration path and the amount of code
which needs to be ported over.

This still isn't complete - the rate calculation code still needs to be
ported and it all needs to be glued together.

Obtained from:	Linux ath9k
2011-05-26 14:29:05 +00:00
Aleksandr Rybalko 141fa00b5f Added myself as src committer.
Approved by: adrian (mentor)
2011-05-26 13:54:07 +00:00
Alexander Motin 1d4ce50afe Add Marvell 88SE9172 chip PCI ID. 2011-05-26 10:10:10 +00:00
Adrian Chadd 90759dbed6 Add the AR9287 chip identification string. 2011-05-26 09:27:58 +00:00
Alexander Motin 232a9d55fb Marvell 88SE91xx controllers are known to report soft-reset completion
without waiting for device readiness (or at least not updating FIS receive
area in time). To workaround that, special quirk was added earlier to wait
for the FIS receive area update. But it was found that under same PCI ID
0x91231b4b and revision 0x11 there are two completely different chip
versions (firmware?): HBA and RAID. The problem is that RAID version in
some cases, such as hot-plug, does not update FIS receive area at all!

To workaround that, differentiate the chip versions by their capabilities,
and, if RAID version found, skip FIS receive area update waiting and read
device signature from the PxSIG register instead. This method doesn't work
for HBA version when PMP attached, so keep using previous workaround there.
2011-05-26 09:23:01 +00:00
Adrian Chadd 8143e16401 Fix a bad merge from a previous commit. 2011-05-26 09:22:59 +00:00
Adrian Chadd 0293774898 Merlin -> Kiwi 2011-05-26 09:16:09 +00:00
Adrian Chadd d8daa2e3f6 Bring over my AR9287 work in progress.
It isn't linked into the build because it's missing the TX power
and PDADC programming code.

This code is mostly based on the ath9k codebase, compared against
the Atheros codebase as appropriate.

What's implemented:

* probe/attach
* EEPROM board value programming
* RX initial calibration
* radio channel programming
* general MAC / baseband setup
* async fifo setup
* open-loop tx power calibration

What's missing before it can be enabled by default:

* TX power / calibration setting code
* closed-loop tx power calibration routines
* TSF2 handling
* generic timer support from ath9k

Obtained from:	Atheros, ath9k
2011-05-26 09:15:33 +00:00
Adrian Chadd b3096aee0b AR9287 prep work:
* Add PCI/PCIE devids
* Add AR9287/Kiwi version check macros
* AR_SREV_9287 -> AR_SREV_KIWI

Obtained from:	Atheros, ath9k
2011-05-26 08:35:47 +00:00
Adrian Chadd a1cf3a877a Add temp sense to the EEPROM variable list;
Export the temperature sense variables to ah_eeprom_9287.c
2011-05-26 08:20:14 +00:00
Alexander Motin 0591ab9c30 Add better names for the Intel HDMI audio codecs. 2011-05-26 06:43:10 +00:00
David E. O'Brien 3c24f8e827 + Tighten up (and simplify) the pass_cmd_vars_1 "variable definition arrived
from the calling make" test.
+ Be more tolerant of newlines in the plus_flag "supports the '+' flag" test.
2011-05-25 23:33:49 +00:00
Jilles Tjoelker 168b9dd182 sh: Show errno messages in cd. 2011-05-25 21:38:16 +00:00
Rick Macklem 81ddb192e8 Add some missing mutex locking to the new NFS client.
MFC after:	2 weeks
2011-05-25 21:17:53 +00:00
Benedict Reuschling bef655932c Bump the date of the man page to the date of the actual commit.
Noticed by:	brix
2011-05-25 21:04:11 +00:00
Rick Macklem 147206ae68 Fix the new NFS client so that it correctly sets the "must_commit"
argument for a write RPC when it succeeds for the first one and
fails for a subsequent RPC within the same call to the function.
This makes it compatible with the old NFS client for this case.

MFC after:	2 weeks
2011-05-25 20:53:08 +00:00
Benedict Reuschling e74fe876b5 Document the device name change from gpioctl to gpioc in the
man page.

PR:		docs/157075
Submitted by:	brix
Reviewed by:	gonzo
2011-05-25 20:25:13 +00:00
Xin LI 5106ce89d0 Fix a regression introduced with previous changeset: if output is stdout,
do not check for symbolic link.
2011-05-25 18:04:11 +00:00
Ruslan Ermilov a6d11f7139 [mdoc] Fixed .Dt call. 2011-05-25 14:13:53 +00:00
Alexander Motin 08c8fde007 According to SATA specification, when Serial ATA Enclosure Management Bridge
(SEMB) is unable to communicate to Storage Enclosure Processor (SEP), in
response to hard and soft resets it should among other things return value
0x7F in Status register. The weird side is that it means DRQ bit set, which
tells that reset request is not completed. It would be fine if SEMB was the
only device on port. But if SEMB connected to PMP or built into it, it may
block access to other devices sharing same SATA port.

Make some tunings/fixes to soft-reset handling to workaround the issue:
 - ahci(4): request CLO on the port after soft reset to ignore DRQ bit;
 - siis(4): gracefully reinitialize port after soft reset timeout (hardware
doesn't detect reset request completion in this case);
 - mvs(4): if PMP is used, send dummy soft-reset to the PMP port to make it
clear DRQ bit for us.

For now this makes quirks in ata_pmp.c, hiding SEMB ports of SiI3726/SiI4726
PMPs, less important. Further, if hardware permit, I hope to implement real
SEMB support.
2011-05-25 13:55:49 +00:00
Andrey V. Elsukov ceef8f2477 Prevent non-aligned reading from provider while tasting. Reject
providers with unsupported sectorsize.

Reported by:	Joerg Wunsch
MFC after:	1 week
2011-05-25 11:14:26 +00:00
Kevin Lo a92e80be3f Bring back r222275. runfw(4) will statically link in rt2870.fw.uu
to the kernel, though I have MODULES_OVERRIDE="" in GENERIC.

Spotted by:	thompsa
2011-05-25 10:04:13 +00:00
Andrey V. Elsukov 6fd1e2e013 Do not truncate available disk space to the closest track boundary. 2011-05-25 09:45:13 +00:00
Andrey V. Elsukov 23a3490034 Do not truncate available disk space to the closest track boundary. 2011-05-25 09:38:12 +00:00
Andrey V. Elsukov db48d4a92e Do not truncate available disk space to the closest track boundary. 2011-05-25 09:32:19 +00:00
Benedict Reuschling 67900914ff Add a description to the checksum target about not only
being able to verify, but also having the ability to
fetch distfiles that are missing or failed the checksum
calculation

PR:		docs/138887
Submitted by:	Radim Kolar (hsn at sendmail dot cz)
MFC after:	5 days
2011-05-25 08:42:01 +00:00
Adrian Chadd 727edca45b The current ANI capability information uses a different set of
values for the commands, compared to the internal command values
(HAL_ANI_CMD.)

My eventual aim is to make the HAL_ANI_CMD internal enum match
the public API and then remove all this messiness.

This now allows HAL_CAP_INTMIT users to use a public HAL_CAP_INTMIT_
enum rather than magic constants.

The only magic constants currently used by if_ath are "enable" and
"present". Some local tools of mine allow for direct, manual fiddling
of the ANI variables and I'll convert these to use the public enum API
before I commit them.
2011-05-25 07:34:49 +00:00
Adrian Chadd 241d9a3400 Tidy up the ANI API in preparation for looking to expose some more
of the ANI statistics and committing some tools which use these.

* Change HAL_ANI_* commands _back_ to be numerical, rather than a
  bitmap;
* modify access to the ANI control bitmap to convert a command to
  a bitmap;
* Fix the ANI noise immunity fiddling for CCK errors - it wasn't
  checking whether noise immunity was disabled or not.
2011-05-25 07:19:19 +00:00
Kevin Lo 6d5ee6cd7f run(4) needs firmware loaded to work 2011-05-25 04:46:48 +00:00
David E. O'Brien a23d1c70b3 Build and install a BSD licensed grep.
If WITH_BSD_GREP is not set, it will be 'bsdgrep' and GNUgrep will be
'[ef]grep'.  Otherwise, BSD-grep will be the grep family, and GNUgrep
will be 'gnugrep'.

Discussed with: brooks
2011-05-25 01:04:12 +00:00
Bjoern A. Zeeb 8d5a3ca77b Add FEATURE() definitions for IPv4 and IPv6 so that we can use
feature_present(3) to dynamically decide whether to use one or the
other family.

Reviewed by:	gnn
Sponsored by:	The FreeBSD Foundation
Sponsored by:	iXsystems
MFC after:	10 days
2011-05-25 00:34:25 +00:00
Pyun YongHyeon 81e2a01a77 style(9) 2011-05-24 20:39:07 +00:00
Pawel Jakub Dawidek b5a060dd8b Don't pass pointer to name buffer which is on the stack to another thread,
because the stack might be paged out once the other thread tries to use the
data. Instead, just allocate memory.

MFC after:	2 weeks
2011-05-24 20:10:12 +00:00
Pawel Jakub Dawidek 541c60d988 Don't access task structure once we call task function.
The task structure might be no longer available.
This also allows to eliminates the need for two tasks in the zio structure.

Submitted by:	anonymous
MFC after:	2 weeks
2011-05-24 20:07:15 +00:00
John Baldwin 5b41f90fd1 Silly spelling typos.
Submitted by:	"b. f."
2011-05-24 19:55:57 +00:00
Adrian Chadd 9f4563363b The ANI control for the AR5416 and later chips was calling ar5212AniControl(),
which did AR5212 specific initialisation. This would cause some slight
silliness when enabling/disabling ANI.

Just to be completely correct - and to ensure the phy error mask/RX filter
register isn't incorrectly played with - make the ANI control function a
method, have it set appropriately for AR5212/AR5416, and call that from the
ANI control interface.
2011-05-24 18:25:40 +00:00