diff options
Diffstat (limited to 'sys/dev/asr/asr.c')
-rw-r--r-- | sys/dev/asr/asr.c | 39 |
1 files changed, 35 insertions, 4 deletions
diff --git a/sys/dev/asr/asr.c b/sys/dev/asr/asr.c index 66b5146..6a4599a 100644 --- a/sys/dev/asr/asr.c +++ b/sys/dev/asr/asr.c @@ -2791,11 +2791,35 @@ asr_action(struct cam_sim *sim, union ccb *ccb) case XPT_GET_TRAN_SETTINGS: /* Get default/user set transfer settings for the target */ { - struct ccb_trans_settings *cts; - u_int target_mask; + struct ccb_trans_settings *cts = &(ccb->cts); +#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; + + if (cts->type == CTS_TYPE_USER_SETTINGS) { + cts->protocol = PROTO_SCSI; + cts->protocol_version = SCSI_REV_2; + cts->transport = XPORT_SPI; + cts->transport_version = 2; + + scsi->flags = CTS_SCSI_FLAGS_TAG_ENB; + spi->flags = CTS_SPI_FLAGS_DISC_ENB; + spi->bus_width = MSG_EXT_WDTR_BUS_16_BIT; + spi->sync_period = 6; /* 40MHz */ + 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; - cts = &(ccb->cts); - target_mask = 0x01 << ccb->ccb_h.target_id; + ccb->ccb_h.status = CAM_REQ_CMP; + } else { + ccb->ccb_h.status = CAM_FUNC_NOTAVAIL; + } +#else if ((cts->flags & CCB_TRANS_USER_SETTINGS) != 0) { cts->flags = CCB_TRANS_DISC_ENB|CCB_TRANS_TAG_ENB; cts->bus_width = MSG_EXT_WDTR_BUS_16_BIT; @@ -2811,6 +2835,7 @@ asr_action(struct cam_sim *sim, union ccb *ccb) } else { ccb->ccb_h.status = CAM_FUNC_NOTAVAIL; } +#endif xpt_done(ccb); break; } @@ -2877,6 +2902,12 @@ asr_action(struct cam_sim *sim, union ccb *ccb) strncpy(cpi->dev_name, cam_sim_name(sim), DEV_IDLEN); cpi->unit_number = cam_sim_unit(sim); cpi->ccb_h.status = CAM_REQ_CMP; +#ifdef CAM_NEW_TRAN_CODE + cpi->transport = XPORT_SPI; + cpi->transport_version = 2; + cpi->protocol = PROTO_SCSI; + cpi->protocol_version = SCSI_REV_2; +#endif xpt_done(ccb); break; } |