aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/ata
diff options
context:
space:
mode:
authorSøren Schmidt <sos@FreeBSD.org>1999-03-29 14:24:42 +0000
committerSøren Schmidt <sos@FreeBSD.org>1999-03-29 14:24:42 +0000
commit20f20ae658e0529ff6580ae0b5c60da2735f3562 (patch)
tree0c848ff200dbf78012c25fb49abc18877158b6f4 /sys/dev/ata
parentc867b0e58227fcde5b913d7af67a142f161c4107 (diff)
Notes
Diffstat (limited to 'sys/dev/ata')
-rw-r--r--sys/dev/ata/ata-dma.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/sys/dev/ata/ata-dma.c b/sys/dev/ata/ata-dma.c
index 1de2f9b824aae..120eeb13d422c 100644
--- a/sys/dev/ata/ata-dma.c
+++ b/sys/dev/ata/ata-dma.c
@@ -25,7 +25,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $Id$
+ * $Id: ata-dma.c,v 1.1 1999/03/28 18:57:19 sos Exp $
*/
#include "ata.h"
@@ -90,7 +90,6 @@ ata_dmainit(struct ata_softc *scp, int32_t device,
devno = (scp->unit << 1) + (device) ? 1 : 0;
mask48 = (1 << devno) + (3 << (16 + (devno << 2)));
new48 = (1 << devno) + (2 << (16 + (devno << 2)));
-
pci_conf_write(scp->tag, 0x48,
(pci_conf_read(scp->tag, 0x48) & ~mask48) | new48);
return 0;
@@ -158,8 +157,6 @@ ata_dmainit(struct ata_softc *scp, int32_t device,
case 0x4d33105a: /* Promise Ultra/33 / FastTrack controllers */
devno = (scp->unit << 1) + (device) ? 1 : 0;
if (udmamode >=2) {
- outb(scp->bmaddr + 0x1f, inb(scp->bmaddr + 0x1f) | 0x01);
- pci_conf_write(scp->tag, 0x60 + (devno << 2), 0x004127f3);
printf("ata%d: %s: settting up UDMA2 mode on Promise chip ",
scp->lun, (device) ? "slave" : "master");
error = ata_command(scp, device, ATA_C_SETFEATURES, 0, 0, 0,
@@ -169,10 +166,11 @@ ata_dmainit(struct ata_softc *scp, int32_t device,
break;
}
printf("OK\n");
+ outb(scp->bmaddr + 0x1f, inb(scp->bmaddr + 0x1f) | 0x01);
+ pci_conf_write(scp->tag, 0x60 + (devno << 2), 0x004127f3);
+ return 0;
}
else if (wdmamode >= 2 && apiomode >= 4) {
- outb(scp->bmaddr + 0x1f, inb(scp->bmaddr + 0x1f) | 0x01);
- pci_conf_write(scp->tag, 0x60 + (devno << 2), 0x004367f3);
printf("ata%d: %s: settting up WDMA2 mode on Promise chip ",
scp->lun, (device) ? "slave" : "master");
error = ata_command(scp, device, ATA_C_SETFEATURES, 0, 0, 0,
@@ -182,11 +180,14 @@ ata_dmainit(struct ata_softc *scp, int32_t device,
break;
}
printf("OK\n");
+ outb(scp->bmaddr + 0x1f, inb(scp->bmaddr + 0x1f) | 0x01);
+ pci_conf_write(scp->tag, 0x60 + (devno << 2), 0x004367f3);
+ return 0;
}
else {
- pci_conf_write(scp->tag, 0x60 + (devno << 2), 0x004fe924);
printf("ata%d: %s: settting up PIO mode on Promise chip OK\n",
scp->lun, (device) ? "slave" : "master");
+ pci_conf_write(scp->tag, 0x60 + (devno << 2), 0x004fe924);
}
break;