From owner-svn-src-stable@FreeBSD.ORG Sun May 2 12:50:29 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D37B3106564A; Sun, 2 May 2010 12:50:29 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id C2D598FC13; Sun, 2 May 2010 12:50:29 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o42CoTgY062919; Sun, 2 May 2010 12:50:29 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o42CoTjn062916; Sun, 2 May 2010 12:50:29 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201005021250.o42CoTjn062916@svn.freebsd.org> From: Alexander Motin Date: Sun, 2 May 2010 12:50:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r207507 - stable/8/sys/cam/ata X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 May 2010 12:50:30 -0000 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);