Commit Graph

1035 Commits

Author SHA1 Message Date
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
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
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
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
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
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
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
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
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
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
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
mycroft
ea12e63610 Regen. 2004-07-17 19:55:28 +00:00
mycroft
af16b34b94 Remove ZONET ZEN. 2004-07-17 19:55:14 +00:00
mycroft
5bd875b764 A bit of cleanup:
* Change PCMCIA_CIS_* values that are empty to PCMCIA_CIS_INVALID.
* Use wildcard OUIs in a few more places.
* Steal a method for differentiating the AX88[17]90 from the Linux driver.
* Remove the ZoNet card entry; it's now a duplicate of the Compex entry.
2004-07-17 19:55:03 +00:00