Commit Graph

129660 Commits

Author SHA1 Message Date
skrll
adf5c92842 Include <sys/cdefs.h> once. 2004-08-10 07:35:53 +00:00
mycroft
03515f2f84 Update to the new world order.
XXX Note: This eliminates some register writes that were done in the "init"
routine during attach.  If these are necessary, they need to do done somewhere
else, quite possibly the enable routine.
2004-08-10 07:04:19 +00:00
mycroft
aebf4d4a6e Update to the new world order. 2004-08-10 07:03:14 +00:00
mycroft
4160a45384 For the c400, set 5380 compatibility mode on every pass through the reset
routine.  The PCMCIA attachment, at least, needs this.
2004-08-10 07:00:30 +00:00
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
rumble
6b72b5c789 In getkey(), check the return values of the various keygen functions
and abort if necessary. Also, check for errors in its callers and
handle them gracefully.

OK'd by elric.
2004-08-10 02:29:34 +00:00
rumble
3db339be14 Avoid dereferencing/free()ing invalid pointers if the random device
cannot be opened.

OK'd by elric.
2004-08-10 02:27:26 +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
nathanw
fd8dc4c93f Remove some unused variables. 2004-08-09 22:39:32 +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
jschauma
1a12f82f4b If a files date is any time in the future (not six months or more),
use "date "+%b %e %Y"" format.  This is what SUSv3 says.
Ok jdolecek, dsl
2004-08-09 20:14:54 +00:00
nathanw
0ef0b5bfc2 nbsd_thread_unsuspend() doesn't need to get or look at the thread
info.
2004-08-09 20:14:22 +00:00
nathanw
82c8abbad2 Fix up a few error messages to correctly report what function they're
in.
2004-08-09 20:13:53 +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
1710cea8cf Enable DDB history. 2004-08-09 19:04:32 +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
chs
ed0b81628a move DBG settings to CPPFLAGS and COPTS as appropriate
so that we can use the default DBG now.
2004-08-09 16:01:37 +00:00