Commit Graph

163098 Commits

Author SHA1 Message Date
Attilio Rao
b9f714be9f MFC 2011-05-07 23:34:14 +00:00
Adrian Chadd
af8223ba6d Fix the IS_5416 checks to actually work correctly.
I've verified that my AR5416 revision 2.2 (minor revision 0x0A) now
matches the correct checks.
2011-05-07 18:42:41 +00:00
Jaakko Heinonen
852bee75b7 To avoid duplicated warning, move WITNESS_WARN() added in r221597 to the
branch which doesn't call malloc(9).

Suggested by:	kib
2011-05-07 17:59:07 +00:00
Marcel Moolenaar
a63f3da5b2 In pmap_kextract(), return the physical address for PBVM virtual
addresses as well (incl. the PBVM page table).
2011-05-07 17:23:13 +00:00
Hans Petter Selasky
4ad5f8c23f Add new USB ID.
Submitted by:	Dmitry Luhtionov
MFC after:	7 days
2011-05-07 16:32:59 +00:00
Hans Petter Selasky
955c139ed4 Minor usbdump update:
- Use memcpy() instead of bcopy().
- Replace all asserts() by standard error messages.
- Update usage().

MFC after:	7 days
2011-05-07 16:28:23 +00:00
Adrian Chadd
26e8415d1d Do a HAL capabilities sync pass based on the Atheros HAL.
* Shuffle some of the capability numbers around to match the
  Atheros HAL capability IDs, just for consistency.

* Add some new capabilities to FreeBSD from the Atheros
  HAL which will be be shortly used when new chipsets are added
  (HAL SGI-20 support is for Kiwi/AR9287 support); for
  TX aggregation (MBSSID aggregate support, WDS aggregation
  support); CST/GTT support for carrier sense/TX timeout.
2011-05-07 15:30:23 +00:00
Jilles Tjoelker
4c244ed255 sh: Add UTF-8 support to ${#var}.
If the current locale uses UTF-8, ${#var} counts codepoints (more precisely,
bytes b with (b & 0xc0) != 0x80).
2011-05-07 14:32:16 +00:00
Andriy Gapon
4fe5d78a0f a whitespace nit
Reminder from:	kib
MFC after:	4 days
2011-05-07 13:57:30 +00:00
Adrian Chadd
b657b11d8d Update the ext channel cycpwr threshold 1 register for the extension
channel when the channel is HT/40.

The new ANI code (primarily for the AR9300/AR9400) in ath9k sets this
register but the ANI code for the previous 11n chips didn't set this.

Unlike ath9k, only set this for HT/40 channels.

Obtained From:	ath9k
2011-05-07 13:08:48 +00:00
Alexander Motin
d96fd07637 Don't use MWAIT for short sleeps under XEN, as it was before r212541.
This fixes panic during boot in PV mode on Xen 3.2.
2011-05-07 12:27:25 +00:00
Kai Wang
b8331e4264 Document the behavior of elf_getdata() and elf_rawdata() with
zero-sized ELF sections.

Obtained from:	elftoolchain
2011-05-07 11:29:48 +00:00
Jaakko Heinonen
816c203937 Add WITNESS_WARN() to getenv() to explicitly note that the function may
sleep. This helps to expose bugs when the requested environment variable
doesn't exist.
2011-05-07 11:10:58 +00:00
Adrian Chadd
f93ef5516b Read in the extended regulatory domain flags so future code can use them.
These describe FCC/Japan channel and DFS behaviour.

The AR9285 and later chips don't set these bits in the eeprom, the correct
behaviour is to just assume all five bits are enabled.
2011-05-07 11:05:16 +00:00
Kai Wang
08a7f479dd For zero-sized sections, set the d_buf field of the Elf_Data
descriptor returned by `elf_rawdata()` to NULL.

Obtained from:	elftoolchain
2011-05-07 11:04:36 +00:00
Kai Wang
3860fcc7f0 * Rewrite ar.5 mannual page to better document ar(1) archive format.
* Use more standard BSD license.

Obtained from:	elftoolchain
2011-05-07 10:44:08 +00:00
Andriy Gapon
ff98e4c515 a whitespace nit
MFC after:	4 days
2011-05-07 10:40:57 +00:00
Andriy Gapon
3f581c18ec scsi_cd: silence READ_TOC errors in CDIOREADTOCHEADER ioctl
An optical disk may not have a TOC (e.g. for blank media) and userland
software may legitimately try to use CDIOREADTOCHEADER to find out about
the TOC.

Silence from:	scsi@
MFC after:	10 days
2011-05-07 10:06:43 +00:00
Adrian Chadd
001ac28926 Instead of returning an unknown mac/bb signature, just return 0. 2011-05-07 06:52:04 +00:00
Adrian Chadd
b810285f24 Add some comments about which HAL capabilities are currently FreeBSD
specific.

The Atheros HAL and FreeBSD HAL share the same capabilities up
until HAL_CAP_11D, where things begin to diverge.

I'll look at tidying these up soon.

Obtained from:	Atheros
2011-05-07 06:47:09 +00:00
Adrian Chadd
de1334e8d7 Some BB hang changes:
* Add Howl (ar9130) to the list of chips that have DFS/BB/MAC hangs
* Don't treat unknown BB hangs as fatal; ath9k/Atheros HAL don't
  treat it as such.
* Add HAL_DEBUG_DFS to the debug fields in ath_hal/ah_debug.h

The BB hang check simply loops over an observation register checking
for a stuck state engine, but it can happen under high traffic
conditions. Ath9k and the Atheros HAL simply log a debug message and
continue.

Private to FreeBSD:

* Add HAL_DEBUG_HANG to the debug fields
* Change the hang debugging to HAL_DEBUG_HANG rather than HAL_DEBUG_DFS
  like in the Atheros HAL.

Obtained from:	Atheros
2011-05-07 06:45:35 +00:00
Pyun YongHyeon
de53eba037 Fix build. 2011-05-07 04:40:44 +00:00
Adrian Chadd
ef1901a3c9 Change AR_SREV_OWL_{X}_OR_LATER to AR_SREV_5416_{X}_OR_LATER.
For now, these are equivalent macros. AR_SREV_OWL{X}_OR_LATER
will later change to exclude Howl (AR9130) in line with what
the Atheros HAL does.

This should not functionally change anything.

Obtained from:	Atheros
2011-05-07 02:59:24 +00:00
Adrian Chadd
d1915e7308 Fix the OWL revision checks.
A quick story, which is partially documented in the commit.

The silicon revision in Linux ath9k and the Atheros HAL use an
AR_SREV_REVISION mask of 0x07.

FreeBSD's HAL uses the AR5212 AR_SREV_REVISION mask of 0x0F.

Thus the OWL silicon revisions were coming through as 0xA, 0xB,
0xC, rather than 0x0, 0x1 and 0x2.

My ath9k-sourced AR_SREV_OWL_<X> macros were thus using the wrong
silicon revision values and wouldn't correctly match.

This commit does a few things:

* Change the AR_SREV_OWL_<x> macros to use the AR_SREV_REVISION_OWL_*
  values, not AR_XSREV_REVISION_OWL macros;
* Disable AR_XSREV_REVISION_OWL_* values;
* Modify the IS_5416 to properly check the MAC is OWL, rather than
  potentially matching on non-OWL revisions (which shouldn't happen
  unless there's a silicon revision of higher than 0x9 in a later
  chip..)
* Add a couple more macros from the Atheros HAL for compatibility.

The main difference now is that the Atheros HAL defines
AR_SREV_OWL_{20,22}_OR_LATER subtly differently - it fails on all HOWL
silicon. The AR_SREV_5416_*_OR_LATER macros match on the relevant OWL
version -and- all HOWL versions, along with subsequent versions.

A subsequent commit is going to migrate the uses of AR_SREV_OWL_X_OR_LATER
to AR_SREV_5416_X_OR_LATER to match what's going on in the Atheros HAL.

There's only two uses of AR_SREV_OWL_X_OR_LATER which currently don't
apply to FreeBSD but it may do in the future.

Yes, it's all confusing!
2011-05-07 02:54:52 +00:00
Pyun YongHyeon
3ea23f341b Remove unneeded use of variable status. This should have been done
in r221557.
2011-05-07 02:19:46 +00:00
David E. O'Brien
9b2a96cc04 Add the ability to search for all the inlined instances of a given function.
Reviewed by:	jb
Obtained from:	Juniper Networks
2011-05-07 01:05:31 +00:00
Pyun YongHyeon
0b96ba12be XL_DMACTL is 32bit register, use 32bit write macro.
While I'm here add more bits for the register.
2011-05-07 00:25:12 +00:00
Pyun YongHyeon
7498e81a2d Rearm watchdog timer if driver kick controller to recover from TX
underrun error.
While here, prepend 0x to status code to show TX status is hex
number.
2011-05-07 00:18:58 +00:00
Pyun YongHyeon
48dcbc3370 Rename xl_stats_update() callout handler to xl_tick() and move MII
tick driving logic to xl_tick(). Now xl_tick() handles MII tick as
well as periodic updating of statistics.
This change removes a hack used in interrupt handler where it
wanted to update statistics without driving MII tick.
2011-05-07 00:06:02 +00:00
Pyun YongHyeon
4a5c788456 Reuse the TX descriptor(DPD) if xl_encap() failed instead of just
picking the next available one. This may explain why xl(4) sees TX
underrun error with no queued frame. I hope this addresses a long
standing xl(4) watchdog timeout issue as well.

Obtained from:	OpenBSD
2011-05-06 23:49:10 +00:00
Pyun YongHyeon
5a13764b11 Change xl_rxeof() a bit to return the number of processed frames in
RX descriptor ring. Previously it returned the number of frames
that were successfully passed to upper stack which in turn means it
ignored frames that were discarded due to errors. The number of
processed frames in RX descriptor ring is used to detect whether
driver is out of sync with controller's current descriptor pointer.
Returning number of processed frames reduces unnecessary (probably
wrong) re-synchronization.

While here, remove unnecessary local variable initialization.
2011-05-06 23:01:29 +00:00
Pyun YongHyeon
74517b0724 Terminate interrupt handler if driver detect it's not running.
Also add check for driver running state before trying to send
frames. While I'm here, use for loop.
2011-05-06 22:55:53 +00:00
Attilio Rao
aa8b9e0706 MFC 2011-05-06 22:45:33 +00:00
Pyun YongHyeon
f321edf95a Updating status word should be the last operation of UPD structure
renewal.  Disable instruction reordering by adding volatile to
xl_list_onefrag structure.
2011-05-06 22:45:13 +00:00
Pyun YongHyeon
0ecf6b16c8 Call bus_dmamap_sync() only after TX DPD update. 2011-05-06 22:36:43 +00:00
Jilles Tjoelker
6ed74a0a1c sh: Track if the current locale's charset is UTF-8 or not. 2011-05-06 22:31:27 +00:00
Pyun YongHyeon
4f58a95ce1 Set status word once instead of twice. For 3C90xB/3C90xC, frame
length of status word is ignored. While here move bus_dmamap_sync()
up where DMA map is loaded.
2011-05-06 22:26:57 +00:00
Pyun YongHyeon
78564eda2d Remove unnecessary htole32/le32toh dance. 2011-05-06 22:16:43 +00:00
Pyun YongHyeon
dd0a76883f Rewrite RX filter logic and provide controller specific filter
handler for 3C90x and 3C90xB/C respectively.  This simplifies ioctl
handler as well as enhancing readability.
While I'm here don't reprogram multicast filter when driver is not
running.
2011-05-06 22:01:46 +00:00
Attilio Rao
0d9fa7bd31 Add sparc64 support.
Compiled (and helped) by:	pluknet
2011-05-06 21:53:29 +00:00
Pyun YongHyeon
d2d0470dc6 Fix white space nits and style 2011-05-06 20:46:29 +00:00
Jilles Tjoelker
c76aed958b sh: Change the CTL* bytes to ones invalid in UTF-8.
This ensures that mbrtowc(3) can be used directly once it has been verified
that there is no CTL* byte. Dealing with a CTLESC byte within a multibyte
character would be complicated.

The new values do occur in iso-8859-* encodings. This decreases efficiency
slightly but should not affect correctness.

Caveat: Updating across this change and rebuilding without cleaning may
yield a subtly broken sh binary. By default, make buildworld will clean and
avoid problems.
2011-05-06 20:45:50 +00:00
Nathan Whitehorn
6533dd880e SMP has worked perfectly for a very long time on 32-bit PowerPC on both
UP and SMP hardware. Enable it in GENERIC.

MFC after:	2 weeks
2011-05-06 20:43:02 +00:00
Michael Tuexen
936fc35bb3 Change the name of an internal structure, since the name
is used by a structure of the (new) SCTP API.

MFC after: 1 week.
2011-05-06 20:40:33 +00:00
Pyun YongHyeon
26b8066bce Do not increment collision counter if transmit have failed.
Transmission error in tun(4) is queueing error(i.e. ENOBUFS) and it
has nothing to do with collision.

Reported by:	Zeus V Panchenko (zeus <> ibs dot dn dot ua)
2011-05-06 20:37:07 +00:00
Rick Macklem
f9de8782aa Move sys/nfsclient/nfs_kdtrace.h to sys/nfs/nfs_kdtrace.h so
it can be used by the new NFS client as well as the old one.
2011-05-06 20:02:19 +00:00
Rick Macklem
10ccc5e389 Fix the module dependency in nfs_kdtrace.c for the old NFS
client. This should fix a problem reported by Marcus Reid.
2011-05-06 19:55:15 +00:00
Ruslan Ermilov
751f92ecc8 MK_GPIO changed its default; reflect. 2011-05-06 19:14:06 +00:00
Ruslan Ermilov
a7a066b13f Removed trailing whitespace. 2011-05-06 19:13:03 +00:00
Ruslan Ermilov
64a9cf7693 Tidy up formatting. 2011-05-06 19:10:27 +00:00