Commit Graph

81886 Commits

Author SHA1 Message Date
Bernhard Schmidt
3096855e8c Instead of hardcoding TX rates and using that to fill the retry table
use the neogotiated ni_rates instead.
2011-04-16 12:42:54 +00:00
Adrian Chadd
18a3a3309f Remove some duplicate code from the AR9285 TX power configuration path. 2011-04-16 11:59:37 +00:00
Rebecca Cran
39c60b6cff Remove missing include directory in preparation for adding
-Wmissing-include-dirs to CWARNFLAGS.
2011-04-16 11:15:57 +00:00
Bernhard Schmidt
7223fe84f2 Replace RX/TX ring allocation error messages with something more sane
and remove those where the caller already prints one.
2011-04-16 11:14:42 +00:00
Bernhard Schmidt
0df53de1c3 Prevent double-free, also use the same error codes as OpenBSD. 2011-04-16 11:11:22 +00:00
Bernhard Schmidt
47c2ecefcc Add missing bus_dmamap_sync calls as well as remove two duplicate ones.
Obtained from:	OpenBSD
2011-04-16 10:52:11 +00:00
Bernhard Schmidt
fac0198998 Unify TX/RX ring allocation, finish the descriptior DMA stuff before
starting with data.
2011-04-16 10:38:27 +00:00
Bernhard Schmidt
a59641a1a4 Make sure to destroy all DMA tags and maps. 2011-04-16 10:35:02 +00:00
Bernhard Schmidt
1f43fb20f2 Rewrite DMA segment handling to be more inline with the OpenBSD code.
Also change the m_len == 0 hack to have less code churn.
2011-04-16 10:32:46 +00:00
Bernhard Schmidt
58e6c20852 scratch_paddr has the same address pre-assigned, use that instead. 2011-04-16 09:39:08 +00:00
Bernhard Schmidt
f75e83846a In case a new mbuf can't be loaded, reuse the old one. 2011-04-16 09:34:40 +00:00
Bernhard Schmidt
3f01dc2d9d OpenBSD uses IWN_RBUF_SIZE not MJUMPAGESIZE for the RX path, also replace
caddr_t with void * to be in sync.
2011-04-16 08:59:21 +00:00
Bernhard Schmidt
5c222f4bc8 Remove the flags argument of iwn_dma_contig_alloc(), it is always set
as BUS_DMA_NOWAIT. While here also set BUS_DMA_COHERENT.
2011-04-16 08:57:17 +00:00
Jaakko Heinonen
9b92242710 Move a comment to the right place. The rearrange done in r208928 left
the comment to a wrong place.
2011-04-16 08:38:11 +00:00
Bernhard Schmidt
65aa0234f0 RSSI related syncs with the OpenBSD code:
- read RSSI only for the active chains
- cast RSSI/NF to int8_t before passing it up to radiotap
- remove the htole64() for the timestamp

Obtained from:	OpenBSD
2011-04-16 07:32:57 +00:00
Bernhard Schmidt
1eccdf31c1 Pass errors that might happen during state transitions up to net80211. 2011-04-16 07:21:00 +00:00
Bernhard Schmidt
c2c3b03223 Obtain the channel number directly from the laster RXON command, also
chan is an uint8_t.
2011-04-16 07:17:03 +00:00
Jaakko Heinonen
e9b3fc67e0 Move TUNABLE_INT_FETCH() out of the SIM lock to avoid sleeping while
holding the lock. The fix is analogous to r220618 for ada(4).

Reviewed by:	mav
2011-04-16 06:54:41 +00:00
Yoshihiro Takahashi
59707f16bd MFi386: revisions 220389 and 220392
- Mark getc() as inline, this has no effect on gcc but helps clang.
  - Move getc() body before xgetc() so gcc does not emit a warning about
    function having no body.
2011-04-16 06:20:49 +00:00
Rick Macklem
7b8c319be4 Change the experimental NFS client so that it creates nfsiod
threads in the same manner as the regular NFS client after
r214026 was committed. This resolves the lors fixed by r214026
and its predecessors for the regular client.

Reviewed by:	jhb
MFC after:	2 weeks
2011-04-15 23:07:48 +00:00
Jung-uk Kim
33a7ed1f45 Re-merge with ACPICA vendor source. 2011-04-15 21:38:24 +00:00
Bernhard Schmidt
f6bb3360b6 fix the order of the prototypes from the previosu commit 2011-04-15 20:40:49 +00:00
Bernhard Schmidt
89a84499e4 The 6005 series devices need additional temperature offset calibration
as well as the IWN_GP_DRIVER_CALIB_VER6 bit set.

Obtained from:	OpenBSD
2011-04-15 20:35:15 +00:00
Bernhard Schmidt
083e216732 Revert some of local calibration changes in favour of the OpenBSD
implementation. This includes the fix required for the 6050 series
devices.
2011-04-15 20:31:02 +00:00
Bernhard Schmidt
518e267e38 remove debug left-overs 2011-04-15 20:19:18 +00:00
Bernhard Schmidt
af2e228dc4 Split up watchdog and calibration callout. This allows us to use different
timing on both and to remove some monitor mode specific hacks (which has
no calibration).
2011-04-15 20:17:52 +00:00
Jung-uk Kim
d052a1cc33 Merge ACPICA 20110413. 2011-04-15 18:34:27 +00:00
Bernhard Schmidt
16b483cb8d Split out bluetooth coexistence setup. 2011-04-15 17:10:52 +00:00
Bernhard Schmidt
b558f70709 Fixes for firmware handling:
- there is a local variable for sc->fw_dma, use that instead
- OpenBSD uses 5*hz to wait for firmware to be loaded
- in case the firmware module contains invalid data, actually release it
2011-04-15 16:59:56 +00:00
Bernhard Schmidt
a7387751dd Only handle beacon misses while in RUN state and not scanning. 2011-04-15 16:55:45 +00:00
Bernhard Schmidt
69e775c384 Don't timeout when stopping DMA channels.
Obtained from:	OpenBSD
2011-04-15 16:50:37 +00:00
Alexander Motin
06ccfe1dd7 Some changes around hot-plug and interface power-management:
- use ATA_SE_EXCHANGED (SError.DIAG.X) bit to detect hot-plug events when
power-management enabled and ATA_SE_PHY_CHANGED (SError.DIAG.N) can't be
trusted;
 - on controllers supporting staggered spin-up (SS) put unused channels
into Listen state instead of Off. It should still save some power, but
allow plug-in events to be detected;
 - on controllers supporting cold presence detection (CPD), when power
management enabled, use CPD events to detect hot-plug in addition to PHY
events.
2011-04-15 16:40:31 +00:00
Philip Paeps
b0321bb1e7 Add basic support for the Marvell Orion TS-7800.
Submitted by:	Kristof Provost <kristof -at- freebsd.org>
2011-04-15 13:37:43 +00:00
Gavin Atkinson
47bae5fd09 Remove an incorrect be16toh() that prevented geom_part_apm from working on
little-endian machines.

Reviewed by:	marcel
MFC after:	2 weeks
2011-04-15 12:32:52 +00:00
Alexander Motin
c3d0d168ae Make ada(4) driver put ATA disks into sleep state on suspend.
Submitted by:	jkim (original version)
2011-04-15 07:07:29 +00:00
Navdeep Parhar
2be67d2948 Fix a couple of bad races that can occur when a cxgbe interface is taken
down.  The ingress queue lock was unused and has been removed as part of
these changes.

- An in-flight egress update from the SGE must be handled before the
  queue that requested it is destroyed.  Wait for the update to arrive.

- Interrupt handlers must stop processing rx events for a queue before
  the queue is destroyed.  Events that have not yet been processed
  should be ignored once the queue disappears.

MFC after:	1 week
2011-04-15 03:09:27 +00:00
Rick Macklem
a09001a82b Fix the experimental NFSv4 server so that it uses VOP_PATHCONF()
to determine if a file system supports NFSv4 ACLs. Since
VOP_PATHCONF() must be called with a locked vnode, the function
is called before nfsvno_fillattr() and the result is passed in
as an extra argument.

MFC after:	2 weeks
2011-04-14 23:46:15 +00:00
Jung-uk Kim
4a8fa6fe58 Add event handlers for (ACPI) suspend/resume events. Suspend event handlers
are invoked right before device drivers go into sleep state and resume event
handlers are invoked right after all device drivers are waken up.
2011-04-14 22:17:39 +00:00
Rick Macklem
07c0c166e4 Modify the experimental NFSv4 server so that it handles
crossing of server mount points properly. The functions
nfsvno_fillattr() and nfsv4_fillattr() were modified to
take the extra arguments that are the mount point, a flag
to indicate that it is a file system root and the mounted
on fileno. The mount point argument needs to be busy when
nfsvno_fillattr() is called, since the vp argument is not
locked.

Reviewed by:	kib
MFC after:	2 weeks
2011-04-14 21:49:52 +00:00
Alexander Motin
b8b6b5d37a Make CAM report devices with ATA/SATA transport to devstat(9) as IDE. 2011-04-14 21:25:32 +00:00
Navdeep Parhar
6b49a4ece8 There is no need to request a tx credit flush if such a request is already
pending.

MFC after:	3 days
2011-04-14 20:06:23 +00:00
Andreas Tobler
415a54c8c5 Adjust debugging string to match the actual function.
Approved by: nwhitehorn (mentor)
2011-04-14 19:37:31 +00:00
Jung-uk Kim
8143750196 Use newly added rdtsc32() for DELAY(9) as well. 2011-04-14 19:11:45 +00:00
Andreas Tobler
8fd7d65779 The macro MOEA_PVO_CHECK is empty and not used. It is a left over from the
NetBSD import. Remove the definition and all its occurrences.

Approved by: nwhitehorn (mentor)
2011-04-14 18:26:50 +00:00
Andreas Tobler
3d20a4803b Add stoppcbs[] arrays on powerpc(64) and have each CPU save its
current context in the IPI_STOP handler. Similar as done on other
architectures.

Approved by: nwhitehorn (mentor)
2011-04-14 18:14:43 +00:00
Jung-uk Kim
0e78005e5c Work around an emulator problem where virtual CPU advertises TSC is P-state
invariant and APERF/MPERF MSRs exist but these MSRs never tick.  When we
calculate effective frequency from cpu_est_clockrate(), it caused panic of
division-by-zero.  Now we test whether these MSRs actually increase to avoid
such foot-shooting.

Reported by:	dim
Tested by:	dim
2011-04-14 17:50:26 +00:00
Bernhard Schmidt
9289984d4b Instead of trying to figure out which rxon.flags to clear, restart
from scratch. Remove htole16() calls, rxon.chan is an uint8_t,
ieee80211_chan2ieee() does return an ic_ieee as an int, but I heavily
doubt a htole16() will buy us anything here.
2011-04-14 17:42:21 +00:00
Bernhard Schmidt
8dace48f6b iwn_cleanup() is just a wrapper around iwn_detach(), call it directly
instead.
2011-04-14 17:31:34 +00:00
Bernhard Schmidt
b2d64bef7e Reuse net80211 code:
- IWN_TXOP_TO_US is equal to IEEE80211_TXOP_TO_US
- use IEEE80211_DUR_TU
- ieee80211_add_rates/ieee80211_add_xrates are public, use em
- copied ieee80211_add_ssid it is not public
2011-04-14 17:26:13 +00:00
Bernhard Schmidt
abd8979b98 Remove IWN_FLAG_HAS_5GHZ and IWN_PCI_BAR0, both unused. 2011-04-14 17:19:33 +00:00