From owner-freebsd-current@FreeBSD.ORG Mon Mar 2 23:15:51 2009 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 EF578106564A; Mon, 2 Mar 2009 23:15:51 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from cmail.optima.ua (cmail.optima.ua [195.248.191.121]) by mx1.freebsd.org (Postfix) with ESMTP id 13AD78FC08; Mon, 2 Mar 2009 23:15:50 +0000 (UTC) (envelope-from mav@FreeBSD.org) X-Spam-Flag: SKIP X-Spam-Yversion: Spamooborona-2.1.0 Received: from [212.86.226.226] (account mav@alkar.net HELO mavbook.mavhome.dp.ua) by cmail.optima.ua (CommuniGate Pro SMTP 5.2.9) with ESMTPSA id 236349640; Tue, 03 Mar 2009 01:15:49 +0200 Message-ID: <49AC68A4.6060201@FreeBSD.org> Date: Tue, 03 Mar 2009 01:15:48 +0200 From: Alexander Motin User-Agent: Thunderbird 2.0.0.19 (X11/20090118) MIME-Version: 1.0 To: Joe Marcus Clarke References: <49AC4DB3.9020007@FreeBSD.org> <1236029236.37252.113.camel@shumai.marcuscom.com> <49AC5E39.7090305@FreeBSD.org> <1236034349.37252.147.camel@shumai.marcuscom.com> In-Reply-To: <1236034349.37252.147.camel@shumai.marcuscom.com> Content-Type: multipart/mixed; boundary="------------070008030706000109060005" Cc: FreeBSD-Current Subject: Re: Continuing saga: FreeBSD -CURRENT hangs with ATA code after April 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: Mon, 02 Mar 2009 23:15:52 -0000 This is a multi-part message in MIME format. --------------070008030706000109060005 Content-Type: text/plain; charset=KOI8-R; format=flowed Content-Transfer-Encoding: 7bit Joe Marcus Clarke wrote: > On Tue, 2009-03-03 at 00:31 +0200, Alexander Motin wrote: >> Joe Marcus Clarke wrote: >>> On Mon, 2009-03-02 at 23:20 +0200, Alexander Motin wrote: >>>> Joe Marcus Clarke wrote: >>>>> I started this thread on May 31 of last year: >>>>> >>>>> http://lists.freebsd.org/pipermail/freebsd-current/2008-May/085923.html >>>>> >>>>> The problem remains as of: >>>>> >>>>> FreeBSD fugu.marcuscom.com 8.0-CURRENT FreeBSD 8.0-CURRENT #12: Sun Mar >>>>> 1 16:10:52 EST 2009 >>>>> gnome@fugu.marcuscom.com:/space/obj/usr/src/sys/FUGU i386 >>>>> >>>>> The only way I can boot this system is to hack in the ATA code from >>>>> April 9, 2008. I would love just to be able to boot this guy on a >>>>> default -CURRENT. >>>> 1) If I understand right, you had working system on April 9, 2008 and >>>> not working on May 31, 2008 and now. Have you tried to narrow down that >>>> interval between working and not working system to find exact point of >>>> breakage? I see no documented changes in Promise support there in CVS >>>> log, but for example, on Apr 10 2008 I see some related changes >>>> unmentioned in commit message. >>> The April 9 date is the documented date of last working. It was the >>> commit on April 10 13:05:05 that broken things: >>> >>> "Add experimental support for SATA Port Multipliers >>> >>> Support is working on the Silicon Image SiI3124/3132. >>> Support is working on some AHCI chips but far from all. >>> >>> Remember this is WIP, so test reports and (constructive) suggestions are welcome!" >> You can try to comment out >> /* set portmultiplier port */ >> ATA_OUTB(ctlr->r_res2, 0x4e8 + (ch->unit << 8), port & 0x0f); >> inside ata_promise_mio_command(). Don't know if there is some problem >> with it, but it was added at that time and looks like it is at least not >> applicable for this type of controller. > > That did it! Thanks! I can now easily post the full verbose dmesg on > HEAD code if you'd like. Apply this patch first. It should be good as far as I can tell without having that chips datasheets. -- Alexander Motin --------------070008030706000109060005 Content-Type: text/plain; name="ata-promise.c.nopm.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="ata-promise.c.nopm.patch" --- ata-promise.c.prev 2009-03-02 00:30:41.000000000 +0200 +++ ata-promise.c 2009-03-03 01:12:18.000000000 +0200 @@ -690,8 +690,11 @@ ata_promise_mio_command(struct ata_reque ATA_OUTL(ctlr->r_res2, (ch->unit + 1) << 2, 0x00000001); - /* set portmultiplier port */ - ATA_OUTB(ctlr->r_res2, 0x4e8 + (ch->unit << 8), atadev->unit & 0x0f); + if ((ctlr->chip->cfg2 == PR_SATA2) || + ((ctlr->chip->cfg2 == PR_CMBO2) && (ch->unit < 2))) { + /* set portmultiplier port */ + ATA_OUTB(ctlr->r_res2, 0x4e8 + (ch->unit << 8), atadev->unit & 0x0f); + } /* XXX SOS add ATAPI commands support later */ switch (request->u.ata.command) { --------------070008030706000109060005--