Commit Graph

20967 Commits

Author SHA1 Message Date
Rui Paulo
187278cadc For every instance of '.if ${CC} == "foo"' or '.if ${CC} != "foo"' in
Makefiles or *.mk files, use ${CC:T:Mfoo} instead, so only the basename
of the compiler command (excluding any arguments) is considered.

This allows you to use, for example, CC="/nondefault/path/clang -xxx",
and still have the various tests in bsd.*.mk identify your compiler as
clang correctly.

ICC if cases were also changed.

Submitted by:	Dimitry Andric <dimitry at andric.com>
2010-08-17 20:39:28 +00:00
Adrian Chadd
a122fea4ff Add s25sl064a, an 8mb SPI flash part. 2010-08-17 16:27:13 +00:00
John Baldwin
62508c531e Add a new method to the PCI bridge interface, PCIB_POWER_FOR_SLEEP(). This
method is used by the PCI bus driver to query the power management system
to determine the proper device state to be used for a device during suspend
and resume.  For the ACPI PCI bridge drivers this calls
acpi_device_pwr_for_sleep().  This removes ACPI-specific knowledge from
the PCI and PCI-PCI bridge drivers.

Reviewed by:	jkim
2010-08-17 15:44:52 +00:00
Navdeep Parhar
21d68a68bf Fix tx pause quanta and timer calculations.
MFC after:	3 days
2010-08-15 20:52:15 +00:00
Navdeep Parhar
3dd6d7570f Always reset the XGMAC's XAUI PCS on a link up.
MFC after:	3 days
2010-08-15 20:45:16 +00:00
Navdeep Parhar
61cb6c9076 wakeup is required if the adapter lock is released anywhere during
init and not just for the may_sleep case.

Pointed out by:	Isilon
MFC after:	3 days
2010-08-15 20:34:51 +00:00
Adrian Chadd
f70c72aa0c Fix indenting/whitespace issues introduced by me. 2010-08-15 11:40:53 +00:00
Adrian Chadd
5674f4a799 The comment is misleading - that register setting seems to kick off the
initial chip NF cal.
2010-08-15 11:32:05 +00:00
Bernhard Schmidt
ad8e331bf2 Introduce IEEE80211_C_RATECTL, drivers which use the ratectl framework
should set this capability.

MFC after:	2 weeks
2010-08-14 20:12:10 +00:00
Adrian Chadd
627e7864f1 A local addition, not imported from ath9k.
AR_PHY_CALMODE is explicitly reset on interface reset for other chipsets;
this commit also sets it for the AR9160.
2010-08-14 15:48:18 +00:00
Adrian Chadd
6a0c1a60c0 * Merge in AR9160 initval updates from Linux-2.6.34.
* Grab the AR_PHY_CCA and AR_PHY_EXT_CCA initvals from Linux wireless-testing.

Obtained from: Linux-2.6.34
2010-08-14 15:46:18 +00:00
Adrian Chadd
49d2d79b7a Merge in a fix for the power/(gain?) calculation. Apply it to both
the 5416/9160 and 9285 code paths.

Obtained from:	OpenWRT r22123, 522-ath9k_pwrcal_fix.patch
2010-08-14 15:29:21 +00:00
Adrian Chadd
8f279cf6e7 Fix the calibration logic to correctly clamp the calculated coefficient.
Obtained from:	OpenWRT r22123, 521-ath9k_iqcal_fix.patch
2010-08-14 15:28:15 +00:00
Adrian Chadd
e8dabfbea9 Export ath stats via snmp, rather than requiring a debugging interface
and "athstats".
2010-08-14 14:18:02 +00:00
Adrian Chadd
7ec4e6b83b Add a global counter of missed beacons.
The existing missed beacon count is reset once a beacon isn't missed.
2010-08-14 14:01:12 +00:00
Pyun YongHyeon
5bec76e720 Make sure to disable RX MAC in alc_stop_mac(). Previously there
was a logic error which it always enabled RX MAC.
2010-08-13 19:39:33 +00:00
Adrian Chadd
d86cdfe4b0 * Fix indentation
* Restore comment erroneously deleted from the previous commit
2010-08-12 08:39:54 +00:00
Adrian Chadd
52f81b679a Loading the NF CCA values may take longer than expected to occur.
If it does, don't then try reprogramming the NF "cap" values (ie
what values are the "maximum" value the NF can be) - instead,
just leave the current CCA value as the NF cap.

This was inspired by some similar work from ath9k. It isn't
a 100% complete solution (as there may be some reason where a
high NF CCA/cap is written, causing the baseband to stop thinking it
is able to transmit, leading to stuck beacon and interface reset)
which I'll investigate and look at fixing in a later commit.

Obtained from:	Linux
2010-08-12 06:20:54 +00:00
Adrian Chadd
5215ce1038 Use ar5212IsNFCalInProgress() to check for NF calibration progress. 2010-08-12 06:14:26 +00:00
Adrian Chadd
245f553a78 Fix indentation. 2010-08-12 06:12:39 +00:00
Adrian Chadd
ccf98f5d9d Ensure that the correct rxchainmask is used when doing calibration in the
AR5416 and later chipsets.

ath_hal_calibrateN() calls the HAL calibrateN function with rxchainmask=0x1.
This is not necessarily the case for AR5416 and later chipsets.
2010-08-12 06:11:44 +00:00
Adrian Chadd
43ff2d6aec Internal NF calibration should not occur in parallel with any other
calibration. Ensure that the NF calibration completes before continuing
with the rest of the calibration setup process.
2010-08-12 06:08:36 +00:00
Adrian Chadd
85b035b335 Add a couple of functions to check NF calibration progress / completion. 2010-08-12 06:06:14 +00:00
Takanori Watanabe
97f24f666f Add tpm(4) driver for Trusted Platform Module.
You may want to look at http://bsssd.sourceforge.net/ .

Submitted by: Hans-Joerg Hoexer <Hans-Joerg_Hoexer@genua.de>
2010-08-12 00:16:18 +00:00
John Baldwin
9f6eb14c88 Do not use %z to print a time_t. Fixes build on architectures where time_t
and size_t are different types.
2010-08-11 16:56:38 +00:00
Neel Natu
5f7eb1ff54 Start using the 'init_static_kenv()' API provided by r198561 to initialize
CFE environment variables.
2010-08-11 02:13:50 +00:00
Gavin Atkinson
f5113df97d Now that the uplcom(4) driver can autodetect the chipset type, sync the
list of devices supported by uplcom(4) with the following sources:

NetBSD  src/sys/dev/usb/uplcom.c 1.70
OpenBSD src/sys/dev/usb/uplcom.c 1.52
Linux   drivers/usb/serial/pl2303.h from kernel 2.6.35
BeOS    usb_serial/driver.c 1.32

Give several devices better descriptions, and rename
PROLIFIC2 -> NETINDEX while here to match everybody else.

MFC after:	6 weeks (after r211111)
2010-08-10 19:13:11 +00:00
Adrian Chadd
8197f57e6a Don't delay updating the longcal timer - instead, update the longcal
flag immediately so it's only set once per longcal interval.

Without this, the current AR5416 code will continuously spam NF
calibrations during a periodic calibration if the longcal flag
is set. The longcal flag wouldn't be cleared until the calibration
method indicates that calibrations are "complete".

This drops the rate of NF calibration updates down from "once every
shortcal" (ie, every 100ms) during a periodic calibration, to only
once per "longcal" interval. Spamming NF calibrations every 100ms
caused some potentially horrific issues in noisy environments as
NF calibrations can take longer than 100ms and this spamming can
cause invalid NF calibration results to be read back - leading to
missed beacons, and thus leading to a stuck beacon situation.

Stuck beacons cause interface resets, which restart calibrations.
This means that the longcal calibration runs every 100ms (shortcal)
until all initial calibrations are completed. This spamming can then
cause the above issues which leads to stuck beacons, leading to
interface resets, etc, etc. Quite annoying.
2010-08-10 07:56:56 +00:00
Adrian Chadd
8b9cd503d2 Bring over ar5416 inivals from Linux-2.6.34.
Reviewed by:	rpaulo@
Obtained from:	Linux
2010-08-10 07:48:13 +00:00
Adrian Chadd
329e425acd Re-format the ar5416 inivals to be consistent with what
Linux ath9k uses.
2010-08-10 07:47:43 +00:00
Gavin Atkinson
bc65068d4a Attempt to autodetect the cype of chipset, rather than storing this
within the device table.  This code uses the same algorithm as used in the
Linux, NetBSD and DragonflyBSD driver.

While investigating this, it became apparent that the Linux driver always
initialises the device, and not just in the PL2303HX case.  Change
uplcom(4) to do the same.

This change allows us to synchronize our device ID list with Linux and
NetBSD, without requiring knowledge of the chipset in use.

Reviewed by:	hselasky
MFC after:	6 weeks
2010-08-09 17:42:05 +00:00
Pyun YongHyeon
2f70ccea9f Add support for Atheros AR8151/AR8152 PCIe gigabit/fast ethernet
controller. These controllers are known as L1D(AR8151) and
L2CB/B2(AR8152). This change adds supports for the following
controllers.
 o AR8151 v1.0(L1D) gigabit ethernet controller
 o AR8151 v2.0(L1D) gigabit ethernet controller
 o AR8152 v1.1(L2CB) fast ethernet controller
 o AR8152 v2.0(L2CB2) fast ethernet controller
These controllers have the same feature of AR8131/AR8132 and
support improved power saving control. The user visible change at
this moment is reduced jumbo frame size from 9KB to 6KB. Many
thanks to Atheros for continuing to support FreeBSD.

HW donated by:	Atheros Communications, Inc.
2010-08-09 17:28:08 +00:00
Gavin Atkinson
4bb3183d46 Add entries for some devices I have locally. 2010-08-09 17:27:27 +00:00
Pyun YongHyeon
af1f79ce84 Add F1 PHY found on Atheros AR8151 v2.0 PCIe gigabit ethernet
controller.
2010-08-09 17:22:14 +00:00
Dag-Erling Smørgrav
c201d4532c - Add full support for header / data digests.
- Increase target limit from 4 to 64; this limit will be removed entirely
  at a later time.
- Improve recovery from lost network connections.
- Fix some potential deadlocks and a serious memory leak.
- Fix incorrect use of MH_ALIGN (instead of M_ALIGN), which makes no
  practical difference, but triggers a KASSERT with INVARIANTS.
- Fix some warnings in iscontrol(8) and improve the man page somewhat.

Submitted by:	Daniel Braniss <danny@cs.huji.ac.il>
Sponsored by:	Dansk Scanning A/S, Data Robotics Inc.
2010-08-09 12:36:36 +00:00
Pyun YongHyeon
497ffa52ef It seems some old Sundace(now IC Plus Corp.) controllers do not
like memory mapped register access. Typical problem from the issue
was MII access returned unreliable values. I'm not sure this comes
from lack of register flushing in MII access after accessing
STE_PHYCTL register though.
To address the issue, read hints data that controls which type of
memory mapping should be used in driver. ste(4) still prefers
memory mapping to io mapping but honor hints entered by user except
for controllers that have problems with memory mapping.
The hint to use iomapping could be given by adding the following
line to /boot/device.hints file.

hint.ste.0.prefer_iomap="1"

PR:	kern/149285
MFC after:	5 days
2010-08-09 01:47:09 +00:00
Gavin Atkinson
fe0f636233 The PL2302X can support any baud rate <= 6Mbps, allow any rate to be set.
PR:		usb/128324
Submitted by:	Mike Durian <durian shadetreesoftware.com> (original patch)
MFC after:	2 weeks
2010-08-08 20:53:00 +00:00
Pyun YongHyeon
a4d3574ccf Cache PCIY_PMG and PCIY_EXPRESS capability pointer to softc and use
it instead of calling pci_find_extcap().
2010-08-08 00:43:41 +00:00
Pyun YongHyeon
d62fc5de93 Remove unnecessary assignment. 2010-08-08 00:23:36 +00:00
Pyun YongHyeon
47ae892c85 Always disable ASPM L0s and enable L1 before entering into WOL
suspend state.  Also disable master clock after PHY power down,
this is supposed to save more power. The master clock should be
enabled if WOL is active.
2010-08-08 00:12:31 +00:00
Pyun YongHyeon
a0bca95502 Do not touch CMB TX threshold register when CMB is not used.
Note, alc(4) does not use CMB at all due to silicon bug.
2010-08-07 23:41:46 +00:00
Pyun YongHyeon
1e77baed0d Controller does not seem to support more than 1024 bytes DMA burst.
Limit DMA burst size to be less than or equal to 1024 bytes.
2010-08-07 23:33:06 +00:00
Pyun YongHyeon
e7a28130c4 Marvell model number 0x06 is 88E1101 PHY. 2010-08-07 23:16:21 +00:00
Gavin Atkinson
ce617aca0a Sync the list of devices supported by uslcom(4) with NetBSD, Linux, OpenBSD
and BeOS.  The devices supported by uslcom(4) are now in sync with:

NetBSD  src/sys/dev/usb/uslsa.c 1.11
OpenBSD src/sys/dev/usb/uslcom.c 1.20
Linux   source/drivers/usb/serial/cp210x.c from kernel 2.6.35
BeOS    usb_serial/driver.c 1.32

Two vendor/product IDs from Linux have not been added to uslcom(4):
  SILABS SAEL - This device has special code in u3g to support it
  SILABS GSM2228 - I suspect this should also be covered by u3g(4).

MFC after:	1 week
2010-08-07 16:14:40 +00:00
Gavin Atkinson
01a8caf18e Sort this file a little better: the vendors are supposed to be sorted by
vendor ID in the vendor section, and by symbolic name in the product
section.  Products are sorted by product ID.  While here, get rid of a
duplicate Microsoft Mouse entry, revealed by sorting.

MFC after:	1 week
2010-08-07 16:08:37 +00:00
Joel Dahl
7f22a6d334 Fix typo in comment. 2010-08-07 08:31:32 +00:00
Jung-uk Kim
90f06c5eae Protect shared palette and state buffer with a mutex. Remove defunct
spltty() calls while I am here.
2010-08-07 05:46:04 +00:00
Jung-uk Kim
34622ff1ab When EC burst mode is activated and multiple bytes are accessed, do not
disable and enable repeatedly, just do it once per call.  It also reduces
code duplication.  Check all parameters early and fail immediately.
2010-08-06 23:35:33 +00:00
Jung-uk Kim
709fac0616 Merge ACPICA 20100806. 2010-08-06 23:11:19 +00:00
Jack F Vogel
3b9b3fc3bf Put the early setting of the MAC type back, its
removal resulted in broken code in MSIX setup.
2010-08-06 20:55:49 +00:00