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.
-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"
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.
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.
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.
- 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!
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.
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.)
* 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.
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.
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.