From owner-p4-projects@FreeBSD.ORG Mon Jun 1 19:52:37 2009 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 0DABC1065670; Mon, 1 Jun 2009 19:52:37 +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 C20DA106566B for ; Mon, 1 Jun 2009 19:52:36 +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 960408FC13 for ; Mon, 1 Jun 2009 19:52:36 +0000 (UTC) (envelope-from mav@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id n51JqaTI046139 for ; Mon, 1 Jun 2009 19:52:36 GMT (envelope-from mav@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id n51Jqa96046137 for perforce@freebsd.org; Mon, 1 Jun 2009 19:52:36 GMT (envelope-from mav@freebsd.org) Date: Mon, 1 Jun 2009 19:52:36 GMT Message-Id: <200906011952.n51Jqa96046137@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 Cc: Subject: PERFORCE change 163297 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Jun 2009 19:52:38 -0000 http://perforce.freebsd.org/chv.cgi?CH=163297 Change 163297 by mav@mav_mavbook on 2009/06/01 19:51:40 ATA controller itself is not present on the bus as device. Do not reserve ID for it. Affected files ... .. //depot/projects/scottl-camlock/src/sys/cam/ata/ata_xpt.c#10 edit .. //depot/projects/scottl-camlock/src/sys/dev/ahci/ahci.c#8 edit Differences ... ==== //depot/projects/scottl-camlock/src/sys/cam/ata/ata_xpt.c#10 (text+ko) ==== @@ -805,7 +805,6 @@ struct cam_path *path; u_int i; u_int max_target; - u_int initiator_id; /* Find out the characteristics of the bus */ work_ccb = xpt_alloc_ccb_nowait(); @@ -849,7 +848,6 @@ /* Cache on our stack so we can work asynchronously */ max_target = scan_info->cpi->max_target; - initiator_id = scan_info->cpi->initiator_id; /* * We can scan all targets in parallel, or do it sequentially. @@ -859,15 +857,10 @@ scan_info->counter = 0; } else { scan_info->counter = scan_info->cpi->max_target + 1; - if (scan_info->cpi->initiator_id < scan_info->counter) { - scan_info->counter--; - } } for (i = 0; i <= max_target; i++) { cam_status status; - if (i == initiator_id) - continue; status = xpt_create_path(&path, xpt_periph, request_ccb->ccb_h.path_id, @@ -922,10 +915,6 @@ done = 0; if (scan_info->cpi->hba_misc & PIM_SEQSCAN) { scan_info->counter++; - if (scan_info->counter == - scan_info->cpi->initiator_id) { - scan_info->counter++; - } if (scan_info->counter >= scan_info->cpi->max_target+1) { done = 1; ==== //depot/projects/scottl-camlock/src/sys/dev/ahci/ahci.c#8 (text+ko) ==== @@ -1722,16 +1722,16 @@ if (ccb->ccb_h.target_id == CAM_TARGET_WILDCARD || (((ATA_ATA_MASTER | ATA_ATAPI_MASTER) << - (ccb->ccb_h.target_id - 1)) & ch->devices)) { + ccb->ccb_h.target_id) & ch->devices)) { cpi->version_num = 1; /* XXX??? */ - cpi->hba_inquiry = PI_SDTR_ABLE; + cpi->hba_inquiry = PI_SDTR_ABLE | PI_TAG_ABLE; cpi->target_sprt = 0; cpi->hba_misc = 0; cpi->hba_eng_cnt = 0; - cpi->max_target = 1; + cpi->max_target = 0; cpi->max_lun = 0; - cpi->initiator_id = 0;//aha->scsi_id; + cpi->initiator_id = 0; cpi->bus_id = cam_sim_bus(sim); cpi->base_transfer_speed = 150000; strncpy(cpi->sim_vid, "FreeBSD", SIM_IDLEN); @@ -1740,7 +1740,7 @@ cpi->unit_number = cam_sim_unit(sim); cpi->transport = XPORT_ATA; cpi->transport_version = 2; - if ((ATA_ATA_MASTER << (ccb->ccb_h.target_id - 1)) & ch->devices) + if ((ATA_ATA_MASTER << ccb->ccb_h.target_id) & ch->devices) cpi->protocol = PROTO_ATA; else cpi->protocol = PROTO_SCSI;