From owner-freebsd-stable@FreeBSD.ORG Wed Feb 15 16:50:52 2012 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7E523106564A; Wed, 15 Feb 2012 16:50:52 +0000 (UTC) (envelope-from victor@bsdes.net) Received: from equilibrium.bsdes.net (244.Red-217-126-240.staticIP.rima-tde.net [217.126.240.244]) by mx1.freebsd.org (Postfix) with ESMTP id 127F98FC14; Wed, 15 Feb 2012 16:50:51 +0000 (UTC) Received: by equilibrium.bsdes.net (Postfix, from userid 1001) id E77B039844; Wed, 15 Feb 2012 17:50:49 +0100 (CET) Date: Wed, 15 Feb 2012 17:50:49 +0100 From: Victor Balada Diaz To: Scott Long Message-ID: <20120215165049.GW2010@equilibrium.bsdes.net> References: <20120214100513.GA94501@icarus.home.lan> <20120214135435.GQ2010@equilibrium.bsdes.net> <20120214141601.GA98986@icarus.home.lan> <4F3A83DE.3000200@ambtec.de> <20120214165029.GA1852@icarus.home.lan> <4F3A971F.9040407@omnilan.de> <20120214221527.GT2010@equilibrium.bsdes.net> <20120214230958.GA8434@icarus.home.lan> <20120214233420.GU2010@equilibrium.bsdes.net> <6D5E973B-6D98-41D7-B5E9-64A497F0F9F5@samsco.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <6D5E973B-6D98-41D7-B5E9-64A497F0F9F5@samsco.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: Harald Schmalzbauer , Alexander Motin , freebsd-stable@freebsd.org, Jeremy Chadwick , Claudius Herder Subject: Re: problems with AHCI on FreeBSD 8.2 X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Feb 2012 16:50:52 -0000 On Tue, Feb 14, 2012 at 04:42:47PM -0700, Scott Long wrote: > On Feb 14, 2012, at 4:34 PM, Victor Balada Diaz wrote: > > On Tue, Feb 14, 2012 at 03:09:58PM -0800, Jeremy Chadwick wrote: > >> I took a stab at this, but I don't feel confident this is the proper > >> solution/method. I worry there's some sort of chicken-or-the-egg > >> condition here (quirk setup/matching comes *after* SATA capabilities > >> detection), or that it makes the code messier. Need mav@'s > >> recommendations on this. > >> > >> Below is for RELENG_8. I should note I haven't tested if this works, or > >> even compiles -- normally I don't provide such patches without testing > >> so I apologise in advance / user beware. > > > > You're amazingly fast. Thanks for all your help :) > > > > You start applying the quirks before > > > > snprintf(announce_buf, sizeof(announce_buf), > > "kern.cam.ada.%d.quirks", periph->unit_number); > > quirks = softc->quirks; > > TUNABLE_INT_FETCH(announce_buf, &quirks); > > > > So you're breaking quirk setting at boot time. > > > > See my attached patch. I can confirm it works for me. > > > > Regards. > > > > I don't think that disabling NCQ entirely is the right solution. It's a tag starvation issue in the firmware, not a complete failure, and it can be dealt with in the CAM XPT scheduler fairly efficiently. Alexander and I talked about this recently, and though we differ on the details, a tag hack is not in order, IMHO. In the short term, try just using "cam control tags ada0 -N 1" to limit the concurrent commands to 1. > > Scott Seems changing tags on both disks doesn't fix the issue: (ada0:ahcich0:0:0:0): Request requeued (ada0:ahcich0:0:0:0): Retrying command ahcich1: Timeout on slot 0 ahcich1: is 00000000 cs 00000001 ss 00000000 rs 00000001 tfd c0 serr 00000000 ahcich1: AHCI reset... ahcich1: SATA connect time=0ms status=00000123 ahcich1: ready wait time=18ms ahcich1: AHCI reset done: device found (ada1:ahcich1:0:0:0): Request requeued (ada1:ahcich1:0:0:0): Retrying command (ada1:ahcich1:0:0:0): Command timed out (ada1:ahcich1:0:0:0): Retrying command ahcich0: Timeout on slot 30 ahcich0: is 00000000 cs c0000000 ss 00000000 rs c0000000 tfd c0 serr 00000000 ahcich0: AHCI reset... ahcich0: SATA connect time=0ms status=00000123 ahcich0: ready wait time=18ms ahcich0: AHCI reset done: device found The only difference is that now i get "Request requeued" message. -- La prueba más fehaciente de que existe vida inteligente en otros planetas, es que no han intentado contactar con nosotros.