Commit Graph

3548 Commits

Author SHA1 Message Date
briggs 8f451cfae0 When we are recovering from a resource exhaustion on receive, make sure
that the RU is stopped before issuing an RU_START.
Fix suggested by Takahiro Kambe in PR kern/10622.
2004-04-28 15:25:45 +00:00
briggs 3d68e2f46f Back out revision 1.82. It seems to cause a number of device timeouts
on x86 boxes.  There must be a better way to deal with this that works
well for everyone.  In the meantime, back out to the version that works
for more people.
2004-04-28 03:37:58 +00:00
itojun aca4c091d3 sprintf -> snprintf 2004-04-22 00:17:10 +00:00
itojun 4c6511de84 avoid unbounded sprintf(), use snprintf() 2004-04-21 18:03:13 +00:00
drochner c6bba42c07 initialize the lock 2004-04-21 17:38:48 +00:00
wiz 3f9411f688 Spell removable with only two es. Inspired by jmc@openbsd. 2004-04-19 12:44:09 +00:00
bouyer fca16a87e1 Make wdc_channel->ch_flags volatile, and cast it to (void *) when used
in tsleep()/wakeup() to appease gcc. Otherwise, the ch_flags value may
be cached in a register in atabus_thread(), and when it sets the WDCF_TH_RUN
bit after tsleep() it may loose loose the changes made by an interrupt handler
or another thread.
Problem analysed by Jukka Andberg on tech-kern.
2004-04-13 19:51:06 +00:00
matt 2d5e1958a5 Don't set M_HASFCS. Rather than just print we got a bad packet length,
actually print out the length that was bad.
2004-04-10 07:44:36 +00:00
briggs d2074a867d Set the DMA SGL length correctly if the DMA request must be chained because
it is too large to fit in one SGL.
Fix from HITOSHI Osada <QFH02545 (at) nifty.com> in response to PR kern/24967.
2004-04-10 01:59:19 +00:00
enami 786727e51f Fix race condition introduced in rev 1.189; after the change, if there is
THRE interrupt occurs between the LSR read and IIR read, we won't see the
LSR_TXRDY bit when testing it in the variable `lsr' and we don't interrupted
again (as the corresponding bit in the IIR is cleared by reading, except
for some broken device).

Tested by Matthias Scheler and me, reviewed by Allen Briggs.
Closes PR#25010.
2004-04-05 22:33:08 +00:00
briggs 1c0ca89048 Be more careful about issuing CU_RESUME in fxp_start()--only doing
it if we think it's probably necessary.  Then do it again in the
tx interrupt handler, if we again think it's necessary.  This
reduces the number of commands we issue the chip.  Prior to this
change, the i82550 (running without extended feature set, so like
a '559) would sometimes fail in fxp_scb_wait() prior to issuing
another CU_RESUME, resulting in
	fxp0: WARNING: SCB timed out!
messages on the console, often followed by device timeouts.
2004-03-31 14:48:31 +00:00
mhitch dbafb08630 Remove clauses 3 and 4. 2004-03-28 19:01:07 +00:00
atatat b233127eb3 GC ath_node_root as well, but modify to work around the single
(tightly scoped) reason for recording the node address by recording
the assigned number.  Dink pci/if_bge.c to match, since ic/ath.c was
used as the archetype.
2004-03-27 04:37:59 +00:00
dyoung f0b37d23ab Actually, disabling RSS rate-adaptation does not make any discernible
difference in locking up STA f/w 8.42.1.
2004-03-26 06:43:25 +00:00
dyoung 046f811cb5 Firmware revisions are decimal. 2004-03-26 06:39:56 +00:00
bouyer 27e1cb0c55 Deassert RST before re-enabling interrupts. Some drives (or controller)
require it.
From Michael van Elst in kern/24904.
2004-03-25 19:45:09 +00:00
dyoung eaf23d986f Enable Tx and TxExc interrupts. Somehow this escaped my initial
commit. The rate adaptation code expects them. Usually wi gets
lucky, and an Rx/Alloc/Info event triggers the interrupt handler,
but I had not intended for wi to count on it.

Without Tx/TxExc interrupts enabled, wi will sometimes exhaust all
its rssdescs and cease transmitting.  Usually it sets IFF_OACTIVE
in that situation.
2004-03-25 06:17:51 +00:00
thorpej df2f52dfc8 My copyright on this file is assigned to TNF. 2004-03-24 18:22:47 +00:00
drochner ef369e0ed6 remove license clauses 3 and 4 from my cpoyright notices 2004-03-24 17:26:53 +00:00
wiz f0d2889eb5 Move
(c) TNF
line from 4-clause UCB to 3-clause UCB license; in other words,
remove UCB's ad clause from the license TNF grants.
There is no point in TNF demanding that UCB's ad clause be followed
when even UCB doesn't demand it any longer.

Ok'd by board@ and agc@.
2004-03-24 15:38:41 +00:00
atatat 19af35fd0d Tango on sysctl_createv() and flags. The flags have all been renamed,
and sysctl_createv() now uses more arguments.
2004-03-24 15:34:46 +00:00
matt deeed00084 Set the M_HASFCS flag on received traffic. 2004-03-24 00:31:15 +00:00
christos e4b3e03b4c Remove extraneous ; from OpenBSD. 2004-03-20 21:16:55 +00:00
he 2c34d70afa Adapt to the removal of NE2000_USE_WORD() macro, now replaced
by a field in ne2000_softc.
2004-03-18 23:38:17 +00:00
mycroft 2d3bb76a10 A random patch that's been in my source tree...
Figure out whether the shared memory region is word-accessible in the same
place we figure out its size, and store this in the softc, rather than using a
series of comparisons later.
2004-03-17 23:47:16 +00:00
dyoung 9ef4dd42f2 Prevent a buffer overflow that's been seen in the wild. The firmware
will sometimes return 0; subtracting 1 from that yields a too-big
buffer length.
2004-03-17 17:19:13 +00:00
dyoung 73a618d5f3 In wi(4), wi_choose_rate used to contain device-independent code.
I have pulled that code into the function ieee80211_rssadapt_choose
so that I can re-use it in ath(4), atw(4), and in other drivers.

In rssadapt(9), I have also created a struct ieee80211_rssadapt_expavgctl
that contains parameters for rate adaptation. When IEEE80211_RSSADAPT_DEBUG
is enabled, I will using sysctl to expose an ieee80211_rssadapt_expavgctl
for each wireless device.

Also in rssadapt(9), I have introduced an interpolate() macro which
makes the exponential-averaging code more compact.
2004-03-17 17:00:34 +00:00
bouyer 751597cddb cbd -> cdb
Command Block Descriptor -> Command Descriptor Block
Pointed out by Allen Briggs.
2004-03-16 19:10:43 +00:00
bouyer 542c876565 Extract the code printing the CBD from scsipi_print_sense(), so that it's
usable in other context.
Use the new scsipi_print_cbd() to dump the command in case of timeout
in siop/esiop.
2004-03-15 22:43:43 +00:00
dyoung 224491add0 Move the ath(4) sysctls to hw.ath from ath. 2004-03-15 03:26:04 +00:00
wiz 4fdf521f76 It's extension, not extention. From Miod Vallat (miod at online fr). 2004-03-14 20:11:24 +00:00
minoura b332b550b9 Add Intel ICHn PCI-LPC bridge driver.
It is a pcib, but with sysmon watchdog support.
2004-03-14 08:04:38 +00:00
bjh21 759fb56651 Convert to use pckbport infrastructure -- another file I missed on the first
pass.
2004-03-13 23:03:43 +00:00
bjh21 dff5222d3a Abstract the interface between pckbc(4), and the pckbd(4) and pms(4)
drivers that attach to it.  This allows for other host interface chips
that use the same keyboards and mice, such as the ones in the ARM
IOMD20, ARM7500, and SA-1111.  The PC-compatible driver is still
called pckbc(4), and the new abstraction layer is "pckbport", so the
child devices have moved from sys/dev/pckbc to sys/dev/pckbport, which
also contains some code shared between all host controllers.  To avoid
incompatibility, pckbdreg.h is still installed in
/usr/include/dev/pckbc.

In theory, this shouldn't cause any behavioural changes in the drivers
concerned.  Thy just use rather more function pointers than before.  Tested
on i386 and (with a new host driver) acorn32.  Compiled on several other
affected architectures.
2004-03-13 17:31:33 +00:00
dyoung a0e5ea5bcb Enable extended channel set.
Add some debug code for printing the HAL's notion of available
channels if hw.ath.debug = 1.
2004-03-13 05:43:08 +00:00
jkunz 17e4dce36a Import MI part of new Intel i82596 Ethernet driver. 2004-03-12 11:37:17 +00:00
jmc 2311909a8b Provide standard workaround for \!defined __BUS_SPACE_HAS_STREAM_METHODS 2004-03-11 05:59:33 +00:00
bouyer eefc140c02 The 1010-66 always generate AIP values on the bus, regardless of the SCNTL4
settings. Disable AIP completely, as this confuse pre-Ultra160 drives.
From FreeBSD.
2004-03-10 22:02:53 +00:00
bouyer 6338d77271 The real value of the message is in msgin, not
esiop_cmd->cmd_tables->msg_in[0], so print the correct value.
2004-03-10 21:51:29 +00:00
dyoung bfe1b324c6 Fix endianness bug to make awi(4) work on macppc (and other big-endian
machines).
2004-03-08 06:52:44 +00:00
dyoung 65e1a3b112 Oops, ath(4) tells dBm signal, not dB signal. 2004-03-03 00:05:16 +00:00
kleink 02a87b49d9 Back out previous. 2004-03-01 23:46:44 +00:00
kleink b66915a096 Cosmetics; add missing newline to autoconf output. 2004-03-01 20:29:24 +00:00
dyoung 3644406951 Attach the ath(4) sysctls:
ath.dwell: channel dwell time (ms) for AP/station scanning
ath.calibrate: chip calibration interval (secs)
ath.outdoor: enable/disable outdoor operation
ath.countrycode: (opaque?) country code
ath.regdomain: (opaque?) regulatory domain
ath.debug: 0 (no debug messages), 1 (some messages), 2 (all messages)
2004-03-01 01:19:45 +00:00
dyoung d68ab48dd5 Update ath(4)'s Hardware Abstraction Layer (HAL) to version 0.9.6.11.
Both the API and ABI changed, hence the changes to so many .c and
.h files.
2004-02-29 00:47:21 +00:00
drochner c6de49574c The interrupt claim stuff is broken -- data buffers
and external interrupt handlers should be completely
unrelated.
For now, just remove the obvious culprit in the nibble/ps2
case to make NTP pps signal capturing work again.
External handlers should be passed to the lower level,
and they should have full power and responsibility if
they are installed, and their lavel should be selected
by the frontend.
Being here, comment out <machine/intr.h> - it is not
used yet, and do some more conmetic cleanup.
2004-02-24 17:41:09 +00:00
wiz 73e1501b98 parameter with two es. From Peter Postma. 2004-02-24 15:22:01 +00:00
wiz f05e6f1a3a occured -> occurred. From Peter Postma. 2004-02-24 15:12:51 +00:00
wiz dc4cc98b15 becuase -> because. From Peter Postma. 2004-02-24 15:05:53 +00:00
yamt 635ee237b0 support h/w assisted vlan tag insertion. 2004-02-19 14:21:40 +00:00