diff options
author | mjacob <mjacob@FreeBSD.org> | 2006-11-02 00:54:38 +0000 |
---|---|---|
committer | mjacob <mjacob@FreeBSD.org> | 2006-11-02 00:54:38 +0000 |
commit | 19b599de4af959c5287bac69d61c3810ae390dfe (patch) | |
tree | 9b84492a0966128feabcb74bbcc277bbdb6640c1 /sys/dev/mly/mly.c | |
parent | e6e29e358bcae4e62ea9a2d72c5b2501c75a1850 (diff) | |
download | FreeBSD-src-19b599de4af959c5287bac69d61c3810ae390dfe.zip FreeBSD-src-19b599de4af959c5287bac69d61c3810ae390dfe.tar.gz |
2nd and final commit that moves us to CAM_NEW_TRAN_CODE
as the default.
Reviewed by multitudes.
Diffstat (limited to 'sys/dev/mly/mly.c')
-rw-r--r-- | sys/dev/mly/mly.c | 54 |
1 files changed, 0 insertions, 54 deletions
diff --git a/sys/dev/mly/mly.c b/sys/dev/mly/mly.c index ac72582..19ece61 100644 --- a/sys/dev/mly/mly.c +++ b/sys/dev/mly/mly.c @@ -2097,12 +2097,10 @@ mly_cam_action(struct cam_sim *sim, union ccb *ccb) cpi->unit_number = cam_sim_unit(sim); cpi->bus_id = cam_sim_bus(sim); cpi->base_transfer_speed = 132 * 1024; /* XXX what to set this to? */ -#ifdef CAM_NEW_TRAN_CODE cpi->transport = XPORT_SPI; cpi->transport_version = 2; cpi->protocol = PROTO_SCSI; cpi->protocol_version = SCSI_REV_2; -#endif ccb->ccb_h.status = CAM_REQ_CMP; break; } @@ -2111,7 +2109,6 @@ mly_cam_action(struct cam_sim *sim, union ccb *ccb) { struct ccb_trans_settings *cts = &ccb->cts; int bus, target; -#ifdef CAM_NEW_TRAN_CODE struct ccb_trans_settings_scsi *scsi = &cts->proto_specific.scsi; struct ccb_trans_settings_spi *spi = &cts->xport_specific.spi; @@ -2168,57 +2165,6 @@ mly_cam_action(struct cam_sim *sim, union ccb *ccb) /* disconnect always OK */ spi->flags |= CTS_SPI_FLAGS_DISC_ENB; spi->valid |= CTS_SPI_VALID_DISC; -#else - cts->valid = 0; - - bus = cam_sim_bus(sim); - target = cts->ccb_h.target_id; - /* XXX validate bus/target? */ - - debug(2, "XPT_GET_TRAN_SETTINGS %d:%d", bus, target); - - /* logical device? */ - if (sc->mly_btl[bus][target].mb_flags & MLY_BTL_LOGICAL) { - /* nothing special for these */ - - /* physical device? */ - } else if (sc->mly_btl[bus][target].mb_flags & MLY_BTL_PHYSICAL) { - /* allow CAM to try tagged transactions */ - cts->flags |= CCB_TRANS_TAG_ENB; - cts->valid |= CCB_TRANS_TQ_VALID; - - /* convert speed (MHz) to usec */ - if (sc->mly_btl[bus][target].mb_speed == 0) { - cts->sync_period = 1000000 / 5; - } else { - cts->sync_period = 1000000 / sc->mly_btl[bus][target].mb_speed; - } - - /* convert bus width to CAM internal encoding */ - switch (sc->mly_btl[bus][target].mb_width) { - case 32: - cts->bus_width = MSG_EXT_WDTR_BUS_32_BIT; - break; - case 16: - cts->bus_width = MSG_EXT_WDTR_BUS_16_BIT; - break; - case 8: - default: - cts->bus_width = MSG_EXT_WDTR_BUS_8_BIT; - break; - } - cts->valid |= CCB_TRANS_SYNC_RATE_VALID | CCB_TRANS_BUS_WIDTH_VALID; - - /* not a device, bail out */ - } else { - cts->ccb_h.status = CAM_REQ_CMP_ERR; - break; - } - - /* disconnect always OK */ - cts->flags |= CCB_TRANS_DISC_ENB; - cts->valid |= CCB_TRANS_DISC_VALID; -#endif cts->ccb_h.status = CAM_REQ_CMP; break; |