summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorgibbs <gibbs@FreeBSD.org>2000-07-18 19:47:14 +0000
committergibbs <gibbs@FreeBSD.org>2000-07-18 19:47:14 +0000
commitce75b526ee2357f1e7a8fc7cd1e36ebcbf4ee822 (patch)
tree5d032683edcad86ea19d218b21f7a6f3bab9620c /sys
parentd7b89f04572dd50f8819106cb1401b444e3af847 (diff)
downloadFreeBSD-src-ce75b526ee2357f1e7a8fc7cd1e36ebcbf4ee822.zip
FreeBSD-src-ce75b526ee2357f1e7a8fc7cd1e36ebcbf4ee822.tar.gz
cam_ccb.h:
Bring back the CAM_NEGOTIATE ccb flag. This flag indicates that SPI transfer negotiation should occur concurrently with the execution of this CCB. The flag is not yet used by the XPT but is required for proper support of multi-initiator configurations where topology scans cannot rely on a bus reset to invalidate prior negotiations. cam_xpt.c: Don't allow DT transmission rates to be specified for devices that don't have the DT feature listed in their inquiry data.
Diffstat (limited to 'sys')
-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 3224522..2184465 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 72f971c..4e2a6b4 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
OpenPOWER on IntegriCloud