Commit Graph

4185 Commits

Author SHA1 Message Date
augustss 2769396f67 Add RECORD to the conversion table, otherwise we panic on boot.
The fact that we cannot record (yet) is found out later anyway.
2004-11-16 19:33:56 +00:00
xtraeme a32e5267fb Fix typo. 2004-11-16 17:15:01 +00:00
skrll 17000c110b Regen 2004-11-16 09:18:20 +00:00
skrll 09e4029fc5 Add Intel PRO/Wireless LAN 2200BG Mini-PCI Adapter 2004-11-16 09:17:20 +00:00
soren 9feb7a04f4 Regen. 2004-11-14 15:24:05 +00:00
soren 05f81f873e Add Mylex ExtremeRAID 1100.
Shorten ATI Technologies to ATI.
Simplify names of Intel mobile USB controllers.
2004-11-14 15:23:42 +00:00
kent af9ebe8723 auacer uses aurateconv 2004-11-13 15:15:56 +00:00
kent c1653144ff adopt auconv_set_converter() 2004-11-13 15:00:48 +00:00
kent ad6e9b1b34 device matching by pcireg_t, not a pair of vendor ID and product ID.
This change reduces 170 Byte of i386 kernel size.
2004-11-11 03:06:21 +00:00
cube 6f5a5c1814 Add support for the ICH6 AC97 controller. 2004-11-10 17:22:25 +00:00
cube 7d9f9f3cc2 Add support for the ICH6 IDE controller (82801FB). 2004-11-10 17:19:05 +00:00
cube cf1fc8341b Return an error when a read operation fails, instead of pretending it
succeeded and transmitting a bogus value.
2004-11-10 17:17:14 +00:00
wiz b764f86fae Fix typo in comment; from Sergey Svishchev. 2004-11-10 16:39:04 +00:00
cube a6f37c0203 In auich_calibrate, set sc_ac97_clock to a default value of 48000 first.
That way, if the calibration fails or times out, sc_ac97_clock won't be 0
and there won't be a division by zero later in ac97_set_rate.
2004-11-10 14:14:09 +00:00
kent a5158f56a8 remove unused variable 2004-11-10 04:22:31 +00:00
kent 145085fc2f move IS_FIXED_RATE(), SUPPORTS_4CH(), and SUPPORTS_6CH to ac97var.h 2004-11-10 04:20:26 +00:00
kent 7a23477c6c remove mixer setting code in *_attach() because ac97_attach() does it. 2004-11-09 16:28:14 +00:00
kent 5bea7e5b64 remove unnecessary ac97-related code 2004-11-09 15:57:11 +00:00
kent 57c1715e7b remove mixer setting code in yds_attach() because ac97_attach() does it. 2004-11-09 11:12:54 +00:00
kent 55c5f0f624 ANSIfy and style fixes 2004-11-08 12:10:22 +00:00
kent 971aa8f6c5 print dmesg correctly for VT8237 2004-11-08 06:20:58 +00:00
xtraeme 398264c31a Add support for:
NVIDIA nForce3 250 IDE Controller
NVIDIA nForce3 250 Serial ATA Controller

From Kouichirou Hiratsuka in PR 27843, ok'ed christos@
2004-11-06 08:44:25 +00:00
xtraeme 537252716c Add support for "nForce3 250 MCP-T AC-97 Audio", from Kouichirou Hiratsuka
in PR 27843.

Ok'ed christos@
2004-11-06 08:41:14 +00:00
xtraeme aef353dd52 Regen for:
Add Nvidia nForce3 250 chipset products, from Kouichirou Hiratsuka
in PR 27843.
2004-11-06 08:37:00 +00:00
xtraeme cc73961db1 Add Nvidia nForce3 250 chipset products, from Kouichirou Hiratsuka
in PR 27843.
2004-11-06 08:34:52 +00:00
xtraeme 2f0a18e581 Add another case to match "PCI_PRODUCT_INTEL_82815_FULL_HUB"
(Intel 82815 Hub) in agp_i810_attach(), closes PR 27863.

Ok'ed christos@
2004-11-06 07:43:30 +00:00
yamt e89aeb518a make recording of clct(4) work. namely,
- cs4281_intr: advance a pointer after copying data.
- cs4281_trigger_input: fix an inverted condition about dma mode.
2004-11-02 00:40:08 +00:00
mycroft 74c82c0ec4 Some miscellaneous cleanup:
* Encapsulate all the ring-specific variables into a substructure.  (This will
  help with some potential code sharing.)
* Don't bother with "last buffer complete" interrupts -- we should be taking an
  interrupt anyway because we set IOC on every buffer.
* Likewise, ignore CELV; it's meaningless to us.
* Get rid of the FIFO error counters, since this doesn't actually happen any
  more.
2004-11-01 06:25:35 +00:00
mycroft 170f82c2c3 Copyright maintenance. 2004-10-31 20:15:16 +00:00
mycroft 43670bc418 More code reduction.
Also, allow any sample rate between 8000 and 48000Hz.  (This range should
probably be larger, but this is what's known to work.)

Another 180 bytes shaved.
2004-10-31 20:00:42 +00:00
mycroft 62405c408b Shave another 112 bytes by reducing some divisions to shifts. 2004-10-31 19:28:31 +00:00
mycroft 53a18a1af1 Fix a regression -- my previous changes made the kernel slightly larger. 2004-10-31 18:30:52 +00:00
mycroft f37709ef90 In the trigger routines, start *all* the blocks, not just the first one. This
was causing some "fifo under/overrun" errors during the initial trigger.

Also fixes a ring synchronization problem introduced in the earlier changes.

This should completely fix the FIFO errors with auich.
2004-10-31 16:49:27 +00:00
mycroft 04699fb576 Reorder some register writes just to be safe. 2004-10-31 06:25:55 +00:00
mycroft 91c9307af1 Attempt to mitigate "fifo underrun" errors in two ways:
1) Update the queue pointers any time we get a block completion interrupt,
   not just when we hit the last block.
2) Set the "back-to-back enable" bit.
In addition:
3) Make sure we ack every block we transfer; there was a bug that could cause
   the audio layer to get out of sync.
2004-10-31 05:50:58 +00:00
thorpej e9818f5b5e When adding/deleting multicast addresses, only whack the address
filter if the interface is marked RUNNING.

Fixes kern/27678.
2004-10-30 18:08:34 +00:00
yamt 18f717bb90 constify audio_hw_if, midi_hw_if, and radio_hw_if. 2004-10-29 12:57:15 +00:00
cube cce3c2a9eb Add support for the BCM575x variants. They're close to the 5705 one, with
some special cases for the PCI-Express versions.  As there is no
documentation available, all of this is inspired from Linux or taken from
FreeBSD (itself inspired from Linux).  There are a lot of magic numbers.

Tested on two BCM5751 devices as found in newer Dell computers.
2004-10-28 07:36:05 +00:00
martti 05e2eaf818 Regen for Dell PERC 4/SC 2004-10-28 07:29:07 +00:00
martti ac15c84040 Align all SYMBIOS entries 2004-10-28 07:26:09 +00:00
martti 0ae886cb1b Added Dell PERC 4/SC 2004-10-28 07:22:23 +00:00
yamt 05f25dcc2a move buffer queue related stuffs from buf.h to their own header, bufq.h. 2004-10-28 07:07:35 +00:00
kent 15afb616fc add "hw.auichN.ac97rate" sysctl MIB to specify AC'97 link rate.
It is needed because automatic calibration by auich_calibrate() is not
so precise.

- Why not ioctl?
  It is not good idea to add a new ioctl operation to MI audio for
a specific audio device.
- Why not mixerctl item?
  AC'97 linke rate is not related to audio mixing.
2004-10-27 13:26:43 +00:00
augustss b729362224 Regen. 2004-10-26 11:31:17 +00:00
augustss fe432c40cc Add a vendor and some products. 2004-10-26 11:30:52 +00:00
xtraeme 2141f16fbe Fix typo in a comment: alalog -> analog. 2004-10-26 06:32:20 +00:00
scw 408aca554c Make artsata depend on sata. 2004-10-22 20:05:01 +00:00
cube 49440f65c0 Add support for the 82801FB/FR (ICH6/6R) SATA controllers. 2004-10-22 15:09:22 +00:00
cube a5a705f674 Regen. 2004-10-22 15:01:32 +00:00
cube e6c3f8fb8d Add two Broadcom devices (575x chips), correct and add a few Intel entries. 2004-10-22 15:00:50 +00:00
xtraeme 4db3ca891c Add another case to match "PCI_PRODUCT_AMD_SC761_SC" (AMD761 System
Controller) in agp_amd_match().

Ok'ed by christos@
2004-10-20 21:47:13 +00:00
martti b0dbe06f9f Regen for DELL PERC 4e/Si 2004-10-20 10:50:12 +00:00
martti ef476ebd05 Added support for DELL PERC 4e/Si RAID controller 2004-10-20 10:48:47 +00:00
heas 4cec10fd22 Adjust/add a few comments and add defines for PCS (aka GEM_MII) FSM and
interrupt registers.
drop some trailing WS.

no functional changes.
2004-10-17 21:49:08 +00:00
kent 3b95460806 no need to restore AC97_REG_EXT_AUDIO_CTRL value on resuming
because ac97_codec_if_vtbl::restore_ports() does it.
2004-10-17 09:10:28 +00:00
kent bac58e9eff add support for suspending/resuming.
patch provided by Rhialto in PR#26432
2004-10-17 08:46:39 +00:00
christos ed27e77c16 Bring back ALLOW_MEMIO change that was lost between 1.38 and 1.39. This
change reportedly makes the driver work on macppc. There must be a better
way of doing this (based on the chip revision?).
2004-10-17 01:10:44 +00:00
christos 6a5f6766d4 Make a commented out print statement compile and avoid wrapped lines.
No functional change.
2004-10-16 22:52:37 +00:00
bouyer 4c45710493 Add the dual-serial VScom PCI-200 adapter. Tested by Jukka Salmi. 2004-10-16 18:05:19 +00:00
augustss 4989f19412 Regen. 2004-10-13 18:44:09 +00:00
augustss 89b66b9ce9 Add ALi M1563 bridge. 2004-10-13 18:42:17 +00:00
drochner f62496141b support ADDI-DATA APCI-7800 8-port serial adapter 2004-10-13 14:15:16 +00:00
drochner f71b9f7aa1 regen 2004-10-13 14:14:41 +00:00
drochner 0f77727191 recognize ADDI-DATA APCI-7800 8-port serial adapter 2004-10-13 14:14:19 +00:00
jmmv 6876483b04 Regen after addition of ATI Technologies Radeon 9200SE Secondary identifier. 2004-10-11 13:05:39 +00:00
jmmv 76cc077b7f Add ATI Technologies Radeon 9200SE Secondary identifier. 2004-10-11 13:01:25 +00:00
augustss 932f692851 Add a driver for the Acer Labs M5455 audio controller.
This controller is integrated in some ALi Southbridges.

XXX This driver is incomplete and slightly buggy, but it
works enough to enable me to listen to music on my Sharp MM20.
2004-10-10 16:37:07 +00:00
dsainty 6ba20401df Corrected a scattering of typos in comments 2004-10-07 10:42:26 +00:00
thorpej 57024fd924 Define a WM_MAXTXDMA constant to represent the largest Tx DMA any given
packet will require.
2004-10-06 05:29:51 +00:00
thorpej 7ee6d38e39 Sync the Tx DMA map after offload stuff has been dealt with, since the
offload set-up digs into the packet.
2004-10-06 05:23:05 +00:00
thorpej eeee37654e Restructure the loop in wm_start() that passes over the DMA map segments
slightly to make it easier to drop in errata work-arounds that require
adding extra descriptors onto the end of the packet.
2004-10-06 00:04:01 +00:00
heas 3e34026e61 Add TWE_PARAM_PROC_PERCENT; completion percentage per-sub-unit (2 bytes/ea) for
initialize/verify/rebuild processes.
2004-10-05 23:49:15 +00:00
heas f931eb70ff Add TWE_OP_PROBEUNIT (0x7), which probes a drive (not associated with a unit
from the controller's POV) for unit information.  It's arguments mirror that
of TWE_OP_PROBE.
2004-10-05 23:31:32 +00:00
thorpej 09421fe870 Largest Tx descriptor buffer size is actually 4K. 2004-10-05 21:29:56 +00:00
thorpej d1c33ede84 Work around another problem (that causes horrible performance) on the 82547:
- Change the Tx:Rx on-chip RAM allocation ratio based on MTU:
  => 82547: > 8192 18K:22K, else 10K:30K
  => others: > 8192 24K:40K, else 16K:48K
  Values derived from Linux driver.
- On the 82547, keep track of how much of the Tx FIFO has been used.
  When in half-duplex mode, don't let packets wrap around the FIFO ring
  buffer, because that causes the chip to croak.  Detect this, stall the
  Tx queue, use a timer to wait for the packets to drain from the Tx FIFO,
  reset the internal FIFO pointers, and restart the Tx queue.  Basic
  algorithm (and some magic numbers) derived from FreeBSD and Linux drivers.
2004-10-05 20:14:52 +00:00
augustss 30c119625c Regen. 2004-10-05 11:58:17 +00:00
augustss 48f76da065 Add some ALI devices. 2004-10-05 11:57:22 +00:00
thorpej 0fdf8295f4 - Add some useful constants related to the Packet Buffer Allocation
register.
- Add the Receive and Transmit Data FIFO registers.
2004-10-05 02:17:21 +00:00
wiz 1486617536 Fix typo reported by Alexander Yurchenko in private mail. 2004-10-02 21:20:12 +00:00
cube 000afe4614 Regen. 2004-09-30 21:59:06 +00:00
cube 331512aeeb Add a bunch of devices found on the SuperMicro P4SCi motherboard. 2004-09-30 21:58:26 +00:00
yamt 81378f8ab8 - mbuf external storage is of (caddr_t), not (caddr_t *).
- remove a needless cast.
2004-09-29 11:22:03 +00:00
skd 25b218cbd7 Fix Yukon ram sizing.
Fix tx queue (slist can be corrupted when tx interrupts hit within tx_encap.
Lower interrupt moderation timer to (improves performance).
Improve chip identification. (from linux sk98lin driver).
Keep tx queue running by kicking the tx bmu repeatedly.
2004-09-26 14:23:58 +00:00
dyoung f5fc723f2b Add rtw(4). 2004-09-26 03:03:17 +00:00
dyoung 517a54fd17 Add Cardbus, PCI bus front-ends for RTL8180 802.11b MAC/baseband. 2004-09-26 02:33:36 +00:00
tsutsui 036acd9295 Use ANSI function decls. 2004-09-25 11:58:19 +00:00
heas afe3b1d559 Add TWE_OP_PROBE, which probes (and attaches) a port/drive. It's argument
is bytes 9 & 10 of the twe_cmd where the bit set corresponds to the port to
probe + 1 (ie: port 0 == 0x1).
2004-09-25 08:27:47 +00:00
heas 9d64f3ebc8 Take the modulus of the AEN queue tail number rather than the mask of. Now
the tail pointer advances properly.
2004-09-23 01:16:34 +00:00
heas ad8109e2b5 Typo in define; PhysSectorNym -> PhysSectorNum 2004-09-23 01:14:50 +00:00
kent 54cf6460d6 ac97_host_if::reset() returns non-zero value if codec reset fails, and
ac97 is not attached in that case.

PR: kern/26973
2004-09-22 12:20:24 +00:00
yamt 52f0c217f7 introduce M_EXT_RW to allow mbuf external storage R/W.
discussed on tech-net@.
2004-09-21 21:57:30 +00:00
martin 06e56dc6b2 Add support for PCI-X version of LSI FC929; from Bert Kiers in PR kern/26836. 2004-09-18 08:52:50 +00:00
martin 9d347457c2 Regen (FC929X added) 2004-09-18 08:48:29 +00:00
martin 7a56ae33d2 Add LSI FC929 (aka FC929X); from PR kern/26836. 2004-09-18 08:47:46 +00:00
enami 45bae472de Whitespace nit. 2004-09-17 23:04:02 +00:00
xtraeme 37db99c68f Regen for GeForce FX 5700 LE. 2004-09-17 18:05:27 +00:00
xtraeme 0c35004c2f Add GeForceFX 5700 LE and regen. 2004-09-17 16:04:17 +00:00
ragge 405ff27fa4 Regen. 2004-09-16 13:09:59 +00:00
ragge b592635459 Add S2io 10 Gigabit ethernet adapter. 2004-09-16 13:08:51 +00:00
drochner a91f239c72 fix botch in config_found conversion, found by Stefan Krueger 2004-09-14 18:57:35 +00:00
simonb 35817977ee Remove an unused event counter. 2004-09-14 08:40:26 +00:00
lukem ade2bb0154 Whitespace tweaks.
Remove vendor RCSID, since it's out of sync already (due to manual patches).
2004-09-14 00:38:37 +00:00
lukem 90a0bf7bae Use ieee80211_find_rxnode() function instead of ieee80211_find_node()
and ieee80211_ref_node().  From Damien Bergamini.
2004-09-14 00:35:10 +00:00
lukem 25429a05fb Correctly synchronize DMA mapping for transmission buffer descriptors.
From Damien Bergamini.
2004-09-14 00:34:19 +00:00
lukem 8c838d97d0 Improve monitor mode support. From Damien Bergamini 2004-09-14 00:32:55 +00:00
lukem 9e6574e2c2 Add IEEE802.11 radiotap support. From Damien Bergamini. 2004-09-14 00:31:20 +00:00
lukem 2cc0c73c82 Whitespace tweaks from Damien Bergamini.
Whitespace tweaks by me.
Remove vendor RCSID, since it's out of sync already (due to manual patchs).
2004-09-14 00:27:26 +00:00
drochner 96b589fc18 a round of autoconf cleanup:
-convert submatch() style functions (passed to config_search() or
 config_found_sm()) to the locator passing variants
-pass interface attributes in some cases
-make submatch() functions look uniformly as far as possible
-avoid macros which just hide cfdata members, and reduce dependencies
 on "locators.h"
2004-09-13 12:55:47 +00:00
drochner a987cab220 remove macros which just hide cfdata internals
(and are used at one place only)
2004-09-13 12:22:52 +00:00
darrenr ec6c370522 Regen'd to add Sierra Wireless AirCard 580 2004-09-10 13:59:07 +00:00
darrenr b5e2dc9cd7 Add Sierra Wireless AirCard 580 (1xEV-DO) 2004-09-10 13:56:32 +00:00
skd 2d0c1ccea9 Fill out correct cap variable so that DMA works again. 2004-09-05 05:07:41 +00:00
he 6c2143cef0 Make this driver recognize LSI Logic MegaRAID 320-2 RAID controllers.
Fixes PR#26834, patch from that PR.
2004-09-02 21:12:42 +00:00
drochner 46289e1fef Phase out the use of a string as first "attach args" member to control
which bustype should be attached with a specific call to config_found()
(from a "mainbus" or a bus bridge).
Do it for isa/eisa/mca and pci/agp for now. These buses all attach to
an mi interface attribute "isabus", "eisabus" etc., and the autoconf
framework now allows to specify an interface attribute on config_found()
and config_search(), which limits the search of matching config data
to these which attach to that specific attribute.
So we basically have to call config_found_ia(..., "foobus", ...) where
such a bus is attached.
As a consequence, where a "mainbus" or alike also attaches other
devices (eg CPUs) which do not attach to a specific attribute yet,
we need at least pass an attribute name (different from "foobus") so
that the foo bus is not found at these places. This made some minor
changes necessary which are not obviously related to the mentioned buses.
2004-08-30 15:05:15 +00:00
drochner 5fa053333d add centralized {eisa,isa,pci,agp,mca}busprint() functions which do
what tens of the bus' parents foo{...}bridge_print()s scattered around do
2004-08-30 10:30:38 +00:00
drochner 13e2ec357a there is (appearently) no reason for the "bktr" driver to carry a
"pcibus" attribute, so remove it
2004-08-30 10:10:34 +00:00
lukem ce0391e266 Minor cosmetic consistency tweaks, from Damien. 2004-08-27 00:02:02 +00:00
thorpej 96663f19df Use ANSI function decls, more static. 2004-08-26 18:38:19 +00:00
itohy 1d4f1abb08 Workbit NinjaSCSI-32 PCI/CardBus SCSI driver (njs) 2004-08-26 14:13:46 +00:00
itohy d1112abfcc Regen from pcidevs rev 1.647. 2004-08-26 13:16:08 +00:00
itohy 2e477d0c91 Add Workbit NinjaSCSI-32 PCI/CardBus products. 2004-08-26 13:14:59 +00:00
bouyer 89817e7217 Revert 1.12, it cause problems on promise controllers, as reported in
PR kern/26568 by Paul Shupak.
2004-08-23 21:30:35 +00:00
lukem 34a603de29 Add ipw(4) 2004-08-23 12:03:25 +00:00
lukem 6d906be913 NetBSD RCSID 2004-08-23 11:57:35 +00:00
lukem a91684ce5d ipw(4) - Intel PRO/Wireless 2100 driver.
Written by Damien Bergamini, from http://damien.bergamini.free.fr/ipw/
2004-08-23 11:42:02 +00:00
thorpej d0fcfb4c3a Use ANSI function decls and make use of static. 2004-08-21 23:48:33 +00:00
thorpej d17a849385 Use ANSI function decls and make use of static. 2004-08-21 22:48:18 +00:00
thorpej 383b485d9a Make the product table static. 2004-08-21 22:23:13 +00:00
nisimura 2ded7c9cd6 Redo the previous adjustment work. 2004-08-21 21:46:54 +00:00
nisimura e86b49fe3c Remove fluctuation of written name in alphabetical representation of
copyright holder.
2004-08-21 21:44:07 +00:00
thorpej 335b799580 atastart() (called only at splbio(), and from interrupts) can change
drive_flags, to make sure all drive_flags manipulations are done at
splbio().
2004-08-21 00:28:34 +00:00
thorpej 9cc521a148 Move most of wdc_softc into a new atac_softc structure that contains
info common to all types of ATA controllers.
2004-08-20 06:39:37 +00:00
thorpej 1600c8b8cd - Add and use a CHAN_TO_WDC() macro to get the wdc_softc from an
ata_channel.
- Add and use a CHAN_TO_WDC_REGS() macro to get the wdc_regs from an
  ata_channel.
- Add and use a CHAN_TO_PCIIDE() macro to get the pciide_softc from an
  ata_channel.
- Add and use a CHAN_TO_PCHAN() macro to get the pciide_channel from an
  ata_channel.  (This one just hides a cast, and is really just for
  consistency with the others.)
2004-08-19 23:25:35 +00:00
thorpej 65193a3b71 Protect against multiple inclusion. 2004-08-19 17:56:57 +00:00
drochner c67a72f6ff make PCI devices attachable/detachable (as far as the particular drivers
allow), and allow to rescan a bus selectively (ie only the device/
function I'm looking at)
2004-08-17 23:20:10 +00:00
enami 31c5dbae84 Dereference ch_wdc after filled. 2004-08-16 22:11:13 +00:00
mrg 2db238d57d fix a wrong variable name in a debug message. 2004-08-16 16:43:29 +00:00
mycroft 5111abd827 Simplify some manipulation of PCIC_INTR.
Further attempt to mitigate "bad Vcc" errors.
2004-08-16 15:46:37 +00:00
mycroft f0b8d692af Some tweaks, per the PC Card spec:
* Assert RESET before powering off a socket.
* Turn on the output enable bit earlier so the interface actually drives CEn
  and RESET.
* Tighten up the power-on timing a bit.
* Mention the specific timing values named in the spec.

For pccbb, be careful to always power off before zeroing PWRCTL.
2004-08-16 15:40:35 +00:00
mycroft 4ff9d12ea9 Do not attempt to fiddle with the power-control bits in PWRCTL; just read them
back after touching the PCI registers.

This shouldn't be necessary, but somehow the controller detects the need for
VPP2=12V and automatically applies it, and gives us a "bad Vcc" error if we
turn it off accidentally.
2004-08-16 14:48:56 +00:00
mycroft a6f02be621 And the reason we had to call pccbb_power() twice in the enable routine is...
we were writing to PCIC_PWRCTL in between and causing the socket to power off.
D'oh.
2004-08-15 20:19:14 +00:00
thorpej 4b51cecfc2 - Split the register handles out of struct wdc_channel into a separate
wdc_regs structure, and array of which (indexed per channel) is pointed
  to by struct wdc_softc.
- Move the resulting wdc_channel structure to atavar.h and rename it to
  ata_channel.  Rename the corresponding flags.
- Add a "ch_ndrive" member to struct ata_channel, which indicates the
  maximum number of drives that can be present on the channel.  For now,
  this is always 2.  Add an ATA_MAXDRIVES constant that places an upper
  limit on this value, also currently 2.
2004-08-14 15:08:04 +00:00
thorpej 46f4277564 WDCDEBUG -> ATADEBUG. 2004-08-13 04:10:49 +00:00
thorpej ab20886f7b Don't bother with bits that tell of the presence of optional callbacks;
just check the function pointers for NULL.
2004-08-13 03:12:59 +00:00
mycroft 306522b970 I can't actually use the FORCE register this way. Just try turning the socket
power off.
2004-08-12 13:42:17 +00:00
mycroft 6b8a90b3fe A bunch of random cleanup:
* Like the i82365 code, add a "delay" function that uses tsleep() to wait, and
  use this in the socket enable/disable paths.  This gets rid of the annoying
  system pauses during card insertion and removal.  (There are still some
  issues related to this in various drivers -- notably big delay()s in wi and
  xi.)
* Move the power-change delay out of pccbb_power() and into the PCMCIA backend
  code -- specifically, once in the disable path and once in the enable path.
  We were being pretty schizo about this before.  Make these use tsleep().
  (Note: This should be safe because card insertion/removal is handled by a
  kernel process, not in an interrupt handler.  It works for me with
  DIAGNOSTIC.)
* If we get a "bad Vcc" error, attempt to force the socket to power off, and
  return an error.  If we don't do this, we will get "bad Vcc" errors forever
  and never be able to use another card without rebooting, which is dumb.
  XXX I haven't been able to test this very well, because it doesn't fail for
  me in the first place.  :-)
* Clean up the socket mappings earlier in the enable path.
* Try to be consistent about clearing PWRCTL (which contains OE) before turning
  off power.
2004-08-12 07:15:49 +00:00
thorpej 77cc762658 Don't assume wdc-specific ATA / ATAPI code should be brought in if atabus
or atapibus are configured; use a separate wdc_common attribute to indicate
that the shared wdc code is also present.
2004-08-12 04:23:02 +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 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