Commit Graph

17725 Commits

Author SHA1 Message Date
mycroft 26df0f0126 Fix a printf(). 2004-08-10 06:23:50 +00:00
mycroft 6d1b8921aa Copyright maintenance. 2004-08-10 06:10:38 +00:00
mycroft 6c47211011 Update to the new world order. 2004-08-10 06:08:58 +00:00
mycroft ac82590655 Remove some useless code. 2004-08-10 06:05:40 +00:00
mycroft d55195e28b Update to the new world order.
"While I'm here..."
All that grotesque code allegedly for the 88190 and 88790 is actually just
mapping the CCR and writing to it.  So, enable the device normally and use
pcmcia_ccr_{read,write}() rather than doing this crap ourselves.
2004-08-10 05:24:56 +00:00
mycroft 1234bb195c Update to the new world order. 2004-08-10 05:23:04 +00:00
mycroft 9e12fe4182 Minor change to a printf(). 2004-08-10 05:22:33 +00:00
mycroft 1641421432 Move the location of a printf() I added. 2004-08-10 05:21:59 +00:00
mycroft 1a0a3e5f59 Update to the new world order. 2004-08-10 03:54:37 +00:00
mycroft baa0e65038 Make the enable state machine during attach more robust. 2004-08-10 03:54:26 +00:00
mycroft dae3551db2 Regen. 2004-08-10 03:03:29 +00:00
mycroft a866720a7e Remove a very silly hack WRT the Digital vendor ID. 2004-08-10 03:03:11 +00:00
mycroft 71e7860bbf GC the "quirk" code. 2004-08-10 03:00:29 +00:00
mycroft f96037f43b Use pcmcia_function_{configure,unconfigure}().
XXX Memory mapped mode seems to be flaky with my CF cards, so I have
disabled it for now.
2004-08-10 02:56:42 +00:00
mycroft 7f6dd84dc4 Use pcmcia_function_{configure,unconfigure}(). 2004-08-10 02:54:19 +00:00
mycroft 2137977a97 Be robust against child devices failing to handle the socket refcnt properly --
force it to 0 when a card is detached, possibly disabling the socket in the
process.

Add several new functions:
* pcmcia_config_alloc(pf, cfe)
  Tries to allocate all the I/O and memory spaces in a config entry.
* pcmcia_config_free(pf)
  Frees all the I/O and memory spaces for the active configuration.
* pcmcia_config_map(pf)
  Maps all the allocated I/O and memory spaces for the active configuration.
* pcmcia_config_unmap(pf)
  Unmaps all the allocated I/O and memory spaces for the active configuration.

And two higher-level functions:
* pcmcia_function_configure(pf, validator)
  Tries to find a CIS config entry that it can allocate the spaces for.  Each
  entry is verified by calling the "validator" function -- which can also do
  card- and driver-specific fixups.  If successful, the regions are all mapped.
* pcmcia_function_unconfigure(pf)
  Equivalent to calling both pcmcia_config_unmap() and pcmcia_config_free().

Most drivers are expected to use the latter two functions, which will greatly
reduce the amount of crufty code.
2004-08-10 02:50:52 +00:00
mycroft dc594b03f9 Be robust against the case of the child devices failing to decrement the
refcnt.
2004-08-10 02:40:51 +00:00
mycroft 646cec1d1d A few things:
* Kill off device nodes *before* we clear out the queue, to help prevent any
  new I/O being queued.
* More useful error reporting in wd_setcache() and wd_flushcache().
* Add a wd_standby() (tested but not used yet).

And the most important:
* In wddetach(), if the device was open, call adapt_delref() so that we
  propagate the disable up to our PCMCIA socket.
2004-08-10 02:33:58 +00:00
dyoung 2bcbb9cb72 IBSS fixes: get IBSS beacon generation right. Merge with a same-SSID,
same-channel IBSS.
2004-08-10 01:03:52 +00:00
dyoung 8abb07d1ac Make the node table into an LRU cache: least-recently used nodes
are at the end of the node queue.  Change the reference-counting
discipline: ni->ni_refcnt indicates how many times net80211 has
granted ni to the driver.  Every node in the table with ni_refcnt=0
is eligible to be garbage-collected.  The mere presence of a node
in the table does not any longer indicate its auth/assoc state;
nodes have a ni_state variable, now.  A sysctl,
net.link.ieee80211.maxnodecache, controls the maximum LRU cache
size.

While I am here, patch ieee80211_find_node_for_beacon to do a "best
match" by bssid/ssid/channel, not a "perfect match."  This keeps
net80211 from caching duplicate nodes in the table.
2004-08-10 00:57:20 +00:00
mycroft 16e317876a Minor change. 2004-08-09 22:24:37 +00:00
mycroft 125ba6ee0c Adapt to the new world order. 2004-08-09 22:02:11 +00:00
mycroft 975673d3f6 Adapt to the new world order. 2004-08-09 21:30:18 +00:00
mycroft 285bec8287 Minor code reduction. 2004-08-09 20:30:19 +00:00
mycroft b37b3de94e Adapt to the new world order. Now all my sm cards work. 2004-08-09 20:30:08 +00:00
mycroft 36c30a2f1a Dispense with all the interrupt multiplexing code here, and assume that the
underlying implementation DTRT.  This has the side effect of causing us to
ignore the INTR and INTRACK bits in the CCR -- but this seems for the best
anyway, since they are not reliably implemented.  (I note that Linux doesn't
bother either.)
2004-08-09 20:02:36 +00:00
mycroft 7848004c46 Do the I/O mapping in the main attach routine.
Also, we don't need to bother cleaning up on a failed attach -- we keep enough
state for the detach routine to do it.
2004-08-09 19:34:00 +00:00
mycroft bc7b11e4ff Add newlines to the messages... 2004-08-09 19:33:07 +00:00
mycroft b7a991ceb6 Whoops, nuke an unused variable. 2004-08-09 19:09:06 +00:00
mycroft 65d47754b3 Assume that io_map/unmap and intr_establish/disestablish will not be called
with the function enabled.  If this happens, issue a warning.  (This is only
really important for multifunction cards.)

This allows me to get rid of a bunch of extra code.
2004-08-09 19:08:19 +00:00
mycroft f65dd54152 Correct the intr_establish order here. 2004-08-09 18:51:32 +00:00
mycroft 7b96c587dc Fix the intr_establish/disestablish order here too. 2004-08-09 18:41:36 +00:00
mycroft 9092e2c97e Make pcmcia_function_disable() primarily responsible for disabling the CCR
bits.  pcmcia_intr_disestablish() continues to do this as a stopgap.
2004-08-09 18:30:51 +00:00
mycroft 2ae40d3e4f Do our io_map()s and intr_establish()es earlier. 2004-08-09 18:11:01 +00:00
mycroft af19b73069 Do io_map() and intr_establish() before enabling the function, always. This
prevents "stray interrupts" during attach.
2004-08-09 17:00:53 +00:00
mycroft deca9207b3 If the function is not enabled, do not attempt to immediately update the CCR.
XXX This is a stopgap until all drivers are converted to do their io_maps and
intr_establishes before function_enable.
2004-08-09 16:59:10 +00:00
mycroft 9a46d5ed7d Do an extra read of the IIR during initialization, just to ack any pending
interrupt.
2004-08-09 16:57:14 +00:00
mycroft c74553663e Add some code to deal with the interrupt mask register on early CEM cards.
Doesn't seem to work yet, but it's marginal progress.
2004-08-09 16:05:00 +00:00
mycroft c8180f49fd Use PCMCIA_WIDTH_AUTO, not PCMCIA_WIDTH_IO16, since we (sometimes) do 8-bit
access.
2004-08-09 15:40:56 +00:00
mycroft b03f5b32c7 Pass a valid alignment to pcmcia_io_alloc(). 2004-08-09 14:24:10 +00:00
mycroft 4e92489373 Add detach support for spc@pcmcia, modeled after aic@pcmcia. 2004-08-09 14:07:57 +00:00
mycroft f5eacc00f9 Don't loop forever if a card went away. 2004-08-09 13:52:21 +00:00
mycroft 10121549dd Add a hack that makes the address register programming more reliable on my
CE2 cards.
2004-08-09 13:30:16 +00:00
mycroft eaae9fcf2b The "savedpage" stuff is nonsense. Every place we touch the device is
protected by splnet(), so there's no reason to even try.
2004-08-09 05:11:33 +00:00
mycroft a271b4e6ab Go online in xi_init(), not xi_full_reset(). Enable/disable receive in
xi_init()/xi_stop().
2004-08-09 04:47:40 +00:00
mycroft 0e261f0935 Fix a debugging printf(). 2004-08-09 02:10:25 +00:00
mycroft 105470da05 Do not set INTRACK ourselves. 2004-08-09 02:01:16 +00:00
mycroft cafa5cc2d1 Implement the correct (I think) interrupt acknowledgement sequence. 2004-08-09 01:49:26 +00:00
mycroft 00a9c911e6 Multifunction fixes:
* Don't call handlers for functions that are not enabled.
* Always call the handler if the function doesn't support the STATUS register.
While I'm here, divide the CCR numbers by 2.
2004-08-09 01:32:04 +00:00
mycroft 213233a551 Access to this device is strictly 16-bit, so use PCMCIA_WIDTH_IO16. 2004-08-09 00:33:17 +00:00
mycroft 16ac152cca Do barriers on the ASIC space without touching the NIC space. 2004-08-09 00:26:15 +00:00
mycroft f0e2cfd7fc Eliminate most 8-bit access. Just the data in/out path remains. 2004-08-09 00:25:33 +00:00
mycroft c52e6e82ec Create two windows iff the config table asks for it. Try to make them
contiguous.  Map windows with mode AUTO since we have mixed size access.
2004-08-09 00:00:36 +00:00
mycroft 8231a1a314 Copyright maintenance. 2004-08-08 23:19:59 +00:00
mycroft ebed70c6e6 Remove the "offset" and "size" arguments to pcmcia_io_map(). In the singular
case (ne@pcmcia) where we were using these to create a subregion, it is better
handled by calling bus_space_subregion().

Now there is a 1:1 mapping between I/O spaces in the config table and windows
mapped in the function.  Rework the multifunction mapping code to take
advantage of this by using both I/O base addresses if necessary.
2004-08-08 23:17:12 +00:00
christos 7e7559f105 by popular demand, bind the scroll keys by default. 2004-08-08 19:24:49 +00:00
christos 959186b32c disable the quirk on the console so that it can scroll. 2004-08-08 19:21:27 +00:00
mycroft 76344241eb Look in the correct register for the BSR detection value.
Also, do this early, before writing any registers.
2004-08-08 16:20:43 +00:00
mycroft fa9798d4c2 Search all the configuration entries. 2004-08-08 15:44:13 +00:00
mycroft 91ad7491a9 AFAICT, there's no reason not to use PCMCIA_WIDTH_AUTO here. 2004-08-08 15:12:20 +00:00
yamt 96e7bb0952 ath_init1: return EIO rather than -1 on a failure of ath_hal_reset.
-1 isn't appropriate for if_init.
2004-08-08 13:01:03 +00:00
kent c525acb34a VT1616i support 2004-08-08 10:41:57 +00:00
mycroft e4250cc050 Nuke an extra printf(). 2004-08-08 09:23:01 +00:00
mycroft bff77eedb1 Don't try to use the MII media status if we're not using MII. 2004-08-08 07:48:46 +00:00
mycroft 019f8a0d02 * Some rearrangement of where the power control hooks are called.
* Don't splnet() in xi_init() -- the callers do that.
* Don't do the enable call in xi_init() -- it should be done only in a process
  context so it can sleep.
* Call xi_start() at the end of xi_init() to restart output.
* If the interface is already up, we only need to call xi_set_address() to
  change state on SIOCSIFFLAGS.
2004-08-08 07:25:20 +00:00
mycroft 0cc7712b97 Hey, my LEDs work now. 2004-08-08 06:37:17 +00:00
mycroft ea155978ee Use the correct data port, for compatibility with old cards. Without this,
some of my CE2 cards are unable to transfer data successfully; they send
bogus packets and every received packet is all 0s.
"Special."
2004-08-08 06:22:50 +00:00
mycroft d643fea8d1 Set xidebug to 0 by default. 2004-08-08 05:56:50 +00:00
mycroft 2d5fe6edb4 Split "xi" into a "xirc" frontend (similar to mhzc; it attaches two child
devices) and a "xi" backend.

My CE2 and CEM2 cards are now probed correctly.  However, there are still
some problems with one model of the CE2, and the CEM2 doesn't seem to get
any modem interrupts.

While I'm at it, fix several bugs:

* The tuple scan for the MAC address was broken in multiple ways.
* xi_intr() did not deal well with a shared interrupt.
* We were setting the wrong page number to look at the receive status.  (How
  did this work???)
* Remove the xi_full_reset() from xi_reset().  Move the parts of
  xi_full_reset() needed to undo the effect of xi_stop() into xi_init().  This
  allows a stop/init pair to DTRT, and much quicker, as used by various
  ioctl()s.
* Set the TRS register before reading the TSO register, as the Linux driver
  does.  While I'm at it, fix the name.
* Fix numerous problems with xi_set_address().  "Where do I begin?"  There's a
  chance that multicast works now, but I haven't tested it.
* Explicitly clear the MSR register, and also force SELECT_MII to 0 if we
  didn't find any PHYs.
* Clean up some cruft that appears to be bogus.

Probably needs more work, but it's a start.
2004-08-08 05:56:08 +00:00
mycroft 961619ae0e pcmcia_socket_{enable,disable}() weren't used. Reimplement them as public
functions taking a pcmcia* device structure.

XXX This is a method of last resort for dealing with stupid/insane cards that
we need to probe harder before we can choose a config entry.  It should not be
used by most drivers.
2004-08-08 05:33:04 +00:00
kent 824fd59f6d correct the mask value for CMI9739 2004-08-08 03:52:19 +00:00
kent 6f7bcb397d recognize CMI9739 codec. 2004-08-08 03:50:56 +00:00
mycroft c5b0509d65 Clear the "card type" bit when powering up the socket, to make it more robust
for memory cards.
2004-08-07 20:11:39 +00:00
mycroft ef638869ae Copy a bug fix from spc. If the target transferred too much, we would return
a bogus residual count.
2004-08-07 20:05:25 +00:00
mycroft 0553444712 Fix a printf() format for Alpha. 2004-08-07 20:04:44 +00:00
mycroft 6742fd43f4 Add Alpha to the list of platforms that use bus_space (for nca@pcmcia). 2004-08-07 20:01:48 +00:00
mycroft 665e1f0611 Attempt to support the 688 as well. It looks vaguely right from inspecting
esl.
2004-08-07 19:32:56 +00:00
kent 9e25bf4c82 AD1888 support.
PR kern/25949
2004-08-07 17:37:31 +00:00
mycroft 9918238ca5 Regen. 2004-08-07 17:18:20 +00:00
mycroft 7e01821c61 Clean up the Lucent (and clone) entries a bit.
Add the Hermes II (doesn't work yet, but it's harmless).
2004-08-07 17:18:09 +00:00
mycroft 900254667d Don't pass a MAC address to wi_attach() -- yet. 2004-08-07 17:13:27 +00:00
mycroft 1afe1f83af Be much more robust with RID values during attach:
* If the device returns a length too short to even contain the RID number,
  flag it as not supported and return EOPNOTSUPP, rather than returning a
  length of -2 and trying to use the value anyway.
* Check the returned lengths to see if we actually got anything.
* If we get no rate list, fail the attach, so we don't just blow up later.
Allow the frontend to pass in a MAC address.
2004-08-07 17:12:44 +00:00
kent 1c7464b5ca recognize ALC655/658/850 2004-08-07 16:59:54 +00:00
soren 3dce04c6cd - Don't attempt to clear the CELV bit by setting it high like the
FIFOE/BCIS/LVBCI bits; it's is cleared automatically by the hardware.
- Separate AUICH_DEBUG out from AUDIO_DEBUG and make it possible to debug
  interrupt handling separately.
- A little KNF.
2004-08-07 16:12:57 +00:00
tsutsui f71b2096d2 On manual transfer via TEMP register, data should be read
before asserting ACK.
2004-08-07 07:17:09 +00:00
mycroft 5ef4913a65 Remove extra space. 2004-08-07 05:46:39 +00:00
mycroft c4fbc53cad Clean up attach messages. 2004-08-07 05:27:39 +00:00
mycroft dddef3e3c4 Clean up attach messages. 2004-08-07 04:55:25 +00:00
mycroft ea0d4e378a Swap around the output in some other cases so it's consistent.
Remove some more DELAY()s.
2004-08-07 01:52:42 +00:00
mycroft 15f2664423 Simplify the revision matching code. This is more like what the current
Linux driver does.
2004-08-07 01:44:45 +00:00
mycroft bbfd8cfd32 Oops; forgot a return. 2004-08-07 01:18:06 +00:00
mycroft 001ca3bd72 Tighten up the CIS parsing code a little.
Fix a double-free in a failure case.
Turn off the card if it doesn't fully attach.
2004-08-07 01:09:26 +00:00
mycroft 4e96eb2bd9 The generic code already looked for a LAN ID tuple, so look at what it found
rather than reparsing.
2004-08-07 01:07:31 +00:00
mycroft 4343cdf0c1 Only DELAY() once per CIS region, not once per tuple.
For PCMCIACISDEBUG, print out the tuple *before* parsing it or calling the
callback, so that we can see the tuple that the callback claimed.
2004-08-07 01:06:38 +00:00
mycroft a84492326e Rework the power sequencing so that I stop getting unrecoverable "bad Vcc"
errors with PCMCIA cards.

I've been using this change for almost a year, but accidentally blew it away
recently, and boy did that suck.
2004-08-06 21:39:47 +00:00
mycroft da7483a558 Don't call rnd_detach_source() if we never called rnd_attach_source().
Very minor other cleanup.
2004-08-06 20:38:09 +00:00
mycroft 632742c13d Put a comma before the last CIS string too. 2004-08-06 20:30:05 +00:00
mycroft cce74b1050 Make a couple of Megahertz cards (one straight Ethernet, one multifunction)
work by:
* adding another product to the table,
* checking the function type (to reject the serial port),
* trying harder to find the MAC address in the CIS strings (it may occur in
  one of two different places).
Also, PCMCIA_STR_* elimination.
2004-08-06 19:38:49 +00:00
mycroft 7942a229b2 Regen. 2004-08-06 19:07:27 +00:00
mycroft 5bce4931d3 A few things:
* The DEPCM-XX cards don't need to be recognized by OUI or string -- they
  work just fine with the IO-DATA PC-LAT/E attachment, and are probable OEM.
  So, remove the DEPCM case.
* PCMCIA_STR_* elimination.
* The Megahertz EM3336 is not always an X-Jack device, so take the "XJ" out
  of the product number.
2004-08-06 19:07:12 +00:00
mycroft 2863ff72cc Add code to recognize the 1688, per PR 11910. Also reduce some control logic. 2004-08-06 15:11:48 +00:00
bouyer 0bb75b5f94 Ops, don't return before the end of the function.
Catched by enami tsugutomo.
2004-08-06 09:27:43 +00:00
mycroft 0ba1d7c0e4 Use bpf_mtap2(). 2004-08-06 02:31:25 +00:00
mycroft ddc97f59ca Put unadulterated dB values in the radiotap header, not the converted dBm
values.
2004-08-05 22:57:32 +00:00
mycroft ca7a51c636 Regen. 2004-08-05 21:53:26 +00:00
mycroft 5cf3883fb7 Match Spectrum24 by product ID, not string. 2004-08-05 21:53:04 +00:00
mycroft 369d9bb279 Regen. 2004-08-05 21:44:01 +00:00
mycroft ed38d701a1 Fix an Aironet product name, and normalize the usage of "Mini-PCI". 2004-08-05 21:43:46 +00:00
bouyer 178586b7f4 scsi_kill_pending(): don't kill the commands in periph_xferq here.
The controller is handling them, calling scsipi_done() here will end up in the
xfer being scsipi_done()'ed a second time when it completes in the controller
code. In addition, the way the loop was done here would end up in an infinite
loop, because the channel kernel thread needs to run to remove a command from
this queue.

scsibusdetach(): scsipi_done() all commands from periph_xferq. The controller
is already gone, and these commands will never complete.
Shut down the channel (which will cause the kenrel thread to exit) after
detaching the childs, as they will need the kernel thread for
scsipi_wait_drain().

Fix kernel hang or deadlock when detaching devices (either by scsictl detach
or unplug) with active commands.
2004-08-05 19:45:13 +00:00
thorpej 867e9734f2 - Dump the mbuf chain if we encounter a "too many DMA segments" error
on transmit.
- On 82544 and up, allocate 4096 Tx descriptors rather than just 256.
  82543 and down must still use 256, due to errata.
- Allow up to 256 DMA segments per packet.  I have observed some truly
  pathological mbuf chains under certain (admittedly uncommon) workloads
  when jumbo frames are in use.
2004-08-05 19:11:11 +00:00
mycroft 3b326e5df0 Add Asustek WL-100, per PR 26559. 2004-08-05 17:29:41 +00:00
mycroft f21c90e03b Regen. 2004-08-05 17:24:00 +00:00
mycroft dec87a4620 Add Asustek WL-100, per PR 26559. 2004-08-05 17:23:47 +00:00
drochner f024db680d simplify some pointer arithmetics which uses typecasts on the LHS
so that gcc-3.4 doesn't complain
2004-08-05 16:43:59 +00:00
cube e16640cc67 Regen. 2004-08-05 16:26:41 +00:00
cube e492e6ec13 Add the GeForce 5900XT. Totally not related to Doom3 release. Honest. 2004-08-05 16:26:05 +00:00
jkunz 2950c906af Attach phy anyway if srom has invalid contents.
Patch sugested by Charles M. Hannum on tech-kern.
2004-08-05 09:07:45 +00:00
lukem 7d850ebd8c consistently use "product<SPACE>" 2004-08-05 01:48:09 +00:00
bouyer 1f5d4dd9dd Change wdc_kill_pending() to take a struct ata_drive_datas * as argument,
and kill only pending requests for this drive.
Implement a DRIVE_WAITDRAIN flag, which will cause the active command to
be killed once complete.
Other minor fixes.
Now it's possible to detach a ATA or ATAPI device from ioctl even when
a dd on the raw char partition is running.
2004-08-04 22:44:04 +00:00
bouyer 199ceb3ad6 Remove an unused prototype. 2004-08-04 22:34:01 +00:00
bouyer 34ac50140e Fix some problems in the scsipi detach code:
- only call periph_switch->psw_start() if the device is active; if it is not
  psw_start() may try to access invalid data.
- remove the TAILQ_FIRST(&periph->periph_xferq) != NULL diagnostic in
  scsipi_kill_pending(). This can't be true at this point (unless the device
  was idle at the time of the detach), because the scsipi channel kernel
  thread has to run for the queue to be flushed.
There are still other problems to be fixed here ...
2004-08-04 22:25:45 +00:00
mycroft 84ba128180 Regen. 2004-08-04 19:29:05 +00:00
mycroft 4460f20125 Normalize more names. 2004-08-04 19:28:52 +00:00
mycroft b648650d43 Regen. 2004-08-04 19:13:20 +00:00
mycroft d82da8f77c Normalize some product names. 2004-08-04 19:13:06 +00:00
drochner 7ba5b8cd09 adapt for changed essattach() signature 2004-08-04 18:55:06 +00:00
drochner 955c2f909d This is definitely what the world has been waiting for:-)
Allow to enable the game port on an ES1888, in case the firmware didn't
this. (Otherwise we still rely on the firmware having mapped the sound
related registers.)
Limit this to the "isa" attachment for now because this is the only
one I'm able to test.
Attach the "joy" device directly at "ess" to make sure the port is
enabled before the "joy" probe/attach.
This makes the joystick port usable on a "PWS" alpha (Miata).
2004-08-04 18:53:55 +00:00
bouyer 9b0cc941a3 Add
struct ata_xfer *active_xfer
to ata_queue. Now the active xfer isn't the head of the queue any more,
this makes a few things easier (this will also help for tagged queuing
support).
Remove the WDCF_ACTIVE flag, test active_xfer != NULL instead.
clean up wdc_free_xfer() and kill_xfer().
Clean up wdc_reset_channel(), and make it issue a ATAPI_SOFT_RESET if the
active command is ATAPI.
In wdc_atapi_get_params(), use AT_WAIT | AT_POLL for ATAPI_SOFT_RESET,
so that we'll use tsleep() instead of delay().
In wdc_atapi_start(), call wdc_dmawait() at the right place.
2004-08-04 18:24:10 +00:00
mycroft fafdc69d20 Regen. 2004-08-04 17:18:19 +00:00
mycroft 4a0d5c9481 Remove vendor names from product strings. 2004-08-04 17:18:01 +00:00
bouyer bedea96dd4 First cut at implementing ATABUSIODETACH. Still buggy. 2004-08-03 22:37:19 +00:00
bouyer a861f41a39 wddetach(): move lockmgr(LK_DRAIN) near the end; otherwise we'll panic in
wddone() (vdevgone() may end up calling it) trying to get the lock.
wdopen(): check for DVF_ACTIVE.
2004-08-03 22:03:46 +00:00
bouyer 9ad121a77a move cleaning of the bad block list in wddetach() after the call to
disk_detach(), to avoid a race condition with the interrupt code.
2004-08-03 21:38:45 +00:00
dyoung 49dce0aac4 Synchronize with the WEP code in madwifi. Konstantin KABASSANOV
verified for me that this fixes his WEP problems.  The HAL ABI for
WEP had changed.
2004-08-03 20:06:54 +00:00
drochner 8269afa5b8 Check return values of config_detach() for child devices and abort
our own detach() on errors.
2004-08-03 18:42:30 +00:00
drochner fc7a65f1b4 use joydetach() now that we have it 2004-08-03 18:38:52 +00:00
drochner a7962d35bd implement device detach support 2004-08-03 18:35:21 +00:00
scw 14cb917552 Support the DS75; a variant of the LM75 but with a slightly different
data format.
2004-08-03 13:40:20 +00:00
he 8c0706bddd Remove include of "opt_wsmsgattrs.h" here, since that's already done
by wsdisplayvar.h.  Fixes build problem for sparc.
2004-08-03 11:16:30 +00:00
bouyer 73203a8277 Make it possible for (*dma_finish)() to abort quietly a DMA op. Use this
in wdc_reset_channel().
2004-08-02 22:20:54 +00:00
bouyer 495631e4d6 Clean up interraction between wdc_reset_channel and the kernel thread.
Move kill_xfer() after the reset, and stop the DMA engine if needed
(this will unload the DMA maps).
2004-08-02 22:02:35 +00:00
bouyer 83b6847565 Don't map the interrupt in pciide_mapregs_compat().
In default_chip_map() we'll do further checks to see if the channel should
really be enabled, and in case it's not we would keep the interrupt mapped.
Fix kern/26502 from Christian Biere.
2004-08-02 19:37:33 +00:00
mycroft beb23a14d8 3 things:
* cardbusdevs -> pcidevs
* Add a Microsoft product.
* Use tlp_cardbus_{disable,enable}() in the powerhook.  This is an experiment
  and may need more work.
2004-08-02 19:31:52 +00:00
mycroft ec8913fec8 Minor name change to match other stuff in pcidevs. 2004-08-02 19:26:51 +00:00
mycroft bbbba5ecef Regen. 2004-08-02 19:25:46 +00:00
mycroft 909bd9c460 Add a device I missed. 2004-08-02 19:25:35 +00:00
mycroft 5c2c1be773 Remove. 2004-08-02 19:15:16 +00:00
mycroft eed3298a3c cardbusdevs -> pcidevs 2004-08-02 19:14:28 +00:00
mycroft 606b77842f Regen. 2004-08-02 19:10:48 +00:00
mycroft 90657a50ca Merge in data from cardbusdevs. 2004-08-02 19:10:35 +00:00
bouyer 574dd00e11 If acknowledge "bogus" interrupts (that is, interrupts that have happened
according to the controller-dependant registers while wdc was not waiting for
an interrupt). A reset can generate spurious interrupts (or even a flow of
spurious interrupts on the promise) that needs to be properly acknowledged.
2004-08-02 19:08:16 +00:00
mycroft 67f6588883 Adapt to pci_findvendor() change. 2004-08-02 18:44:56 +00:00
mycroft bedcb9569b Regen. 2004-08-02 18:43:53 +00:00
mycroft 31a80e2d68 For the PCIVERBOSE case, separate vendors and products into separate tables.
Eliminating redundant pointers in the tables saves nearly 20K (20% of the table
size).  In the process, add a pci_findproduct() and make that and
pci_findvendor() return a "const char *".
2004-08-02 18:43:38 +00:00
mycroft 6b2c766b7e Regen. 2004-08-02 17:58:51 +00:00
mycroft 883e3cb011 Mmmm, Microsoft products. 2004-08-02 17:58:29 +00:00
joda c3800782de bridge memory and lower prefetch memory ranges are only 12 bits wide 2004-08-02 14:50:36 +00:00
drochner f0a8ebbee2 avoid a questionable pointer type cast 2004-08-02 13:04:58 +00:00
bouyer 011181ac3e Implement an atabus control device, and define some ATA bus control
IOCTLS. Implement ATABUSIORESET, which will reset the given ATA bus.
2004-08-01 21:40:41 +00:00
mycroft b4ae48a794 Add binary versions of firmware images, which will be used Soon. 2004-08-01 19:31:46 +00:00
bouyer 7ffa35d1a2 Implement asynchronous channel reset.
Use this to reset the channel before doing a dump, instead of the hack in
  wdc_exec_xfer() based on C_POLL. This hack was causing problems on
  controllers with a shared queue, because we now can have C_POLL set during
  concurent channels probes (problem found and analysed on sparc64 by
  Martin Husemann).
This should even make core dumps marginally more reliable on ATA drives.
2004-07-31 21:26:42 +00:00
mrg 5f5ece3320 add several definitions useful for ICH-based speedstep.
(from linux and freebsd.)
2004-07-31 17:28:36 +00:00
jmmv 9a0019380f Implement the replaceattr emulop. 2004-07-30 22:36:39 +00:00
jmmv 1dea55cc2e Fix the eraserows operation, which was using an incorrect value to paint
the background.  The problem was exposed when setting a non-black color
as the background, as the shift did not produce the expected fill value
(for black it worked because 0 is black).
2004-07-30 21:46:01 +00:00
mycroft 85e28ec5ee Only discard beacons in AHDEMO mode, where we ignore management frames
completely.  In particular, accept them in monitor mode (where we generally
aren't doing anything unless we're in promiscuous mode anyway) and host-AP
mode (where we want to see neighbor APs).
2004-07-30 17:40:57 +00:00
jmmv cda2a3bba1 Fix initialitzation of border color at boot time through the
WSDISPLAY_BORDER_COLOR option, broken by a last-minute change.
Pointed out by xtraeme@.

Also back out the previous change by dogcow@, which was an attempt
to fix kernel builds that didn't define WSDISPLAY_CUSTOM_BORDER;
shouldn't be needed now.  (Problem also introduced by the same
last-minute change; sorry).
2004-07-30 10:47:20 +00:00
dogcow 4ebba2e5cb let kernels that don't have WSDISPLAY_CUSTOM_BORDER compile again. 2004-07-30 07:40:26 +00:00
jmmv 2a08d54a9a Implement border color customization in wscons(4), only available for vga(4)
at the moment.

This includes the addition of two new wsdisplay ioctls, WSDISPLAY_{G,S}BORDER,
one to get the actual color and one to set it, respectively.  Possible colors
match those defined by ANSI (and listed in wsdisplayvar.h).

It also adds two accessops to the underlying graphics device, getborder and
setborder, which mach their ioctl counterparts.

Two kernel options are added: WSDISPLAY_CUSTOM_BORDER, which enables the
ioctls described above (to customize the border color from userland after
boot), and WSDISPLAY_BORDER_COLOR, which sets the color at boot time.
The former is enabled by default on the GENERIC kernel, but not on INSTALL
(among others).  The later is always commented out, leaving the usual black
border as a default.

wsconsctl is modified to allow accessing this value easily.  For example,
'wsconsctl -d -w border=blue'.
2004-07-29 22:29:35 +00:00
drochner fd293d10fd remove some typecasts to "cfmatch_t" which are obviously relicts from
__BROKEN_INDIRECT_CONFIG times
2004-07-29 18:39:00 +00:00
drochner 04a2fc0f5a make the "generic" PCI bus enumeration code the standard case which
gets used if nothing else is defined in MD headers,
introduce a "PCI_MACHDEP_ENUMERATE_BUS" CPP definition which can
be used by MD headers (just 1 port atm) to plug in special code
2004-07-29 16:51:01 +00:00
cube 5258679d27 Regen. 2004-07-29 12:12:08 +00:00
cube b9eaa43c97 Add a bunch of devices that are in the Dell Dimension 8400 sitting on my
desk:  ATI Radeon X300, Broadcom BMC5751, Intel 915 chipset family (ICH6).
2004-07-29 12:11:31 +00:00
he 20304167d0 Add entries for TI CardBus bridges 1520 and 4520Yenta, as found in
IBM ThinkPad 40p and 41p respectively, so that the CardBus probes and
works on those machines.  Fixes PR#26380.
2004-07-28 15:32:49 +00:00
jmmv bc47208cb0 Forgot to define WSDISPLAY_CUSTOM_OUTPUT here. 2004-07-28 15:12:07 +00:00
jmmv 92f81ea7d3 Implement support to dynamically change wscons console and kernel colors.
Two new ioctls are added to the wsdisplay device, named WSDISPLAY_GMSGATTRS
and WSDISPLAY_SMSGATTRS, used to retrieve the actual values and set them,
respectively (the name, if you are wondering, comes from "message attributes").

A new emulop is added to the underlying display driver (only vga, for now)
which sets the new attribute for the whole screen, without having to clear
it.  This is optional, which means that this also works with other drivers
that don't have this new operation.

Five new kernel options have been added, although only documented in
i386 kernels (for now):
- WSDISPLAY_CUSTOM_OUTPUT, which enables the ioctls described above to
  change the colors dynamically from userland.  This is enabled by default
  in the GENERIC kernel (as well as others) but disabled on all INSTALL*
  kernels (as this feature is useless there).
- WS_DEFAULT_COLATTR, WS_DEFAULT_MONOATTR, WS_DEFAULT_BG and WS_DEFAULT_FG,
  which specify the default colors for the console at boot time.  These have
  the same meaning as the (already existing) WS_KERNEL_* variables.

wsconsctl is modified to add msg.default.{attrs,bg,fg} and
msg.kernel.{attrs,bg,fg} to the display part, so that colors can be changed
after boot.

Tested on NetBSD/i386 with vga (and vga in mono mode), and on NetBSD/mac68k.
No objections in tech-kern@.
2004-07-28 12:34:02 +00:00
dyoung 110ceded85 Finalize import of the Atheros HAL 0.9.9.13, bringing ath(4)
up-to-date where the HAL API changed.
2004-07-28 08:57:40 +00:00
dyoung 6f9ff5e059 Vastly simplify ieee80211_ibss_merge, eliminating the needless
callbacks.  Change the reference IBSS-merge implementation in atw
to match.
2004-07-28 08:12:49 +00:00
dyoung 24fb56e3b4 Cancel scan callout when the device detaches. Pointed out by Todd
Miller.
2004-07-27 23:57:02 +00:00
he 00e7d35ef0 Make the SSLOTS, MSLOTS and JSLOTS tunable (redefineable).
Bump the default values for these to the values used by FreeBSD,
and also adjust ti_init_rx_ring_jumbo() to use the same constant
that FreeBSD uses.  Yes, this consumes more kernel memory.

The effect of this is that you can use jumbo frames in a back-to-back
setup with TCP windows up to about 250KB and get ~930Mbit/s throughput,
while we were earlier limited to around 3-400Mbit/s, and trying to push
above that mark by widening the TCP window caused
  ti0: jumbo buffer allocation failed
messages to be logged and a corresponding stall in the traffic.
2004-07-27 07:59:51 +00:00
christos 1584cf1af7 regen 2004-07-27 01:01:17 +00:00
christos 81f4a7cae8 add compaq advanced systems management controller. 2004-07-27 01:01:00 +00:00
rumble dd003a35bd Add support for the controller found on the AMD (previously
NatSemi) Geode SC1100 controller (as found on the Soekris
NET4801). The chip has two bugs: the first requires dword
alignment, and the second cannot handle exact 64K transfers.

Also, fix a few typos while we're here.

Timings from FreeBSD. Reviewed by Manuel Bouyer.
2004-07-27 00:19:27 +00:00
rumble b6465064a7 regen. 2004-07-27 00:13:11 +00:00
rumble 611930ca2d Fix typos in the SC1100 IDE and AUDIO ids. 2004-07-27 00:12:10 +00:00
christos 452b7e16cb jason says that it is unclear if the new device is compatible with the old
one so disable it for now.
2004-07-25 18:04:52 +00:00
christos 34c5d0dc13 Match viatech's power controller (Sergio Jimenez) 2004-07-25 16:07:08 +00:00
christos 8d9bd7465d regen 2004-07-25 16:05:05 +00:00
christos cc5376ee65 Add viatech's VT8231 Power controller. (Sergio Jimenez) 2004-07-25 16:04:22 +00:00
dyoung ce488d2bf7 Pull the IBSS merge logic out of atw and into net80211, since ath
will eventually share it.

In the IBSS merge logic, check conditions in a different order so
that they run faster in the common case---no merge.  Fix the
rate-limiting on the debug outputs (enabled by IFF_LINK0).
2004-07-24 23:53:49 +00:00
christos a3a9698bfd PR/26420: Thilo Manske: lm(4): Add support vor environment controller
built into iTE 8705f
Also: change some memcpy's to strlcpy's and some (0)'s to 0's
2004-07-24 18:59:16 +00:00
mrg 5b576a585b match LeadTek's original PCI vendor ID as well as the 3-alternates
when setting CARD_LEADTEK.  now with just

	options BKTR_SYSTEM_DEFAULT=BROOKTREE_PAL

i get a shiny happy working card on my macppc box:

bktr0 at pci1 dev 18 function 0
bktr0: interrupting at irq 52
bktr0: Leadtek WinFast TV2000/VC100, Philips FR1216 PAL FM tuner.
2004-07-24 12:52:45 +00:00
mrg 6c81cd39b8 Hauke Fath's port of the openbsd SUNW,spif driver from PR#26061.
the driver was originally written by Jason L. Wright.

XXX: i haven't tested this on sparc64 at all...
2004-07-24 12:45:00 +00:00
mrg 0dcb65e9d4 add spif to sparc & sparc64 2004-07-24 12:40:38 +00:00
mrg 5df9a04912 Hauke Fath's port of the openbsd SUNW,spif driver from PR#26061.
the driver was originally written by Jason L. Wright.

XXX: i haven't tested this on sparc64 at all...
2004-07-24 12:37:20 +00:00
dyoung c743c6b066 Doh, we really do need to set bit ATW_NAR_MM in ATW_NAR, or else
no multicast packets are let through.
2004-07-24 04:59:01 +00:00
dyoung 32dee95c54 Add atw_nar_init, atw_next_scan prototypes (thanks Todd Miller)
and sort prototypes.

In-line atw_tsft.
2004-07-24 01:26:20 +00:00
mycroft f526e7326b Cleanup of ieee80211_node from madwifi:
* Don't use ifp pointers; use ieee80211com.
* Implement the locking macros that are used under FreeBSD and Linux.
2004-07-23 10:15:13 +00:00
mycroft 64f68f9cf8 Fix mismerge. 2004-07-23 08:36:01 +00:00
mycroft 50d44f4f07 IEEE80211_F_WEPON -> IEEE80211_F_PRIVACY 2004-07-23 08:31:39 +00:00
dyoung f63e03e538 Instrument atw(4) delays so that I can experiment and shorten the
conservative delays that I derived from the reference driver.
2004-07-23 07:20:44 +00:00