From owner-svn-src-all@FreeBSD.ORG Wed Oct 21 13:00:02 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 69C85106568B; Wed, 21 Oct 2009 13:00:02 +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 387BB8FC15; Wed, 21 Oct 2009 13:00:02 +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 n9LD0235099734; Wed, 21 Oct 2009 13:00:02 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n9LD02V3099731; Wed, 21 Oct 2009 13:00:02 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <200910211300.n9LD02V3099731@svn.freebsd.org> From: Alexander Motin Date: Wed, 21 Oct 2009 13:00:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r198322 - in head/sys: cam/ata dev/ahci dev/siis 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: Wed, 21 Oct 2009 13:00:02 -0000 Author: mav Date: Wed Oct 21 13:00:01 2009 New Revision: 198322 URL: http://svn.freebsd.org/changeset/base/198322 Log: MFp4: Report real max_target = 15. SIM doesn't need to know that target 15 is PMP. It is XPT business. Modified: head/sys/cam/ata/ata_xpt.c head/sys/dev/ahci/ahci.c head/sys/dev/siis/siis.c Modified: head/sys/cam/ata/ata_xpt.c ============================================================================== --- head/sys/cam/ata/ata_xpt.c Wed Oct 21 12:47:39 2009 (r198321) +++ head/sys/cam/ata/ata_xpt.c Wed Oct 21 13:00:01 2009 (r198322) @@ -1212,7 +1212,8 @@ ata_scan_bus(struct cam_periph *periph, take_next: /* Take next device. Wrap from 15 (PM) to 0. */ scan_info->counter = (scan_info->counter + 1 ) & 0x0f; - if (scan_info->counter >= scan_info->cpi->max_target+1) { + if (scan_info->counter > scan_info->cpi->max_target - + ((scan_info->cpi->hba_inquiry & PI_SATAPM) ? 1 : 0)) { xpt_free_ccb(work_ccb); xpt_free_ccb((union ccb *)scan_info->cpi); request_ccb = scan_info->request_ccb; Modified: head/sys/dev/ahci/ahci.c ============================================================================== --- head/sys/dev/ahci/ahci.c Wed Oct 21 12:47:39 2009 (r198321) +++ head/sys/dev/ahci/ahci.c Wed Oct 21 13:00:01 2009 (r198322) @@ -1967,7 +1967,7 @@ ahciaction(struct cam_sim *sim, union cc cpi->hba_misc = PIM_SEQSCAN; cpi->hba_eng_cnt = 0; if (ch->caps & AHCI_CAP_SPM) - cpi->max_target = 14; + cpi->max_target = 15; else cpi->max_target = 0; cpi->max_lun = 0; Modified: head/sys/dev/siis/siis.c ============================================================================== --- head/sys/dev/siis/siis.c Wed Oct 21 12:47:39 2009 (r198321) +++ head/sys/dev/siis/siis.c Wed Oct 21 13:00:01 2009 (r198322) @@ -1584,7 +1584,7 @@ siisaction(struct cam_sim *sim, union cc cpi->target_sprt = 0; cpi->hba_misc = PIM_SEQSCAN; cpi->hba_eng_cnt = 0; - cpi->max_target = 14; + cpi->max_target = 15; cpi->max_lun = 0; cpi->initiator_id = 0; cpi->bus_id = cam_sim_bus(sim);