From owner-freebsd-bugs Tue May 29 12:50: 9 2001 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id C957437B424 for ; Tue, 29 May 2001 12:50:01 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.1/8.11.1) id f4TJo1l72582; Tue, 29 May 2001 12:50:01 -0700 (PDT) (envelope-from gnats) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id D1DC437B422 for ; Tue, 29 May 2001 12:43:50 -0700 (PDT) (envelope-from nobody@FreeBSD.org) Received: (from nobody@localhost) by freefall.freebsd.org (8.11.1/8.11.1) id f4TJho867259; Tue, 29 May 2001 12:43:50 -0700 (PDT) (envelope-from nobody) Message-Id: <200105291943.f4TJho867259@freefall.freebsd.org> Date: Tue, 29 May 2001 12:43:50 -0700 (PDT) From: jswank@colltech.com To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-1.0 Subject: kern/27750: [PATCH] Promise Ultra100 TX2 unsupported by ata Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org >Number: 27750 >Category: kern >Synopsis: [PATCH] Promise Ultra100 TX2 unsupported by ata >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Tue May 29 12:50:01 PDT 2001 >Closed-Date: >Last-Modified: >Originator: Jason Swank >Release: 4.3-STABLE >Organization: Collective Technologies >Environment: FreeBSD top 4.3-STABLE FreeBSD 4.3-STABLE #7: Sun May 27 17:15:01 EDT 2001 root@top:/usr/src/sys/compile/TOP i386 >Description: The ata code does not support the Promise Ultra100 TX2 controller. The product/vendor ID is unknown to the ata driver. It is reported as: "pci0: (vendor=0x105a, dev=0x4d68)". >How-To-Repeat: Run a -STABLE kernel in conjuction with this controller. >Fix: Attached are two patches which seem to work. --- ata-dma.c Tue May 29 07:36:50 2001 +++ ata-dma.c.orig Tue May 29 07:36:28 2001 @@ -723,14 +723,13 @@ case 0x4d38105a: /* Promise Ultra/FastTrak 66 controllers */ case 0x4d30105a: /* Promise Ultra/FastTrak 100 controllers */ case 0x0d30105a: /* Promise OEM ATA100 controllers */ - case 0x4d68105a: /* Promise Ultra100 TX2 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; - if (udmamode >= 5 && (scp->chiptype == 0x4d30105a || - scp->chiptype == 0x0d30105a || scp->chiptype == 0x4d68105a) && + if (udmamode >= 5 && + (scp->chiptype == 0x4d30105a || scp->chiptype == 0x0d30105a) && !(pci_read_config(parent, 0x50, 2)&(scp->channel ? 1<<11 : 1<<10))){ error = ata_command(scp, device, ATA_C_SETFEATURES, 0, 0, 0, ATA_UDMA5, ATA_C_F_SETXFER, ATA_WAIT_READY); @@ -745,11 +744,10 @@ } } if (udmamode >= 4 && (scp->chiptype == 0x4d38105a || - scp->chiptype == 0x4d30105a || scp->chiptype == 0x0d30105a || - scp->chiptype == 0x4d68105a) && !(pci_read_config(parent , 0x50, 2) - &(scp->channel ? 1<<11 : 1<<10))){ - error = ata_command(scp, device, ATA_C_SETFEATURES, 0, 0 , 0, - ATA_UDMA4, ATA_C_F_SETXFER, ATA_WAIT_READY); + scp->chiptype == 0x4d30105a || scp->chiptype == 0x0d30105a) && + !(pci_read_config(parent, 0x50, 2)&(scp->channel ? 1<<11 : 1<<10))){ + 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 UDMA4 on Promise chip\n", @@ -1043,7 +1041,6 @@ case 0x4d38105a: /* Promise Ultra/Fasttrak 66 */ case 0x4d30105a: /* Promise Ultra/Fasttrak 100 */ case 0x0d30105a: /* Promise OEM ATA 100 */ - case 0x4d68105a: /* Promise Ultra100 TX2 */ switch (mode) { default: case ATA_PIO0: t->pa = 15; t->pb = 31; t->mb = 7; t->mc = 15; break; --- ata-all.c Tue May 29 07:36:54 2001 +++ ata-all.c.orig Tue May 29 07:36:10 2001 @@ -327,11 +327,8 @@ case 0x0d30105a: case 0x4d30105a: return "Promise ATA100 controller"; - - case 0x4d68105a: - return "Promise Ultra100 TX2 controller"; - case 0x00041103: + case 0x00041103: switch (pci_get_revid(dev)) { case 0x00: case 0x01: @@ -430,7 +427,6 @@ case 0x4d38105a: /* Promise 66 & 100 need their clock changed */ case 0x4d30105a: case 0x0d30105a: - case 0x4d68105a: outb(rman_get_start(sc->bmio) + 0x11, inb(rman_get_start(sc->bmio) + 0x11) | 0x0a); /* FALLTHROUGH */ @@ -1124,7 +1120,6 @@ case 0x4d38105a: /* Promise Ultra/Fasttrak 66 */ case 0x4d30105a: /* Promise Ultra/Fasttrak 100 */ case 0x0d30105a: /* Promise OEM ATA100 */ - case 0x4d48105a: /* Promise Ultra100 TX2 */ if (!(inl(rman_get_start(sc->bmio) + 0x1c) & (scp->channel ? 0x00004000 : 0x00000400))) return; >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message