Commit Graph

11 Commits

Author SHA1 Message Date
Warner Losh
03988eea4d MF-p4:
"Ian gave me this patch"  I assume this is iadowse@.

Also, pull in a few devices NetBSD's table.  More are there, but I need
to properly move them to pccarddev before including them here.
2003-04-26 22:19:02 +00:00
Søren Schmidt
566cf07a7c Second round of updates to the ATA driver.
Clean up the DMA interface too much unneeded stuff crept in with
the busdma code back when.

Modify the ATA_IN* / ATA_OUT* macros so that resource and offset
are gotten from a table. That allows for new chipsets that doesn't
nessesarily have things ordered the good old way. This also removes
the need for the wierd PC98 resource functions.

Tested on: i386, PC98, Alpha, Sparc64
2003-03-29 13:37:09 +00:00
Søren Schmidt
c55607ce1f Always set the setmode funcptr. 2003-03-03 11:15:32 +00:00
Søren Schmidt
bb5bdd386e First round off updates/fixes to the ATA driver.
This moves all chipset specific code to a new file 'ata-chipset.c'.
Extensive use of tables and pointers to avoid having the same switch
on chipset type in several places, and to allow substituting various
functions for different HW arch needs.
Added PIO mode setup and all DMA modes.
Support for all known SiS chipsets. Thanks to Christoph Kukulies for
sponsoring a nice ASUS P4S8X SiS648 based board for this work!

Tested on:	i386, PC98, alpha and sparc64
2003-02-20 20:02:32 +00:00
Søren Schmidt
9dec0f3de0 Fix linking problem when atadisk is not use in ata-all.c
Add dummy intr_func and lock_func to ata-card.c

Dont call ad_print if the driver decided there is no disk.
2002-12-06 19:29:53 +00:00
Poul-Henning Kamp
c6ff03e2df Remove unused #includes: <sys/disk.h> <sys/devicestat.h> and <sys/sysctl.h>
Sponsored by:	DARPA & NAI Labs.
Approved by:	sos
2002-09-20 18:08:57 +00:00
Poul-Henning Kamp
2f11d560cc remove #includes of <sys/bio.h> where not needed. 2002-09-14 18:59:32 +00:00
Søren Schmidt
6ddce9039b Major update of the ATA RAID code, part 1:
Overhaul of the attach/detach code and structures, there were some nasty
bugs in the old implementation. This made it possible to collapse the
ATA/ATAPI device control structures into one generic structure.

A note here, the kernel is NOT ready for detach of active devices,
it fails all over in random places, but for inactive devices it works.
However for ATA RAID this works, since the RAID abstration layer
insulates the buggy^H^H^H^H^H^Hfragile device subsystem from the
physical disks.

Proberly detect the RAID's from the BIOS, and mark critical RAID1
arrays as such, but continue if there is enough of the mirror left
to do so.

Properly fail arrays on a live system. For RAID0 that means return EIO,
and for RAID1 it means continue on the still working part of the mirror
if possible, else return EIO.
If the state changes, log this to the console.

Allow for Promise & Highpoint controllers/arrays to coexist on the
same machine. It is not possible to distribute arrays over different
makes of controllers though.

If Promise SuperSwap enclosures are used, signal disk state on the
status LED on the front.

Misc fixes that I had lying around for various minor bugs.

Sponsored by: Advanis Inc.
2002-02-04 19:23:40 +00:00
Søren Schmidt
d2e812582d Add support for pccard.
submitted by: imp
2002-01-28 13:12:16 +00:00
Søren Schmidt
f601b4eb7c Overhaul to minimize stack usage, in some places >2K was used
on the stack *blush*...
2001-09-20 15:25:36 +00:00
Søren Schmidt
331c488d69 Split out the ata probes in seperate files for each bus type. 2001-03-06 21:43:46 +00:00