Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 26 Nov 2012 21:27:21 +0200
From:      Alexander Motin <mav@FreeBSD.org>
To:        Adam McDougall <mcdouga9@egr.msu.edu>
Cc:        stable@freebsd.org
Subject:   Re: Samsung SSD 840 PRO fails to probe
Message-ID:  <50B3C299.1040809@FreeBSD.org>
In-Reply-To: <50B3BA46.7030000@egr.msu.edu>
References:  <50B3BA46.7030000@egr.msu.edu>

next in thread | previous in thread | raw e-mail | index | archive | help
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: <Samsung SSD 840 PRO Series DXM03B0Q> 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.


-- 
Alexander Motin



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?50B3C299.1040809>