Date: Sun, 24 May 2009 17:03:25 GMT From: Alexander Motin <mav@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 162655 for review Message-ID: <200905241703.n4OH3Ptx076258@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200905241703.n4OH3Ptx076258>