Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 25 Aug 2000 00:09:56 -0700 (PDT)
From:      gerti-freebsd@bitart.com
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   kern/20834: Patches and remarks ASUS A7V onboard Promise 100 controller
Message-ID:  <20000825070956.AE34537B43C@hub.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         20834
>Category:       kern
>Synopsis:       Patches and remarks ASUS A7V onboard Promise 100 controller
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Fri Aug 25 00:10:01 PDT 2000
>Closed-Date:
>Last-Modified:
>Originator:     Gerd Knops
>Release:        4.1S
>Organization:
BITart Consulting
>Environment:
FreeBSD basod.bitart.com 4.1-STABLE FreeBSD 4.1-STABLE #3: Fri Aug 25 00:33:58 CDT 2000     gerti@basod.bitart.com:/usr/src/sys/compile/BASOD  i386

>Description:
The onboard Promise ATA100 controller on the ASUS A7V motherboard 
uses a different chipset ID than the stand-alone card. The patches
below add this ID to the ATA driver.

Also in order to be able to boot from the ATA100 disks additional
devices have to be created the dev directory.

There is another problem with the ata driver not addresses in the
patches below: The ata driver appears to be expecting to find a
drive on the primary master channel. If there is no drive, the
probe takes very long, causing the boot process to be delayed.
>How-To-Repeat:
Try an ASUS A7V mobo...
>Fix:
*** ata-all.c.orig	Wed Aug 23 23:13:05 2000
--- ata-all.c	Thu Aug 24 22:55:38 2000
***************
*** 298,303 ****
--- 298,304 ----
  	return "Promise ATA66 controller";
  
      case 0x4d30105a:
+ 	case 0x0d30105a:
  	return "Promise ATA100 controller";
  
      case 0x00041103:
***************
*** 397,403 ****
      }
      else {
      	if (type == 0x4d33105a || type == 0x4d38105a || 
! 	    type == 0x4d30105a || type == 0x00041103) {
  	    /* Promise and HighPoint controllers support busmastering DMA */
  	    rid = 0x20;
  	    sc->bmio = bus_alloc_resource(dev, SYS_RES_IOPORT, &rid,
--- 398,404 ----
      }
      else {
      	if (type == 0x4d33105a || type == 0x4d38105a || 
! 	    type == 0x4d30105a || type == 0x00041103 || type == 0x0d30105a) {
  	    /* Promise and HighPoint controllers support busmastering DMA */
  	    rid = 0x20;
  	    sc->bmio = bus_alloc_resource(dev, SYS_RES_IOPORT, &rid,
***************
*** 417,422 ****
--- 418,424 ----
  
      case 0x4d38105a: /* Promise 66's need their clock changed */
      case 0x4d30105a: /* Promise 100's too */
+     case 0x0d30105a: /* Promise 100's too */
  	outb(rman_get_start(sc->bmio) + 0x11, 
  	     inb(rman_get_start(sc->bmio) + 0x11) | 0x0a);
  	/* FALLTHROUGH */
***************
*** 1085,1090 ****
--- 1087,1093 ----
      case 0x4d33105a:	/* Promise 33's */
      case 0x4d38105a:	/* Promise 66's */
      case 0x4d30105a:	/* Promise 100's */
+     case 0x0d30105a:	/* Promise 100's */
      {
  	struct ata_pci_softc *sc=device_get_softc(device_get_parent(scp->dev));
  
*** ata-dma.c.orig	Wed Aug 23 23:13:06 2000
--- ata-dma.c	Thu Aug 24 22:55:38 2000
***************
*** 474,485 ****
      case 0x4d33105a:	/* Promise Ultra33 / FastTrak33 controllers */
      case 0x4d38105a:	/* Promise Ultra66 / FastTrak66 controllers */
      case 0x4d30105a:	/* Promise Ultra100 / FastTrak100 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 &&
  	    !(pci_read_config(parent, 0x50, 2)&(scp->unit ? 1<<11 : 1<<10))) {
  	    error = ata_command(scp, device, ATA_C_SETFEATURES, 0, 0, 0,
  				ATA_UDMA5, ATA_C_F_SETXFER, ATA_WAIT_READY);
--- 474,486 ----
      case 0x4d33105a:	/* Promise Ultra33 / FastTrak33 controllers */
      case 0x4d38105a:	/* Promise Ultra66 / FastTrak66 controllers */
      case 0x4d30105a:	/* Promise Ultra100 / FastTrak100 controllers */
+     case 0x0d30105a:	/* Promise Ultra100 / FastTrak100 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) &&
  	    !(pci_read_config(parent, 0x50, 2)&(scp->unit ? 1<<11 : 1<<10))) {
  	    error = ata_command(scp, device, ATA_C_SETFEATURES, 0, 0, 0,
  				ATA_UDMA5, ATA_C_F_SETXFER, ATA_WAIT_READY);
***************
*** 494,500 ****
  	    }
  	}
  	if (udmamode >=4 && 
! 	    (scp->chiptype == 0x4d38105a || scp->chiptype == 0x4d30105a) &&
  	    !(pci_read_config(parent, 0x50, 2)&(scp->unit ? 1<<11 : 1<<10))) {
  	    error = ata_command(scp, device, ATA_C_SETFEATURES, 0, 0, 0,
  				ATA_UDMA4, ATA_C_F_SETXFER, ATA_WAIT_READY);
--- 495,501 ----
  	    }
  	}
  	if (udmamode >=4 && 
! 	    (scp->chiptype == 0x4d38105a || scp->chiptype == 0x4d30105a || scp->chiptype == 0x0d30105a) &&
  	    !(pci_read_config(parent, 0x50, 2)&(scp->unit ? 1<<11 : 1<<10))) {
  	    error = ata_command(scp, device, ATA_C_SETFEATURES, 0, 0, 0,
  				ATA_UDMA4, ATA_C_F_SETXFER, ATA_WAIT_READY);
***************
*** 770,775 ****
--- 771,777 ----
  
      case 0x4d38105a:  /* Promise 66's */
      case 0x4d30105a:  /* Promise 100's */
+     case 0x0d30105a:  /* Promise 100's */
  	switch (mode) {
  	default:
  	case ATA_PIO0:  t->pa = 15; t->pb = 31; t->mb = 7; t->mc = 15; break;


>Release-Note:
>Audit-Trail:
>Unformatted:


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20000825070956.AE34537B43C>