28c28
< * $FreeBSD: head/sys/dev/ata/ata-dma.c 55333 2000-01-03 10:26:59Z sos $
---
> * $FreeBSD: head/sys/dev/ata/ata-dma.c 56138 2000-01-17 02:04:19Z sos $
101c101,103
< case 0x71998086: /* Intel PIIX4 */
---
> case 0x71998086: /* Intel PIIX4e */
> case 0x24118086: /* Intel ICH */
> case 0x24218086: /* Intel ICH0 */
108c110
< printf("ata%d-%s: %s setting up UDMA2 mode on PIIX4 chip\n",
---
> printf("ata%d-%s: %s setting up UDMA2 mode on %s chip\n",
110c112,114
< (error) ? "failed" : "success");
---
> (error) ? "failed" : "success",
> (scp->chiptype == 0x24118086) ? "ICH" :
> (scp->chiptype == 0x24218086) ? "ICH0" :"PIIX4");
146c150
< printf("ata%d-%s: %s setting up WDMA2 mode on PIIX%s chip\n",
---
> printf("ata%d-%s: %s setting up WDMA2 mode on %s chip\n",
149c153,155
< (scp->chiptype == 0x70108086) ? "3" : "4");
---
> (scp->chiptype == 0x70108086) ? "PIIX3" :
> (scp->chiptype == 0x24118086) ? "ICH" :
> (scp->chiptype == 0x24218086) ? "ICH0" :"PIIX4");
254,257c260,263
< /* UDMA4 mode only on 82C686 and AMD 756 */
< if ((udmamode >= 4 && ata_find_dev(scp->dev, 0x06861106)) ||
< (udmamode >= 4 && scp->chiptype == 0x74091022)) {
< error = ata_command(scp, device, ATA_C_SETFEATURES, 0, 0, 0,
---
> /* UDMA modes on 82C686 */
> if (ata_find_dev(scp->dev, 0x06861106)) {
> if (udmamode >= 4) {
> error = ata_command(scp, device, ATA_C_SETFEATURES, 0, 0, 0,
258a265,293
> if (bootverbose)
> printf("ata%d-%s: %s setting up UDMA4 mode on VIA chip\n",
> scp->lun, (device == ATA_MASTER) ? "master":"slave",
> (error) ? "failed" : "success");
> if (!error) {
> pci_write_config(scp->dev, 0x53 - devno, 0xe8, 1);
> scp->mode[(device == ATA_MASTER) ? 0 : 1] = ATA_UDMA4;
> return 0;
> }
> }
> 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)
> printf("ata%d-%s: %s setting up UDMA2 mode on VIA chip\n",
> scp->lun, (device == ATA_MASTER) ? "master":"slave",
> (error) ? "failed" : "success");
> if (!error) {
> pci_write_config(scp->dev, 0x53 - devno, 0xea, 1);
> scp->mode[(device == ATA_MASTER) ? 0 : 1] = ATA_UDMA2;
> return 0;
> }
> }
> }
>
> /* UDMA4 mode on AMD 756 */
> if (udmamode >= 4 && scp->chiptype == 0x74091022) {
> error = ata_command(scp, device, ATA_C_SETFEATURES, 0, 0, 0,
> ATA_UDMA4, ATA_C_F_SETXFER, ATA_WAIT_READY);
260c295
< printf("ata%d-%s: %s setting up UDMA4 mode on %s chip\n",
---
> printf("ata%d-%s: %s setting up UDMA4 mode on AMD chip\n",
262,263c297
< (error) ? "failed" : "success",
< (scp->chiptype == 0x74091022) ? "AMD" : "VIA");
---
> (error) ? "failed" : "success");
271c305
< /* UDMA2 mode only on 82C586 > rev1, 82C596, 82C686, AMD 756 */
---
> /* UDMA2 mode only on 82C586 > rev1, 82C596, AMD 756 */
275d308
< (udmamode >= 2 && ata_find_dev(scp->dev, 0x06861106)) ||
291d323
< /* set WDMA2 mode timing */
< * $FreeBSD: head/sys/dev/ata/ata-dma.c 55333 2000-01-03 10:26:59Z sos $
---
> * $FreeBSD: head/sys/dev/ata/ata-dma.c 56138 2000-01-17 02:04:19Z sos $
101c101,103
< case 0x71998086: /* Intel PIIX4 */
---
> case 0x71998086: /* Intel PIIX4e */
> case 0x24118086: /* Intel ICH */
> case 0x24218086: /* Intel ICH0 */
108c110
< printf("ata%d-%s: %s setting up UDMA2 mode on PIIX4 chip\n",
---
> printf("ata%d-%s: %s setting up UDMA2 mode on %s chip\n",
110c112,114
< (error) ? "failed" : "success");
---
> (error) ? "failed" : "success",
> (scp->chiptype == 0x24118086) ? "ICH" :
> (scp->chiptype == 0x24218086) ? "ICH0" :"PIIX4");
146c150
< printf("ata%d-%s: %s setting up WDMA2 mode on PIIX%s chip\n",
---
> printf("ata%d-%s: %s setting up WDMA2 mode on %s chip\n",
149c153,155
< (scp->chiptype == 0x70108086) ? "3" : "4");
---
> (scp->chiptype == 0x70108086) ? "PIIX3" :
> (scp->chiptype == 0x24118086) ? "ICH" :
> (scp->chiptype == 0x24218086) ? "ICH0" :"PIIX4");
254,257c260,263
< /* UDMA4 mode only on 82C686 and AMD 756 */
< if ((udmamode >= 4 && ata_find_dev(scp->dev, 0x06861106)) ||
< (udmamode >= 4 && scp->chiptype == 0x74091022)) {
< error = ata_command(scp, device, ATA_C_SETFEATURES, 0, 0, 0,
---
> /* UDMA modes on 82C686 */
> if (ata_find_dev(scp->dev, 0x06861106)) {
> if (udmamode >= 4) {
> error = ata_command(scp, device, ATA_C_SETFEATURES, 0, 0, 0,
258a265,293
> if (bootverbose)
> printf("ata%d-%s: %s setting up UDMA4 mode on VIA chip\n",
> scp->lun, (device == ATA_MASTER) ? "master":"slave",
> (error) ? "failed" : "success");
> if (!error) {
> pci_write_config(scp->dev, 0x53 - devno, 0xe8, 1);
> scp->mode[(device == ATA_MASTER) ? 0 : 1] = ATA_UDMA4;
> return 0;
> }
> }
> 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)
> printf("ata%d-%s: %s setting up UDMA2 mode on VIA chip\n",
> scp->lun, (device == ATA_MASTER) ? "master":"slave",
> (error) ? "failed" : "success");
> if (!error) {
> pci_write_config(scp->dev, 0x53 - devno, 0xea, 1);
> scp->mode[(device == ATA_MASTER) ? 0 : 1] = ATA_UDMA2;
> return 0;
> }
> }
> }
>
> /* UDMA4 mode on AMD 756 */
> if (udmamode >= 4 && scp->chiptype == 0x74091022) {
> error = ata_command(scp, device, ATA_C_SETFEATURES, 0, 0, 0,
> ATA_UDMA4, ATA_C_F_SETXFER, ATA_WAIT_READY);
260c295
< printf("ata%d-%s: %s setting up UDMA4 mode on %s chip\n",
---
> printf("ata%d-%s: %s setting up UDMA4 mode on AMD chip\n",
262,263c297
< (error) ? "failed" : "success",
< (scp->chiptype == 0x74091022) ? "AMD" : "VIA");
---
> (error) ? "failed" : "success");
271c305
< /* UDMA2 mode only on 82C586 > rev1, 82C596, 82C686, AMD 756 */
---
> /* UDMA2 mode only on 82C586 > rev1, 82C596, AMD 756 */
275d308
< (udmamode >= 2 && ata_find_dev(scp->dev, 0x06861106)) ||
291d323
< /* set WDMA2 mode timing */