mycroft
3ebcfd93ee
Forget to reset to memory mode on power up.
...
The hd64465 looks a bit incomplete, but "not my problem".
2004-08-11 06:30:15 +00:00
mycroft
7e4288f8a6
Attempt to fix these up, but I have no way to test them.
2004-08-11 06:16:10 +00:00
mycroft
9de9d325ad
And the settype pointer.
2004-08-11 06:05:21 +00:00
mycroft
d54277f76c
Do not ever set IOIS8. We are not running on an 8088.
2004-08-11 04:35:35 +00:00
mycroft
8f96fc7c75
Always use PCMCIA_WIDTH_AUTO rather than PCMCIA_WIDTH_IO16. This spec is
...
pretty clear on how this works.
2004-08-11 04:25:28 +00:00
mycroft
310c1dab88
Do the read of the MAC address before enabling the function the first time,
...
so we're still in memory mode.
2004-08-11 03:56:03 +00:00
mycroft
70c487b124
Add a settype() function. Also clear the window enables when powering up or
...
down a socket, just to be safe. (I've had problems with WinCE trashing my CF
card if there's state left behind...)
2004-08-11 01:54:46 +00:00
mycroft
8605b5b9c0
Nuke the address windows earlier, before the socket is powered up. Just in
...
case there are remnants left behind.
2004-08-11 01:51:41 +00:00
perseant
a315d33325
Allow compilation in the absence of DIAGNOSTIC and/or DEBUG options.
2004-08-11 01:23:47 +00:00
mycroft
33ee9cbce7
Oops; fix a compile error.
2004-08-11 01:05:42 +00:00
mycroft
51be90e8ac
Be more liberal in torching the old state in the disable and settype routines.
2004-08-11 01:04:40 +00:00
mycroft
38ce741470
Clear IOIE in settype(), too. Not that we currently change modes without
...
powering down the socket, but...
2004-08-11 00:59:40 +00:00
mycroft
d978001d30
Clear some more ICR0 bits on socket enable/disable.
2004-08-11 00:58:08 +00:00
mycroft
b9798ff4a2
Add a settype() function.
...
XXX Note that I haven't even compiled this, but any problems are likely to be
more straightforward than crashing with a null pointer dereference.
2004-08-11 00:55:38 +00:00
mycroft
faaea66252
Fix uninitialized variable warnings (which did not appear on x86).
2004-08-11 00:32:44 +00:00
mycroft
a23e15bcbe
Rather than having a call up from the low-level driver to get the card type,
...
instead have a call down from the PCMCIA mid-layer to set it. Use this from
pcmcia_function_enable(). (Currently the policy is the same, but this would
allow for more flexibility in deciding which mode to use.)
Now it is safe to hold the socket enabled during attach, so do that. Only
one enable/disable cycle to attach a card now!
2004-08-11 00:18:18 +00:00
mycroft
a6bd4c05d7
GC some unneeded struct elements.
2004-08-10 23:34:32 +00:00
mycroft
76ad292990
Move the socket reference counting into pcmcia_socket_{enable,disable}(), and
...
use that where needed.
2004-08-10 23:34:06 +00:00
mycroft
32dee96c25
Hold a reference between atabus_attach() and atabusconfig() to avoid an extra
...
enable/disable cycle. Now my CF card attaches a bit faster.
XXX This code is split strangely between files.
2004-08-10 23:09:38 +00:00
mycroft
8c50dac2a1
Rather than the silly state machine, set whatever higher-level reference
...
count there is (for SCSI, adapt_refcnt) to 1 and call the appropriate
"delref" function afterwards to disable the controller. This is a bit
simpler.
In a couple of cases, just remove the state machine, because it wasn't
really necessary.
2004-08-10 22:49:12 +00:00
dyoung
90691ca787
Cosmetic: remove extraneous blank line.
2004-08-10 21:58:31 +00:00
mycroft
c2ecd3e635
Update to the new world order. While I'm here, simplify a lot.
2004-08-10 21:14:50 +00:00
mycroft
0a960e80ec
+cs@pcmcia
2004-08-10 20:50:11 +00:00
mycroft
8355db5e7a
Update to the new world order.
2004-08-10 20:47:17 +00:00
mycroft
ab96663a2a
Use the right function for disabling after attach.
2004-08-10 20:25:03 +00:00
mycroft
22d0dd0aab
Whoops. This goes with the esl_pcmcia.c commit.
2004-08-10 19:55:20 +00:00
mycroft
2f2f7913ed
This code was pretty far from even compiling before. It also doesn't implement
...
detach support. However, update other parts of it.
2004-08-10 19:54:30 +00:00
mycroft
a2606a74af
Update to the new world order.
...
XXX This driver's backend should really be merged with ess.
2004-08-10 19:47:11 +00:00
mycroft
43a768d1a7
Remove an extra printf().
2004-08-10 19:23:21 +00:00
mycroft
8534032c92
Constify.
2004-08-10 19:20:20 +00:00
mycroft
bf4a3f1523
Whoops, look at both the ID numbers and the CIS strings in each pcmcia_product.
...
It's dumb that drivers depend on this, but...
2004-08-10 19:15:08 +00:00
mycroft
96221eb572
Constify.
2004-08-10 19:12:25 +00:00
mycroft
1e7c425a39
Replace another home-grown matching function.
2004-08-10 19:08:37 +00:00
drochner
5a11f34433
The amd64 address space layout is different.
...
We can't assume that kernel addresses are below
VM_MAX_KERNEL_ADDRESS.
2004-08-10 18:57:09 +00:00
mycroft
3a3d934204
Regen.
2004-08-10 18:45:36 +00:00
mycroft
99e8c8ddca
Copyright maintenance.
2004-08-10 18:45:25 +00:00
mycroft
0515828a46
Now that all the silly string printing is gone, move the location where we
...
print a newline so it doesn't have to be done in every driver.
2004-08-10 18:43:49 +00:00
mycroft
adbea3511a
Enhance pcmcia_product_lookup():
...
* Remove the "expected function" value. This was just causing problems with
multifunction cards. Differentiating the functions is better done by
checking the function type (which we now do in ep and sm).
* Add support for matching CIS strings. This necessitated changing the calling
pattern a little too.
Use this enhanced version rather than driver-specific versions that do the
same thing.
Also, remove the last vestiges of PCMCIA_STR_*.
2004-08-10 18:39:08 +00:00
mycroft
f185d2861f
Remove some CIS strings that we don't actually want to match on -- in some
...
cases they contain minor revision numbers, and one was even someone's MAC
address!
2004-08-10 18:00:15 +00:00
mycroft
e489df60f6
Take a shot at updating this to the new world order. Hopefully someone will
...
test it for me...
2004-08-10 16:43:47 +00:00
mycroft
d11fb31edb
More careful about cleaning up pointers.
2004-08-10 16:04:16 +00:00
mycroft
f1b2ffd886
Hold a reference to the adapter until scsibus_config() has been called. This
...
avoids an extra enable/disable cycle on removable controllers (i.e. PCMCIA).
2004-08-10 15:46:44 +00:00
mycroft
70ca4b2fa7
Print diagnostics in only one place if intr_establish() or function_enable()
...
fails.
Also, be a little more careful about passing up error values, and consistently
clear our interrupt handler pointer.
2004-08-10 15:29:56 +00:00
mycroft
90f47f6065
Better fix for the previous.
2004-08-10 08:57:50 +00:00
mycroft
8ccc950011
Copyright maintenance.
2004-08-10 08:56:08 +00:00
mycroft
51376df968
Fix a reference count problem I introduced here.
2004-08-10 08:29:27 +00:00
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