Commit Graph

4727 Commits

Author SHA1 Message Date
christos
6d8587f061 from jmcneill: suspend and resume handlers for spic. 2007-12-17 19:51:09 +00:00
tsutsui
8cdfb3fc02 Fix from YAMAGUCHI Takahiro in PR kern/30023:
Pass correct EEPROM address in fxp_write_eeprom().
2007-12-17 12:18:31 +00:00
dyoung
48b8e42d80 Fix a bug I introduced to rtw_chan2txpower() the other night.
Fix a bug in device detachment: change a break statement to a
/*FALLTHROUGH*/ in rtw_detach().
2007-12-16 21:39:33 +00:00
dyoung
058d9b982e Synchronize device detachment with network interrupts. Use the
pmf network class instead of powerhooks.
2007-12-16 00:04:07 +00:00
perry
9b2b412c19 __FUNCTION__ -> __func__ 2007-12-15 00:39:14 +00:00
dyoung
8fc7c0c5ca Add a resume handler for com@isa, using Jared McNeill's suggested
code from current-users.  com@acpi, et cetera, remain to be done.
2007-12-14 03:36:54 +00:00
dyoung
552eeca6f7 Exit from ath_init() with EBUSY if the device does not have power. 2007-12-14 02:46:49 +00:00
degroote
aaf41b42d1 Remove the shutdown hook (pmf takes care about it already), as suggested by joerg@ 2007-12-13 19:58:42 +00:00
dyoung
3ccfb020a3 Back out previous my previous change, it stops device resumption
entirely.
2007-12-13 09:17:43 +00:00
dyoung
4e2f6cc949 Do not reinitialize the NIC while it is suspended. 2007-12-13 09:04:39 +00:00
lukem
ceed9c722c use __KERNEL_RCSID() 2007-12-11 11:52:26 +00:00
martin
f40133bd10 const'ify ad1848 devmap. 2007-12-11 00:21:51 +00:00
degroote
087fae3d54 Register fxp @ pci to the pmf framework
Kill reference to old powerhook framework.
2007-12-10 16:15:02 +00:00
jmcneill
4c1d81b2b5 Merge jmcneill-pm branch. 2007-12-09 20:27:42 +00:00
tsutsui
0ac5343d25 Pull several fixes from OpenBSD's fxp.c:
Rev 1.41:
> use a nop with I bit set at the end of the tx chain.  This avoids a race
> between status update and clearing the suspend bit on machines which can't
> write data smaller than 32bits at a time.
This should fix PR port-alpha/30560.

Rev 1.50:
> Fix nasty bug where driver would not correctly catch and handle an rnr
> condition when it was due to the the recieve buffers being exhausted with
> no packet transmits during that time. Symptom was that the fxp would
> simply stop interrupting for the next 15 seconds until the watchdog kicked
> in and reset the chip due to 15 seconds of inactivity, making the fxp very
> poorly behaved when hammered on hard.

Rev 1.61:
> Defer reinitialisation of the RU until after the interrupt handler has had
> a chance to process all pending packets, otherwise the chip may overwrite
> their mbuf clusters after we have freed them.
>
> Eliminates a race that can cause random pool corruption when reconfiguring
> an interface under heavy network load.

And one more change for RX sanity:
- put RU into suspend when the last RFA is processed.

These RNR/RU changes may fix pool corruption problems on fxp.

Tested on AlphaPC164 and i386 with i82559 and i82550.
2007-12-08 15:45:43 +00:00
ad
6874e511b7 lockmgr -> mutex 2007-12-05 07:58:29 +00:00
ad
598ab03ad0 Match the docs: MUTEX_DRIVER/SPIN are now only for porting code written
for Solaris.
2007-12-05 07:06:50 +00:00
spz
3d1270e2c8 try fixing up broken revision string again 2007-12-04 15:42:05 +00:00
spz
5bfaf1ebca fix up broken revision string 2007-12-04 15:41:20 +00:00
jmcneill
490542edae aprintify, on behalf of xtraeme 2007-12-01 23:40:28 +00:00
ad
3c1048714b Noisy printf. 2007-12-01 16:51:22 +00:00
dyoung
2db1c5cdfa Bug fix: in ath_init(), if ath_enable() fails, ATH_UNLOCK() before
returning.
2007-11-27 00:07:42 +00:00
dyoung
e45771984e Don't process the CAB queue twice in ath_tx_proc_q0123. 2007-11-26 23:54:48 +00:00
dyoung
37bdac8857 Eliminate redundant check for read-only mbuf data, since
M_TRAILINGSPACE() does a more complete check on NetBSD.
2007-11-26 23:52:40 +00:00
dyoung
84a52560a3 Bug fix: restore antenna diversity settings after reset. 2007-11-26 23:49:55 +00:00
dyoung
ecfc7c1996 Use device_xname(). Make device_printf() take a device_t argument.
Add __attribute__((__format__(__printf__,2,3))) to device_printf()
so that the compiler will help us detect bad arguments.

Retire unused subroutine m_defrag(), and unused declaration m_getcl().
2007-11-26 23:48:37 +00:00
dyoung
ca57c50be5 Make this compile. Use callout_init() instead of ATH_CALLOUT_INIT(),
since callout_init() on FreeBSD and NetBSD are the same, now.
2007-11-26 20:45:01 +00:00
ad
b7b14106bd Don't rely on others being kind enough to pull in sys/device.h 2007-11-20 14:33:58 +00:00
ad
dc26833bb6 - Factor out too many copies of the same bit of tty code.
- Fix another tty signalling/wakeup problem.
2007-11-19 18:51:36 +00:00
jnemeth
237d2dd7e7 fix 'm' used unitialized 2007-11-18 12:40:15 +00:00
kefren
c61259ee1f initialize via sysmon_envsys_create()
make sensors valid
2007-11-17 08:23:46 +00:00
dyoung
aadb8be251 Count received frames, Rx PLCP errors, Rx FCS (CRC32) errors, and
Rx ICV errors using evcnt(9).

In promiscuous mode, and when scanning (hmm), ask the NIC for bad
packets (e.g., those that do not pass CRC32).  Pass bad packets to
radiotap listeners.  Pass packets to radiotap listeners before
stripping FCS.  Re-order operations in atw_rxintr() to accomplish
all of this without passing bad packets up to net80211.

Set radiotap channel once in atw_tune() instead of in atw_rxintr().

Fix an endianness bug: it_len is little-endian, but bpf_mtap2()'s
argument needs to be in host order.
2007-11-16 23:51:02 +00:00
dyoung
5c5f8f488c Accommodate the variety of RF front-ends when radiotapping frames:
tap only RSSI when there is a Philips RF front-end.  Tap both Barker
lock quality and RSSI when there is any other RF front-end.

Provide radiotap listeners a more complete picture of channel
activity:

    in promiscuous mode, tap frames who do not pass the CRC32 check.
    Flag packets that were received with a short preamble.  Ask
    the NIC to pass us 802.11 Control frames.  Pass frames to
    radiotap listeners before stripping the FCS.  Re-order operations
    in rtw_intr_rx() in order to accomplish all of this, taking
    care not to pass a broken packet to net80211!

Do not provide a flags field when tapping xmitted frames.

Assert sane Rx packet lengths.  Really should check and drop instead
of KASSERTing.  I will revisit this, soon.

Update copyright.
2007-11-16 23:35:19 +00:00
xtraeme
31962fc6e5 Extend the envsys2 API (one more time, sorry) as defined in:
http://mail-index.netbsd.org/tech-kern/2007/11/09/0001.html

sysmon_envsys_create() and sysmon_envsys_destroy() were added to
create/destroy sysmon_envsys objects (and its TAILQ/LIST for sensors/events).

sysmon_envsys_sensor_attach() and sysmon_envsys_sensor_detach() were
added to attach/detach sensors to a specified sysmon_envsys device.

The events framework is now per device and configurable via the
ENVSYS_SETDICTIONARY ioctl or /etc/envsys.conf and envstat(8).

Update all users and documentation to reflect these changes.
2007-11-16 08:00:11 +00:00
dyoung
fba210bf0b Use uintXX_t instead of u_intXX_t. 2007-11-16 06:06:15 +00:00
dyoung
c58de3c983 Cosmetic: rename some variables and constants. Move some constants
from atw.c to atwreg.h.
2007-11-16 05:53:16 +00:00
dyoung
b66951c216 Replace some magic numbers with HFA3861A register names.
Do not alias the Rx descriptor word ar_ctl to ar_rssi with a #define.
Instead, call the member ar_ctlrssi.

Convert the ugly macro ATW_RXDESC_INIT() to an inline subroutine,
atw_rxdesc_init().

Do not load an empty IEEE80211_RADIOTAP_FLAGS field into the Tx
radiotap header.
2007-11-16 04:58:38 +00:00
dyoung
67612c1e03 Define some more registers. 2007-11-16 04:52:36 +00:00
dyoung
5167b8ef99 Add missing */, RCS Id, and license. 2007-11-16 04:31:34 +00:00
dyoung
93ac8c75eb Add part of the Intersil HFA3861A register set so that eventually
I can remove magic numbers from atw(4).
2007-11-16 04:24:06 +00:00
dyoung
c0297f3ac1 Fix order of operations:
rtw_rxdesc_init: before initializing a Rx descriptor's
            control word, synchronize the Rx buffer

        rtw_start, be paranoid: set the "NIC owns" bit on a Tx
            descriptor dead last.  Always reinitialize the "next
            Tx descriptor" pointer, just in case it got clobbered
            somehow.

Let the compiler decide whether to inline rtw_collect_txring or
not.
2007-11-15 22:55:50 +00:00
dyoung
57103df331 Use __arraycount(). 2007-11-15 22:49:46 +00:00
bouyer
637a7b4433 Add ATAPI support to ahcisata(4). lightly tested with a DVD burner, by
mounting a CD and reading from it, and blanking a DVD-RW using cdrecord.
2007-11-12 21:25:14 +00:00
joerg
2053e6a730 Merge refactoring from jmcneill-pm. 2007-11-12 20:10:32 +00:00
ad
2ea87a5b7a Back out revision 1.26. 2007-11-12 17:28:23 +00:00
bouyer
d64cd0dda9 Move a delay() inside a loop, so that the 1s delay is really 1s. 2007-11-11 18:03:46 +00:00
ad
d6bd505623 zsstart, zstty_txsoft: don't acquire tty_lock, it's already held. 2007-11-10 18:07:53 +00:00
macallan
f9f695f535 turn the channel lock into a spin mutex at IPL_NONE so it resembles the
simplelock it used to be
With this my macppc boxes no longer deadlock when init sets up serial ports
2007-11-09 20:31:16 +00:00
ad
ca6954d465 Use zs_lock_init() to set up the chanstate's lock. 2007-11-09 00:05:38 +00:00
ad
d37935697b Merge tty changes from the vmlocking branch. 2007-11-07 15:56:11 +00:00