From owner-svn-src-all@FreeBSD.ORG Tue Nov 17 21:27:22 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 178251065693; Tue, 17 Nov 2009 21:27:22 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 074E88FC27; Tue, 17 Nov 2009 21:27:22 +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 nAHLRL7S040307; Tue, 17 Nov 2009 21:27:21 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAHLRLmH040305; Tue, 17 Nov 2009 21:27:21 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <200911172127.nAHLRLmH040305@svn.freebsd.org> From: Alexander Motin Date: Tue, 17 Nov 2009 21:27:21 +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: r199452 - stable/8/sys/dev/ahci X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Nov 2009 21:27:22 -0000 Author: mav Date: Tue Nov 17 21:27:21 2009 New Revision: 199452 URL: http://svn.freebsd.org/changeset/base/199452 Log: MFC r199278: Check SNCQ HBA capability bit when reporting NCQ support to CAM. Modified: stable/8/sys/dev/ahci/ahci.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) Modified: stable/8/sys/dev/ahci/ahci.c ============================================================================== --- stable/8/sys/dev/ahci/ahci.c Tue Nov 17 21:26:05 2009 (r199451) +++ stable/8/sys/dev/ahci/ahci.c Tue Nov 17 21:27:21 2009 (r199452) @@ -734,7 +734,9 @@ ahci_ch_attach(device_t dev) /* Construct SIM entry */ ch->sim = cam_sim_alloc(ahciaction, ahcipoll, "ahcich", ch, device_get_unit(dev), &ch->mtx, - min(2, ch->numslots), ch->numslots, devq); + min(2, ch->numslots), + (ch->caps & AHCI_CAP_SNCQ) ? ch->numslots : 0, + devq); if (ch->sim == NULL) { device_printf(dev, "unable to allocate sim\n"); error = ENOMEM; @@ -2119,7 +2121,9 @@ ahciaction(struct cam_sim *sim, union cc struct ccb_pathinq *cpi = &ccb->cpi; cpi->version_num = 1; /* XXX??? */ - cpi->hba_inquiry = PI_SDTR_ABLE | PI_TAG_ABLE; + cpi->hba_inquiry = PI_SDTR_ABLE; + if (ch->caps & AHCI_CAP_SNCQ) + cpi->hba_inquiry |= PI_TAG_ABLE; if (ch->caps & AHCI_CAP_SPM) cpi->hba_inquiry |= PI_SATAPM; cpi->target_sprt = 0;