aboutsummaryrefslogtreecommitdiff
path: root/sys/cam
diff options
context:
space:
mode:
authorJustin T. Gibbs <gibbs@FreeBSD.org>2000-07-18 19:47:14 +0000
committerJustin T. Gibbs <gibbs@FreeBSD.org>2000-07-18 19:47:14 +0000
commitdd5bac9d0f87febd395be2c0a081db1ae01311dc (patch)
treecde65c0b08911fb79d45f80c969d1fc23cafe270 /sys/cam
parent727a4ed619d729403d33b2b76dca65b2abbfb07d (diff)
Notes
Diffstat (limited to 'sys/cam')
-rw-r--r--sys/cam/cam_ccb.h4
-rw-r--r--sys/cam/cam_xpt.c9
2 files changed, 13 insertions, 0 deletions
diff --git a/sys/cam/cam_ccb.h b/sys/cam/cam_ccb.h
index 32245225ddb8..2184465bda95 100644
--- a/sys/cam/cam_ccb.h
+++ b/sys/cam/cam_ccb.h
@@ -58,6 +58,10 @@ typedef enum {
CAM_CDB_POINTER = 0x00000001,/* The CDB field is a pointer */
CAM_QUEUE_ENABLE = 0x00000002,/* SIM queue actions are enabled */
CAM_CDB_LINKED = 0x00000004,/* CCB contains a linked CDB */
+ CAM_NEGOTIATE = 0x00000008,/*
+ * Perform transport negotiation
+ * with this command.
+ */
CAM_SCATTER_VALID = 0x00000010,/* Scatter/gather list is valid */
CAM_DIS_AUTOSENSE = 0x00000020,/* Disable autosense feature */
CAM_DIR_RESV = 0x00000000,/* Data direction (00:reserved) */
diff --git a/sys/cam/cam_xpt.c b/sys/cam/cam_xpt.c
index 72f971cca6af..4e2a6b461e9c 100644
--- a/sys/cam/cam_xpt.c
+++ b/sys/cam/cam_xpt.c
@@ -5786,6 +5786,15 @@ xpt_set_transfer_settings(struct ccb_trans_settings *cts, struct cam_ed *device,
cts->sync_offset = 0;
}
+ /*
+ * Don't allow DT transmission rates if the
+ * device does not support it.
+ */
+ if ((device->flags & CAM_DEV_INQUIRY_DATA_VALID) != 0
+ && (inq_data->spi3data & SID_SPI_CLOCK_DT) == 0
+ && cts->sync_period <= 0x9)
+ cts->sync_period = 0xa;
+
switch (cts->bus_width) {
case MSG_EXT_WDTR_BUS_32_BIT:
if (((device->flags & CAM_DEV_INQUIRY_DATA_VALID) == 0