From owner-p4-projects@FreeBSD.ORG Sat Nov 14 08:31:29 2009 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id ED3EB1065692; Sat, 14 Nov 2009 08:31:28 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AF92A106566C for ; Sat, 14 Nov 2009 08:31:28 +0000 (UTC) (envelope-from mav@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 9D7A28FC15 for ; Sat, 14 Nov 2009 08:31:28 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id nAE8VSts094459 for ; Sat, 14 Nov 2009 08:31:28 GMT (envelope-from mav@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id nAE8VSga094457 for perforce@freebsd.org; Sat, 14 Nov 2009 08:31:28 GMT (envelope-from mav@freebsd.org) Date: Sat, 14 Nov 2009 08:31:28 GMT Message-Id: <200911140831.nAE8VSga094457@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to mav@freebsd.org using -f From: Alexander Motin To: Perforce Change Reviews Precedence: bulk Cc: Subject: PERFORCE change 170610 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Nov 2009 08:31:29 -0000 http://p4web.freebsd.org/chv.cgi?CH=170610 Change 170610 by mav@mav_mavtest on 2009/11/14 08:31:22 Honor HBA SNCQ capability bit whan reporting NCQ support. Affected files ... .. //depot/projects/scottl-camlock/src/sys/dev/ahci/ahci.c#79 edit Differences ... ==== //depot/projects/scottl-camlock/src/sys/dev/ahci/ahci.c#79 (text+ko) ==== @@ -734,7 +734,9 @@ /* 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 @@ 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;