From owner-p4-projects@FreeBSD.ORG Sun May 24 17:03:26 2009 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 6EB34106568A; Sun, 24 May 2009 17:03:26 +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 257B3106567F for ; Sun, 24 May 2009 17:03:26 +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 EE88A8FC25 for ; Sun, 24 May 2009 17:03:25 +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 n4OH3P38076260 for ; Sun, 24 May 2009 17:03:25 GMT (envelope-from mav@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id n4OH3Ptx076258 for perforce@freebsd.org; Sun, 24 May 2009 17:03:25 GMT (envelope-from mav@freebsd.org) Date: Sun, 24 May 2009 17:03:25 GMT Message-Id: <200905241703.n4OH3Ptx076258@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 162655 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: Sun, 24 May 2009 17:03:28 -0000 http://perforce.freebsd.org/chv.cgi?CH=162655 Change 162655 by mav@mav_mavbook on 2009/05/24 17:02:35 Give CAM a bit more information about device. Mostly cosmetics. Affected files ... .. //depot/projects/scottl-camlock/src/sys/dev/ahci/ahci.c#2 edit Differences ... ==== //depot/projects/scottl-camlock/src/sys/dev/ahci/ahci.c#2 (text+ko) ==== @@ -1718,50 +1718,24 @@ ccb->ccb_h.status = CAM_PROVIDE_FAIL; xpt_done(ccb); break; +#endif case XPT_GET_TRAN_SETTINGS: /* Get default/user set transfer settings for the target */ { struct ccb_trans_settings *cts = &ccb->cts; - u_int target_mask = 0x01 << ccb->ccb_h.target_id; - struct ccb_trans_settings_scsi *scsi = - &cts->proto_specific.scsi; - struct ccb_trans_settings_spi *spi = - &cts->xport_specific.spi; - cts->protocol = PROTO_SCSI; + cts->protocol = PROTO_ATA; cts->protocol_version = SCSI_REV_2; - cts->transport = XPORT_SPI; + cts->transport = XPORT_ATA; cts->transport_version = 2; - if (cts->type == CTS_TYPE_USER_SETTINGS) { - spi->flags = 0; - if ((aha->disc_permitted & target_mask) != 0) - spi->flags |= CTS_SPI_FLAGS_DISC_ENB; - spi->bus_width = MSG_EXT_WDTR_BUS_8_BIT; - if ((aha->sync_permitted & target_mask) != 0) { - if (aha->boardid >= BOARD_1542CF) - spi->sync_period = 25; - else - spi->sync_period = 50; - } else { - spi->sync_period = 0; - } - - if (spi->sync_period != 0) - spi->sync_offset = 15; - - spi->valid = CTS_SPI_VALID_SYNC_RATE - | CTS_SPI_VALID_SYNC_OFFSET - | CTS_SPI_VALID_BUS_WIDTH - | CTS_SPI_VALID_DISC; - scsi->valid = CTS_SCSI_VALID_TQ; - } else { - ahafetchtransinfo(aha, cts); - } + cts->proto_specific.valid = 0; + cts->xport_specific.valid = 0; ccb->ccb_h.status = CAM_REQ_CMP; xpt_done(ccb); break; } +#if 0 case XPT_CALC_GEOMETRY: { struct ccb_calc_geometry *ccg; @@ -1817,7 +1791,7 @@ cpi->max_lun = 0; cpi->initiator_id = 0;//aha->scsi_id; cpi->bus_id = cam_sim_bus(sim); - cpi->base_transfer_speed = 3300; + cpi->base_transfer_speed = 150000; strncpy(cpi->sim_vid, "FreeBSD", SIM_IDLEN); strncpy(cpi->hba_vid, "AHCI", HBA_IDLEN); strncpy(cpi->dev_name, cam_sim_name(sim), DEV_IDLEN);