Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 21 Oct 2009 13:00:02 +0000 (UTC)
From:      Alexander Motin <mav@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r198322 - in head/sys: cam/ata dev/ahci dev/siis
Message-ID:  <200910211300.n9LD02V3099731@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200910211300.n9LD02V3099731>