From owner-freebsd-stable@FreeBSD.ORG Mon Nov 26 19:51:04 2012 Return-Path: Delivered-To: stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 5D9DBE5F; Mon, 26 Nov 2012 19:51:04 +0000 (UTC) (envelope-from mcdouga9@egr.msu.edu) Received: from mail.egr.msu.edu (gribble.egr.msu.edu [35.9.37.169]) by mx1.freebsd.org (Postfix) with ESMTP id EAE718FC0C; Mon, 26 Nov 2012 19:51:03 +0000 (UTC) Received: from gribble (localhost [127.0.0.1]) by mail.egr.msu.edu (Postfix) with ESMTP id 5F43611191; Mon, 26 Nov 2012 14:50:57 -0500 (EST) X-Virus-Scanned: amavisd-new at egr.msu.edu Received: from mail.egr.msu.edu ([127.0.0.1]) by gribble (gribble.egr.msu.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id p9BHGo7tKHCO; Mon, 26 Nov 2012 14:50:57 -0500 (EST) Received: from EGR authenticated sender Message-ID: <50B3C821.4030806@egr.msu.edu> Date: Mon, 26 Nov 2012 14:50:57 -0500 From: Adam McDougall User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:17.0) Gecko/17.0 Thunderbird/17.0 MIME-Version: 1.0 To: Alexander Motin Subject: Re: Samsung SSD 840 PRO fails to probe References: <50B3BA46.7030000@egr.msu.edu> <50B3C299.1040809@FreeBSD.org> In-Reply-To: <50B3C299.1040809@FreeBSD.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: stable@freebsd.org X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Nov 2012 19:51:04 -0000 On 11/26/12 14:27, Alexander Motin wrote: > Hi. > > On 26.11.2012 20:51, Adam McDougall wrote: >> My co-worker ordered a Samsung 840 PRO series SSD for his desktop but we >> found 9.0-rel would not probe it and 9.1-rc3 shows some errors. I got >> past the problem with a workaround of disabling AHCI mode in the BIOS >> which drops it to IDE mode and it detects fine, although runs a little >> slower. Is there something I can try to make it probe properly in AHCI >> mode? We also tried moving it to the SATA data and power cables from >> the working SATA HD so I don't think it is the port or controller >> driver. The same model motherboard from another computer did the same >> thing. Thanks. >> >> dmesg line when it is working: >> ada0: ATA-9 SATA 3.x device >> >> dmesg lines when it is not working: (hand transcribed from a picture) >> (aprobe0:ahcich0:0:0): SETFEATURES ENABLE SATA FEATURE. ACB: ef 10 00 00 >> 00 40 00 00 00 00 05 00 >> (aprobe0:ahcich0:0:0): CAM status: ATA Status Error >> (aprobe0:ahcich0:0:0): ATA status: 51 (DRDY SERV ERR), error: 04 (ABRT ) >> (aprobe0:ahcich0:0:0): RES: 51 04 00 00 00 40 00 00 00 00 00 >> (aprobe0:ahcich0:0:0): Retrying command >> (aprobe0:ahcich0:0:0): SETFEATURES ENABLE SATA FEATURE. ACB: ef 10 00 00 >> 00 40 00 00 00 00 05 00 >> (aprobe0:ahcich0:0:0): CAM status: ATA Status Error >> (aprobe0:ahcich0:0:0): ATA status: 51 (DRDY SERV ERR), error: 04 (ABRT ) >> (aprobe0:ahcich0:0:0): RES: 51 04 00 00 00 40 00 00 00 00 00 >> (aprobe0:ahcich0:0:0): Error 5, Retries exhausted > > I believe that is SSD's firmware bug. Probably it declares support for > SATA Asynchronous Notifications in its IDENTIFY data, but returns error > on attempt to enable it. Switching controller to legacy mode disables > that functionality and so works as workaround. Patch below should > workaround the problem from the OS side: > > --- ata_xpt.c (revision 243561) > +++ ata_xpt.c (working copy) > @@ -745,6 +745,14 @@ probedone(struct cam_periph *periph, union ccb *do > goto noerror; > > /* > + * Some Samsung SSDs report supported Asynchronous > Notification, > + * but return ABORT on attempt to enable it. > + */ > + } else if (softc->action == PROBE_SETAN && > + status == CAM_ATA_STATUS_ERROR) { > + goto noerror; > + > + /* > * SES and SAF-TE SEPs have different IDENTIFY commands, > * but SATA specification doesn't tell how to identify > them. > * Until better way found, just try another if first fail. > > Thanks for the prompt response and patch, that worked!