From owner-freebsd-current@FreeBSD.ORG Fri Dec 7 10:51:13 2007 Return-Path: Delivered-To: freebsd-current@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 317E416A420; Fri, 7 Dec 2007 10:51:13 +0000 (UTC) (envelope-from sos@deepcore.dk) Received: from spider.deepcore.dk (cpe.atm2-0-70484.0x50a6c9a6.abnxx16.customer.tele.dk [80.166.201.166]) by mx1.freebsd.org (Postfix) with ESMTP id 5852413C474; Fri, 7 Dec 2007 10:51:12 +0000 (UTC) (envelope-from sos@deepcore.dk) Received: from ws.local (ws.deepcore.dk [194.192.25.137]) by spider.deepcore.dk (8.13.8/8.13.8) with ESMTP id lB7Ap7H9005711; Fri, 7 Dec 2007 11:51:07 +0100 (CET) (envelope-from sos@deepcore.dk) Message-ID: <4759259A.3070000@deepcore.dk> Date: Fri, 07 Dec 2007 11:51:06 +0100 From: =?ISO-8859-1?Q?S=F8ren_Schmidt?= User-Agent: Thunderbird 2.0.0.9 (Macintosh/20071031) MIME-Version: 1.0 To: "Andrey V. Elsukov" References: <1B3A2410-9C2A-4126-AC92-8E38B4A0D79A@duke.edu> <200712061726.lB6HQCIu023253@fire.js.berklix.net> <4758FC14.2080606@yandex.ru> In-Reply-To: <4758FC14.2080606@yandex.ru> Content-Type: multipart/mixed; boundary="------------000006040706060003020003" Cc: =?ISO-8859-1?Q?S=F8ren_Schmidt?= , "Julian H. Stacey" , freebsd-current@FreeBSD.ORG, Todd Wasson Subject: Re: BETA4 installer doesn't attach my HDD controller; BETA3 did X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Dec 2007 10:51:13 -0000 This is a multi-part message in MIME format. --------------000006040706060003020003 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable Andrey V. Elsukov wrote: > Todd Wasson wrote: >>> Todd Wasson wrote: >>>> I've got a Maxtor 6Y080L0 YAR41VW0 drive on a JMicron JMB368 UDMA133= >>>> controller, and in the BETA4 installer the controller doesn't seem t= o >>>> be properly attaching, which leads to the drive not being found. Th= e >>>> relevant sections from dmesg (as I'm not sure where else to look whi= le >>>> running the installer CD) are: >>> >>> Did you try "Safe Boot" key 3. > > I think this changes may create a regression: > > 1. the BETA3's version: > > ctlr->r_type2 =3D SYS_RES_MEMORY; > ctlr->r_rid2 =3D PCIR_BAR(5); > if ((ctlr->r_res2 =3D bus_alloc_resource_any(dev, ctlr->r_type2= , > &ctlr->r_rid2, RF_ACTIVE))){ > if ((error =3D ata_ahci_chipinit(dev))) > return error; > } > We have two checks here. Probably your controller doesn't allocate a > memory resource for the AHCI, but it works because it skips second > checks. > > 2. the BETA4's version: > > if ((error =3D ata_ahci_chipinit(dev))) > return error; > > In this version driver doesn't pass it. I've already sent patch > for test to your PR, but i attach it again. > May be Soren can comment it? Yeah, there's a bug allright, attached patch is the right way to fix it, = I'll commit when I get a few.. -S=F8ren --------------000006040706060003020003 Content-Type: text/plain; x-mac-type="0"; x-mac-creator="0"; name="JMicrom-p1" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="JMicrom-p1" ? JMicrom-p1 ? ich-sata-fix Index: ata-chipset.c =================================================================== RCS file: /home/ncvs/src/sys/dev/ata/ata-chipset.c,v retrieving revision 1.209 diff -u -r1.209 ata-chipset.c --- ata-chipset.c 26 Nov 2007 19:08:08 -0000 1.209 +++ ata-chipset.c 7 Dec 2007 10:49:06 -0000 @@ -2260,7 +2309,7 @@ pci_write_config(dev, 0x40, 0x80c0a131, 4); pci_write_config(dev, 0x80, 0x01200000, 4); - if ((error = ata_ahci_chipinit(dev))) + if (ctlr->chip->cfg1 && (error = ata_ahci_chipinit(dev))) return error; ctlr->allocate = ata_jmicron_allocate; --------------000006040706060003020003--