Author: mav
Date: Sun May  2 12:50:29 2010
New Revision: 207507
URL: http://svn.freebsd.org/changeset/base/207507

Log:
  MFC r207222:
  Move PI_TAG_ABLE check from ada driver to ATA XPT.

Modified:
  stable/8/sys/cam/ata/ata_da.c
  stable/8/sys/cam/ata/ata_xpt.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/xen/xenpci/   (props changed)
  stable/8/sys/geom/sched/   (props changed)

Modified: stable/8/sys/cam/ata/ata_da.c
==============================================================================
--- stable/8/sys/cam/ata/ata_da.c       Sun May  2 12:45:22 2010        
(r207506)
+++ stable/8/sys/cam/ata/ata_da.c       Sun May  2 12:50:29 2010        
(r207507)
@@ -686,14 +686,10 @@ adaregister(struct cam_periph *periph, v
        else
                softc->quirks = ADA_Q_NONE;
 
-       /* Check if the SIM does not want queued commands */
        bzero(&cpi, sizeof(cpi));
        xpt_setup_ccb(&cpi.ccb_h, periph->path, CAM_PRIORITY_NONE);
        cpi.ccb_h.func_code = XPT_PATH_INQ;
        xpt_action((union ccb *)&cpi);
-       if (cpi.ccb_h.status != CAM_REQ_CMP ||
-           (cpi.hba_inquiry & PI_TAG_ABLE) == 0)
-               softc->flags &= ~ADA_FLAG_CAN_NCQ;
 
        TASK_INIT(&softc->sysctl_task, 0, adasysctlinit, periph);
 

Modified: stable/8/sys/cam/ata/ata_xpt.c
==============================================================================
--- stable/8/sys/cam/ata/ata_xpt.c      Sun May  2 12:45:22 2010        
(r207506)
+++ stable/8/sys/cam/ata/ata_xpt.c      Sun May  2 12:50:29 2010        
(r207507)
@@ -766,6 +766,7 @@ noerror:
        }
        case PROBE_IDENTIFY:
        {
+               struct ccb_pathinq cpi;
                int16_t *ptr;
 
                ident_buf = &softc->ident_data;
@@ -840,16 +841,24 @@ noerror:
                ata_find_quirk(path->device);
                if (path->device->mintags != 0 &&
                    path->bus->sim->max_tagged_dev_openings != 0) {
-                       /* Report SIM which tags are allowed. */
-                       bzero(&cts, sizeof(cts));
-                       xpt_setup_ccb(&cts.ccb_h, path, CAM_PRIORITY_NONE);
-                       cts.ccb_h.func_code = XPT_SET_TRAN_SETTINGS;
-                       cts.type = CTS_TYPE_CURRENT_SETTINGS;
-                       cts.xport_specific.sata.tags = path->device->maxtags;
-                       cts.xport_specific.sata.valid = CTS_SATA_VALID_TAGS;
-                       xpt_action((union ccb *)&cts);
-                       /* Reconfigure queues for tagged queueing. */
-                       xpt_start_tags(path);
+                       /* Check if the SIM does not want queued commands. */
+                       bzero(&cpi, sizeof(cpi));
+                       xpt_setup_ccb(&cpi.ccb_h, path, CAM_PRIORITY_NONE);
+                       cpi.ccb_h.func_code = XPT_PATH_INQ;
+                       xpt_action((union ccb *)&cpi);
+                       if (cpi.ccb_h.status == CAM_REQ_CMP &&
+                           (cpi.hba_inquiry & PI_TAG_ABLE)) {
+                               /* Report SIM which tags are allowed. */
+                               bzero(&cts, sizeof(cts));
+                               xpt_setup_ccb(&cts.ccb_h, path, 
CAM_PRIORITY_NONE);
+                               cts.ccb_h.func_code = XPT_SET_TRAN_SETTINGS;
+                               cts.type = CTS_TYPE_CURRENT_SETTINGS;
+                               cts.xport_specific.sata.tags = 
path->device->maxtags;
+                               cts.xport_specific.sata.valid = 
CTS_SATA_VALID_TAGS;
+                               xpt_action((union ccb *)&cts);
+                               /* Reconfigure queues for tagged queueing. */
+                               xpt_start_tags(path);
+                       }
                }
                ata_device_transport(path);
                PROBE_SET_ACTION(softc, PROBE_SETMODE);
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "[email protected]"

Reply via email to