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/aic/aic.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/aic/aic.c')
-rw-r--r-- | sys/dev/aic/aic.c | 86 |
1 files changed, 0 insertions, 86 deletions
diff --git a/sys/dev/aic/aic.c b/sys/dev/aic/aic.c index c912153..cd9fabc 100644 --- a/sys/dev/aic/aic.c +++ b/sys/dev/aic/aic.c @@ -167,7 +167,6 @@ aic_action(struct cam_sim *sim, union ccb *ccb) { struct ccb_trans_settings *cts = cts = &ccb->cts; struct aic_tinfo *ti = &aic->tinfo[ccb->ccb_h.target_id]; -#ifdef CAM_NEW_TRAN_CODE struct ccb_trans_settings_scsi *scsi = &cts->proto_specific.scsi; struct ccb_trans_settings_spi *spi = @@ -213,47 +212,6 @@ aic_action(struct cam_sim *sim, union ccb *ccb) ti->flags |= TINFO_SDTR_NEGO; splx(s); -#else - s = splcam(); - if ((cts->valid & CCB_TRANS_DISC_VALID) != 0 && - (aic->flags & AIC_DISC_ENABLE) != 0) { - if ((cts->flags & CCB_TRANS_DISC_ENB) != 0) - ti->flags |= TINFO_DISC_ENB; - else - ti->flags &= ~TINFO_DISC_ENB; - } - - if ((cts->valid & CCB_TRANS_TQ_VALID) != 0) { - if ((cts->flags & CCB_TRANS_TAG_ENB) != 0) - ti->flags |= TINFO_TAG_ENB; - else - ti->flags &= ~TINFO_TAG_ENB; - } - - if ((cts->valid & CCB_TRANS_SYNC_RATE_VALID) != 0) { - ti->goal.period = cts->sync_period; - - if (ti->goal.period > aic->min_period) { - ti->goal.period = 0; - ti->goal.offset = 0; - } else if (ti->goal.period < aic->max_period) - ti->goal.period = aic->max_period; - } - - if ((cts->valid & CCB_TRANS_SYNC_OFFSET_VALID) != 0) { - ti->goal.offset = cts->sync_offset; - if (ti->goal.offset == 0) - ti->goal.period = 0; - else if (ti->goal.offset > AIC_SYNC_OFFSET) - ti->goal.offset = AIC_SYNC_OFFSET; - } - - if ((ti->goal.period != ti->current.period) - || (ti->goal.offset != ti->current.offset)) - ti->flags |= TINFO_SDTR_NEGO; - - splx(s); -#endif ccb->ccb_h.status = CAM_REQ_CMP; xpt_done(ccb); break; @@ -262,7 +220,6 @@ aic_action(struct cam_sim *sim, union ccb *ccb) { struct ccb_trans_settings *cts = &ccb->cts; struct aic_tinfo *ti = &aic->tinfo[ccb->ccb_h.target_id]; -#ifdef CAM_NEW_TRAN_CODE struct ccb_trans_settings_scsi *scsi = &cts->proto_specific.scsi; struct ccb_trans_settings_spi *spi = @@ -296,31 +253,6 @@ aic_action(struct cam_sim *sim, union ccb *ccb) | CTS_SPI_VALID_BUS_WIDTH | CTS_SPI_VALID_DISC; scsi->valid = CTS_SCSI_VALID_TQ; -#else - s = splcam(); - cts->flags &= ~(CCB_TRANS_DISC_ENB|CCB_TRANS_TAG_ENB); - if ((ti->flags & TINFO_DISC_ENB) != 0) - cts->flags |= CCB_TRANS_DISC_ENB; - if ((ti->flags & TINFO_TAG_ENB) != 0) - cts->flags |= CCB_TRANS_TAG_ENB; - - if ((cts->flags & CCB_TRANS_CURRENT_SETTINGS) != 0) { - cts->sync_period = ti->current.period; - cts->sync_offset = ti->current.offset; - } else { - cts->sync_period = ti->user.period; - cts->sync_offset = ti->user.offset; - } - cts->bus_width = MSG_EXT_WDTR_BUS_8_BIT; - - splx(s); - - cts->valid = CCB_TRANS_SYNC_RATE_VALID - | CCB_TRANS_SYNC_OFFSET_VALID - | CCB_TRANS_BUS_WIDTH_VALID - | CCB_TRANS_DISC_VALID - | CCB_TRANS_TQ_VALID; -#endif ccb->ccb_h.status = CAM_REQ_CMP; xpt_done(ccb); @@ -355,12 +287,10 @@ aic_action(struct cam_sim *sim, union ccb *ccb) strncpy(cpi->hba_vid, "Adaptec", HBA_IDLEN); strncpy(cpi->dev_name, cam_sim_name(sim), DEV_IDLEN); cpi->unit_number = cam_sim_unit(sim); -#ifdef CAM_NEW_TRAN_CODE cpi->transport = XPORT_SPI; cpi->transport_version = 2; cpi->protocol = PROTO_SCSI; cpi->protocol_version = SCSI_REV_2; -#endif cpi->ccb_h.status = CAM_REQ_CMP; xpt_done(ccb); break; @@ -678,9 +608,7 @@ aic_handle_msgin(struct aic_softc *aic) struct ccb_hdr *ccb_h; struct aic_tinfo *ti; struct ccb_trans_settings neg; -#ifdef CAM_NEW_TRAN_CODE struct ccb_trans_settings_spi *spi = &neg.xport_specific.spi; -#endif if (aic->state == AIC_RESELECTED) { if (!MSG_ISIDENTIFY(aic->msg_buf[0])) { @@ -767,7 +695,6 @@ aic_handle_msgin(struct aic_softc *aic) ((ti->current.period * 4 + 49) / 50 - 2) << 4 : 0; aic_outb(aic, SCSIRATE, ti->scsirate); memset(&neg, 0, sizeof (neg)); -#ifdef CAM_NEW_TRAN_CODE neg.protocol = PROTO_SCSI; neg.protocol_version = SCSI_REV_2; neg.transport = XPORT_SPI; @@ -776,12 +703,6 @@ aic_handle_msgin(struct aic_softc *aic) spi->sync_offset = ti->goal.offset = ti->current.offset; spi->valid = CTS_SPI_VALID_SYNC_RATE | CTS_SPI_VALID_SYNC_OFFSET; -#else - neg.sync_period = ti->goal.period = ti->current.period; - neg.sync_offset = ti->goal.offset = ti->current.offset; - neg.valid = CCB_TRANS_SYNC_RATE_VALID - | CCB_TRANS_SYNC_OFFSET_VALID; -#endif ccb_h = &scb->ccb->ccb_h; xpt_setup_ccb(&neg.ccb_h, ccb_h->path, 1); xpt_async(AC_TRANSFER_NEG, ccb_h->path, &neg); @@ -818,7 +739,6 @@ aic_handle_msgin(struct aic_softc *aic) ti->scsirate = 0; aic_outb(aic, SCSIRATE, ti->scsirate); memset(&neg, 0, sizeof (neg)); -#ifdef CAM_NEW_TRAN_CODE neg.protocol = PROTO_SCSI; neg.protocol_version = SCSI_REV_2; neg.transport = XPORT_SPI; @@ -827,12 +747,6 @@ aic_handle_msgin(struct aic_softc *aic) spi->sync_offset = ti->current.offset; spi->valid = CTS_SPI_VALID_SYNC_RATE | CTS_SPI_VALID_SYNC_OFFSET; -#else - neg.sync_period = ti->current.period; - neg.sync_offset = ti->current.offset; - neg.valid = CCB_TRANS_SYNC_RATE_VALID - | CCB_TRANS_SYNC_OFFSET_VALID; -#endif ccb_h = &scb->ccb->ccb_h; xpt_setup_ccb(&neg.ccb_h, ccb_h->path, 1); xpt_async(AC_TRANSFER_NEG, ccb_h->path, &neg); |