summaryrefslogtreecommitdiffstats
path: root/sys/dev/ciss/cissvar.h
diff options
context:
space:
mode:
authorps <ps@FreeBSD.org>2004-04-16 23:00:01 +0000
committerps <ps@FreeBSD.org>2004-04-16 23:00:01 +0000
commita7a31583b738b898e6e5fc0e113160519768d0b8 (patch)
treee2f6cfb86187409cf53dcfda78756032100e4037 /sys/dev/ciss/cissvar.h
parent914d5fc9b4fc8f56a7ae7565ed67757fcfd84358 (diff)
downloadFreeBSD-src-a7a31583b738b898e6e5fc0e113160519768d0b8.zip
FreeBSD-src-a7a31583b738b898e6e5fc0e113160519768d0b8.tar.gz
Add support for the HP Modular Smart Array 20 & 500 storage arrays.
Logical volumes on these devices show up as LUNs behind another controller (also known as proxy controller). In order to issue firmware commands for a volume on a proxy controller, they must be targeted at the address of the proxy controller it is attached to, not the Host/PCI controller. A proxy controller is defined as a device listed in the INQUIRY PHYSICAL LUNS command who's L2 and L3 SCSI addresses are zero. The corresponding address returned defines which "bus" the controller lives on and we use this to create a virtual CAM bus. A logical volume's addresses first byte defines the logical drive number. The second byte defines the bus that it is attached to which corresponds to the BUS of the proxy controller's found or the Host/PCI controller. Change event notification to be handled in its own kernel thread. This is needed since some events may require the driver to sleep on some operations and this cannot be done during interrupt context. With this change, it is now possible to create and destroy logical volumes from FreeBSD, but it requires a native application to construct the proper firmware commands which is not publicly available. Special thanks to John Cagle @ HP for providing remote access to all the hardware and beating on the storage engineers at HP to answer my questions.
Diffstat (limited to 'sys/dev/ciss/cissvar.h')
-rw-r--r--sys/dev/ciss/cissvar.h32
1 files changed, 18 insertions, 14 deletions
diff --git a/sys/dev/ciss/cissvar.h b/sys/dev/ciss/cissvar.h
index 6274b9d..717351f 100644
--- a/sys/dev/ciss/cissvar.h
+++ b/sys/dev/ciss/cissvar.h
@@ -47,6 +47,11 @@
#define CISS_MAX_LOGICAL 15
/*
+ * Maximum number of physical devices we support.
+ */
+#define CISS_MAX_PHYSICAL 1024
+
+/*
* Interrupt reduction can be controlled by tuning the interrupt
* coalesce delay and count paramters. The delay (in microseconds)
* defers delivery of interrupts to increase the chance of there being
@@ -66,11 +71,6 @@
*/
#define CISS_HEARTBEAT_RATE 10
-/*
- * Maximum number of events we will queue for a monitoring utility.
- */
-#define CISS_MAX_EVENTS 32
-
/************************************************************************
* Compatibility with older versions of FreeBSD
*/
@@ -86,7 +86,8 @@ typedef struct proc d_thread_t;
#define CISSQ_FREE 0
#define CISSQ_BUSY 1
#define CISSQ_COMPLETE 2
-#define CISSQ_COUNT 3
+#define CISSQ_NOTIFY 3
+#define CISSQ_COUNT 4
struct ciss_qstat
{
@@ -150,12 +151,14 @@ struct ciss_request
struct ciss_ldrive
{
union ciss_device_address cl_address;
-
+ union ciss_device_address *cl_controller;
int cl_status;
#define CISS_LD_NONEXISTENT 0
#define CISS_LD_ONLINE 1
#define CISS_LD_OFFLINE 2
+ int cl_update;
+
struct ciss_bmic_id_ldrive *cl_ldrive;
struct ciss_bmic_id_lstatus *cl_lstatus;
struct ciss_ldrive_geometry cl_geometry;
@@ -202,19 +205,18 @@ struct ciss_softc
TAILQ_HEAD(,ciss_request) ciss_free; /* requests available for reuse */
TAILQ_HEAD(,ciss_request) ciss_busy; /* requests in the adapter */
TAILQ_HEAD(,ciss_request) ciss_complete; /* requests which have been returned by the adapter */
+ TAILQ_HEAD(,ciss_request) ciss_notify; /* requests which are defered for processing */
+ struct proc *ciss_notify_thread;
struct callout_handle ciss_periodic; /* periodic event handling */
struct ciss_request *ciss_periodic_notify; /* notify callback request */
- struct ciss_notify ciss_notify[CISS_MAX_EVENTS];
- int ciss_notify_head; /* saved-event ringbuffer */
- int ciss_notify_tail;
-
- struct ciss_ldrive ciss_logical[CISS_MAX_LOGICAL];
+ struct ciss_ldrive **ciss_logical;
+ union ciss_device_address *ciss_controllers; /* controller address */
+ int ciss_max_bus_number; /* maximum bus number */
struct cam_devq *ciss_cam_devq;
- struct cam_sim *ciss_cam_sim;
- struct cam_path *ciss_cam_path;
+ struct cam_sim **ciss_cam_sim;
int ciss_flags;
#define CISS_FLAG_NOTIFY_OK (1<<0) /* notify command running OK */
@@ -224,6 +226,7 @@ struct ciss_softc
#define CISS_FLAG_FAKE_SYNCH (1<<16) /* needs SYNCHRONISE_CACHE faked */
#define CISS_FLAG_BMIC_ABORT (1<<17) /* use BMIC command to abort Notify on Event */
+#define CISS_FLAG_THREAD_SHUT (1<<20) /* shutdown the kthread */
struct ciss_qstat ciss_qstat[CISSQ_COUNT]; /* queue statistics */
};
@@ -367,6 +370,7 @@ struct hack
CISSQ_REQUEST_QUEUE(free, CISSQ_FREE);
CISSQ_REQUEST_QUEUE(busy, CISSQ_BUSY);
CISSQ_REQUEST_QUEUE(complete, CISSQ_COMPLETE);
+CISSQ_REQUEST_QUEUE(notify, CISSQ_NOTIFY);
/********************************************************************************
* space-fill a character string
OpenPOWER on IntegriCloud