Make the error recovery code a little more obvious.
Inform the user if UDMA66 mode couldn't be selected due to a
non ATA66 compliant 80pin cable.
Minor cosmetics.
<sys/bio.h>.
<sys/bio.h> is now a prerequisite for <sys/buf.h> but it shall
not be made a nested include according to bdes teachings on the
subject of nested includes.
Diskdrivers and similar stuff below specfs::strategy() should no
longer need to include <sys/buf.> unless they need caching of data.
Still a few bogus uses of struct buf to track down.
Repocopy by: peter
Call intr_teardown on detach.
Always add non masterdevice from unit 2 upwards.
Update to the pccard code, at least some cards are now working,
more testing to follow.
was needed to make attach/detach of devices work, which is
needed for the PCCARD support.
(PCCARD support is still not working though, more to come on that)
Support the CMD646 chip which is used on many alphas, sadly only
in WDMA2 mode, as the silicon is broken beyond belief for UDMA modes.
Lots of cosmetic fixes here and there.
Sorry for the size of this megapatchfromhell but it was not
possible otherwise...
newbus patches based on work from: dfr (Doug Rabson)
fix support for multiple HPT & Promise controllers.
support mixed 33/66 devices on the Promise 66 controllers.
fix the refcount stuff in the atapi drivers.
misc cleanups.
Try to support older systems reporting irq0 for the first channels.
Support sharing of the std interrupts (says peter :) )
Dont use READ_CD on normal data reads (2048 bytes), too many old drives
doesn't support this command even if the std says "shall" :(, but still
use READ_CD on all other blocksizes.
Add the geometry to the ad probe, its still usefull.
Dont be so verbose in the probe, only ONE line printed now, to get more
info boot verbose. Centralise most printf's in ata-all & ata-dma to use
the ata_printf function, it saves alot of codelines.
Repeat the identify command if drive fails the first.
Protect the timeout functions with splbio.
Dont update the transfer details before we are sure the transfer
succeded, this way they are proberly retried on errors.
Move the handling of next_writeable to userland.
Use the READ_CD command to read CD's. That enables us to read _anything_
via the normal read/write interface. This kindof obsoletes the READAUDIO
ioctl, but we keep that for now.
correctly on both master and slave.
Smash together the ata_params & atapi_params structures as they
are more or less equal anyways.
Get rid of the last SYSINIT's in here.
Prober support for the VIA 82C686, I finally got the right datasheet.
Get rid of atapi_wait, merge it into ata_wait.
Avoid a couple of races by using asleep instead of tsleep.
Always use 16bit transfers on ISA systems.
Clear up the atapi_read/write functions.
on all combinations (I hope)...
Add DMA support for the AMD 756 chip (K7 chipset) this is actually the
same as the VIA 82C686 chip (the ATA part that is).
Treat the intel MX chipset PIIX as a PIIX4
Allow UDMA on all disks that say they can handle it.
Cleanup probe printf's a bit
Remove alot of the old #ifdef DEBUG crap.
main component in the southbridge chip to determine which VIA chip
we are dealing with.
Try to enable DMA on generic controllers that say they has the
capability, instead of relying on the BIOS to have set it up.
Add a missing DELAY(1) in ata_wait.
Change the info from ad_version, so the ATA version from the disk can
be used to quantify the DAM modes valid for this drive, ie be more
selective with turning DMA on on older disks that should not support it..
Fix the probe for BIOS enabled DMA in the generic case, master/slave
was reversed in the test.
Check the return for ata_command in all cases, and print warnings if
it fails.
Call ata_dmainit with all dmamodes off when falling back to PIO mode,
that should take care of both the Promise & HPT366 controllers not
being able to handle the fallback...
Cleanup the printf's in the drivers, use the prober device name (if
possible) instead of ataN-master/slave.
Try to use a 32bit mask on the IO addresses, this fixes the alpha
and hopefully doesn't break on any i386 machines.
Try to enable both read & write cache on disks, they should be as
default, but better be sure..
Fix a bug which could cause panics in ad/atapi-interrupt.
Add support for UDMA66 on Promise Ultra/Fasttrak controllers.
Get rid of ATA_IGNORE_INTR, and introduce ATA_WAIT_INTR instead.
Add a delay in the dump routine in ata-disk.c, some controllers
seem to need this. Also dont use the timeout watchdog when dumping.
Disable DMA on ATAPI devices as default, add option ATA_ENABLE_ATAPI_DMA
for those that has HW that works.
Add support for some not-up-to-spec ATAPI devices that returns data
together with completition status on data moving cmd's.
their HotRod controller and on SIIG PCI ultra DMA controller. These
changes also made lots of the Promise code go away, its all much more
generic this way.
Get rid of atapi_immed_cmd, instead use the queue to move atapi commands
from interrupt context if nessesary, the entire atapi layer has
gotten an overhaul.
Lots of fixes to utililize the new features in subr_disk.c etc, and
get rid of the last biots of softc arrays in the drivers, the
only one left is atadevices which cannot easily go away (yet).
Use our own malloc names, its a lot easier to track memory usage this way.
General cleanup overall.
The old algorithm was:
if class == storage and subclass != SCSI device must be IDE
This results in claiming 'raid' and 'other' storage devices as IDE,
which is typically not the case.
Reviewed by: sos
It been awhile since the last major update, as a benefit there
are some cool things in this one (and new bugs probably :) )...
The ATA driver has grown "real" timeout support for all devices.
This means that it should be possible to get in contact with
(especially) lost ATAPI devices. It also means that the ATA
driver is now usable on notebooks as it will DTRT on resume.
An experimental hack at utilizing the Promise66's at UDMA66 is
in there, but I cant test it. If someone feels like sending
me one, give me a ping.
The ATAPI DMA enableling scheme has been changed, also better DMA
support for the Aladdin chipset has been implemented for ATAPI
devices. Note that the Aladdin apparently only can do DMA reads
on ATAPI devices, and the Promise cant do ATAPI DMA at all.
I have seen problems on some ATAPI devices that should be able
to run in DMA mode, so if you encounter problems with hanging
atapi devices during the probe, or during access, disable DMA
in atapi-all.c, and let me know. It might be nessesary to do this
via a "white list" for known good devices...
The ATAPI CDROM driver can now use eject/close without hanging and
the bug that caused reading beyond the end of a CD has been fixed.
Media change is also handled proberly. DVD drives are identified
and are usable as CDROM devices at least, I dont have the HW to
test this further, see above :).
The ATAPI tape driver has gotten some support for using the DSC
method for not blocking the IDE channel during read/write when
the device has full buffers. It knows about the OnStream DI-30
device, support is not completed yet, but it can function as a
primitive backup medium, without filemarks, and without bad media
handeling. This is because the OnStream device doesn't handle this
(like everybody else) in HW. It also now supports getting/setting
the record position on devices that supports it.
Some rather major cleanups and rearrangements as well (cvs -b diff
is your freind). I'm closing in on declaring this for beta code,
most of the infrastruture is in place by now.
As usual USE AT YOUR OWN RISK!!, this is still alpha level code.
This driver can hose your disk real bad if anything goes wrong, but
now you have been warned :)
But please tell me how it works for you!
Enjoy!
-Søren
new system is integrated with the ISA bus code more cleanly and allows
the future addition of more enumerators such as PnPBIOS and ACPI.
This commit also enables the new pcm driver since it is somewhat tied to
the new PnP code.
The atapi subsystem has gotten better error handeling and timeouts,
it also tries a REQUEST SENSE command when devices returns errors,
to give a little more info as to what went wrong. It might be a
little verbose for now, but I'm interested in as much feedback on
errors as possible, especially timeouts, as I'm a bit in doubt if
I've chosen resonable default values everywhere.
The disk driver has been changed a bit to prepare for tagged queing,
which is next on my list.
The disk driver has grown a dump routine, I got one implementation
from Darrell Anderson <anderson@cs.duke.edu> which also did
partial dumps (usefull on big memory machines) I left out the
partial stuff for now, and changed the rest alot to fit into the new
ad_request framework.
Some minor cleanups and rearrangements as well.
As usual USE AT YOUR OWN RISK!!, this is still pre alpha level code.
Especially the DMA support can hose your disk real bad if anything
goes wrong, again you have been warned :)
Notebook owners should be carefull that their machines dont suspend
as this might cause trouble...
But please tell me how it works for you!
Enjoy!
-Søren
Fixed problems:
LS120/ZIP drives still currupted data.
Reworked once again, buffered I/O is just ignoring any sizehints
it is given :(
Now the atapifd driver splits up requests for devices that has
limitted transfer size.
ISA only configs fails on boot with interrupt timeouts.
The new-bus integration introduced a bug where the softc ptr
was lost during the probe.
Some minor cleanups and rearrangements as well.
As usual USE AT YOUR OWN RISK!!, this is still pre alpha level code.
Especially the DMA support can hose your disk real bad if anything
goes wrong, again you have been warned :)
Notebook owners should be carefull that their machines dont suspend
as this might cause trouble...
But please tell me how it works for you!
Enjoy!
Fixed problems:
LS120 drives currupted data.
The workaround for drives not supporting upto 64K transfers
has been reworked. It works now both on LS120 & ZIP drives.
ISA only configs wont compile.
Fixed.
The ATA driver wont share interrupts.
Fixed.
The "unwanted interrupt" warning gave wrong controller.
Another lun<>unit messup from the newbus integration.
Some minor cleanups and rearrangements as well.
As usual USE AT YOUR OWN RISK!!, this is still pre alpha level code.
Especially the DMA support can hose your disk real bad if anything
goes wrong, again you have been warned :)
Notebook owners should be carefull that their machines dont suspend
as this might cause trouble...
But please tell me how it works for you!
Enjoy!
-Søren
Interrupts under the new scheme are managed by the i386 nexus with the
awareness of the resource manager. There is further room for optimizing
the interfaces still. All the users of register_intr()/intr_create()
should be gone, with the exception of pcic and i386/isa/clock.c.