Commit Graph

72516 Commits

Author SHA1 Message Date
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
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 6d0330a781 Add {spc,xirc,mhzc}@pcmcia. All tested on a Multia. 2004-08-09 14:16:02 +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
yamt 49b8d40924 #if SYSCTL_INCLUDE_DESCR -> #ifdef SYSCTL_INCLUDE_DESCR 2004-08-09 08:35:23 +00:00
junyoung 0889de87d0 xi -> xirc,com,xi 2004-08-09 05:23:52 +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
jdolecek b43cbaf291 fix two bugs in previous:
* flags passed from fork1() are FORK_*, not CLONE_*; thus, correct is to check
  for FORK_SHAREVM, not CLONE_VM
* fix a reference counting bug
2004-08-08 19:52:37 +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 ca7dc95cab Enable DDB history by default. 2004-08-08 16:38:50 +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
rearnsha df8fa882b3 Add UVMHIST tracking for data and prefetch aborts. 2004-08-08 14:21:29 +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
jdolecek 9aba366e0b Linux enforces CLONE_VM if CLONE_SIGHAND in clone(2) is specified,
follow the suit - this is intended to be Linux-compatible call
2004-08-08 11:02:10 +00:00
jdolecek 142def6b36 pass the fork flags down the emulation proc fork hook 2004-08-08 11:00:05 +00:00
kent c525acb34a VT1616i support 2004-08-08 10:41:57 +00:00
yamt 28b17ac69e in_control: fix address leaks on error, which causes a panic
("no domain for AF 0") on if_detach.
- SIOCAIFADDR, SIOCSIFADDR: free an address on error.
- SIOCSIFNETMASK, SIOCSIFDSTADDR: reject operations for an interface which
  has no AF_INET addresses.

partly from OpenBSD and FreeBSD.
reviewed by Christos Zoulas on tech-net@.
2004-08-08 09:52:41 +00:00
yamt 9cc3176930 kvtopte: use a correct base addr for LARGEPAGES. 2004-08-08 09:47:05 +00:00
jdolecek a714ac8294 linux processes sharing VM space (via clone() call) must also
share same 'break' value used for brk()/sbrk(), otherwise application SIGSEGVs
quickly once different threads try to adjust data segment size

this fixes linux Mozilla crashes with SuSE 9.1 libraries, and possibly
other linux applications using real threads
2004-08-08 09:40:50 +00:00
yamt a37fba2a04 correct VAs in a comment. 2004-08-08 09:40:48 +00:00
yamt b606f3e999 reduce gratuitous whitespace/comment differences from i386. 2004-08-08 09:38:50 +00:00
mycroft e4250cc050 Nuke an extra printf(). 2004-08-08 09:23:01 +00:00
mycroft 958716ead8 xi -> xirc,com,xi 2004-08-08 08:54:43 +00:00
jdolecek 74436be135 pass the fork flags down to the emulation fork hook, so that emulation
code can use the information for setup
2004-08-08 08:42:03 +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
briggs fae6b577a8 Recognize the VIA Nehemiah by name.
Probe the VIA cache.
Add to, don't step on, feature flags when looking at extended feature
    flags in VIA's 0x800000001 CPUID response.
2004-08-08 05:21:01 +00:00
briggs bd2376263b VIA C3 cache info. 2004-08-08 05:16:16 +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
chs 7732d6db9d handle T_CONDITION traps (by sending SIGFPE).
fix T_EXCEPTION code to handle the other FP major opcodes.
2004-08-07 21:47:05 +00:00
chs 43d9a77774 remove the alignment attribute from the typedef of __cpu_simple_lock_t
since it doesn't have any affect and lint chokes on it.
2004-08-07 21:42:10 +00:00
chs 1974de97c5 stub out the ldcw stuff for now, since gcc -O2 chokes on it. 2004-08-07 21:41:44 +00:00
chs 2e5e9111d9 clean up some register naming. 2004-08-07 21:41:18 +00:00
chs 5dd3057b5c replace some spinlock/tsleep code with a lockmgr lock. 2004-08-07 21:40:47 +00:00
chs 272b73cf0a use CALL() instead of "bl" in a few more places. 2004-08-07 21:40:05 +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 5e289bdf22 Don't pass in a MAC address -- yet. 2004-08-07 17:27:30 +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
rearnsha f506c2b14b Bah! Fix tyop CORE_UNKOWN_HANDLER -> CORE_UNKNOWN_HANDLER 2004-08-07 12:20:20 +00:00
rearnsha eb40e03a12 Use SYSTEM_COPROC. 2004-08-07 12:07:08 +00:00
rearnsha 2d02f2af34 Add SYSTEM_COPROC (cp15). 2004-08-07 12:05:54 +00:00
rearnsha 548ccf50bd Use FPA_COPROC instead of a manifest constant. 2004-08-07 12:04:05 +00:00
rearnsha 3de3493771 FP_COPROC* ->FPA_COPROC* 2004-08-07 12:02:36 +00:00
rearnsha 9264ede43d Changing the interrupt mask is a scheduling barrier. 2004-08-07 11:47:58 +00:00
rearnsha b0a3a4309a Don't overload the unknown instruction handling for the core onto CP0.
Instead, add a seventeenth 'co-processor' specifically for the core.
Add support for ARMv5 unknown instructions in the 'NV' space.
2004-08-07 11:45:41 +00:00
rearnsha 951ec8627f Don't use vector_page before it's been initialized. 2004-08-07 11:20:53 +00:00
rearnsha da975d6d89 Fix pasto error in comment. 2004-08-07 11:13:09 +00:00
rearnsha 5b0328df32 Add barriers to prevent scheduling of critical code outside of the
SPL-protected region.
2004-08-07 11:08:58 +00:00
rearnsha 0163f96e43 Add fixed configs for fxp0 and sd0 booting. 2004-08-07 11:00:06 +00:00
rearnsha 0e811ff437 Support probing the compact PCI bus. 2004-08-07 10:54:54 +00:00
rearnsha 7c8434c371 Set CPUFLAGS not COPTS 2004-08-07 10:47:19 +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