Fourth update to the new ATA/ATAPI driver:
Well, better late than newer, but things has been hectic
around here, sorry for the long delay.
DMA support has been added to the ATA disk driver.
This only works on Intel PIIX3/4, Acer Aladdin and Promise controllers.
The promise support works without the BIOS on the board,
and timing modes are set to support up to UDMA speed. This
solves the problems with having more than one promise controller
in the same system.
There is support for "generic" DMA, that might work on other
controllers, but now you have been warned :)
More chipset specific code will come soon, I have to find testers
with the approbiate HW, more on that when I have it ready.
The system now uses its own major numbers, please run MAKEDEV
with the devices you need (ad?, acd?, afd?, ast?).
For now the disk driver will also attach to the old wd major
so one can at least boot without this step, but be warned, this
will eventually go away. The bootblocks will have to be changed
before one can boot directly from an "ad" device though.
Fixed problems:
All known hang problems should be solved
The probe code has been sligthly changed, this should solve
the reports I have lying around (I hope).
Hangs when accessing ata & atapi device on the same channel simultaniously.
A real braino in ata_start caused this, fixed.
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, agaiin you have been warned :)
But please tell me how it works for you!
Enjoy!
-Søren
1999-03-28 18:57:20 +00:00
|
|
|
|
/*-
|
2000-01-03 10:26:59 +00:00
|
|
|
|
* Copyright (c) 1998,1999,2000 S<EFBFBD>ren Schmidt
|
Fourth update to the new ATA/ATAPI driver:
Well, better late than newer, but things has been hectic
around here, sorry for the long delay.
DMA support has been added to the ATA disk driver.
This only works on Intel PIIX3/4, Acer Aladdin and Promise controllers.
The promise support works without the BIOS on the board,
and timing modes are set to support up to UDMA speed. This
solves the problems with having more than one promise controller
in the same system.
There is support for "generic" DMA, that might work on other
controllers, but now you have been warned :)
More chipset specific code will come soon, I have to find testers
with the approbiate HW, more on that when I have it ready.
The system now uses its own major numbers, please run MAKEDEV
with the devices you need (ad?, acd?, afd?, ast?).
For now the disk driver will also attach to the old wd major
so one can at least boot without this step, but be warned, this
will eventually go away. The bootblocks will have to be changed
before one can boot directly from an "ad" device though.
Fixed problems:
All known hang problems should be solved
The probe code has been sligthly changed, this should solve
the reports I have lying around (I hope).
Hangs when accessing ata & atapi device on the same channel simultaniously.
A real braino in ata_start caused this, fixed.
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, agaiin you have been warned :)
But please tell me how it works for you!
Enjoy!
-Søren
1999-03-28 18:57:20 +00:00
|
|
|
|
* All rights reserved.
|
|
|
|
|
*
|
|
|
|
|
* Redistribution and use in source and binary forms, with or without
|
|
|
|
|
* modification, are permitted provided that the following conditions
|
|
|
|
|
* are met:
|
|
|
|
|
* 1. Redistributions of source code must retain the above copyright
|
|
|
|
|
* notice, this list of conditions and the following disclaimer,
|
|
|
|
|
* without modification, immediately at the beginning of the file.
|
|
|
|
|
* 2. Redistributions in binary form must reproduce the above copyright
|
|
|
|
|
* notice, this list of conditions and the following disclaimer in the
|
|
|
|
|
* documentation and/or other materials provided with the distribution.
|
|
|
|
|
* 3. The name of the author may not be used to endorse or promote products
|
|
|
|
|
* derived from this software without specific prior written permission.
|
|
|
|
|
*
|
|
|
|
|
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
|
|
|
|
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
|
|
|
|
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
|
|
|
|
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
|
|
|
|
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
|
|
|
|
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
|
|
|
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
|
|
|
|
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
|
|
|
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
|
|
|
|
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
|
|
|
*
|
1999-08-28 01:08:13 +00:00
|
|
|
|
* $FreeBSD$
|
Fourth update to the new ATA/ATAPI driver:
Well, better late than newer, but things has been hectic
around here, sorry for the long delay.
DMA support has been added to the ATA disk driver.
This only works on Intel PIIX3/4, Acer Aladdin and Promise controllers.
The promise support works without the BIOS on the board,
and timing modes are set to support up to UDMA speed. This
solves the problems with having more than one promise controller
in the same system.
There is support for "generic" DMA, that might work on other
controllers, but now you have been warned :)
More chipset specific code will come soon, I have to find testers
with the approbiate HW, more on that when I have it ready.
The system now uses its own major numbers, please run MAKEDEV
with the devices you need (ad?, acd?, afd?, ast?).
For now the disk driver will also attach to the old wd major
so one can at least boot without this step, but be warned, this
will eventually go away. The bootblocks will have to be changed
before one can boot directly from an "ad" device though.
Fixed problems:
All known hang problems should be solved
The probe code has been sligthly changed, this should solve
the reports I have lying around (I hope).
Hangs when accessing ata & atapi device on the same channel simultaniously.
A real braino in ata_start caused this, fixed.
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, agaiin you have been warned :)
But please tell me how it works for you!
Enjoy!
-Søren
1999-03-28 18:57:20 +00:00
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#include "pci.h"
|
|
|
|
|
#include <sys/param.h>
|
|
|
|
|
#include <sys/systm.h>
|
2000-05-05 09:59:14 +00:00
|
|
|
|
#include <sys/bio.h>
|
Fourth update to the new ATA/ATAPI driver:
Well, better late than newer, but things has been hectic
around here, sorry for the long delay.
DMA support has been added to the ATA disk driver.
This only works on Intel PIIX3/4, Acer Aladdin and Promise controllers.
The promise support works without the BIOS on the board,
and timing modes are set to support up to UDMA speed. This
solves the problems with having more than one promise controller
in the same system.
There is support for "generic" DMA, that might work on other
controllers, but now you have been warned :)
More chipset specific code will come soon, I have to find testers
with the approbiate HW, more on that when I have it ready.
The system now uses its own major numbers, please run MAKEDEV
with the devices you need (ad?, acd?, afd?, ast?).
For now the disk driver will also attach to the old wd major
so one can at least boot without this step, but be warned, this
will eventually go away. The bootblocks will have to be changed
before one can boot directly from an "ad" device though.
Fixed problems:
All known hang problems should be solved
The probe code has been sligthly changed, this should solve
the reports I have lying around (I hope).
Hangs when accessing ata & atapi device on the same channel simultaniously.
A real braino in ata_start caused this, fixed.
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, agaiin you have been warned :)
But please tell me how it works for you!
Enjoy!
-Søren
1999-03-28 18:57:20 +00:00
|
|
|
|
#include <sys/malloc.h>
|
1999-04-18 20:48:15 +00:00
|
|
|
|
#include <sys/bus.h>
|
1999-12-07 22:07:18 +00:00
|
|
|
|
#include <sys/disk.h>
|
|
|
|
|
#include <sys/devicestat.h>
|
Ten'th update to the new ATA/ATAPI driver:
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
1999-09-21 19:50:40 +00:00
|
|
|
|
#include <vm/vm.h>
|
Fourth update to the new ATA/ATAPI driver:
Well, better late than newer, but things has been hectic
around here, sorry for the long delay.
DMA support has been added to the ATA disk driver.
This only works on Intel PIIX3/4, Acer Aladdin and Promise controllers.
The promise support works without the BIOS on the board,
and timing modes are set to support up to UDMA speed. This
solves the problems with having more than one promise controller
in the same system.
There is support for "generic" DMA, that might work on other
controllers, but now you have been warned :)
More chipset specific code will come soon, I have to find testers
with the approbiate HW, more on that when I have it ready.
The system now uses its own major numbers, please run MAKEDEV
with the devices you need (ad?, acd?, afd?, ast?).
For now the disk driver will also attach to the old wd major
so one can at least boot without this step, but be warned, this
will eventually go away. The bootblocks will have to be changed
before one can boot directly from an "ad" device though.
Fixed problems:
All known hang problems should be solved
The probe code has been sligthly changed, this should solve
the reports I have lying around (I hope).
Hangs when accessing ata & atapi device on the same channel simultaniously.
A real braino in ata_start caused this, fixed.
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, agaiin you have been warned :)
But please tell me how it works for you!
Enjoy!
-Søren
1999-03-28 18:57:20 +00:00
|
|
|
|
#include <vm/pmap.h>
|
1999-05-17 15:58:47 +00:00
|
|
|
|
#if NPCI > 0
|
Fourth update to the new ATA/ATAPI driver:
Well, better late than newer, but things has been hectic
around here, sorry for the long delay.
DMA support has been added to the ATA disk driver.
This only works on Intel PIIX3/4, Acer Aladdin and Promise controllers.
The promise support works without the BIOS on the board,
and timing modes are set to support up to UDMA speed. This
solves the problems with having more than one promise controller
in the same system.
There is support for "generic" DMA, that might work on other
controllers, but now you have been warned :)
More chipset specific code will come soon, I have to find testers
with the approbiate HW, more on that when I have it ready.
The system now uses its own major numbers, please run MAKEDEV
with the devices you need (ad?, acd?, afd?, ast?).
For now the disk driver will also attach to the old wd major
so one can at least boot without this step, but be warned, this
will eventually go away. The bootblocks will have to be changed
before one can boot directly from an "ad" device though.
Fixed problems:
All known hang problems should be solved
The probe code has been sligthly changed, this should solve
the reports I have lying around (I hope).
Hangs when accessing ata & atapi device on the same channel simultaniously.
A real braino in ata_start caused this, fixed.
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, agaiin you have been warned :)
But please tell me how it works for you!
Enjoy!
-Søren
1999-03-28 18:57:20 +00:00
|
|
|
|
#include <pci/pcivar.h>
|
1999-05-17 15:58:47 +00:00
|
|
|
|
#endif
|
Fourth update to the new ATA/ATAPI driver:
Well, better late than newer, but things has been hectic
around here, sorry for the long delay.
DMA support has been added to the ATA disk driver.
This only works on Intel PIIX3/4, Acer Aladdin and Promise controllers.
The promise support works without the BIOS on the board,
and timing modes are set to support up to UDMA speed. This
solves the problems with having more than one promise controller
in the same system.
There is support for "generic" DMA, that might work on other
controllers, but now you have been warned :)
More chipset specific code will come soon, I have to find testers
with the approbiate HW, more on that when I have it ready.
The system now uses its own major numbers, please run MAKEDEV
with the devices you need (ad?, acd?, afd?, ast?).
For now the disk driver will also attach to the old wd major
so one can at least boot without this step, but be warned, this
will eventually go away. The bootblocks will have to be changed
before one can boot directly from an "ad" device though.
Fixed problems:
All known hang problems should be solved
The probe code has been sligthly changed, this should solve
the reports I have lying around (I hope).
Hangs when accessing ata & atapi device on the same channel simultaniously.
A real braino in ata_start caused this, fixed.
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, agaiin you have been warned :)
But please tell me how it works for you!
Enjoy!
-Søren
1999-03-28 18:57:20 +00:00
|
|
|
|
#include <dev/ata/ata-all.h>
|
1999-12-07 22:07:18 +00:00
|
|
|
|
#include <dev/ata/ata-disk.h>
|
Fourth update to the new ATA/ATAPI driver:
Well, better late than newer, but things has been hectic
around here, sorry for the long delay.
DMA support has been added to the ATA disk driver.
This only works on Intel PIIX3/4, Acer Aladdin and Promise controllers.
The promise support works without the BIOS on the board,
and timing modes are set to support up to UDMA speed. This
solves the problems with having more than one promise controller
in the same system.
There is support for "generic" DMA, that might work on other
controllers, but now you have been warned :)
More chipset specific code will come soon, I have to find testers
with the approbiate HW, more on that when I have it ready.
The system now uses its own major numbers, please run MAKEDEV
with the devices you need (ad?, acd?, afd?, ast?).
For now the disk driver will also attach to the old wd major
so one can at least boot without this step, but be warned, this
will eventually go away. The bootblocks will have to be changed
before one can boot directly from an "ad" device though.
Fixed problems:
All known hang problems should be solved
The probe code has been sligthly changed, this should solve
the reports I have lying around (I hope).
Hangs when accessing ata & atapi device on the same channel simultaniously.
A real braino in ata_start caused this, fixed.
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, agaiin you have been warned :)
But please tell me how it works for you!
Enjoy!
-Søren
1999-03-28 18:57:20 +00:00
|
|
|
|
|
2000-01-28 15:57:13 +00:00
|
|
|
|
#if NPCI > 0
|
|
|
|
|
|
1999-10-09 19:57:13 +00:00
|
|
|
|
/* prototypes */
|
2000-01-03 10:26:59 +00:00
|
|
|
|
static void promise_timing(struct ata_softc *, int32_t, int32_t);
|
1999-10-09 19:57:13 +00:00
|
|
|
|
static void hpt366_timing(struct ata_softc *, int32_t, int32_t);
|
|
|
|
|
|
|
|
|
|
/* misc defines */
|
1999-04-16 21:22:55 +00:00
|
|
|
|
#ifdef __alpha__
|
|
|
|
|
#undef vtophys
|
Ten'th update to the new ATA/ATAPI driver:
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
1999-09-21 19:50:40 +00:00
|
|
|
|
#define vtophys(va) alpha_XXX_dmamap((vm_offset_t)va)
|
1999-04-16 21:22:55 +00:00
|
|
|
|
#endif
|
|
|
|
|
|
2000-01-28 13:35:43 +00:00
|
|
|
|
void
|
Fourth update to the new ATA/ATAPI driver:
Well, better late than newer, but things has been hectic
around here, sorry for the long delay.
DMA support has been added to the ATA disk driver.
This only works on Intel PIIX3/4, Acer Aladdin and Promise controllers.
The promise support works without the BIOS on the board,
and timing modes are set to support up to UDMA speed. This
solves the problems with having more than one promise controller
in the same system.
There is support for "generic" DMA, that might work on other
controllers, but now you have been warned :)
More chipset specific code will come soon, I have to find testers
with the approbiate HW, more on that when I have it ready.
The system now uses its own major numbers, please run MAKEDEV
with the devices you need (ad?, acd?, afd?, ast?).
For now the disk driver will also attach to the old wd major
so one can at least boot without this step, but be warned, this
will eventually go away. The bootblocks will have to be changed
before one can boot directly from an "ad" device though.
Fixed problems:
All known hang problems should be solved
The probe code has been sligthly changed, this should solve
the reports I have lying around (I hope).
Hangs when accessing ata & atapi device on the same channel simultaniously.
A real braino in ata_start caused this, fixed.
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, agaiin you have been warned :)
But please tell me how it works for you!
Enjoy!
-Søren
1999-03-28 18:57:20 +00:00
|
|
|
|
ata_dmainit(struct ata_softc *scp, int32_t device,
|
|
|
|
|
int32_t apiomode, int32_t wdmamode, int32_t udmamode)
|
|
|
|
|
{
|
2000-02-18 20:57:33 +00:00
|
|
|
|
device_t parent = device_get_parent(scp->dev);
|
2000-01-24 20:45:24 +00:00
|
|
|
|
int32_t devno = (scp->unit << 1) + ATA_DEV(device);
|
2000-01-03 10:26:59 +00:00
|
|
|
|
int32_t error;
|
Fourth update to the new ATA/ATAPI driver:
Well, better late than newer, but things has been hectic
around here, sorry for the long delay.
DMA support has been added to the ATA disk driver.
This only works on Intel PIIX3/4, Acer Aladdin and Promise controllers.
The promise support works without the BIOS on the board,
and timing modes are set to support up to UDMA speed. This
solves the problems with having more than one promise controller
in the same system.
There is support for "generic" DMA, that might work on other
controllers, but now you have been warned :)
More chipset specific code will come soon, I have to find testers
with the approbiate HW, more on that when I have it ready.
The system now uses its own major numbers, please run MAKEDEV
with the devices you need (ad?, acd?, afd?, ast?).
For now the disk driver will also attach to the old wd major
so one can at least boot without this step, but be warned, this
will eventually go away. The bootblocks will have to be changed
before one can boot directly from an "ad" device though.
Fixed problems:
All known hang problems should be solved
The probe code has been sligthly changed, this should solve
the reports I have lying around (I hope).
Hangs when accessing ata & atapi device on the same channel simultaniously.
A real braino in ata_start caused this, fixed.
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, agaiin you have been warned :)
But please tell me how it works for you!
Enjoy!
-Søren
1999-03-28 18:57:20 +00:00
|
|
|
|
|
2000-01-28 13:35:43 +00:00
|
|
|
|
/* set our most pessimistic default mode */
|
|
|
|
|
scp->mode[ATA_DEV(device)] = ATA_PIO;
|
|
|
|
|
|
Fourth update to the new ATA/ATAPI driver:
Well, better late than newer, but things has been hectic
around here, sorry for the long delay.
DMA support has been added to the ATA disk driver.
This only works on Intel PIIX3/4, Acer Aladdin and Promise controllers.
The promise support works without the BIOS on the board,
and timing modes are set to support up to UDMA speed. This
solves the problems with having more than one promise controller
in the same system.
There is support for "generic" DMA, that might work on other
controllers, but now you have been warned :)
More chipset specific code will come soon, I have to find testers
with the approbiate HW, more on that when I have it ready.
The system now uses its own major numbers, please run MAKEDEV
with the devices you need (ad?, acd?, afd?, ast?).
For now the disk driver will also attach to the old wd major
so one can at least boot without this step, but be warned, this
will eventually go away. The bootblocks will have to be changed
before one can boot directly from an "ad" device though.
Fixed problems:
All known hang problems should be solved
The probe code has been sligthly changed, this should solve
the reports I have lying around (I hope).
Hangs when accessing ata & atapi device on the same channel simultaniously.
A real braino in ata_start caused this, fixed.
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, agaiin you have been warned :)
But please tell me how it works for you!
Enjoy!
-Søren
1999-03-28 18:57:20 +00:00
|
|
|
|
if (!scp->bmaddr)
|
2000-01-28 13:35:43 +00:00
|
|
|
|
return;
|
Fourth update to the new ATA/ATAPI driver:
Well, better late than newer, but things has been hectic
around here, sorry for the long delay.
DMA support has been added to the ATA disk driver.
This only works on Intel PIIX3/4, Acer Aladdin and Promise controllers.
The promise support works without the BIOS on the board,
and timing modes are set to support up to UDMA speed. This
solves the problems with having more than one promise controller
in the same system.
There is support for "generic" DMA, that might work on other
controllers, but now you have been warned :)
More chipset specific code will come soon, I have to find testers
with the approbiate HW, more on that when I have it ready.
The system now uses its own major numbers, please run MAKEDEV
with the devices you need (ad?, acd?, afd?, ast?).
For now the disk driver will also attach to the old wd major
so one can at least boot without this step, but be warned, this
will eventually go away. The bootblocks will have to be changed
before one can boot directly from an "ad" device though.
Fixed problems:
All known hang problems should be solved
The probe code has been sligthly changed, this should solve
the reports I have lying around (I hope).
Hangs when accessing ata & atapi device on the same channel simultaniously.
A real braino in ata_start caused this, fixed.
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, agaiin you have been warned :)
But please tell me how it works for you!
Enjoy!
-Søren
1999-03-28 18:57:20 +00:00
|
|
|
|
|
1999-10-09 19:57:13 +00:00
|
|
|
|
/* if simplex controller, only allow DMA on primary channel */
|
|
|
|
|
if (scp->unit == 1) {
|
|
|
|
|
outb(scp->bmaddr + ATA_BMSTAT_PORT, inb(scp->bmaddr + ATA_BMSTAT_PORT) &
|
|
|
|
|
(ATA_BMSTAT_DMA_MASTER | ATA_BMSTAT_DMA_SLAVE));
|
|
|
|
|
if (inb(scp->bmaddr + ATA_BMSTAT_PORT) & ATA_BMSTAT_DMA_SIMPLEX) {
|
2000-01-24 20:45:24 +00:00
|
|
|
|
ata_printf(scp, device, "simplex device, DMA on primary only\n");
|
2000-01-28 13:35:43 +00:00
|
|
|
|
return;
|
1999-10-09 19:57:13 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2000-01-24 20:45:24 +00:00
|
|
|
|
if (!scp->dmatab[ATA_DEV(device)]) {
|
|
|
|
|
void *dmatab;
|
Fourth update to the new ATA/ATAPI driver:
Well, better late than newer, but things has been hectic
around here, sorry for the long delay.
DMA support has been added to the ATA disk driver.
This only works on Intel PIIX3/4, Acer Aladdin and Promise controllers.
The promise support works without the BIOS on the board,
and timing modes are set to support up to UDMA speed. This
solves the problems with having more than one promise controller
in the same system.
There is support for "generic" DMA, that might work on other
controllers, but now you have been warned :)
More chipset specific code will come soon, I have to find testers
with the approbiate HW, more on that when I have it ready.
The system now uses its own major numbers, please run MAKEDEV
with the devices you need (ad?, acd?, afd?, ast?).
For now the disk driver will also attach to the old wd major
so one can at least boot without this step, but be warned, this
will eventually go away. The bootblocks will have to be changed
before one can boot directly from an "ad" device though.
Fixed problems:
All known hang problems should be solved
The probe code has been sligthly changed, this should solve
the reports I have lying around (I hope).
Hangs when accessing ata & atapi device on the same channel simultaniously.
A real braino in ata_start caused this, fixed.
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, agaiin you have been warned :)
But please tell me how it works for you!
Enjoy!
-Søren
1999-03-28 18:57:20 +00:00
|
|
|
|
|
2000-01-24 20:45:24 +00:00
|
|
|
|
if (!(dmatab = malloc(PAGE_SIZE, M_DEVBUF, M_NOWAIT)))
|
2000-01-28 13:35:43 +00:00
|
|
|
|
return;
|
2000-01-24 20:45:24 +00:00
|
|
|
|
if (((uintptr_t)dmatab >> PAGE_SHIFT) ^
|
|
|
|
|
(((uintptr_t)dmatab + PAGE_SIZE - 1) >> PAGE_SHIFT)) {
|
|
|
|
|
ata_printf(scp, device, "dmatab crosses page boundary, no DMA\n");
|
|
|
|
|
free(dmatab, M_DEVBUF);
|
2000-01-28 13:35:43 +00:00
|
|
|
|
return;
|
2000-01-24 20:45:24 +00:00
|
|
|
|
}
|
|
|
|
|
scp->dmatab[ATA_DEV(device)] = dmatab;
|
Fourth update to the new ATA/ATAPI driver:
Well, better late than newer, but things has been hectic
around here, sorry for the long delay.
DMA support has been added to the ATA disk driver.
This only works on Intel PIIX3/4, Acer Aladdin and Promise controllers.
The promise support works without the BIOS on the board,
and timing modes are set to support up to UDMA speed. This
solves the problems with having more than one promise controller
in the same system.
There is support for "generic" DMA, that might work on other
controllers, but now you have been warned :)
More chipset specific code will come soon, I have to find testers
with the approbiate HW, more on that when I have it ready.
The system now uses its own major numbers, please run MAKEDEV
with the devices you need (ad?, acd?, afd?, ast?).
For now the disk driver will also attach to the old wd major
so one can at least boot without this step, but be warned, this
will eventually go away. The bootblocks will have to be changed
before one can boot directly from an "ad" device though.
Fixed problems:
All known hang problems should be solved
The probe code has been sligthly changed, this should solve
the reports I have lying around (I hope).
Hangs when accessing ata & atapi device on the same channel simultaniously.
A real braino in ata_start caused this, fixed.
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, agaiin you have been warned :)
But please tell me how it works for you!
Enjoy!
-Søren
1999-03-28 18:57:20 +00:00
|
|
|
|
}
|
2000-05-23 19:05:56 +00:00
|
|
|
|
if (udmamode > 2 && !ATA_PARAM(scp, device)->cblid) {
|
|
|
|
|
ata_printf(scp, device,
|
|
|
|
|
"DMA limitted to UDMA33, non-ATA66 compliant cable\n");
|
|
|
|
|
udmamode = 2;
|
|
|
|
|
}
|
Fourth update to the new ATA/ATAPI driver:
Well, better late than newer, but things has been hectic
around here, sorry for the long delay.
DMA support has been added to the ATA disk driver.
This only works on Intel PIIX3/4, Acer Aladdin and Promise controllers.
The promise support works without the BIOS on the board,
and timing modes are set to support up to UDMA speed. This
solves the problems with having more than one promise controller
in the same system.
There is support for "generic" DMA, that might work on other
controllers, but now you have been warned :)
More chipset specific code will come soon, I have to find testers
with the approbiate HW, more on that when I have it ready.
The system now uses its own major numbers, please run MAKEDEV
with the devices you need (ad?, acd?, afd?, ast?).
For now the disk driver will also attach to the old wd major
so one can at least boot without this step, but be warned, this
will eventually go away. The bootblocks will have to be changed
before one can boot directly from an "ad" device though.
Fixed problems:
All known hang problems should be solved
The probe code has been sligthly changed, this should solve
the reports I have lying around (I hope).
Hangs when accessing ata & atapi device on the same channel simultaniously.
A real braino in ata_start caused this, fixed.
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, agaiin you have been warned :)
But please tell me how it works for you!
Enjoy!
-Søren
1999-03-28 18:57:20 +00:00
|
|
|
|
|
2000-01-03 10:26:59 +00:00
|
|
|
|
switch (scp->chiptype) {
|
Fourth update to the new ATA/ATAPI driver:
Well, better late than newer, but things has been hectic
around here, sorry for the long delay.
DMA support has been added to the ATA disk driver.
This only works on Intel PIIX3/4, Acer Aladdin and Promise controllers.
The promise support works without the BIOS on the board,
and timing modes are set to support up to UDMA speed. This
solves the problems with having more than one promise controller
in the same system.
There is support for "generic" DMA, that might work on other
controllers, but now you have been warned :)
More chipset specific code will come soon, I have to find testers
with the approbiate HW, more on that when I have it ready.
The system now uses its own major numbers, please run MAKEDEV
with the devices you need (ad?, acd?, afd?, ast?).
For now the disk driver will also attach to the old wd major
so one can at least boot without this step, but be warned, this
will eventually go away. The bootblocks will have to be changed
before one can boot directly from an "ad" device though.
Fixed problems:
All known hang problems should be solved
The probe code has been sligthly changed, this should solve
the reports I have lying around (I hope).
Hangs when accessing ata & atapi device on the same channel simultaniously.
A real braino in ata_start caused this, fixed.
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, agaiin you have been warned :)
But please tell me how it works for you!
Enjoy!
-Søren
1999-03-28 18:57:20 +00:00
|
|
|
|
|
2000-02-22 20:37:01 +00:00
|
|
|
|
case 0x24118086: /* Intel ICH */
|
|
|
|
|
if (udmamode >= 4) {
|
|
|
|
|
int32_t mask48, new48;
|
|
|
|
|
int16_t word54;
|
|
|
|
|
|
|
|
|
|
word54 = pci_read_config(parent, 0x54, 2);
|
|
|
|
|
if (word54 & (0x10 << devno)) {
|
|
|
|
|
error = ata_command(scp, device, ATA_C_SETFEATURES, 0, 0, 0,
|
|
|
|
|
ATA_UDMA4, ATA_C_F_SETXFER,ATA_WAIT_READY);
|
|
|
|
|
if (bootverbose)
|
|
|
|
|
ata_printf(scp, device,
|
|
|
|
|
"%s setting up UDMA4 mode on ICH chip\n",
|
|
|
|
|
(error) ? "failed" : "success");
|
|
|
|
|
if (!error) {
|
|
|
|
|
mask48 = (1 << devno) + (3 << (16 + (devno << 2)));
|
|
|
|
|
new48 = (1 << devno) + (2 << (16 + (devno << 2)));
|
|
|
|
|
pci_write_config(parent, 0x48,
|
|
|
|
|
(pci_read_config(parent, 0x48, 4) &
|
|
|
|
|
~mask48) | new48, 4);
|
|
|
|
|
pci_write_config(parent, 0x54, word54 | (1 << devno), 2);
|
|
|
|
|
scp->mode[ATA_DEV(device)] = ATA_UDMA4;
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
/* FALLTHROUGH */
|
|
|
|
|
|
Fourth update to the new ATA/ATAPI driver:
Well, better late than newer, but things has been hectic
around here, sorry for the long delay.
DMA support has been added to the ATA disk driver.
This only works on Intel PIIX3/4, Acer Aladdin and Promise controllers.
The promise support works without the BIOS on the board,
and timing modes are set to support up to UDMA speed. This
solves the problems with having more than one promise controller
in the same system.
There is support for "generic" DMA, that might work on other
controllers, but now you have been warned :)
More chipset specific code will come soon, I have to find testers
with the approbiate HW, more on that when I have it ready.
The system now uses its own major numbers, please run MAKEDEV
with the devices you need (ad?, acd?, afd?, ast?).
For now the disk driver will also attach to the old wd major
so one can at least boot without this step, but be warned, this
will eventually go away. The bootblocks will have to be changed
before one can boot directly from an "ad" device though.
Fixed problems:
All known hang problems should be solved
The probe code has been sligthly changed, this should solve
the reports I have lying around (I hope).
Hangs when accessing ata & atapi device on the same channel simultaniously.
A real braino in ata_start caused this, fixed.
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, agaiin you have been warned :)
But please tell me how it works for you!
Enjoy!
-Søren
1999-03-28 18:57:20 +00:00
|
|
|
|
case 0x71118086: /* Intel PIIX4 */
|
2000-01-17 02:04:19 +00:00
|
|
|
|
case 0x71998086: /* Intel PIIX4e */
|
|
|
|
|
case 0x24218086: /* Intel ICH0 */
|
Fourth update to the new ATA/ATAPI driver:
Well, better late than newer, but things has been hectic
around here, sorry for the long delay.
DMA support has been added to the ATA disk driver.
This only works on Intel PIIX3/4, Acer Aladdin and Promise controllers.
The promise support works without the BIOS on the board,
and timing modes are set to support up to UDMA speed. This
solves the problems with having more than one promise controller
in the same system.
There is support for "generic" DMA, that might work on other
controllers, but now you have been warned :)
More chipset specific code will come soon, I have to find testers
with the approbiate HW, more on that when I have it ready.
The system now uses its own major numbers, please run MAKEDEV
with the devices you need (ad?, acd?, afd?, ast?).
For now the disk driver will also attach to the old wd major
so one can at least boot without this step, but be warned, this
will eventually go away. The bootblocks will have to be changed
before one can boot directly from an "ad" device though.
Fixed problems:
All known hang problems should be solved
The probe code has been sligthly changed, this should solve
the reports I have lying around (I hope).
Hangs when accessing ata & atapi device on the same channel simultaniously.
A real braino in ata_start caused this, fixed.
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, agaiin you have been warned :)
But please tell me how it works for you!
Enjoy!
-Søren
1999-03-28 18:57:20 +00:00
|
|
|
|
if (udmamode >= 2) {
|
Ten'th update to the new ATA/ATAPI driver:
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
1999-09-21 19:50:40 +00:00
|
|
|
|
int32_t mask48, new48;
|
Fourth update to the new ATA/ATAPI driver:
Well, better late than newer, but things has been hectic
around here, sorry for the long delay.
DMA support has been added to the ATA disk driver.
This only works on Intel PIIX3/4, Acer Aladdin and Promise controllers.
The promise support works without the BIOS on the board,
and timing modes are set to support up to UDMA speed. This
solves the problems with having more than one promise controller
in the same system.
There is support for "generic" DMA, that might work on other
controllers, but now you have been warned :)
More chipset specific code will come soon, I have to find testers
with the approbiate HW, more on that when I have it ready.
The system now uses its own major numbers, please run MAKEDEV
with the devices you need (ad?, acd?, afd?, ast?).
For now the disk driver will also attach to the old wd major
so one can at least boot without this step, but be warned, this
will eventually go away. The bootblocks will have to be changed
before one can boot directly from an "ad" device though.
Fixed problems:
All known hang problems should be solved
The probe code has been sligthly changed, this should solve
the reports I have lying around (I hope).
Hangs when accessing ata & atapi device on the same channel simultaniously.
A real braino in ata_start caused this, fixed.
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, agaiin you have been warned :)
But please tell me how it works for you!
Enjoy!
-Søren
1999-03-28 18:57:20 +00:00
|
|
|
|
|
|
|
|
|
error = ata_command(scp, device, ATA_C_SETFEATURES, 0, 0, 0,
|
1999-11-08 21:36:00 +00:00
|
|
|
|
ATA_UDMA2, ATA_C_F_SETXFER, ATA_WAIT_READY);
|
Ten'th update to the new ATA/ATAPI driver:
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
1999-09-21 19:50:40 +00:00
|
|
|
|
if (bootverbose)
|
2000-01-24 20:45:24 +00:00
|
|
|
|
ata_printf(scp, device, "%s setting up UDMA2 mode on %s chip\n",
|
|
|
|
|
(error) ? "failed" : "success",
|
|
|
|
|
(scp->chiptype == 0x24118086) ? "ICH" :
|
|
|
|
|
(scp->chiptype == 0x24218086) ? "ICH0" :"PIIX4");
|
1999-11-24 21:40:05 +00:00
|
|
|
|
if (!error) {
|
|
|
|
|
mask48 = (1 << devno) + (3 << (16 + (devno << 2)));
|
|
|
|
|
new48 = (1 << devno) + (2 << (16 + (devno << 2)));
|
2000-02-18 20:57:33 +00:00
|
|
|
|
pci_write_config(parent, 0x48,
|
|
|
|
|
(pci_read_config(parent, 0x48, 4) &
|
1999-11-24 21:40:05 +00:00
|
|
|
|
~mask48) | new48, 4);
|
2000-01-24 20:45:24 +00:00
|
|
|
|
scp->mode[ATA_DEV(device)] = ATA_UDMA2;
|
2000-01-28 13:35:43 +00:00
|
|
|
|
return;
|
1999-11-24 21:40:05 +00:00
|
|
|
|
}
|
Fourth update to the new ATA/ATAPI driver:
Well, better late than newer, but things has been hectic
around here, sorry for the long delay.
DMA support has been added to the ATA disk driver.
This only works on Intel PIIX3/4, Acer Aladdin and Promise controllers.
The promise support works without the BIOS on the board,
and timing modes are set to support up to UDMA speed. This
solves the problems with having more than one promise controller
in the same system.
There is support for "generic" DMA, that might work on other
controllers, but now you have been warned :)
More chipset specific code will come soon, I have to find testers
with the approbiate HW, more on that when I have it ready.
The system now uses its own major numbers, please run MAKEDEV
with the devices you need (ad?, acd?, afd?, ast?).
For now the disk driver will also attach to the old wd major
so one can at least boot without this step, but be warned, this
will eventually go away. The bootblocks will have to be changed
before one can boot directly from an "ad" device though.
Fixed problems:
All known hang problems should be solved
The probe code has been sligthly changed, this should solve
the reports I have lying around (I hope).
Hangs when accessing ata & atapi device on the same channel simultaniously.
A real braino in ata_start caused this, fixed.
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, agaiin you have been warned :)
But please tell me how it works for you!
Enjoy!
-Søren
1999-03-28 18:57:20 +00:00
|
|
|
|
}
|
|
|
|
|
/* FALLTHROUGH */
|
|
|
|
|
|
|
|
|
|
case 0x70108086: /* Intel PIIX3 */
|
|
|
|
|
if (wdmamode >= 2 && apiomode >= 4) {
|
|
|
|
|
int32_t mask40, new40, mask44, new44;
|
|
|
|
|
|
|
|
|
|
/* if SITRE not set doit for both channels */
|
2000-02-18 20:57:33 +00:00
|
|
|
|
if (!((pci_read_config(parent, 0x40, 4)>>(scp->unit<<8))&0x4000)){
|
|
|
|
|
new40 = pci_read_config(parent, 0x40, 4);
|
|
|
|
|
new44 = pci_read_config(parent, 0x44, 4);
|
Ten'th update to the new ATA/ATAPI driver:
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
1999-09-21 19:50:40 +00:00
|
|
|
|
if (!(new40 & 0x00004000)) {
|
|
|
|
|
new44 &= ~0x0000000f;
|
|
|
|
|
new44 |= ((new40&0x00003000)>>10)|((new40&0x00000300)>>8);
|
|
|
|
|
}
|
|
|
|
|
if (!(new40 & 0x40000000)) {
|
|
|
|
|
new44 &= ~0x000000f0;
|
|
|
|
|
new44 |= ((new40&0x30000000)>>22)|((new40&0x03000000)>>20);
|
|
|
|
|
}
|
|
|
|
|
new40 |= 0x40004000;
|
2000-02-18 20:57:33 +00:00
|
|
|
|
pci_write_config(parent, 0x40, new40, 4);
|
|
|
|
|
pci_write_config(parent, 0x44, new44, 4);
|
Fourth update to the new ATA/ATAPI driver:
Well, better late than newer, but things has been hectic
around here, sorry for the long delay.
DMA support has been added to the ATA disk driver.
This only works on Intel PIIX3/4, Acer Aladdin and Promise controllers.
The promise support works without the BIOS on the board,
and timing modes are set to support up to UDMA speed. This
solves the problems with having more than one promise controller
in the same system.
There is support for "generic" DMA, that might work on other
controllers, but now you have been warned :)
More chipset specific code will come soon, I have to find testers
with the approbiate HW, more on that when I have it ready.
The system now uses its own major numbers, please run MAKEDEV
with the devices you need (ad?, acd?, afd?, ast?).
For now the disk driver will also attach to the old wd major
so one can at least boot without this step, but be warned, this
will eventually go away. The bootblocks will have to be changed
before one can boot directly from an "ad" device though.
Fixed problems:
All known hang problems should be solved
The probe code has been sligthly changed, this should solve
the reports I have lying around (I hope).
Hangs when accessing ata & atapi device on the same channel simultaniously.
A real braino in ata_start caused this, fixed.
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, agaiin you have been warned :)
But please tell me how it works for you!
Enjoy!
-Søren
1999-03-28 18:57:20 +00:00
|
|
|
|
}
|
|
|
|
|
error = ata_command(scp, device, ATA_C_SETFEATURES, 0, 0, 0,
|
1999-11-08 21:36:00 +00:00
|
|
|
|
ATA_WDMA2, ATA_C_F_SETXFER, ATA_WAIT_READY);
|
Ten'th update to the new ATA/ATAPI driver:
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
1999-09-21 19:50:40 +00:00
|
|
|
|
if (bootverbose)
|
2000-01-24 20:45:24 +00:00
|
|
|
|
ata_printf(scp, device, "%s setting up WDMA2 mode on %s chip\n",
|
|
|
|
|
(error) ? "failed" : "success",
|
|
|
|
|
(scp->chiptype == 0x70108086) ? "PIIX3" :
|
|
|
|
|
(scp->chiptype == 0x24118086) ? "ICH" :
|
|
|
|
|
(scp->chiptype == 0x24218086) ? "ICH0" :"PIIX4");
|
1999-11-24 21:40:05 +00:00
|
|
|
|
if (!error) {
|
|
|
|
|
if (device == ATA_MASTER) {
|
|
|
|
|
mask40 = 0x0000330f;
|
|
|
|
|
new40 = 0x00002307;
|
|
|
|
|
mask44 = 0;
|
|
|
|
|
new44 = 0;
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
mask40 = 0x000000f0;
|
|
|
|
|
new40 = 0x00000070;
|
|
|
|
|
mask44 = 0x0000000f;
|
|
|
|
|
new44 = 0x0000000b;
|
|
|
|
|
}
|
|
|
|
|
if (scp->unit) {
|
|
|
|
|
mask40 <<= 16;
|
|
|
|
|
new40 <<= 16;
|
|
|
|
|
mask44 <<= 4;
|
|
|
|
|
new44 <<= 4;
|
|
|
|
|
}
|
2000-02-18 20:57:33 +00:00
|
|
|
|
pci_write_config(parent, 0x40,
|
|
|
|
|
(pci_read_config(parent, 0x40, 4) & ~mask40)|
|
1999-11-24 21:40:05 +00:00
|
|
|
|
new40, 4);
|
2000-02-18 20:57:33 +00:00
|
|
|
|
pci_write_config(parent, 0x44,
|
|
|
|
|
(pci_read_config(parent, 0x44, 4) & ~mask44)|
|
1999-11-24 21:40:05 +00:00
|
|
|
|
new44, 4);
|
2000-01-24 20:45:24 +00:00
|
|
|
|
scp->mode[ATA_DEV(device)] = ATA_WDMA2;
|
2000-01-28 13:35:43 +00:00
|
|
|
|
return;
|
Ten'th update to the new ATA/ATAPI driver:
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
1999-09-21 19:50:40 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
1999-11-24 21:40:05 +00:00
|
|
|
|
/* we could set PIO mode timings, but we assume the BIOS did that */
|
Fourth update to the new ATA/ATAPI driver:
Well, better late than newer, but things has been hectic
around here, sorry for the long delay.
DMA support has been added to the ATA disk driver.
This only works on Intel PIIX3/4, Acer Aladdin and Promise controllers.
The promise support works without the BIOS on the board,
and timing modes are set to support up to UDMA speed. This
solves the problems with having more than one promise controller
in the same system.
There is support for "generic" DMA, that might work on other
controllers, but now you have been warned :)
More chipset specific code will come soon, I have to find testers
with the approbiate HW, more on that when I have it ready.
The system now uses its own major numbers, please run MAKEDEV
with the devices you need (ad?, acd?, afd?, ast?).
For now the disk driver will also attach to the old wd major
so one can at least boot without this step, but be warned, this
will eventually go away. The bootblocks will have to be changed
before one can boot directly from an "ad" device though.
Fixed problems:
All known hang problems should be solved
The probe code has been sligthly changed, this should solve
the reports I have lying around (I hope).
Hangs when accessing ata & atapi device on the same channel simultaniously.
A real braino in ata_start caused this, fixed.
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, agaiin you have been warned :)
But please tell me how it works for you!
Enjoy!
-Søren
1999-03-28 18:57:20 +00:00
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case 0x12308086: /* Intel PIIX */
|
1999-12-13 10:19:39 +00:00
|
|
|
|
if (wdmamode >= 2 && apiomode >= 4) {
|
|
|
|
|
int32_t word40;
|
|
|
|
|
|
2000-02-18 20:57:33 +00:00
|
|
|
|
word40 = pci_read_config(parent, 0x40, 4);
|
1999-12-13 10:19:39 +00:00
|
|
|
|
word40 >>= scp->unit * 16;
|
|
|
|
|
|
|
|
|
|
/* Check for timing config usable for DMA on controller */
|
|
|
|
|
if (!((word40 & 0x3300) == 0x2300 &&
|
|
|
|
|
((word40 >> (device == ATA_MASTER ? 0 : 4)) & 1) == 1))
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
error = ata_command(scp, device, ATA_C_SETFEATURES, 0, 0, 0,
|
|
|
|
|
ATA_WDMA2, ATA_C_F_SETXFER, ATA_WAIT_READY);
|
|
|
|
|
if (bootverbose)
|
2000-01-24 20:45:24 +00:00
|
|
|
|
ata_printf(scp, device,
|
|
|
|
|
"%s setting up WDMA2 mode on PIIX chip\n",
|
|
|
|
|
(error) ? "failed" : "success");
|
1999-12-13 10:19:39 +00:00
|
|
|
|
if (!error) {
|
2000-01-24 20:45:24 +00:00
|
|
|
|
scp->mode[ATA_DEV(device)] = ATA_WDMA2;
|
2000-01-28 13:35:43 +00:00
|
|
|
|
return;
|
1999-12-13 10:19:39 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
Fourth update to the new ATA/ATAPI driver:
Well, better late than newer, but things has been hectic
around here, sorry for the long delay.
DMA support has been added to the ATA disk driver.
This only works on Intel PIIX3/4, Acer Aladdin and Promise controllers.
The promise support works without the BIOS on the board,
and timing modes are set to support up to UDMA speed. This
solves the problems with having more than one promise controller
in the same system.
There is support for "generic" DMA, that might work on other
controllers, but now you have been warned :)
More chipset specific code will come soon, I have to find testers
with the approbiate HW, more on that when I have it ready.
The system now uses its own major numbers, please run MAKEDEV
with the devices you need (ad?, acd?, afd?, ast?).
For now the disk driver will also attach to the old wd major
so one can at least boot without this step, but be warned, this
will eventually go away. The bootblocks will have to be changed
before one can boot directly from an "ad" device though.
Fixed problems:
All known hang problems should be solved
The probe code has been sligthly changed, this should solve
the reports I have lying around (I hope).
Hangs when accessing ata & atapi device on the same channel simultaniously.
A real braino in ata_start caused this, fixed.
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, agaiin you have been warned :)
But please tell me how it works for you!
Enjoy!
-Søren
1999-03-28 18:57:20 +00:00
|
|
|
|
break;
|
|
|
|
|
|
1999-10-09 19:57:13 +00:00
|
|
|
|
case 0x522910b9: /* AcerLabs Aladdin IV/V */
|
1999-11-08 21:36:00 +00:00
|
|
|
|
/* the Aladdin doesn't support ATAPI DMA on both master & slave */
|
|
|
|
|
if (scp->devices & ATA_ATAPI_MASTER && scp->devices & ATA_ATAPI_SLAVE) {
|
2000-01-24 20:45:24 +00:00
|
|
|
|
ata_printf(scp, device,
|
|
|
|
|
"Aladdin: two atapi devices on this channel, no DMA\n");
|
1999-11-08 21:36:00 +00:00
|
|
|
|
break;
|
1999-10-09 19:57:13 +00:00
|
|
|
|
}
|
1999-11-24 21:40:05 +00:00
|
|
|
|
if (udmamode >= 2) {
|
2000-02-18 20:57:33 +00:00
|
|
|
|
int32_t word54 = pci_read_config(parent, 0x54, 4);
|
1999-10-09 19:57:13 +00:00
|
|
|
|
|
Ten'th update to the new ATA/ATAPI driver:
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
1999-09-21 19:50:40 +00:00
|
|
|
|
error = ata_command(scp, device, ATA_C_SETFEATURES, 0, 0, 0,
|
1999-11-08 21:36:00 +00:00
|
|
|
|
ATA_UDMA2, ATA_C_F_SETXFER, ATA_WAIT_READY);
|
Ten'th update to the new ATA/ATAPI driver:
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
1999-09-21 19:50:40 +00:00
|
|
|
|
if (bootverbose)
|
2000-01-24 20:45:24 +00:00
|
|
|
|
ata_printf(scp, device,
|
|
|
|
|
"%s setting up UDMA2 mode on Aladdin chip\n",
|
|
|
|
|
(error) ? "failed" : "success");
|
1999-11-24 21:40:05 +00:00
|
|
|
|
if (!error) {
|
2000-05-23 19:05:56 +00:00
|
|
|
|
word54 &= ~(0x000f000f << (devno << 2));
|
|
|
|
|
word54 |= (0x000a0005 << (devno << 2));
|
2000-02-18 20:57:33 +00:00
|
|
|
|
pci_write_config(parent, 0x54, word54, 4);
|
|
|
|
|
pci_write_config(parent, 0x53,
|
|
|
|
|
pci_read_config(parent, 0x53, 1) | 0x03, 1);
|
1999-11-24 21:40:05 +00:00
|
|
|
|
scp->flags |= ATA_ATAPI_DMA_RO;
|
2000-01-24 20:45:24 +00:00
|
|
|
|
scp->mode[ATA_DEV(device)] = ATA_UDMA2;
|
2000-01-28 13:35:43 +00:00
|
|
|
|
return;
|
1999-11-24 21:40:05 +00:00
|
|
|
|
}
|
Ten'th update to the new ATA/ATAPI driver:
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
1999-09-21 19:50:40 +00:00
|
|
|
|
}
|
1999-11-24 21:40:05 +00:00
|
|
|
|
if (wdmamode >= 2 && apiomode >= 4) {
|
1999-10-09 19:57:13 +00:00
|
|
|
|
error = ata_command(scp, device, ATA_C_SETFEATURES, 0, 0, 0,
|
1999-11-08 21:36:00 +00:00
|
|
|
|
ATA_WDMA2, ATA_C_F_SETXFER, ATA_WAIT_READY);
|
1999-10-09 19:57:13 +00:00
|
|
|
|
if (bootverbose)
|
2000-01-24 20:45:24 +00:00
|
|
|
|
ata_printf(scp, device,
|
|
|
|
|
"%s setting up WDMA2 mode on Aladdin chip\n",
|
|
|
|
|
(error) ? "failed" : "success");
|
1999-11-24 21:40:05 +00:00
|
|
|
|
if (!error) {
|
2000-02-18 20:57:33 +00:00
|
|
|
|
pci_write_config(parent, 0x53,
|
|
|
|
|
pci_read_config(parent, 0x53, 1) | 0x03, 1);
|
1999-11-24 21:40:05 +00:00
|
|
|
|
scp->flags |= ATA_ATAPI_DMA_RO;
|
2000-01-24 20:45:24 +00:00
|
|
|
|
scp->mode[ATA_DEV(device)] = ATA_WDMA2;
|
2000-01-28 13:35:43 +00:00
|
|
|
|
return;
|
1999-11-24 21:40:05 +00:00
|
|
|
|
}
|
1999-10-09 19:57:13 +00:00
|
|
|
|
}
|
2000-03-05 16:52:26 +00:00
|
|
|
|
pci_write_config(parent, 0x53,
|
|
|
|
|
(pci_read_config(parent, 0x53, 1) & ~0x01) | 0x02, 1);
|
1999-11-24 21:40:05 +00:00
|
|
|
|
/* we could set PIO mode timings, but we assume the BIOS did that */
|
|
|
|
|
break;
|
|
|
|
|
|
2000-04-09 15:08:27 +00:00
|
|
|
|
case 0x74091022: /* AMD 756 */
|
|
|
|
|
if (udmamode >= 4) {
|
|
|
|
|
error = ata_command(scp, device, ATA_C_SETFEATURES, 0, 0, 0,
|
|
|
|
|
ATA_UDMA4, ATA_C_F_SETXFER, ATA_WAIT_READY);
|
|
|
|
|
if (bootverbose)
|
|
|
|
|
ata_printf(scp, device,
|
|
|
|
|
"%s setting up UDMA4 mode on AMD chip\n",
|
|
|
|
|
(error) ? "failed" : "success");
|
|
|
|
|
if (!error) {
|
|
|
|
|
pci_write_config(parent, 0x53 - devno, 0xc3, 1);
|
|
|
|
|
scp->mode[ATA_DEV(device)] = ATA_UDMA4;
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
goto via_82c586;
|
|
|
|
|
|
2000-02-04 10:20:22 +00:00
|
|
|
|
case 0x06861106: /* VIA 82C686 */
|
2000-04-09 15:08:27 +00:00
|
|
|
|
via_82c686:
|
2000-02-04 10:20:22 +00:00
|
|
|
|
if (udmamode >= 4) {
|
|
|
|
|
error = ata_command(scp, device, ATA_C_SETFEATURES, 0, 0, 0,
|
|
|
|
|
ATA_UDMA4, ATA_C_F_SETXFER, ATA_WAIT_READY);
|
|
|
|
|
if (bootverbose)
|
|
|
|
|
ata_printf(scp, device,
|
|
|
|
|
"%s setting up UDMA4 mode on VIA chip\n",
|
|
|
|
|
(error) ? "failed" : "success");
|
|
|
|
|
if (!error) {
|
2000-02-18 20:57:33 +00:00
|
|
|
|
pci_write_config(parent, 0x53 - devno, 0xe8, 1);
|
2000-02-04 10:20:22 +00:00
|
|
|
|
scp->mode[ATA_DEV(device)] = ATA_UDMA4;
|
|
|
|
|
return;
|
2000-01-17 02:04:19 +00:00
|
|
|
|
}
|
2000-02-04 10:20:22 +00:00
|
|
|
|
}
|
|
|
|
|
if (udmamode >= 2) {
|
|
|
|
|
error = ata_command(scp, device, ATA_C_SETFEATURES, 0, 0, 0,
|
|
|
|
|
ATA_UDMA2, ATA_C_F_SETXFER, ATA_WAIT_READY);
|
|
|
|
|
if (bootverbose)
|
|
|
|
|
ata_printf(scp, device,
|
|
|
|
|
"%s setting up UDMA2 mode on VIA chip\n",
|
|
|
|
|
(error) ? "failed" : "success");
|
|
|
|
|
if (!error) {
|
2000-02-18 20:57:33 +00:00
|
|
|
|
pci_write_config(parent, 0x53 - devno, 0xea, 1);
|
2000-02-04 10:20:22 +00:00
|
|
|
|
scp->mode[ATA_DEV(device)] = ATA_UDMA2;
|
|
|
|
|
return;
|
2000-01-17 02:04:19 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
2000-02-04 10:20:22 +00:00
|
|
|
|
goto via_generic;
|
2000-01-17 02:04:19 +00:00
|
|
|
|
|
2000-04-09 15:08:27 +00:00
|
|
|
|
case 0x05961106: /* VIA 82C596 */
|
|
|
|
|
/* 82c596 revision >= 0x12 is like the 82c686 */
|
|
|
|
|
if (ata_find_dev(parent, 0x05961106, 0x12))
|
|
|
|
|
goto via_82c686;
|
2000-02-04 10:20:22 +00:00
|
|
|
|
/* FALLTHROUGH */
|
|
|
|
|
|
|
|
|
|
case 0x05861106: /* VIA 82C586 */
|
2000-04-09 15:08:27 +00:00
|
|
|
|
via_82c586:
|
2000-01-17 02:04:19 +00:00
|
|
|
|
/* UDMA2 mode only on 82C586 > rev1, 82C596, AMD 756 */
|
2000-05-23 19:05:56 +00:00
|
|
|
|
if ((udmamode >= 2 && ata_find_dev(parent, 0x05861106, 0x02)) ||
|
2000-02-04 10:20:22 +00:00
|
|
|
|
(udmamode >= 2 && scp->chiptype == 0x05961106) ||
|
2000-01-03 10:26:59 +00:00
|
|
|
|
(udmamode >= 2 && scp->chiptype == 0x74091022)) {
|
1999-11-24 21:40:05 +00:00
|
|
|
|
error = ata_command(scp, device, ATA_C_SETFEATURES, 0, 0, 0,
|
|
|
|
|
ATA_UDMA2, ATA_C_F_SETXFER, ATA_WAIT_READY);
|
|
|
|
|
if (bootverbose)
|
2000-01-24 20:45:24 +00:00
|
|
|
|
ata_printf(scp, device, "%s setting up UDMA2 mode on %s chip\n",
|
|
|
|
|
(error) ? "failed" : "success",
|
|
|
|
|
(scp->chiptype == 0x74091022) ? "AMD" : "VIA");
|
1999-11-24 21:40:05 +00:00
|
|
|
|
if (!error) {
|
2000-02-18 20:57:33 +00:00
|
|
|
|
pci_write_config(parent, 0x53 - devno, 0xc0, 1);
|
2000-01-24 20:45:24 +00:00
|
|
|
|
scp->mode[ATA_DEV(device)] = ATA_UDMA2;
|
2000-01-28 13:35:43 +00:00
|
|
|
|
return;
|
1999-11-24 21:40:05 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
2000-02-04 10:20:22 +00:00
|
|
|
|
/* FALLTHROUGH */
|
|
|
|
|
|
|
|
|
|
case 0x05711106: /* VIA 82C571 */
|
|
|
|
|
via_generic:
|
1999-11-24 21:40:05 +00:00
|
|
|
|
if (wdmamode >= 2 && apiomode >= 4) {
|
|
|
|
|
error = ata_command(scp, device, ATA_C_SETFEATURES, 0, 0, 0,
|
|
|
|
|
ATA_WDMA2, ATA_C_F_SETXFER, ATA_WAIT_READY);
|
|
|
|
|
if (bootverbose)
|
2000-01-24 20:45:24 +00:00
|
|
|
|
ata_printf(scp, device, "%s setting up WDMA2 mode on %s chip\n",
|
|
|
|
|
(error) ? "failed" : "success",
|
|
|
|
|
(scp->chiptype == 0x74091022) ? "AMD" : "VIA");
|
1999-11-24 21:40:05 +00:00
|
|
|
|
if (!error) {
|
2000-02-18 20:57:33 +00:00
|
|
|
|
pci_write_config(parent, 0x53 - devno, 0x82, 1);
|
|
|
|
|
pci_write_config(parent, 0x4b - devno, 0x31, 1);
|
2000-01-24 20:45:24 +00:00
|
|
|
|
scp->mode[ATA_DEV(device)] = ATA_WDMA2;
|
2000-01-28 13:35:43 +00:00
|
|
|
|
return;
|
1999-11-24 21:40:05 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
/* we could set PIO mode timings, but we assume the BIOS did that */
|
1999-10-09 19:57:13 +00:00
|
|
|
|
break;
|
|
|
|
|
|
1999-12-13 10:19:39 +00:00
|
|
|
|
case 0x55131039: /* SiS 5591 */
|
|
|
|
|
if (udmamode >= 2) {
|
|
|
|
|
error = ata_command(scp, device, ATA_C_SETFEATURES, 0, 0, 0,
|
|
|
|
|
ATA_UDMA2, ATA_C_F_SETXFER, ATA_WAIT_READY);
|
|
|
|
|
if (bootverbose)
|
2000-01-24 20:45:24 +00:00
|
|
|
|
ata_printf(scp, device,
|
|
|
|
|
"%s setting up UDMA2 mode on SiS chip\n",
|
|
|
|
|
(error) ? "failed" : "success");
|
1999-12-13 10:19:39 +00:00
|
|
|
|
if (!error) {
|
2000-02-18 20:57:33 +00:00
|
|
|
|
pci_write_config(parent, 0x40 + (devno << 1), 0xa301, 2);
|
2000-01-24 20:45:24 +00:00
|
|
|
|
scp->mode[ATA_DEV(device)] = ATA_UDMA2;
|
2000-01-28 13:35:43 +00:00
|
|
|
|
return;
|
1999-12-13 10:19:39 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (wdmamode >=2 && apiomode >= 4) {
|
|
|
|
|
error = ata_command(scp, device, ATA_C_SETFEATURES, 0, 0, 0,
|
|
|
|
|
ATA_WDMA2, ATA_C_F_SETXFER, ATA_WAIT_READY);
|
|
|
|
|
if (bootverbose)
|
2000-01-24 20:45:24 +00:00
|
|
|
|
ata_printf(scp, device,
|
|
|
|
|
"%s setting up WDMA2 mode on SiS chip\n",
|
|
|
|
|
(error) ? "failed" : "success");
|
1999-12-13 10:19:39 +00:00
|
|
|
|
if (!error) {
|
2000-02-18 20:57:33 +00:00
|
|
|
|
pci_write_config(parent, 0x40 + (devno << 1), 0x0301, 2);
|
|
|
|
|
scp->mode[ATA_DEV(device)] = ATA_WDMA2;
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
/* we could set PIO mode timings, but we assume the BIOS did that */
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case 0x06461095: /* CMD 646 ATA controller */
|
|
|
|
|
if (wdmamode >= 2 && apiomode >= 4) {
|
|
|
|
|
error = ata_command(scp, device, ATA_C_SETFEATURES, 0, 0, 0,
|
|
|
|
|
ATA_WDMA2, ATA_C_F_SETXFER, ATA_WAIT_READY);
|
|
|
|
|
if (bootverbose)
|
|
|
|
|
ata_printf(scp, device,
|
|
|
|
|
"%s setting up WDMA2 mode on CMD646 chip\n",
|
|
|
|
|
error ? "failed" : "success");
|
|
|
|
|
if (!error) {
|
|
|
|
|
int32_t offset = (devno < 3) ? (devno << 1) : 7;
|
|
|
|
|
|
|
|
|
|
pci_write_config(parent, 0x54 + offset, 0x3f, 1);
|
2000-01-24 20:45:24 +00:00
|
|
|
|
scp->mode[ATA_DEV(device)] = ATA_WDMA2;
|
2000-01-28 13:35:43 +00:00
|
|
|
|
return;
|
1999-12-13 10:19:39 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
/* we could set PIO mode timings, but we assume the BIOS did that */
|
|
|
|
|
break;
|
|
|
|
|
|
2000-02-25 09:48:23 +00:00
|
|
|
|
case 0xc6931080: /* Cypress 82c693 ATA controller */
|
|
|
|
|
if (wdmamode >= 2 && apiomode >= 4) {
|
|
|
|
|
error = ata_command(scp, device, ATA_C_SETFEATURES, 0, 0, 0,
|
|
|
|
|
ATA_WDMA2, ATA_C_F_SETXFER, ATA_WAIT_READY);
|
|
|
|
|
if (bootverbose)
|
|
|
|
|
ata_printf(scp, device,
|
|
|
|
|
"%s setting up WDMA2 mode on Cypress chip\n",
|
|
|
|
|
error ? "failed" : "success");
|
|
|
|
|
if (!error) {
|
|
|
|
|
pci_write_config(scp->dev, scp->unit ? 0x4e : 0x4c, 0x2020, 2);
|
|
|
|
|
scp->mode[ATA_DEV(device)] = ATA_WDMA2;
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
/* we could set PIO mode timings, but we assume the BIOS did that */
|
|
|
|
|
break;
|
|
|
|
|
|
1999-10-09 19:57:13 +00:00
|
|
|
|
case 0x4d33105a: /* Promise Ultra33 / FastTrak33 controllers */
|
|
|
|
|
case 0x4d38105a: /* Promise Ultra66 / FastTrak66 controllers */
|
|
|
|
|
/* the Promise can only do DMA on ATA disks not on ATAPI devices */
|
|
|
|
|
if ((device == ATA_MASTER && scp->devices & ATA_ATAPI_MASTER) ||
|
|
|
|
|
(device == ATA_SLAVE && scp->devices & ATA_ATAPI_SLAVE))
|
|
|
|
|
break;
|
|
|
|
|
|
2000-01-03 10:26:59 +00:00
|
|
|
|
if (udmamode >=4 && scp->chiptype == 0x4d38105a &&
|
2000-02-18 20:57:33 +00:00
|
|
|
|
!(pci_read_config(parent, 0x50, 2)&(scp->unit ? 1<<11 : 1<<10))) {
|
1999-11-06 16:50:21 +00:00
|
|
|
|
error = ata_command(scp, device, ATA_C_SETFEATURES, 0, 0, 0,
|
1999-11-08 21:36:00 +00:00
|
|
|
|
ATA_UDMA4, ATA_C_F_SETXFER, ATA_WAIT_READY);
|
1999-11-06 16:50:21 +00:00
|
|
|
|
if (bootverbose)
|
2000-01-24 20:45:24 +00:00
|
|
|
|
ata_printf(scp, device,
|
|
|
|
|
"%s setting up UDMA4 mode on Promise chip\n",
|
|
|
|
|
(error) ? "failed" : "success");
|
1999-11-24 21:40:05 +00:00
|
|
|
|
if (!error) {
|
2000-01-03 10:26:59 +00:00
|
|
|
|
promise_timing(scp, devno, ATA_UDMA4);
|
2000-01-24 20:45:24 +00:00
|
|
|
|
scp->mode[ATA_DEV(device)] = ATA_UDMA4;
|
2000-01-28 13:35:43 +00:00
|
|
|
|
return;
|
1999-11-24 21:40:05 +00:00
|
|
|
|
}
|
1999-11-06 16:50:21 +00:00
|
|
|
|
}
|
1999-11-24 21:40:05 +00:00
|
|
|
|
if (udmamode >= 2) {
|
Fourth update to the new ATA/ATAPI driver:
Well, better late than newer, but things has been hectic
around here, sorry for the long delay.
DMA support has been added to the ATA disk driver.
This only works on Intel PIIX3/4, Acer Aladdin and Promise controllers.
The promise support works without the BIOS on the board,
and timing modes are set to support up to UDMA speed. This
solves the problems with having more than one promise controller
in the same system.
There is support for "generic" DMA, that might work on other
controllers, but now you have been warned :)
More chipset specific code will come soon, I have to find testers
with the approbiate HW, more on that when I have it ready.
The system now uses its own major numbers, please run MAKEDEV
with the devices you need (ad?, acd?, afd?, ast?).
For now the disk driver will also attach to the old wd major
so one can at least boot without this step, but be warned, this
will eventually go away. The bootblocks will have to be changed
before one can boot directly from an "ad" device though.
Fixed problems:
All known hang problems should be solved
The probe code has been sligthly changed, this should solve
the reports I have lying around (I hope).
Hangs when accessing ata & atapi device on the same channel simultaniously.
A real braino in ata_start caused this, fixed.
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, agaiin you have been warned :)
But please tell me how it works for you!
Enjoy!
-Søren
1999-03-28 18:57:20 +00:00
|
|
|
|
error = ata_command(scp, device, ATA_C_SETFEATURES, 0, 0, 0,
|
1999-11-08 21:36:00 +00:00
|
|
|
|
ATA_UDMA2, ATA_C_F_SETXFER, ATA_WAIT_READY);
|
Ten'th update to the new ATA/ATAPI driver:
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
1999-09-21 19:50:40 +00:00
|
|
|
|
if (bootverbose)
|
2000-01-24 20:45:24 +00:00
|
|
|
|
ata_printf(scp, device,
|
|
|
|
|
"%s setting up UDMA2 mode on Promise chip\n",
|
|
|
|
|
(error) ? "failed" : "success");
|
1999-11-24 21:40:05 +00:00
|
|
|
|
if (!error) {
|
2000-01-03 10:26:59 +00:00
|
|
|
|
promise_timing(scp, devno, ATA_UDMA2);
|
2000-01-24 20:45:24 +00:00
|
|
|
|
scp->mode[ATA_DEV(device)] = ATA_UDMA2;
|
2000-01-28 13:35:43 +00:00
|
|
|
|
return;
|
1999-11-24 21:40:05 +00:00
|
|
|
|
}
|
Fourth update to the new ATA/ATAPI driver:
Well, better late than newer, but things has been hectic
around here, sorry for the long delay.
DMA support has been added to the ATA disk driver.
This only works on Intel PIIX3/4, Acer Aladdin and Promise controllers.
The promise support works without the BIOS on the board,
and timing modes are set to support up to UDMA speed. This
solves the problems with having more than one promise controller
in the same system.
There is support for "generic" DMA, that might work on other
controllers, but now you have been warned :)
More chipset specific code will come soon, I have to find testers
with the approbiate HW, more on that when I have it ready.
The system now uses its own major numbers, please run MAKEDEV
with the devices you need (ad?, acd?, afd?, ast?).
For now the disk driver will also attach to the old wd major
so one can at least boot without this step, but be warned, this
will eventually go away. The bootblocks will have to be changed
before one can boot directly from an "ad" device though.
Fixed problems:
All known hang problems should be solved
The probe code has been sligthly changed, this should solve
the reports I have lying around (I hope).
Hangs when accessing ata & atapi device on the same channel simultaniously.
A real braino in ata_start caused this, fixed.
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, agaiin you have been warned :)
But please tell me how it works for you!
Enjoy!
-Søren
1999-03-28 18:57:20 +00:00
|
|
|
|
}
|
1999-11-24 21:40:05 +00:00
|
|
|
|
if (wdmamode >= 2 && apiomode >= 4) {
|
Fourth update to the new ATA/ATAPI driver:
Well, better late than newer, but things has been hectic
around here, sorry for the long delay.
DMA support has been added to the ATA disk driver.
This only works on Intel PIIX3/4, Acer Aladdin and Promise controllers.
The promise support works without the BIOS on the board,
and timing modes are set to support up to UDMA speed. This
solves the problems with having more than one promise controller
in the same system.
There is support for "generic" DMA, that might work on other
controllers, but now you have been warned :)
More chipset specific code will come soon, I have to find testers
with the approbiate HW, more on that when I have it ready.
The system now uses its own major numbers, please run MAKEDEV
with the devices you need (ad?, acd?, afd?, ast?).
For now the disk driver will also attach to the old wd major
so one can at least boot without this step, but be warned, this
will eventually go away. The bootblocks will have to be changed
before one can boot directly from an "ad" device though.
Fixed problems:
All known hang problems should be solved
The probe code has been sligthly changed, this should solve
the reports I have lying around (I hope).
Hangs when accessing ata & atapi device on the same channel simultaniously.
A real braino in ata_start caused this, fixed.
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, agaiin you have been warned :)
But please tell me how it works for you!
Enjoy!
-Søren
1999-03-28 18:57:20 +00:00
|
|
|
|
error = ata_command(scp, device, ATA_C_SETFEATURES, 0, 0, 0,
|
1999-11-08 21:36:00 +00:00
|
|
|
|
ATA_WDMA2, ATA_C_F_SETXFER, ATA_WAIT_READY);
|
Ten'th update to the new ATA/ATAPI driver:
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
1999-09-21 19:50:40 +00:00
|
|
|
|
if (bootverbose)
|
2000-01-24 20:45:24 +00:00
|
|
|
|
ata_printf(scp, device,
|
|
|
|
|
"%s setting up WDMA2 mode on Promise chip\n",
|
|
|
|
|
(error) ? "failed" : "success");
|
1999-11-24 21:40:05 +00:00
|
|
|
|
if (!error) {
|
2000-01-03 10:26:59 +00:00
|
|
|
|
promise_timing(scp, devno, ATA_WDMA2);
|
2000-01-24 20:45:24 +00:00
|
|
|
|
scp->mode[ATA_DEV(device)] = ATA_WDMA2;
|
2000-01-28 13:35:43 +00:00
|
|
|
|
return;
|
1999-11-24 21:40:05 +00:00
|
|
|
|
}
|
Fourth update to the new ATA/ATAPI driver:
Well, better late than newer, but things has been hectic
around here, sorry for the long delay.
DMA support has been added to the ATA disk driver.
This only works on Intel PIIX3/4, Acer Aladdin and Promise controllers.
The promise support works without the BIOS on the board,
and timing modes are set to support up to UDMA speed. This
solves the problems with having more than one promise controller
in the same system.
There is support for "generic" DMA, that might work on other
controllers, but now you have been warned :)
More chipset specific code will come soon, I have to find testers
with the approbiate HW, more on that when I have it ready.
The system now uses its own major numbers, please run MAKEDEV
with the devices you need (ad?, acd?, afd?, ast?).
For now the disk driver will also attach to the old wd major
so one can at least boot without this step, but be warned, this
will eventually go away. The bootblocks will have to be changed
before one can boot directly from an "ad" device though.
Fixed problems:
All known hang problems should be solved
The probe code has been sligthly changed, this should solve
the reports I have lying around (I hope).
Hangs when accessing ata & atapi device on the same channel simultaniously.
A real braino in ata_start caused this, fixed.
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, agaiin you have been warned :)
But please tell me how it works for you!
Enjoy!
-Søren
1999-03-28 18:57:20 +00:00
|
|
|
|
}
|
2000-01-03 10:26:59 +00:00
|
|
|
|
error = ata_command(scp, device, ATA_C_SETFEATURES, 0, 0, 0,
|
|
|
|
|
ata_pio2mode(apiomode),
|
|
|
|
|
ATA_C_F_SETXFER, ATA_WAIT_READY);
|
1999-11-24 21:40:05 +00:00
|
|
|
|
if (bootverbose)
|
2000-01-24 20:45:24 +00:00
|
|
|
|
ata_printf(scp, device,
|
|
|
|
|
"%s setting up PIO%d mode on Promise chip\n",
|
|
|
|
|
(error) ? "failed" : "success",
|
|
|
|
|
(apiomode >= 0) ? apiomode : 0);
|
2000-01-27 19:00:51 +00:00
|
|
|
|
promise_timing(scp, devno, ata_pio2mode(apiomode));
|
|
|
|
|
scp->mode[ATA_DEV(device)] = ata_pio2mode(apiomode);
|
2000-01-28 13:35:43 +00:00
|
|
|
|
return;
|
Fourth update to the new ATA/ATAPI driver:
Well, better late than newer, but things has been hectic
around here, sorry for the long delay.
DMA support has been added to the ATA disk driver.
This only works on Intel PIIX3/4, Acer Aladdin and Promise controllers.
The promise support works without the BIOS on the board,
and timing modes are set to support up to UDMA speed. This
solves the problems with having more than one promise controller
in the same system.
There is support for "generic" DMA, that might work on other
controllers, but now you have been warned :)
More chipset specific code will come soon, I have to find testers
with the approbiate HW, more on that when I have it ready.
The system now uses its own major numbers, please run MAKEDEV
with the devices you need (ad?, acd?, afd?, ast?).
For now the disk driver will also attach to the old wd major
so one can at least boot without this step, but be warned, this
will eventually go away. The bootblocks will have to be changed
before one can boot directly from an "ad" device though.
Fixed problems:
All known hang problems should be solved
The probe code has been sligthly changed, this should solve
the reports I have lying around (I hope).
Hangs when accessing ata & atapi device on the same channel simultaniously.
A real braino in ata_start caused this, fixed.
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, agaiin you have been warned :)
But please tell me how it works for you!
Enjoy!
-Søren
1999-03-28 18:57:20 +00:00
|
|
|
|
|
1999-12-07 22:07:18 +00:00
|
|
|
|
case 0x00041103: /* HighPoint HPT366 controller */
|
1999-11-24 21:40:05 +00:00
|
|
|
|
/* no ATAPI devices for now */
|
Ten'th update to the new ATA/ATAPI driver:
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
1999-09-21 19:50:40 +00:00
|
|
|
|
if ((device == ATA_MASTER && scp->devices & ATA_ATAPI_MASTER) ||
|
1999-10-09 19:57:13 +00:00
|
|
|
|
(device == ATA_SLAVE && scp->devices & ATA_ATAPI_SLAVE))
|
|
|
|
|
break;
|
Ten'th update to the new ATA/ATAPI driver:
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
1999-09-21 19:50:40 +00:00
|
|
|
|
|
2000-02-18 20:57:33 +00:00
|
|
|
|
if (udmamode >=4 && !(pci_read_config(parent, 0x5a, 1) & 0x2)) {
|
1999-10-09 19:57:13 +00:00
|
|
|
|
error = ata_command(scp, device, ATA_C_SETFEATURES, 0, 0, 0,
|
1999-11-08 21:36:00 +00:00
|
|
|
|
ATA_UDMA4, ATA_C_F_SETXFER, ATA_WAIT_READY);
|
1999-10-09 19:57:13 +00:00
|
|
|
|
if (bootverbose)
|
2000-01-24 20:45:24 +00:00
|
|
|
|
ata_printf(scp, device,
|
|
|
|
|
"%s setting up UDMA4 mode on HPT366 chip\n",
|
|
|
|
|
(error) ? "failed" : "success");
|
1999-11-24 21:40:05 +00:00
|
|
|
|
if (!error) {
|
2000-01-03 10:26:59 +00:00
|
|
|
|
hpt366_timing(scp, devno, ATA_UDMA4);
|
2000-01-24 20:45:24 +00:00
|
|
|
|
scp->mode[ATA_DEV(device)] = ATA_UDMA4;
|
2000-01-28 13:35:43 +00:00
|
|
|
|
return;
|
1999-11-24 21:40:05 +00:00
|
|
|
|
}
|
1999-10-09 19:57:13 +00:00
|
|
|
|
}
|
1999-11-24 21:40:05 +00:00
|
|
|
|
if (udmamode >= 2) {
|
Fourth update to the new ATA/ATAPI driver:
Well, better late than newer, but things has been hectic
around here, sorry for the long delay.
DMA support has been added to the ATA disk driver.
This only works on Intel PIIX3/4, Acer Aladdin and Promise controllers.
The promise support works without the BIOS on the board,
and timing modes are set to support up to UDMA speed. This
solves the problems with having more than one promise controller
in the same system.
There is support for "generic" DMA, that might work on other
controllers, but now you have been warned :)
More chipset specific code will come soon, I have to find testers
with the approbiate HW, more on that when I have it ready.
The system now uses its own major numbers, please run MAKEDEV
with the devices you need (ad?, acd?, afd?, ast?).
For now the disk driver will also attach to the old wd major
so one can at least boot without this step, but be warned, this
will eventually go away. The bootblocks will have to be changed
before one can boot directly from an "ad" device though.
Fixed problems:
All known hang problems should be solved
The probe code has been sligthly changed, this should solve
the reports I have lying around (I hope).
Hangs when accessing ata & atapi device on the same channel simultaniously.
A real braino in ata_start caused this, fixed.
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, agaiin you have been warned :)
But please tell me how it works for you!
Enjoy!
-Søren
1999-03-28 18:57:20 +00:00
|
|
|
|
error = ata_command(scp, device, ATA_C_SETFEATURES, 0, 0, 0,
|
1999-11-08 21:36:00 +00:00
|
|
|
|
ATA_UDMA2, ATA_C_F_SETXFER, ATA_WAIT_READY);
|
Ten'th update to the new ATA/ATAPI driver:
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
1999-09-21 19:50:40 +00:00
|
|
|
|
if (bootverbose)
|
2000-01-24 20:45:24 +00:00
|
|
|
|
ata_printf(scp, device,
|
|
|
|
|
"%s setting up UDMA2 mode on HPT366 chip\n",
|
|
|
|
|
(error) ? "failed" : "success");
|
1999-11-24 21:40:05 +00:00
|
|
|
|
if (!error) {
|
2000-01-03 10:26:59 +00:00
|
|
|
|
hpt366_timing(scp, devno, ATA_UDMA2);
|
2000-01-24 20:45:24 +00:00
|
|
|
|
scp->mode[ATA_DEV(device)] = ATA_UDMA2;
|
2000-01-28 13:35:43 +00:00
|
|
|
|
return;
|
1999-11-24 21:40:05 +00:00
|
|
|
|
}
|
Fourth update to the new ATA/ATAPI driver:
Well, better late than newer, but things has been hectic
around here, sorry for the long delay.
DMA support has been added to the ATA disk driver.
This only works on Intel PIIX3/4, Acer Aladdin and Promise controllers.
The promise support works without the BIOS on the board,
and timing modes are set to support up to UDMA speed. This
solves the problems with having more than one promise controller
in the same system.
There is support for "generic" DMA, that might work on other
controllers, but now you have been warned :)
More chipset specific code will come soon, I have to find testers
with the approbiate HW, more on that when I have it ready.
The system now uses its own major numbers, please run MAKEDEV
with the devices you need (ad?, acd?, afd?, ast?).
For now the disk driver will also attach to the old wd major
so one can at least boot without this step, but be warned, this
will eventually go away. The bootblocks will have to be changed
before one can boot directly from an "ad" device though.
Fixed problems:
All known hang problems should be solved
The probe code has been sligthly changed, this should solve
the reports I have lying around (I hope).
Hangs when accessing ata & atapi device on the same channel simultaniously.
A real braino in ata_start caused this, fixed.
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, agaiin you have been warned :)
But please tell me how it works for you!
Enjoy!
-Søren
1999-03-28 18:57:20 +00:00
|
|
|
|
}
|
1999-11-24 21:40:05 +00:00
|
|
|
|
if (wdmamode >= 2 && apiomode >= 4) {
|
Fourth update to the new ATA/ATAPI driver:
Well, better late than newer, but things has been hectic
around here, sorry for the long delay.
DMA support has been added to the ATA disk driver.
This only works on Intel PIIX3/4, Acer Aladdin and Promise controllers.
The promise support works without the BIOS on the board,
and timing modes are set to support up to UDMA speed. This
solves the problems with having more than one promise controller
in the same system.
There is support for "generic" DMA, that might work on other
controllers, but now you have been warned :)
More chipset specific code will come soon, I have to find testers
with the approbiate HW, more on that when I have it ready.
The system now uses its own major numbers, please run MAKEDEV
with the devices you need (ad?, acd?, afd?, ast?).
For now the disk driver will also attach to the old wd major
so one can at least boot without this step, but be warned, this
will eventually go away. The bootblocks will have to be changed
before one can boot directly from an "ad" device though.
Fixed problems:
All known hang problems should be solved
The probe code has been sligthly changed, this should solve
the reports I have lying around (I hope).
Hangs when accessing ata & atapi device on the same channel simultaniously.
A real braino in ata_start caused this, fixed.
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, agaiin you have been warned :)
But please tell me how it works for you!
Enjoy!
-Søren
1999-03-28 18:57:20 +00:00
|
|
|
|
error = ata_command(scp, device, ATA_C_SETFEATURES, 0, 0, 0,
|
1999-11-08 21:36:00 +00:00
|
|
|
|
ATA_WDMA2, ATA_C_F_SETXFER, ATA_WAIT_READY);
|
Ten'th update to the new ATA/ATAPI driver:
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
1999-09-21 19:50:40 +00:00
|
|
|
|
if (bootverbose)
|
2000-01-24 20:45:24 +00:00
|
|
|
|
ata_printf(scp, device,
|
|
|
|
|
"%s setting up WDMA2 mode on HPT366 chip\n",
|
|
|
|
|
(error) ? "failed" : "success");
|
1999-11-24 21:40:05 +00:00
|
|
|
|
if (!error) {
|
2000-01-03 10:26:59 +00:00
|
|
|
|
hpt366_timing(scp, devno, ATA_WDMA2);
|
2000-01-24 20:45:24 +00:00
|
|
|
|
scp->mode[ATA_DEV(device)] = ATA_WDMA2;
|
2000-01-28 13:35:43 +00:00
|
|
|
|
return;
|
1999-11-24 21:40:05 +00:00
|
|
|
|
}
|
1999-10-09 19:57:13 +00:00
|
|
|
|
}
|
2000-01-03 10:26:59 +00:00
|
|
|
|
error = ata_command(scp, device, ATA_C_SETFEATURES, 0, 0, 0,
|
|
|
|
|
ata_pio2mode(apiomode),
|
|
|
|
|
ATA_C_F_SETXFER, ATA_WAIT_READY);
|
1999-11-24 21:40:05 +00:00
|
|
|
|
if (bootverbose)
|
2000-01-24 20:45:24 +00:00
|
|
|
|
ata_printf(scp, device, "%s setting up PIO%d mode on HPT366 chip\n",
|
|
|
|
|
(error) ? "failed" : "success",
|
|
|
|
|
(apiomode >= 0) ? apiomode : 0);
|
2000-01-27 19:00:51 +00:00
|
|
|
|
hpt366_timing(scp, devno, ata_pio2mode(apiomode));
|
|
|
|
|
scp->mode[ATA_DEV(device)] = ata_pio2mode(apiomode);
|
2000-01-28 13:35:43 +00:00
|
|
|
|
return;
|
Fourth update to the new ATA/ATAPI driver:
Well, better late than newer, but things has been hectic
around here, sorry for the long delay.
DMA support has been added to the ATA disk driver.
This only works on Intel PIIX3/4, Acer Aladdin and Promise controllers.
The promise support works without the BIOS on the board,
and timing modes are set to support up to UDMA speed. This
solves the problems with having more than one promise controller
in the same system.
There is support for "generic" DMA, that might work on other
controllers, but now you have been warned :)
More chipset specific code will come soon, I have to find testers
with the approbiate HW, more on that when I have it ready.
The system now uses its own major numbers, please run MAKEDEV
with the devices you need (ad?, acd?, afd?, ast?).
For now the disk driver will also attach to the old wd major
so one can at least boot without this step, but be warned, this
will eventually go away. The bootblocks will have to be changed
before one can boot directly from an "ad" device though.
Fixed problems:
All known hang problems should be solved
The probe code has been sligthly changed, this should solve
the reports I have lying around (I hope).
Hangs when accessing ata & atapi device on the same channel simultaniously.
A real braino in ata_start caused this, fixed.
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, agaiin you have been warned :)
But please tell me how it works for you!
Enjoy!
-Søren
1999-03-28 18:57:20 +00:00
|
|
|
|
|
1999-09-22 12:04:51 +00:00
|
|
|
|
default: /* unknown controller chip */
|
|
|
|
|
/* better not try generic DMA on ATAPI devices it almost never works */
|
|
|
|
|
if ((device == ATA_MASTER && scp->devices & ATA_ATAPI_MASTER) ||
|
|
|
|
|
(device == ATA_SLAVE && scp->devices & ATA_ATAPI_SLAVE))
|
|
|
|
|
break;
|
|
|
|
|
|
2000-01-28 13:35:43 +00:00
|
|
|
|
/* if controller says its setup for DMA take the easy way out */
|
|
|
|
|
/* the downside is we dont know what DMA mode we are in */
|
|
|
|
|
if ((udmamode >= 0 || wdmamode > 1) &&
|
|
|
|
|
(inb(scp->bmaddr + ATA_BMSTAT_PORT) &
|
|
|
|
|
((device==ATA_MASTER) ?
|
|
|
|
|
ATA_BMSTAT_DMA_MASTER : ATA_BMSTAT_DMA_SLAVE))) {
|
|
|
|
|
scp->mode[ATA_DEV(device)] = ATA_DMA;
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
1999-09-22 12:04:51 +00:00
|
|
|
|
/* well, we have no support for this, but try anyways */
|
1999-12-14 10:25:28 +00:00
|
|
|
|
if ((wdmamode >= 2 && apiomode >= 4) && scp->bmaddr) {
|
Fourth update to the new ATA/ATAPI driver:
Well, better late than newer, but things has been hectic
around here, sorry for the long delay.
DMA support has been added to the ATA disk driver.
This only works on Intel PIIX3/4, Acer Aladdin and Promise controllers.
The promise support works without the BIOS on the board,
and timing modes are set to support up to UDMA speed. This
solves the problems with having more than one promise controller
in the same system.
There is support for "generic" DMA, that might work on other
controllers, but now you have been warned :)
More chipset specific code will come soon, I have to find testers
with the approbiate HW, more on that when I have it ready.
The system now uses its own major numbers, please run MAKEDEV
with the devices you need (ad?, acd?, afd?, ast?).
For now the disk driver will also attach to the old wd major
so one can at least boot without this step, but be warned, this
will eventually go away. The bootblocks will have to be changed
before one can boot directly from an "ad" device though.
Fixed problems:
All known hang problems should be solved
The probe code has been sligthly changed, this should solve
the reports I have lying around (I hope).
Hangs when accessing ata & atapi device on the same channel simultaniously.
A real braino in ata_start caused this, fixed.
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, agaiin you have been warned :)
But please tell me how it works for you!
Enjoy!
-Søren
1999-03-28 18:57:20 +00:00
|
|
|
|
error = ata_command(scp, device, ATA_C_SETFEATURES, 0, 0, 0,
|
1999-11-08 21:36:00 +00:00
|
|
|
|
ATA_WDMA2, ATA_C_F_SETXFER, ATA_WAIT_READY);
|
Ten'th update to the new ATA/ATAPI driver:
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
1999-09-21 19:50:40 +00:00
|
|
|
|
if (bootverbose)
|
2000-01-24 20:45:24 +00:00
|
|
|
|
ata_printf(scp, device,
|
|
|
|
|
"%s setting up WDMA2 mode on generic chip\n",
|
|
|
|
|
(error) ? "failed" : "success");
|
1999-11-24 21:40:05 +00:00
|
|
|
|
if (!error) {
|
2000-01-24 20:45:24 +00:00
|
|
|
|
scp->mode[ATA_DEV(device)] = ATA_WDMA2;
|
2000-01-28 13:35:43 +00:00
|
|
|
|
return;
|
1999-11-24 21:40:05 +00:00
|
|
|
|
}
|
Fourth update to the new ATA/ATAPI driver:
Well, better late than newer, but things has been hectic
around here, sorry for the long delay.
DMA support has been added to the ATA disk driver.
This only works on Intel PIIX3/4, Acer Aladdin and Promise controllers.
The promise support works without the BIOS on the board,
and timing modes are set to support up to UDMA speed. This
solves the problems with having more than one promise controller
in the same system.
There is support for "generic" DMA, that might work on other
controllers, but now you have been warned :)
More chipset specific code will come soon, I have to find testers
with the approbiate HW, more on that when I have it ready.
The system now uses its own major numbers, please run MAKEDEV
with the devices you need (ad?, acd?, afd?, ast?).
For now the disk driver will also attach to the old wd major
so one can at least boot without this step, but be warned, this
will eventually go away. The bootblocks will have to be changed
before one can boot directly from an "ad" device though.
Fixed problems:
All known hang problems should be solved
The probe code has been sligthly changed, this should solve
the reports I have lying around (I hope).
Hangs when accessing ata & atapi device on the same channel simultaniously.
A real braino in ata_start caused this, fixed.
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, agaiin you have been warned :)
But please tell me how it works for you!
Enjoy!
-Søren
1999-03-28 18:57:20 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
2000-02-04 10:20:22 +00:00
|
|
|
|
error = ata_command(scp, device, ATA_C_SETFEATURES, 0, 0, 0,
|
|
|
|
|
ata_pio2mode(apiomode), ATA_C_F_SETXFER,ATA_WAIT_READY);
|
2000-01-03 10:26:59 +00:00
|
|
|
|
if (bootverbose)
|
2000-02-04 10:20:22 +00:00
|
|
|
|
ata_printf(scp, device, "%s setting up PIO%d mode on generic chip\n",
|
|
|
|
|
(error) ? "failed" : "success", apiomode < 0 ? 0 : apiomode);
|
|
|
|
|
if (!error)
|
|
|
|
|
scp->mode[ATA_DEV(device)] = ata_pio2mode(apiomode);
|
2000-03-05 16:52:26 +00:00
|
|
|
|
else {
|
2000-02-04 10:20:22 +00:00
|
|
|
|
if (bootverbose)
|
|
|
|
|
ata_printf(scp, device, "using PIO mode set by BIOS\n");
|
2000-03-05 16:52:26 +00:00
|
|
|
|
scp->mode[ATA_DEV(device)] = ATA_PIO;
|
|
|
|
|
}
|
Fourth update to the new ATA/ATAPI driver:
Well, better late than newer, but things has been hectic
around here, sorry for the long delay.
DMA support has been added to the ATA disk driver.
This only works on Intel PIIX3/4, Acer Aladdin and Promise controllers.
The promise support works without the BIOS on the board,
and timing modes are set to support up to UDMA speed. This
solves the problems with having more than one promise controller
in the same system.
There is support for "generic" DMA, that might work on other
controllers, but now you have been warned :)
More chipset specific code will come soon, I have to find testers
with the approbiate HW, more on that when I have it ready.
The system now uses its own major numbers, please run MAKEDEV
with the devices you need (ad?, acd?, afd?, ast?).
For now the disk driver will also attach to the old wd major
so one can at least boot without this step, but be warned, this
will eventually go away. The bootblocks will have to be changed
before one can boot directly from an "ad" device though.
Fixed problems:
All known hang problems should be solved
The probe code has been sligthly changed, this should solve
the reports I have lying around (I hope).
Hangs when accessing ata & atapi device on the same channel simultaniously.
A real braino in ata_start caused this, fixed.
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, agaiin you have been warned :)
But please tell me how it works for you!
Enjoy!
-Søren
1999-03-28 18:57:20 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
int32_t
|
|
|
|
|
ata_dmasetup(struct ata_softc *scp, int32_t device,
|
|
|
|
|
int8_t *data, int32_t count, int32_t flags)
|
|
|
|
|
{
|
|
|
|
|
struct ata_dmaentry *dmatab;
|
|
|
|
|
u_int32_t dma_count, dma_base;
|
|
|
|
|
int32_t i = 0;
|
|
|
|
|
|
1999-04-16 21:22:55 +00:00
|
|
|
|
if (((uintptr_t)data & 1) || (count & 1))
|
Fourth update to the new ATA/ATAPI driver:
Well, better late than newer, but things has been hectic
around here, sorry for the long delay.
DMA support has been added to the ATA disk driver.
This only works on Intel PIIX3/4, Acer Aladdin and Promise controllers.
The promise support works without the BIOS on the board,
and timing modes are set to support up to UDMA speed. This
solves the problems with having more than one promise controller
in the same system.
There is support for "generic" DMA, that might work on other
controllers, but now you have been warned :)
More chipset specific code will come soon, I have to find testers
with the approbiate HW, more on that when I have it ready.
The system now uses its own major numbers, please run MAKEDEV
with the devices you need (ad?, acd?, afd?, ast?).
For now the disk driver will also attach to the old wd major
so one can at least boot without this step, but be warned, this
will eventually go away. The bootblocks will have to be changed
before one can boot directly from an "ad" device though.
Fixed problems:
All known hang problems should be solved
The probe code has been sligthly changed, this should solve
the reports I have lying around (I hope).
Hangs when accessing ata & atapi device on the same channel simultaniously.
A real braino in ata_start caused this, fixed.
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, agaiin you have been warned :)
But please tell me how it works for you!
Enjoy!
-Søren
1999-03-28 18:57:20 +00:00
|
|
|
|
return -1;
|
|
|
|
|
|
|
|
|
|
if (!count) {
|
2000-01-24 20:45:24 +00:00
|
|
|
|
ata_printf(scp, device, "zero length DMA transfer attempted\n");
|
Fourth update to the new ATA/ATAPI driver:
Well, better late than newer, but things has been hectic
around here, sorry for the long delay.
DMA support has been added to the ATA disk driver.
This only works on Intel PIIX3/4, Acer Aladdin and Promise controllers.
The promise support works without the BIOS on the board,
and timing modes are set to support up to UDMA speed. This
solves the problems with having more than one promise controller
in the same system.
There is support for "generic" DMA, that might work on other
controllers, but now you have been warned :)
More chipset specific code will come soon, I have to find testers
with the approbiate HW, more on that when I have it ready.
The system now uses its own major numbers, please run MAKEDEV
with the devices you need (ad?, acd?, afd?, ast?).
For now the disk driver will also attach to the old wd major
so one can at least boot without this step, but be warned, this
will eventually go away. The bootblocks will have to be changed
before one can boot directly from an "ad" device though.
Fixed problems:
All known hang problems should be solved
The probe code has been sligthly changed, this should solve
the reports I have lying around (I hope).
Hangs when accessing ata & atapi device on the same channel simultaniously.
A real braino in ata_start caused this, fixed.
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, agaiin you have been warned :)
But please tell me how it works for you!
Enjoy!
-Søren
1999-03-28 18:57:20 +00:00
|
|
|
|
return -1;
|
|
|
|
|
}
|
|
|
|
|
|
2000-01-24 20:45:24 +00:00
|
|
|
|
dmatab = scp->dmatab[ATA_DEV(device)];
|
Fourth update to the new ATA/ATAPI driver:
Well, better late than newer, but things has been hectic
around here, sorry for the long delay.
DMA support has been added to the ATA disk driver.
This only works on Intel PIIX3/4, Acer Aladdin and Promise controllers.
The promise support works without the BIOS on the board,
and timing modes are set to support up to UDMA speed. This
solves the problems with having more than one promise controller
in the same system.
There is support for "generic" DMA, that might work on other
controllers, but now you have been warned :)
More chipset specific code will come soon, I have to find testers
with the approbiate HW, more on that when I have it ready.
The system now uses its own major numbers, please run MAKEDEV
with the devices you need (ad?, acd?, afd?, ast?).
For now the disk driver will also attach to the old wd major
so one can at least boot without this step, but be warned, this
will eventually go away. The bootblocks will have to be changed
before one can boot directly from an "ad" device though.
Fixed problems:
All known hang problems should be solved
The probe code has been sligthly changed, this should solve
the reports I have lying around (I hope).
Hangs when accessing ata & atapi device on the same channel simultaniously.
A real braino in ata_start caused this, fixed.
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, agaiin you have been warned :)
But please tell me how it works for you!
Enjoy!
-Søren
1999-03-28 18:57:20 +00:00
|
|
|
|
dma_base = vtophys(data);
|
2000-01-24 20:45:24 +00:00
|
|
|
|
dma_count = min(count, (PAGE_SIZE - ((uintptr_t)data & PAGE_MASK)));
|
Fourth update to the new ATA/ATAPI driver:
Well, better late than newer, but things has been hectic
around here, sorry for the long delay.
DMA support has been added to the ATA disk driver.
This only works on Intel PIIX3/4, Acer Aladdin and Promise controllers.
The promise support works without the BIOS on the board,
and timing modes are set to support up to UDMA speed. This
solves the problems with having more than one promise controller
in the same system.
There is support for "generic" DMA, that might work on other
controllers, but now you have been warned :)
More chipset specific code will come soon, I have to find testers
with the approbiate HW, more on that when I have it ready.
The system now uses its own major numbers, please run MAKEDEV
with the devices you need (ad?, acd?, afd?, ast?).
For now the disk driver will also attach to the old wd major
so one can at least boot without this step, but be warned, this
will eventually go away. The bootblocks will have to be changed
before one can boot directly from an "ad" device though.
Fixed problems:
All known hang problems should be solved
The probe code has been sligthly changed, this should solve
the reports I have lying around (I hope).
Hangs when accessing ata & atapi device on the same channel simultaniously.
A real braino in ata_start caused this, fixed.
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, agaiin you have been warned :)
But please tell me how it works for you!
Enjoy!
-Søren
1999-03-28 18:57:20 +00:00
|
|
|
|
data += dma_count;
|
|
|
|
|
count -= dma_count;
|
|
|
|
|
|
|
|
|
|
while (count) {
|
|
|
|
|
dmatab[i].base = dma_base;
|
|
|
|
|
dmatab[i].count = (dma_count & 0xffff);
|
|
|
|
|
i++;
|
|
|
|
|
if (i >= ATA_DMA_ENTRIES) {
|
2000-01-24 20:45:24 +00:00
|
|
|
|
ata_printf(scp, device, "too many segments in DMA table\n");
|
Fourth update to the new ATA/ATAPI driver:
Well, better late than newer, but things has been hectic
around here, sorry for the long delay.
DMA support has been added to the ATA disk driver.
This only works on Intel PIIX3/4, Acer Aladdin and Promise controllers.
The promise support works without the BIOS on the board,
and timing modes are set to support up to UDMA speed. This
solves the problems with having more than one promise controller
in the same system.
There is support for "generic" DMA, that might work on other
controllers, but now you have been warned :)
More chipset specific code will come soon, I have to find testers
with the approbiate HW, more on that when I have it ready.
The system now uses its own major numbers, please run MAKEDEV
with the devices you need (ad?, acd?, afd?, ast?).
For now the disk driver will also attach to the old wd major
so one can at least boot without this step, but be warned, this
will eventually go away. The bootblocks will have to be changed
before one can boot directly from an "ad" device though.
Fixed problems:
All known hang problems should be solved
The probe code has been sligthly changed, this should solve
the reports I have lying around (I hope).
Hangs when accessing ata & atapi device on the same channel simultaniously.
A real braino in ata_start caused this, fixed.
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, agaiin you have been warned :)
But please tell me how it works for you!
Enjoy!
-Søren
1999-03-28 18:57:20 +00:00
|
|
|
|
return -1;
|
|
|
|
|
}
|
|
|
|
|
dma_base = vtophys(data);
|
2000-01-24 20:45:24 +00:00
|
|
|
|
dma_count = min(count, PAGE_SIZE);
|
|
|
|
|
data += min(count, PAGE_SIZE);
|
|
|
|
|
count -= min(count, PAGE_SIZE);
|
Fourth update to the new ATA/ATAPI driver:
Well, better late than newer, but things has been hectic
around here, sorry for the long delay.
DMA support has been added to the ATA disk driver.
This only works on Intel PIIX3/4, Acer Aladdin and Promise controllers.
The promise support works without the BIOS on the board,
and timing modes are set to support up to UDMA speed. This
solves the problems with having more than one promise controller
in the same system.
There is support for "generic" DMA, that might work on other
controllers, but now you have been warned :)
More chipset specific code will come soon, I have to find testers
with the approbiate HW, more on that when I have it ready.
The system now uses its own major numbers, please run MAKEDEV
with the devices you need (ad?, acd?, afd?, ast?).
For now the disk driver will also attach to the old wd major
so one can at least boot without this step, but be warned, this
will eventually go away. The bootblocks will have to be changed
before one can boot directly from an "ad" device though.
Fixed problems:
All known hang problems should be solved
The probe code has been sligthly changed, this should solve
the reports I have lying around (I hope).
Hangs when accessing ata & atapi device on the same channel simultaniously.
A real braino in ata_start caused this, fixed.
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, agaiin you have been warned :)
But please tell me how it works for you!
Enjoy!
-Søren
1999-03-28 18:57:20 +00:00
|
|
|
|
}
|
|
|
|
|
dmatab[i].base = dma_base;
|
|
|
|
|
dmatab[i].count = (dma_count & 0xffff) | ATA_DMA_EOT;
|
|
|
|
|
outl(scp->bmaddr + ATA_BMDTP_PORT, vtophys(dmatab));
|
|
|
|
|
outb(scp->bmaddr + ATA_BMCMD_PORT, flags ? ATA_BMCMD_WRITE_READ:0);
|
|
|
|
|
outb(scp->bmaddr + ATA_BMSTAT_PORT, (inb(scp->bmaddr + ATA_BMSTAT_PORT) |
|
|
|
|
|
(ATA_BMSTAT_INTERRUPT | ATA_BMSTAT_ERROR)));
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void
|
1999-10-09 19:57:13 +00:00
|
|
|
|
ata_dmastart(struct ata_softc *scp)
|
Fourth update to the new ATA/ATAPI driver:
Well, better late than newer, but things has been hectic
around here, sorry for the long delay.
DMA support has been added to the ATA disk driver.
This only works on Intel PIIX3/4, Acer Aladdin and Promise controllers.
The promise support works without the BIOS on the board,
and timing modes are set to support up to UDMA speed. This
solves the problems with having more than one promise controller
in the same system.
There is support for "generic" DMA, that might work on other
controllers, but now you have been warned :)
More chipset specific code will come soon, I have to find testers
with the approbiate HW, more on that when I have it ready.
The system now uses its own major numbers, please run MAKEDEV
with the devices you need (ad?, acd?, afd?, ast?).
For now the disk driver will also attach to the old wd major
so one can at least boot without this step, but be warned, this
will eventually go away. The bootblocks will have to be changed
before one can boot directly from an "ad" device though.
Fixed problems:
All known hang problems should be solved
The probe code has been sligthly changed, this should solve
the reports I have lying around (I hope).
Hangs when accessing ata & atapi device on the same channel simultaniously.
A real braino in ata_start caused this, fixed.
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, agaiin you have been warned :)
But please tell me how it works for you!
Enjoy!
-Søren
1999-03-28 18:57:20 +00:00
|
|
|
|
{
|
1999-10-09 19:57:13 +00:00
|
|
|
|
scp->flags |= ATA_DMA_ACTIVE;
|
Fourth update to the new ATA/ATAPI driver:
Well, better late than newer, but things has been hectic
around here, sorry for the long delay.
DMA support has been added to the ATA disk driver.
This only works on Intel PIIX3/4, Acer Aladdin and Promise controllers.
The promise support works without the BIOS on the board,
and timing modes are set to support up to UDMA speed. This
solves the problems with having more than one promise controller
in the same system.
There is support for "generic" DMA, that might work on other
controllers, but now you have been warned :)
More chipset specific code will come soon, I have to find testers
with the approbiate HW, more on that when I have it ready.
The system now uses its own major numbers, please run MAKEDEV
with the devices you need (ad?, acd?, afd?, ast?).
For now the disk driver will also attach to the old wd major
so one can at least boot without this step, but be warned, this
will eventually go away. The bootblocks will have to be changed
before one can boot directly from an "ad" device though.
Fixed problems:
All known hang problems should be solved
The probe code has been sligthly changed, this should solve
the reports I have lying around (I hope).
Hangs when accessing ata & atapi device on the same channel simultaniously.
A real braino in ata_start caused this, fixed.
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, agaiin you have been warned :)
But please tell me how it works for you!
Enjoy!
-Søren
1999-03-28 18:57:20 +00:00
|
|
|
|
outb(scp->bmaddr + ATA_BMCMD_PORT,
|
|
|
|
|
inb(scp->bmaddr + ATA_BMCMD_PORT) | ATA_BMCMD_START_STOP);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
int32_t
|
1999-10-09 19:57:13 +00:00
|
|
|
|
ata_dmadone(struct ata_softc *scp)
|
Fourth update to the new ATA/ATAPI driver:
Well, better late than newer, but things has been hectic
around here, sorry for the long delay.
DMA support has been added to the ATA disk driver.
This only works on Intel PIIX3/4, Acer Aladdin and Promise controllers.
The promise support works without the BIOS on the board,
and timing modes are set to support up to UDMA speed. This
solves the problems with having more than one promise controller
in the same system.
There is support for "generic" DMA, that might work on other
controllers, but now you have been warned :)
More chipset specific code will come soon, I have to find testers
with the approbiate HW, more on that when I have it ready.
The system now uses its own major numbers, please run MAKEDEV
with the devices you need (ad?, acd?, afd?, ast?).
For now the disk driver will also attach to the old wd major
so one can at least boot without this step, but be warned, this
will eventually go away. The bootblocks will have to be changed
before one can boot directly from an "ad" device though.
Fixed problems:
All known hang problems should be solved
The probe code has been sligthly changed, this should solve
the reports I have lying around (I hope).
Hangs when accessing ata & atapi device on the same channel simultaniously.
A real braino in ata_start caused this, fixed.
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, agaiin you have been warned :)
But please tell me how it works for you!
Enjoy!
-Søren
1999-03-28 18:57:20 +00:00
|
|
|
|
{
|
|
|
|
|
outb(scp->bmaddr + ATA_BMCMD_PORT,
|
|
|
|
|
inb(scp->bmaddr + ATA_BMCMD_PORT) & ~ATA_BMCMD_START_STOP);
|
1999-10-09 19:57:13 +00:00
|
|
|
|
scp->flags &= ~ATA_DMA_ACTIVE;
|
Fourth update to the new ATA/ATAPI driver:
Well, better late than newer, but things has been hectic
around here, sorry for the long delay.
DMA support has been added to the ATA disk driver.
This only works on Intel PIIX3/4, Acer Aladdin and Promise controllers.
The promise support works without the BIOS on the board,
and timing modes are set to support up to UDMA speed. This
solves the problems with having more than one promise controller
in the same system.
There is support for "generic" DMA, that might work on other
controllers, but now you have been warned :)
More chipset specific code will come soon, I have to find testers
with the approbiate HW, more on that when I have it ready.
The system now uses its own major numbers, please run MAKEDEV
with the devices you need (ad?, acd?, afd?, ast?).
For now the disk driver will also attach to the old wd major
so one can at least boot without this step, but be warned, this
will eventually go away. The bootblocks will have to be changed
before one can boot directly from an "ad" device though.
Fixed problems:
All known hang problems should be solved
The probe code has been sligthly changed, this should solve
the reports I have lying around (I hope).
Hangs when accessing ata & atapi device on the same channel simultaniously.
A real braino in ata_start caused this, fixed.
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, agaiin you have been warned :)
But please tell me how it works for you!
Enjoy!
-Søren
1999-03-28 18:57:20 +00:00
|
|
|
|
return inb(scp->bmaddr + ATA_BMSTAT_PORT) & ATA_BMSTAT_MASK;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
int32_t
|
1999-10-09 19:57:13 +00:00
|
|
|
|
ata_dmastatus(struct ata_softc *scp)
|
Fourth update to the new ATA/ATAPI driver:
Well, better late than newer, but things has been hectic
around here, sorry for the long delay.
DMA support has been added to the ATA disk driver.
This only works on Intel PIIX3/4, Acer Aladdin and Promise controllers.
The promise support works without the BIOS on the board,
and timing modes are set to support up to UDMA speed. This
solves the problems with having more than one promise controller
in the same system.
There is support for "generic" DMA, that might work on other
controllers, but now you have been warned :)
More chipset specific code will come soon, I have to find testers
with the approbiate HW, more on that when I have it ready.
The system now uses its own major numbers, please run MAKEDEV
with the devices you need (ad?, acd?, afd?, ast?).
For now the disk driver will also attach to the old wd major
so one can at least boot without this step, but be warned, this
will eventually go away. The bootblocks will have to be changed
before one can boot directly from an "ad" device though.
Fixed problems:
All known hang problems should be solved
The probe code has been sligthly changed, this should solve
the reports I have lying around (I hope).
Hangs when accessing ata & atapi device on the same channel simultaniously.
A real braino in ata_start caused this, fixed.
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, agaiin you have been warned :)
But please tell me how it works for you!
Enjoy!
-Søren
1999-03-28 18:57:20 +00:00
|
|
|
|
{
|
|
|
|
|
return inb(scp->bmaddr + ATA_BMSTAT_PORT) & ATA_BMSTAT_MASK;
|
|
|
|
|
}
|
|
|
|
|
|
1999-10-09 19:57:13 +00:00
|
|
|
|
static void
|
2000-01-03 10:26:59 +00:00
|
|
|
|
promise_timing(struct ata_softc *scp, int32_t devno, int32_t mode)
|
|
|
|
|
{
|
2000-02-04 10:20:22 +00:00
|
|
|
|
u_int32_t timing = 0;
|
|
|
|
|
struct promise_timing {
|
|
|
|
|
u_int8_t pa:4;
|
|
|
|
|
u_int8_t prefetch:1;
|
|
|
|
|
u_int8_t iordy:1;
|
|
|
|
|
u_int8_t errdy:1;
|
|
|
|
|
u_int8_t syncin:1;
|
|
|
|
|
u_int8_t pb:5;
|
|
|
|
|
u_int8_t mb:3;
|
|
|
|
|
u_int8_t mc:4;
|
|
|
|
|
u_int8_t dmaw:1;
|
|
|
|
|
u_int8_t dmar:1;
|
|
|
|
|
u_int8_t iordyp:1;
|
|
|
|
|
u_int8_t dmarqp:1;
|
|
|
|
|
u_int8_t reserved:8;
|
|
|
|
|
} *t = (struct promise_timing*)&timing;
|
|
|
|
|
|
|
|
|
|
t->iordy = 1; t->iordyp = 1;
|
|
|
|
|
if (mode >= ATA_DMA) {
|
|
|
|
|
t->prefetch = 1; t->errdy = 1; t->syncin = 1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
switch (scp->chiptype) {
|
|
|
|
|
case 0x4d33105a: /* Promise 33's */
|
|
|
|
|
switch (mode) {
|
|
|
|
|
default:
|
|
|
|
|
case ATA_PIO0: t->pa = 9; t->pb = 19; t->mb = 7; t->mc = 15; break;
|
|
|
|
|
case ATA_PIO1: t->pa = 5; t->pb = 12; t->mb = 7; t->mc = 15; break;
|
|
|
|
|
case ATA_PIO2: t->pa = 3; t->pb = 8; t->mb = 7; t->mc = 15; break;
|
|
|
|
|
case ATA_PIO3: t->pa = 2; t->pb = 6; t->mb = 7; t->mc = 15; break;
|
|
|
|
|
case ATA_PIO4: t->pa = 1; t->pb = 4; t->mb = 7; t->mc = 15; break;
|
|
|
|
|
case ATA_WDMA2: t->pa = 3; t->pb = 7; t->mb = 3; t->mc = 3; break;
|
|
|
|
|
case ATA_UDMA2: t->pa = 3; t->pb = 7; t->mb = 1; t->mc = 1; break;
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case 0x4d38105a: /* Promise 66's */
|
|
|
|
|
switch (mode) {
|
|
|
|
|
default:
|
|
|
|
|
case ATA_PIO0: t->pa = 15; t->pb = 31; t->mb = 7; t->mc = 15; break;
|
|
|
|
|
case ATA_PIO1: t->pa = 10; t->pb = 24; t->mb = 7; t->mc = 15; break;
|
|
|
|
|
case ATA_PIO2: t->pa = 6; t->pb = 16; t->mb = 7; t->mc = 15; break;
|
|
|
|
|
case ATA_PIO3: t->pa = 4; t->pb = 12; t->mb = 7; t->mc = 15; break;
|
|
|
|
|
case ATA_PIO4: t->pa = 2; t->pb = 8; t->mb = 7; t->mc = 15; break;
|
|
|
|
|
case ATA_WDMA2: t->pa = 6; t->pb = 14; t->mb = 6; t->mc = 6; break;
|
|
|
|
|
case ATA_UDMA2: t->pa = 6; t->pb = 14; t->mb = 2; t->mc = 2; break;
|
|
|
|
|
case ATA_UDMA4: t->pa = 3; t->pb = 7; t->mb = 1; t->mc = 1; break;
|
|
|
|
|
}
|
|
|
|
|
break;
|
2000-01-03 10:26:59 +00:00
|
|
|
|
}
|
2000-02-18 20:57:33 +00:00
|
|
|
|
pci_write_config(device_get_parent(scp->dev), 0x60 + (devno<<2), timing, 4);
|
2000-01-03 10:26:59 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void
|
|
|
|
|
hpt366_timing(struct ata_softc *scp, int32_t devno, int32_t mode)
|
1999-10-09 19:57:13 +00:00
|
|
|
|
{
|
2000-02-18 20:57:33 +00:00
|
|
|
|
device_t parent = device_get_parent(scp->dev);
|
1999-10-09 19:57:13 +00:00
|
|
|
|
u_int32_t timing;
|
|
|
|
|
|
2000-02-18 20:57:33 +00:00
|
|
|
|
switch (pci_read_config(parent, 0x41 + (devno << 2), 1)) {
|
1999-10-09 19:57:13 +00:00
|
|
|
|
case 0x85: /* 25Mhz */
|
|
|
|
|
switch (mode) {
|
2000-01-03 10:26:59 +00:00
|
|
|
|
case ATA_PIO0: timing = 0xc0d08585; break;
|
|
|
|
|
case ATA_PIO1: timing = 0xc0d08572; break;
|
|
|
|
|
case ATA_PIO2: timing = 0xc0ca8542; break;
|
|
|
|
|
case ATA_PIO3: timing = 0xc0ca8532; break;
|
|
|
|
|
case ATA_PIO4: timing = 0xc0ca8521; break;
|
|
|
|
|
case ATA_WDMA2: timing = 0xa0ca8521; break;
|
|
|
|
|
case ATA_UDMA2: timing = 0x90cf8521; break;
|
|
|
|
|
case ATA_UDMA4: timing = 0x90c98521; break;
|
|
|
|
|
default: timing = 0x01208585;
|
1999-10-09 19:57:13 +00:00
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
default:
|
|
|
|
|
case 0xa7: /* 33MHz */
|
|
|
|
|
switch (mode) {
|
2000-01-03 10:26:59 +00:00
|
|
|
|
case ATA_PIO0: timing = 0xc0d0a7aa; break;
|
|
|
|
|
case ATA_PIO1: timing = 0xc0d0a7a3; break;
|
|
|
|
|
case ATA_PIO2: timing = 0xc0d0a753; break;
|
|
|
|
|
case ATA_PIO3: timing = 0xc0c8a742; break;
|
|
|
|
|
case ATA_PIO4: timing = 0xc0c8a731; break;
|
|
|
|
|
case ATA_WDMA2: timing = 0xa0c8a731; break;
|
|
|
|
|
case ATA_UDMA2: timing = 0x90caa731; break;
|
|
|
|
|
case ATA_UDMA4: timing = 0x90c9a731; break;
|
|
|
|
|
default: timing = 0x0120a7a7;
|
1999-10-09 19:57:13 +00:00
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
case 0xd9: /* 40Mhz */
|
|
|
|
|
switch (mode) {
|
2000-01-03 10:26:59 +00:00
|
|
|
|
case ATA_PIO0: timing = 0xc018d9d9; break;
|
|
|
|
|
case ATA_PIO1: timing = 0xc010d9c7; break;
|
|
|
|
|
case ATA_PIO2: timing = 0xc010d997; break;
|
|
|
|
|
case ATA_PIO3: timing = 0xc010d974; break;
|
|
|
|
|
case ATA_PIO4: timing = 0xc008d963; break;
|
|
|
|
|
case ATA_WDMA2: timing = 0xa008d943; break;
|
|
|
|
|
case ATA_UDMA2: timing = 0x900bd943; break;
|
|
|
|
|
case ATA_UDMA4: timing = 0x900fd943; break;
|
|
|
|
|
default: timing = 0x0120d9d9;
|
1999-10-09 19:57:13 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
2000-02-18 20:57:33 +00:00
|
|
|
|
pci_write_config(parent, 0x40 + (devno << 2) , (timing & ~0x80000000), 4);
|
1999-10-09 19:57:13 +00:00
|
|
|
|
}
|
|
|
|
|
|
Fourth update to the new ATA/ATAPI driver:
Well, better late than newer, but things has been hectic
around here, sorry for the long delay.
DMA support has been added to the ATA disk driver.
This only works on Intel PIIX3/4, Acer Aladdin and Promise controllers.
The promise support works without the BIOS on the board,
and timing modes are set to support up to UDMA speed. This
solves the problems with having more than one promise controller
in the same system.
There is support for "generic" DMA, that might work on other
controllers, but now you have been warned :)
More chipset specific code will come soon, I have to find testers
with the approbiate HW, more on that when I have it ready.
The system now uses its own major numbers, please run MAKEDEV
with the devices you need (ad?, acd?, afd?, ast?).
For now the disk driver will also attach to the old wd major
so one can at least boot without this step, but be warned, this
will eventually go away. The bootblocks will have to be changed
before one can boot directly from an "ad" device though.
Fixed problems:
All known hang problems should be solved
The probe code has been sligthly changed, this should solve
the reports I have lying around (I hope).
Hangs when accessing ata & atapi device on the same channel simultaniously.
A real braino in ata_start caused this, fixed.
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, agaiin you have been warned :)
But please tell me how it works for you!
Enjoy!
-Søren
1999-03-28 18:57:20 +00:00
|
|
|
|
#else /* NPCI > 0 */
|
|
|
|
|
|
2000-01-28 15:57:13 +00:00
|
|
|
|
void
|
Fourth update to the new ATA/ATAPI driver:
Well, better late than newer, but things has been hectic
around here, sorry for the long delay.
DMA support has been added to the ATA disk driver.
This only works on Intel PIIX3/4, Acer Aladdin and Promise controllers.
The promise support works without the BIOS on the board,
and timing modes are set to support up to UDMA speed. This
solves the problems with having more than one promise controller
in the same system.
There is support for "generic" DMA, that might work on other
controllers, but now you have been warned :)
More chipset specific code will come soon, I have to find testers
with the approbiate HW, more on that when I have it ready.
The system now uses its own major numbers, please run MAKEDEV
with the devices you need (ad?, acd?, afd?, ast?).
For now the disk driver will also attach to the old wd major
so one can at least boot without this step, but be warned, this
will eventually go away. The bootblocks will have to be changed
before one can boot directly from an "ad" device though.
Fixed problems:
All known hang problems should be solved
The probe code has been sligthly changed, this should solve
the reports I have lying around (I hope).
Hangs when accessing ata & atapi device on the same channel simultaniously.
A real braino in ata_start caused this, fixed.
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, agaiin you have been warned :)
But please tell me how it works for you!
Enjoy!
-Søren
1999-03-28 18:57:20 +00:00
|
|
|
|
ata_dmainit(struct ata_softc *scp, int32_t device,
|
Ten'th update to the new ATA/ATAPI driver:
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
1999-09-21 19:50:40 +00:00
|
|
|
|
int32_t piomode, int32_t wdmamode, int32_t udmamode)
|
Fourth update to the new ATA/ATAPI driver:
Well, better late than newer, but things has been hectic
around here, sorry for the long delay.
DMA support has been added to the ATA disk driver.
This only works on Intel PIIX3/4, Acer Aladdin and Promise controllers.
The promise support works without the BIOS on the board,
and timing modes are set to support up to UDMA speed. This
solves the problems with having more than one promise controller
in the same system.
There is support for "generic" DMA, that might work on other
controllers, but now you have been warned :)
More chipset specific code will come soon, I have to find testers
with the approbiate HW, more on that when I have it ready.
The system now uses its own major numbers, please run MAKEDEV
with the devices you need (ad?, acd?, afd?, ast?).
For now the disk driver will also attach to the old wd major
so one can at least boot without this step, but be warned, this
will eventually go away. The bootblocks will have to be changed
before one can boot directly from an "ad" device though.
Fixed problems:
All known hang problems should be solved
The probe code has been sligthly changed, this should solve
the reports I have lying around (I hope).
Hangs when accessing ata & atapi device on the same channel simultaniously.
A real braino in ata_start caused this, fixed.
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, agaiin you have been warned :)
But please tell me how it works for you!
Enjoy!
-Søren
1999-03-28 18:57:20 +00:00
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
int32_t
|
|
|
|
|
ata_dmasetup(struct ata_softc *scp, int32_t device,
|
Ten'th update to the new ATA/ATAPI driver:
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
1999-09-21 19:50:40 +00:00
|
|
|
|
int8_t *data, int32_t count, int32_t flags)
|
Fourth update to the new ATA/ATAPI driver:
Well, better late than newer, but things has been hectic
around here, sorry for the long delay.
DMA support has been added to the ATA disk driver.
This only works on Intel PIIX3/4, Acer Aladdin and Promise controllers.
The promise support works without the BIOS on the board,
and timing modes are set to support up to UDMA speed. This
solves the problems with having more than one promise controller
in the same system.
There is support for "generic" DMA, that might work on other
controllers, but now you have been warned :)
More chipset specific code will come soon, I have to find testers
with the approbiate HW, more on that when I have it ready.
The system now uses its own major numbers, please run MAKEDEV
with the devices you need (ad?, acd?, afd?, ast?).
For now the disk driver will also attach to the old wd major
so one can at least boot without this step, but be warned, this
will eventually go away. The bootblocks will have to be changed
before one can boot directly from an "ad" device though.
Fixed problems:
All known hang problems should be solved
The probe code has been sligthly changed, this should solve
the reports I have lying around (I hope).
Hangs when accessing ata & atapi device on the same channel simultaniously.
A real braino in ata_start caused this, fixed.
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, agaiin you have been warned :)
But please tell me how it works for you!
Enjoy!
-Søren
1999-03-28 18:57:20 +00:00
|
|
|
|
{
|
|
|
|
|
return -1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void
|
1999-10-09 19:57:13 +00:00
|
|
|
|
ata_dmastart(struct ata_softc *scp)
|
Fourth update to the new ATA/ATAPI driver:
Well, better late than newer, but things has been hectic
around here, sorry for the long delay.
DMA support has been added to the ATA disk driver.
This only works on Intel PIIX3/4, Acer Aladdin and Promise controllers.
The promise support works without the BIOS on the board,
and timing modes are set to support up to UDMA speed. This
solves the problems with having more than one promise controller
in the same system.
There is support for "generic" DMA, that might work on other
controllers, but now you have been warned :)
More chipset specific code will come soon, I have to find testers
with the approbiate HW, more on that when I have it ready.
The system now uses its own major numbers, please run MAKEDEV
with the devices you need (ad?, acd?, afd?, ast?).
For now the disk driver will also attach to the old wd major
so one can at least boot without this step, but be warned, this
will eventually go away. The bootblocks will have to be changed
before one can boot directly from an "ad" device though.
Fixed problems:
All known hang problems should be solved
The probe code has been sligthly changed, this should solve
the reports I have lying around (I hope).
Hangs when accessing ata & atapi device on the same channel simultaniously.
A real braino in ata_start caused this, fixed.
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, agaiin you have been warned :)
But please tell me how it works for you!
Enjoy!
-Søren
1999-03-28 18:57:20 +00:00
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
int32_t
|
1999-10-09 19:57:13 +00:00
|
|
|
|
ata_dmadone(struct ata_softc *scp)
|
Fourth update to the new ATA/ATAPI driver:
Well, better late than newer, but things has been hectic
around here, sorry for the long delay.
DMA support has been added to the ATA disk driver.
This only works on Intel PIIX3/4, Acer Aladdin and Promise controllers.
The promise support works without the BIOS on the board,
and timing modes are set to support up to UDMA speed. This
solves the problems with having more than one promise controller
in the same system.
There is support for "generic" DMA, that might work on other
controllers, but now you have been warned :)
More chipset specific code will come soon, I have to find testers
with the approbiate HW, more on that when I have it ready.
The system now uses its own major numbers, please run MAKEDEV
with the devices you need (ad?, acd?, afd?, ast?).
For now the disk driver will also attach to the old wd major
so one can at least boot without this step, but be warned, this
will eventually go away. The bootblocks will have to be changed
before one can boot directly from an "ad" device though.
Fixed problems:
All known hang problems should be solved
The probe code has been sligthly changed, this should solve
the reports I have lying around (I hope).
Hangs when accessing ata & atapi device on the same channel simultaniously.
A real braino in ata_start caused this, fixed.
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, agaiin you have been warned :)
But please tell me how it works for you!
Enjoy!
-Søren
1999-03-28 18:57:20 +00:00
|
|
|
|
{
|
|
|
|
|
return -1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
int32_t
|
1999-10-09 19:57:13 +00:00
|
|
|
|
ata_dmastatus(struct ata_softc *scp)
|
Fourth update to the new ATA/ATAPI driver:
Well, better late than newer, but things has been hectic
around here, sorry for the long delay.
DMA support has been added to the ATA disk driver.
This only works on Intel PIIX3/4, Acer Aladdin and Promise controllers.
The promise support works without the BIOS on the board,
and timing modes are set to support up to UDMA speed. This
solves the problems with having more than one promise controller
in the same system.
There is support for "generic" DMA, that might work on other
controllers, but now you have been warned :)
More chipset specific code will come soon, I have to find testers
with the approbiate HW, more on that when I have it ready.
The system now uses its own major numbers, please run MAKEDEV
with the devices you need (ad?, acd?, afd?, ast?).
For now the disk driver will also attach to the old wd major
so one can at least boot without this step, but be warned, this
will eventually go away. The bootblocks will have to be changed
before one can boot directly from an "ad" device though.
Fixed problems:
All known hang problems should be solved
The probe code has been sligthly changed, this should solve
the reports I have lying around (I hope).
Hangs when accessing ata & atapi device on the same channel simultaniously.
A real braino in ata_start caused this, fixed.
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, agaiin you have been warned :)
But please tell me how it works for you!
Enjoy!
-Søren
1999-03-28 18:57:20 +00:00
|
|
|
|
{
|
|
|
|
|
return -1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#endif /* NPCI > 0 */
|