Commit Graph

3802 Commits

Author SHA1 Message Date
fvdl 6a68a8b6c5 Don't use sizeof on a pointer when you mean the whole structure. 2004-10-04 11:23:39 +00:00
fvdl 5d83432e24 No need to print out sense data just because it happened to arrive in
a pkt. Wrap that in AHD_DEBUG.
2004-10-04 11:08:47 +00:00
bouyer 14068e2ca9 Add missing return, fix handling of Ignore Wide Residue messages. 2004-10-03 14:52:53 +00:00
yamt 5735ef17ab ex_add_rxbuf: use MRESETDATA macro. 2004-09-28 11:35:21 +00:00
yamt 478d44cb16 ath_getmbuf: check MCLGET failure. 2004-09-28 11:34:37 +00:00
dyoung 1b319e72be Simplify the BSSID synchronization code. 2004-09-28 00:42:11 +00:00
dyoung 3e9bdb9662 Add work-in-progress driver rtw(4) for Realtek RTL8180 MAC/baseband.
Add register definitions for Maxim MAX2820 and Philips SA2400 radio
front-ends.
2004-09-26 02:29:15 +00:00
tsutsui 036acd9295 Use ANSI function decls. 2004-09-25 11:58:19 +00:00
tsutsui a5c60861e8 Sprinkle DELAY(1)'s in several busy loops to avoid excessive bus access.
Inspired by OpenBSD.
2004-09-25 10:47:29 +00:00
tsutsui 30e4125256 On manual xfer via TEMP register, set PCTL_BFINT_ENAB and check
bus free by INTS register. spc_intr() also checks the INTS_DISCON bit.
2004-09-25 10:36:15 +00:00
tsutsui 45d871e0fb In spc_intr(), return 0 if the interrupt is not for spc(4). 2004-09-25 10:32:15 +00:00
tsutsui dc28263470 Use manual xfer via TEMP register in status phase even on x68k.
Some devices do not transfer data with proper way on status phase
and it causes bus error in spc_datain_pio() which uses auto xfer
via DREG register on weird x68k hardware.
2004-09-25 10:15:36 +00:00
tsutsui ae6239f109 Use ANSI function decls. 2004-09-25 09:46:17 +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
simonb 74b1235f26 Fix a typo in a comment. 2004-09-20 07:32:02 +00:00
chs b42337cb2a fix optimized compilation. 2004-09-19 23:00:29 +00:00
mycroft 7e54a3ad57 If we need to poll, set SCSIPI_ADAPT_POLL_ONLY rather than a homegrown flag. 2004-09-18 02:18:39 +00:00
martin 657b6abe1d Do not count ipackets twice. From Dave Barnes in PR port-i386/26906. 2004-09-16 10:02:59 +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 b04ad75025 use locator passing versions of xxxsubmatch() and simplify the code by
using arithmetics instead of case statements
2004-09-13 12:34:00 +00:00
he b119cd7a61 Enclose initialization of NCR_VARIANT_NCR53C400 in an ifdef on
NCR5380_USE_BUS_SPACE, to make this build again on acorn32, mac68k,
pc532, and sun3.  This is done under the assumption that it's
somewhat doubtful that any of those machines will encounter that
chip variant.

The acorn32 and mac68k parent drivers (csa and sbc) are listed in
ncr5380var.h as "easy to convert", but it's evident that noone have
stepped up to that challenge yet.  Sun3 and pc532 needs bus.h first,
which they apparently don't have at the moment.
2004-09-12 18:05:46 +00:00
bouyer a480086121 pool_prime() the ncr53c9x_ecb pool with one element (this will cause one page
to be allocated anyway). scsipi can deal with resources shortage, but if this
pool goes down to 0 pages we can deadlock with the scsipi_xfer, vnode or
inode pools.
Also update a comment, despite resources accounting we can return
ATAPTER_RESOURCES_SHORTAGE here.
2004-09-10 23:44:29 +00:00
enami 5cdda6c35f ath_debug is bitmask and takes much wider value than 0, 1, or 2. 2004-09-07 01:15:59 +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
kent 4f9d67091a add debug code for ac97_write().
It is enabled by defining AC97_IO_DEBUG.
2004-08-28 07:02:11 +00:00
thorpej 96663f19df Use ANSI function decls, more static. 2004-08-26 18:38:19 +00:00
jkunz 6c6c2be95f Remove race conditions caused by the CPU cache of PA7100 CPUs. 2004-08-26 16:56:07 +00:00
jkunz 1035c6af08 Import STI wscons(4) driver from OpenBSD and add new driver for PS/2
keyboard / mouse pots of LASI.
2004-08-26 16:48:06 +00:00
itohy 1d4f1abb08 Workbit NinjaSCSI-32 PCI/CardBus SCSI driver (njs) 2004-08-26 14:13:46 +00:00
thorpej 8b2ffcedfc Use ANSI function decls and more use of static. 2004-08-24 00:53:28 +00:00
thorpej 45bd8be9fa Protect against multiple inclusion. 2004-08-23 23:17:54 +00:00
thorpej 218dbb60a6 Make some functions referenced only in wdc.c private to that file. 2004-08-21 01:51:46 +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 e975b9caee - Add an (*ata_reset_channel)() member to ata_bustype.
- Add an ata_reset_channel() function that performs the common parts
  of resetting an ATA channel, which uses the (*ata_reset_channel)()
  callback to do the heavy lifting.  Adjust callers to use ata_reset_channel()
  instead of wdc_reset_channel().

This removes the last wdc-specific code from ata.c!
2004-08-20 23:26:53 +00:00
thorpej 56e2a255b5 Move common parts of attaching an ata_channel to a new ata_channel_attach()
function.
2004-08-20 22:17:06 +00:00
thorpej 3234a02f48 Move atabusconfig() to ata.c. 2004-08-20 22:02:40 +00:00
thorpej 2606542c7b - Add an atac_bustype_ata member to atac_softc to hold a pointer to
the ata_bustype for the controller.  Fill it in and use it instead
  of referencing wdc_ata_bustype directly.
- Add an atac_atapibus_attach member to atac_softc to hold a pointer
  to the function that attaches the ATAPI bus for the controller.  Fill
  it in and use it instead of referencing wdc_atapibus_attach directly.
2004-08-20 20:52:31 +00:00
kent 2edd85fb18 Check power states after codec reset. This change fixes a
resume problem on some boards.
Patch provided by Joachim Thiemann in PR kern/26457
2004-08-20 14:36:13 +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
dyoung c9108ddfc8 Hubert Feyrer points out that hw.ath.countrycode really ought to
be writeable.  Make hw.ath.outdoor writeable while I am here.
2004-08-18 21:59:39 +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
thorpej 08fa2a3486 - 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:14:35 +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
tsutsui d91b03bd13 Use bus_space(9) on news68k.
Update/sort the comment/ifdefs about bus_space-using ports.

XXX which should we use defined(__${MACHINE_CPU}__) or defined(${MACHINE})?
2004-08-13 12:59:20 +00:00
pooka b151590832 kill "magic" number 2004-08-13 11:25:58 +00:00
mycroft 1d167b13be amd64 also has bus_space... 2004-08-13 10:52:18 +00:00
mycroft 27b5b1440c Remove a really gratuitous 1s delay. 2004-08-13 04:36:08 +00:00
thorpej 46f4277564 WDCDEBUG -> ATADEBUG. 2004-08-13 04:10:49 +00:00