summaryrefslogtreecommitdiffstats
path: root/sys/dev/isp/isp_tpublic.h
diff options
context:
space:
mode:
authormjacob <mjacob@FreeBSD.org>2007-05-05 20:17:23 +0000
committermjacob <mjacob@FreeBSD.org>2007-05-05 20:17:23 +0000
commitace2524e6248fd7ca96bda126cb5bded62451a13 (patch)
treec5e127befa8e1d977a5d0f932bdbef74b370fa64 /sys/dev/isp/isp_tpublic.h
parentb34f6f7ab1b2b31d561cfbfbc0b43a23c6d93a3e (diff)
downloadFreeBSD-src-ace2524e6248fd7ca96bda126cb5bded62451a13.zip
FreeBSD-src-ace2524e6248fd7ca96bda126cb5bded62451a13.tar.gz
Make this an MP safe driver but also still be multi-release.
Seems to work on RELENG_4 through -current and also on sparc64 now. There may still be some issues with the auto attach/detach code to sort out. MFC after: 3 days
Diffstat (limited to 'sys/dev/isp/isp_tpublic.h')
-rw-r--r--sys/dev/isp/isp_tpublic.h24
1 files changed, 18 insertions, 6 deletions
diff --git a/sys/dev/isp/isp_tpublic.h b/sys/dev/isp/isp_tpublic.h
index 63e7454..b16440b 100644
--- a/sys/dev/isp/isp_tpublic.h
+++ b/sys/dev/isp/isp_tpublic.h
@@ -54,6 +54,7 @@ typedef enum {
QIN_HBA_REG=99, /* the argument is a pointer to a hba_register_t */
QIN_GETINFO, /* the argument is a pointer to a info_t */
QIN_SETINFO, /* the argument is a pointer to a info_t */
+ QIN_GETDLIST, /* the argument is a pointer to a fc_dlist_t */
QIN_ENABLE, /* the argument is a pointer to a enadis_t */
QIN_DISABLE, /* the argument is a pointer to a enadis_t */
QIN_TMD_CONT, /* the argument is a pointer to a tmd_cmd_t */
@@ -72,7 +73,7 @@ typedef enum {
* in, and the external module to call back with a QIN_HBA_REG that
* passes back the corresponding information.
*/
-#define QR_VERSION 15
+#define QR_VERSION 16
typedef struct {
/* NB: tags from here to r_version must never change */
void * r_identity;
@@ -87,8 +88,7 @@ typedef struct {
} hba_register_t;
/*
- * An information structure that is used to get or set per-channel
- * transport layer parameters.
+ * An information structure that is used to get or set per-channel transport layer parameters.
*/
typedef struct {
void * i_identity;
@@ -109,6 +109,16 @@ typedef struct {
} info_t;
/*
+ * An information structure to return a list of logged in WWPNs. FC specific.
+ */
+typedef struct {
+ void * d_identity;
+ int d_channel;
+ int d_error;
+ int d_count;
+ uint64_t * d_wwpns;
+} fc_dlist_t;
+/*
* Notify structure
*/
typedef enum {
@@ -324,12 +334,14 @@ typedef struct tmd_cmd {
#define L0LUN_TO_FLATLUN(lptr) ((((lptr)[0] & 0x3f) << 8) | ((lptr)[1]))
#define FLATLUN_TO_L0LUN(lptr, lun) \
- (lptr)[1] = lun; \
+ (lptr)[1] = lun & 0xff; \
if (sizeof (lun) == 1) { \
(lptr)[0] = 0; \
} else { \
- int nl = (lun); \
- if (nl < 256) { \
+ uint16_t nl = lun; \
+ if (nl == LUN_ANY) { \
+ (lptr)[0] = (nl >> 8) & 0xff; \
+ } else if (nl < 256) { \
(lptr)[0] = 0; \
} else { \
(lptr)[0] = 0x40 | ((nl >> 8) & 0x3f); \
OpenPOWER on IntegriCloud