Author: imp
Date: Tue Aug 26 03:45:54 2014
New Revision: 270645
URL: http://svnweb.freebsd.org/changeset/base/270645

Log:
  Merge SETAN changes from head:
  
        r270327 | imp | 2014-08-22 07:15:59 -0600 (Fri, 22 Aug 2014) | 6 lines
        We should never enter the PROBE_SETAN phase if we're not ATAPI, since
        that's ATAPI specific. Instead, skip to PROBE_SET_MULTI instead for
        non ATAPI protocols. The prior code incorrectly terminated the probe
        with a break, rather than arranging for probedone to get called. This
        caused panics or worse on some systems.
  
        r270249 | imp | 2014-08-20 16:58:12 -0600 (Wed, 20 Aug 2014) | 13 lines
        Turns out that IDENTIFY DEVICE and IDENTIFY PACKET DEVICE return data
        that's only mostly similar. Specifically word 78 bits are defined for
        IDENTIFY DEVICE as
                5 Supports Hardware Feature Control
        while a IDENTIFY PACKET DEVICE defines them as
                5 Asynchronous notification supported
        Therefore, only pay attention to bit 5 when we're talking to ATAPI
        devices (we don't use the hardware feature control at this time).
        Ignore it for ATA devices. Remove kludge that papered over this issue
        for Samsung SATA SSDs, since Micron drives also have the bit set and
        the error was caused by this bad interpretation of the spec (which is
        quite easy to do, since bits aren't normally overlapping like this).
  
  Sponsored by: Netflix (the merge and the original work)

Modified:
  stable/10/sys/cam/ata/ata_xpt.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/cam/ata/ata_xpt.c
==============================================================================
--- stable/10/sys/cam/ata/ata_xpt.c     Tue Aug 26 02:31:37 2014        
(r270644)
+++ stable/10/sys/cam/ata/ata_xpt.c     Tue Aug 26 03:45:54 2014        
(r270645)
@@ -750,14 +750,6 @@ out:
                        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.
@@ -1059,7 +1051,8 @@ noerror:
                }
                /* FALLTHROUGH */
        case PROBE_SETDMAAA:
-               if ((ident_buf->satasupport & ATA_SUPPORT_ASYNCNOTIF) &&
+               if (path->device->protocol != PROTO_ATA &&
+                   (ident_buf->satasupport & ATA_SUPPORT_ASYNCNOTIF) &&
                    (!(softc->caps & CTS_SATA_CAPS_H_AN)) !=
                    (!(ident_buf->sataenabled & ATA_SUPPORT_ASYNCNOTIF))) {
                        PROBE_SET_ACTION(softc, PROBE_SETAN);
@@ -1180,7 +1173,7 @@ notsata:
                else
                        caps = 0;
                /* Remember what transport thinks about AEN. */
-               if (caps & CTS_SATA_CAPS_H_AN)
+               if ((caps & CTS_SATA_CAPS_H_AN) && path->device->protocol != 
PROTO_ATA)
                        path->device->inq_flags |= SID_AEN;
                else
                        path->device->inq_flags &= ~SID_AEN;
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to