From lyuka@lily.finetune.co.jp  Wed May 28 06:42:50 2003
Return-Path: <lyuka@lily.finetune.co.jp>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 1B22B37B401
	for <FreeBSD-gnats-submit@freebsd.org>; Wed, 28 May 2003 06:42:50 -0700 (PDT)
Received: from lily.finetune.co.jp (lily.finetune.co.jp [210.226.85.226])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 9295E43FAF
	for <FreeBSD-gnats-submit@freebsd.org>; Wed, 28 May 2003 06:42:48 -0700 (PDT)
	(envelope-from lyuka@lily.finetune.co.jp)
Received: (from lyuka@localhost)
	by lily.finetune.co.jp (8.9.3/3.6W) id WAA07558;
	Wed, 28 May 2003 22:42:46 +0900 (JST)
Message-Id: <200305281342.WAA07558@lily.finetune.co.jp>
Date: Wed, 28 May 2003 22:42:46 +0900 (JST)
From: Takayuki HOSODA <lyuka@lily.finetune.co.jp>
Reply-To: lyuka@lily.finetune.co.jp
To: FreeBSD-gnats-submit@freebsd.org
Subject: 4.8 RELEASE installer(generic kernel) stacks while boot, resetti
X-Send-Pr-Version: 3.2

>Number:         52756
>Category:       kern
>Synopsis:       4.8 RELEASE installer(generic kernel) stacks while boot, resetti
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    sos
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed May 28 06:50:12 PDT 2003
>Closed-Date:    Fri Aug 27 16:25:00 GMT 2004
>Last-Modified:  Fri Aug 27 16:25:00 GMT 2004
>Originator:     Takayuki HOSODA <lyuka@lily.finetune.co.jp>
>Release:        
>Organization:
>Environment:
 GigaByte GA-SINXP1394 mother board
 MAXTOR 6Y080P0(80GB, ATA133) hard drive
>Description:
        While installing FreeBSD-4.8 RELEASE onto the system with Gigabyte's
GA-SINXP1394 mother board and Maxtor's 6Y080P0 (80GB, ATA133) hard drive,
the GENERIC kernel stacks while boot, resetting the ata device.
>How-To-Repeat:
        Boot the GENERIC kernel on the SiS655 chipset motherboard with ATA drive
>Fix:
The problem is mainly because device probe failure of the SiS655 chipset.
To bypass the problem, temporally boot with the ata driver in PIO mode.
    set hw.ata.ata_dma="0"
This option disables the ATA DMA function.
Then apply patches below and compile, install the new kernel, reboot.
The kernel with these patches seemingly have been working well so far.

*** ata-dma.c.orig      Wed Oct  2 23:13:38 2002
--- ata-dma.c   Fri May 16 05:23:58 2003
***************
*** 504,509 ****
--- 504,510 ----
            ata_find_dev(parent, 0x06401039, 0) ||      /* SiS 640 */
            ata_find_dev(parent, 0x06451039, 0) ||      /* SiS 645 */
            ata_find_dev(parent, 0x06501039, 0) ||      /* SiS 650 */
+           ata_find_dev(parent, 0x06551039, 0) ||      /* SiS 655 */
            ata_find_dev(parent, 0x07301039, 0) ||      /* SiS 730 */
            ata_find_dev(parent, 0x07331039, 0) ||      /* SiS 733 */
            ata_find_dev(parent, 0x07351039, 0) ||      /* SiS 735 */
***************
*** 513,518 ****
--- 514,531 ----
            int8_t reg = 0x40 + (devno << 1);
            int16_t val = pci_read_config(parent, reg, 2) & 0x0fff;
  
+           if (udmamode >= 6) {
+               error = ata_command(atadev, ATA_C_SETFEATURES, 0,
+                                   ATA_UDMA6, ATA_C_F_SETXFER, ATA_WAIT_READY);
+               if (bootverbose)
+                   ata_prtdev(atadev, "%s setting UDMA6 on SiS chip\n",
+                              (error) ? "failed" : "success");
+               if (!error) {
+                   pci_write_config(parent, reg, val | 0x7000, 2);
+                   atadev->mode = ATA_UDMA6;
+                   return;
+               }
+           }
            if (udmamode >= 5) {
                error = ata_command(atadev, ATA_C_SETFEATURES, 0,
                                    ATA_UDMA5, ATA_C_F_SETXFER, ATA_WAIT_READY);


*** ata-pci.c.orig      Wed Oct  2 23:13:38 2002
--- ata-pci.c   Fri May 16 05:19:41 2003
***************
*** 186,192 ****
        return "VIA Apollo ATA controller";
  
      case 0x55131039:
!       if (ata_find_dev(dev, 0x06301039, 0x30) ||
            ata_find_dev(dev, 0x06331039, 0) ||
            ata_find_dev(dev, 0x06351039, 0) ||
            ata_find_dev(dev, 0x06401039, 0) ||
--- 186,194 ----
        return "VIA Apollo ATA controller";
  
      case 0x55131039:
!       if (ata_find_dev(dev, 0x06551039, 0))
!           return "SiS 5591 ATA133 controller";
!       else if (ata_find_dev(dev, 0x06301039, 0x30) ||
            ata_find_dev(dev, 0x06331039, 0) ||
            ata_find_dev(dev, 0x06351039, 0) ||
            ata_find_dev(dev, 0x06401039, 0) ||

>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: gnats-admin->freebsd-bugs 
Responsible-Changed-By: ceri 
Responsible-Changed-When: Wed May 28 15:21:24 PDT 2003 
Responsible-Changed-Why:  
Reassign misfiled PR. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=52756 
Responsible-Changed-From-To: freebsd-bugs->sos 
Responsible-Changed-By: arved 
Responsible-Changed-When: Fri Aug 27 16:06:24 GMT 2004 
Responsible-Changed-Why:  
Over to ATA maintainer 

http://www.freebsd.org/cgi/query-pr.cgi?pr=52756 
State-Changed-From-To: open->closed 
State-Changed-By: sos 
State-Changed-When: Fri Aug 27 16:20:32 GMT 2004 
State-Changed-Why:  
There is more involved than just this, the 655 uses an external 
southbridge that can be of a few different types.  
Se -current or soon to be 5.3 for the real solution. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=52756 
>Unformatted:
