From nobody@FreeBSD.org  Fri Dec  7 05:36:25 2007
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id D342D16A41A
	for <freebsd-gnats-submit@FreeBSD.org>; Fri,  7 Dec 2007 05:36:25 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21])
	by mx1.freebsd.org (Postfix) with ESMTP id C47B513C459
	for <freebsd-gnats-submit@FreeBSD.org>; Fri,  7 Dec 2007 05:36:25 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.14.2/8.14.2) with ESMTP id lB75aJuZ075396
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 7 Dec 2007 05:36:19 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.14.2/8.14.1/Submit) id lB75aJIc075395;
	Fri, 7 Dec 2007 05:36:19 GMT
	(envelope-from nobody)
Message-Id: <200712070536.lB75aJIc075395@www.freebsd.org>
Date: Fri, 7 Dec 2007 05:36:19 GMT
From: Todd Wasson <tsw5@duke.edu>
To: freebsd-gnats-submit@FreeBSD.org
Subject: BETA4 installer doesn't attach my HDD controller; BETA3 did
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         118477
>Category:       kern
>Synopsis:       BETA4 installer doesn't attach my HDD controller; BETA3 did
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Dec 07 05:40:03 UTC 2007
>Closed-Date:    Sun Dec 09 11:52:42 UTC 2007
>Last-Modified:  Sun Dec 09 11:52:42 UTC 2007
>Originator:     Todd Wasson
>Release:        7.0-BETA4
>Organization:
>Environment:
>Description:
I've got a Maxtor 6Y080L0 YAR41VW0 drive on a JMicron JMB368 UDMA133  
controller, and in the BETA4 installer the controller doesn't seem to  
be properly attaching, which leads to the drive not being found.  The  
relevant sections from dmesg (as I'm not sure where else to look while  
running the installer CD) are:

From BETA3:
atapci0: <JMicron JMB368 UDMA133 controller> port  
0xdc00-0xdc07,0xd880-0xd883,0xd800-0xd807,0xd480-0xd483,0xd400-0xd40f  
irq 16 at device 0.0 on pci2
atapci0: [ITHREAD]
ata2: <ATA channel 0> on atapci0
ata2: [ITHREAD]

From BETA4:
atapci0: <JMicron JMB368 UDMA133 controller> port  
0xdc00-0xdc07,0xd880-0xd883,0xd800-0xd807,0xd480-0xd483,0xd400-0xd40f  
irq 16 at device 0.0 on pci2
atapci0: [ITHREAD]
device_attach: atapci0 attach returned 6

I've tried this with both i386 and amd64 install discs, with the same  
results.  I've also updated my BETA3 install to CURRENT and built the kernel and run into this same error, so clearly some code is checked into the tree now, as it was at the time of BETA4's release, that is causing this issue.
>How-To-Repeat:
Boot the 7.0-BETA4 disc 1 install CD.  Alternatively, csup to CURRENT from BETA3, build the kernel, and boot into it.
>Fix:


>Release-Note:
>Audit-Trail:

From: "Andrey V. Elsukov" <bu7cher@yandex.ru>
To: Todd Wasson <tsw5@duke.edu>
Cc: freebsd-gnats-submit@FreeBSD.org
Subject: Re: kern/118477: BETA4 installer doesn't attach my HDD controller;
        BETA3 did
Date: Fri, 07 Dec 2007 10:10:39 +0300

 This is a multi-part message in MIME format.
 --------------010200000106090202080003
 Content-Type: text/plain; charset=KOI8-R; format=flowed
 Content-Transfer-Encoding: 7bit
 
 Todd Wasson wrote:
 > I've tried this with both i386 and amd64 install discs, with the
 > same results. I've also updated my BETA3 install to CURRENT and
 > built the kernel and run into this same error, so clearly some
  > code is checked into the tree now, as it was at the time
  > of BETA4's release, that is causing this issue.
 >> How-To-Repeat: > Boot the 7.0-BETA4 disc 1 install CD.  Alternatively, csup to 
 CURRENT from BETA3, build the kernel, and boot into it.
 >> Fix:
 
 Hi, Todd.
 
 Can you try the attached patch?
 
 -- 
 WBR, Andrey V. Elsukov
 
 --------------010200000106090202080003
 Content-Type: text/plain;
  name="ata-chipset.c.diff.txt"
 Content-Transfer-Encoding: 7bit
 Content-Disposition: inline;
  filename="ata-chipset.c.diff.txt"
 
 --- src/sys/dev/ata/ata-chipset.c	2007-11-22 00:15:00.000000000 +0300
 +++ src/sys/dev/ata/ata-chipset.c	2007-12-07 10:07:21.000000000 +0300
 @@ -2243,7 +2243,7 @@ ata_jmicron_chipinit(device_t dev)
  	return ENXIO;
  
      /* do we have multiple PCI functions ? */
 -    if (pci_read_config(dev, 0xdf, 1) & 0x40) {
 +    if ((pci_read_config(dev, 0xdf, 1) & 0x40) || ctlr->chip->cfg1 == 0) {
  	/* are we on the AHCI part ? */
  	if (ata_ahci_chipinit(dev) != ENXIO)
  	    return 0;
 
 --------------010200000106090202080003--

From: Todd Wasson <tsw5@duke.edu>
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: kern/118477: BETA4 installer doesn't attach my HDD controller; BETA3 did
Date: Sat, 8 Dec 2007 20:43:09 -0500

 This bug was fixed, as far as I can tell, by Soren's checkin on  
 2007-12-07, linked here: http://lists.freebsd.org/pipermail/cvs-all/2007-December/239585.html
 
 
 Todd
State-Changed-From-To: open->closed 
State-Changed-By: remko 
State-Changed-When: Sun Dec 9 11:52:41 UTC 2007 
State-Changed-Why:  
This had been fixed by recent work of soren 

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