summaryrefslogtreecommitdiffstats
path: root/sys/dev/ciss/cissvar.h
diff options
context:
space:
mode:
authorscottl <scottl@FreeBSD.org>2004-06-21 20:18:40 +0000
committerscottl <scottl@FreeBSD.org>2004-06-21 20:18:40 +0000
commit3eaa7bd6e03c66be6bae0de22213bab94497f1f7 (patch)
tree5d34300b04955ddfa6f0ee0a0b60ccdf2d12f55c /sys/dev/ciss/cissvar.h
parent4104a7f84fd330bcd30c1c509f0026011e03780b (diff)
downloadFreeBSD-src-3eaa7bd6e03c66be6bae0de22213bab94497f1f7.zip
FreeBSD-src-3eaa7bd6e03c66be6bae0de22213bab94497f1f7.tar.gz
Add SCSI passthrough support to CISS. This allows devices like tape drives
that are on a CISS bus to be exported up to CAM and made available as normal devices. This will typically add one or two buses to CAM, which will be numbered starting at 32 to allow room for CISS proxy buses. Also, the CISS firmware usually hides disk devices, but these can also be exposed as 'pass' devices if you set the hw.ciss.expose_hidden_physical tunable. Sponsored by: Tape Laboratories, Inc. MFC After: 3 days
Diffstat (limited to 'sys/dev/ciss/cissvar.h')
-rw-r--r--sys/dev/ciss/cissvar.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/sys/dev/ciss/cissvar.h b/sys/dev/ciss/cissvar.h
index b1bdd42..5657ea0 100644
--- a/sys/dev/ciss/cissvar.h
+++ b/sys/dev/ciss/cissvar.h
@@ -167,6 +167,22 @@ struct ciss_ldrive
};
/*
+ * Per-physical-drive data
+ */
+struct ciss_pdrive
+{
+ union ciss_device_address cp_address;
+ int cp_online;
+};
+
+#define CISS_PHYSICAL_SHIFT 5
+#define CISS_PHYSICAL_BASE (1 << CISS_PHYSICAL_SHIFT)
+#define CISS_MAX_PHYSTGT 15
+
+#define CISS_IS_PHYSICAL(bus) (bus >= CISS_PHYSICAL_BASE)
+#define CISS_CAM_TO_PBUS(bus) (bus - CISS_PHYSICAL_BASE)
+
+/*
* Per-adapter data
*/
struct ciss_softc
@@ -212,8 +228,11 @@ struct ciss_softc
struct ciss_request *ciss_periodic_notify; /* notify callback request */
struct ciss_ldrive **ciss_logical;
+ struct ciss_pdrive **ciss_physical;
union ciss_device_address *ciss_controllers; /* controller address */
int ciss_max_bus_number; /* maximum bus number */
+ int ciss_max_logical_bus;
+ int ciss_max_physical_bus;
struct cam_devq *ciss_cam_devq;
struct cam_sim **ciss_cam_sim;
OpenPOWER on IntegriCloud