Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 29 May 2002 20:25:33 -0700 (PDT)
From:      "M.J.Kouache" <bsdmail@rhoda.fsworld.co.uk>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   misc/38721: HPT372 fixes have not propagated down to 4-stable
Message-ID:  <200205300325.g4U3PXYK060071@www.freebsd.org>

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

>Number:         38721
>Category:       misc
>Synopsis:       HPT372 fixes have not propagated down to 4-stable
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed May 29 20:30:01 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     M.J.Kouache
>Release:        4-stable
>Organization:
>Environment:
irrelevant, the bugs in the code are obvious.
>Description:
      Despite the release docs saying 4.5 supports the HPT372 controller, it doesn't actually work, and 4-STABLE still doesn't.
 The controller is recognised, but is not correctly initialised by the 4.x code and is unable to actually operate.
 After having perused the code, it is also apparent that 4.x would set UDMA5 when UDMA6 was requested, which would be a bug, but the code never runs because of the initialisation bug.

 This has been cured in 5.0, and the diffs to fix HPT372 alone are almost negligible. I have include specific diffs for _my_ HTP372 , but I suggest the person(s) responsible take a look at the whole of the HPT37x series updates in 5.0 and make a quick decision on wether to just go for that 1 or include all of them, there's not a great deal of change anyway.

Also, it's reported as ATA100, when it's actually ATA133, but that's obviously not a critical problem.

 
>How-To-Repeat:
      run 4.5 RELEASE ... 4-STABLE, on an system with an I-Will XP333-R motherboard, and (I guess) other HPT372 equipped machines.
>Fix:

these are 'diff -c; of my hpt372 fixed code against 4-STABLE

*** ata-all.c	Sat Jan  5 17:49:36 2002
--- ata-all.fixed.c	Thu May 30 04:22:43 2002
***************
*** 399,405 ****
  	case 0x04:
  	    return "HighPoint HPT370 ATA100 controller";
  	case 0x05:
! 	    return "HighPoint HPT372 ATA100 controller";
  	default:
  	    return "Unknown revision HighPoint ATA controller";
  	}
--- 399,405 ----
  	case 0x04:
  	    return "HighPoint HPT370 ATA100 controller";
  	case 0x05:
! 	    return "HighPoint HPT372 ATA133 controller";
  	default:
  	    return "Unknown revision HighPoint ATA controller";
  	}
***************
*** 510,515 ****
--- 510,516 ----
  	case 0x02:
  	case 0x03:
  	case 0x04:
+ 	case 0x05:
  	    /* turn off interrupt prediction */
  	    pci_write_config(dev, 0x51, 
  	    		     (pci_read_config(dev, 0x51, 1) & ~0x02), 1);
***************
*** 1172,1178 ****
       */
      switch (scp->chiptype) {
  #if NPCI > 0
!     case 0x00041103:    /* HighPoint HPT366/368/370 */
  	if (((dmastat = ata_dmastatus(scp)) &
  	    (ATA_BMSTAT_ACTIVE | ATA_BMSTAT_INTERRUPT)) != ATA_BMSTAT_INTERRUPT)
  	    return;
--- 1173,1179 ----
       */
      switch (scp->chiptype) {
  #if NPCI > 0
!     case 0x00041103:    /* HighPoint HPT366/368/370/372 */
  	if (((dmastat = ata_dmastatus(scp)) &
  	    (ATA_BMSTAT_ACTIVE | ATA_BMSTAT_INTERRUPT)) != ATA_BMSTAT_INTERRUPT)
  	    return;

*** ata-dma.c	Sat Jan  5 17:49:36 2002
--- ata-dma.fixed.c	Thu May 30 04:11:23 2002
***************
*** 926,936 ****
  	    error = ata_command(scp, device, ATA_C_SETFEATURES, 0,
  				ATA_UDMA6, ATA_C_F_SETXFER, ATA_WAIT_READY);
  	    if (bootverbose)
! 		ata_printf(scp, device, "%s setting UDMA5 on HighPoint chip\n",
  			   (error) ? "failed" : "success");
  	    if (!error) {
! 		hpt_timing(scp, devno, ATA_UDMA5);
! 		scp->mode[ATA_DEV(device)] = ATA_UDMA5;
  		return;
  	    }
  	}
--- 926,936 ----
  	    error = ata_command(scp, device, ATA_C_SETFEATURES, 0,
  				ATA_UDMA6, ATA_C_F_SETXFER, ATA_WAIT_READY);
  	    if (bootverbose)
! 		ata_printf(scp, device, "%s setting UDMA6 on HighPoint chip\n",
  			   (error) ? "failed" : "success");
  	    if (!error) {
! 		hpt_timing(scp, devno, ATA_UDMA6);
! 		scp->mode[ATA_DEV(device)] = ATA_UDMA6;
  		return;
  	    }
  	}



>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?200205300325.g4U3PXYK060071>