[SCSI] lpfc 8.3.10: Added management for LP21000 through BSG.
[deliverable/linux.git] / drivers / scsi / lpfc / lpfc_bsg.h
1 /*******************************************************************
2 * This file is part of the Emulex Linux Device Driver for *
3 * Fibre Channel Host Bus Adapters. *
4 * Copyright (C) 2010 Emulex. All rights reserved. *
5 * EMULEX and SLI are trademarks of Emulex. *
6 * www.emulex.com *
7 * *
8 * This program is free software; you can redistribute it and/or *
9 * modify it under the terms of version 2 of the GNU General *
10 * Public License as published by the Free Software Foundation. *
11 * This program is distributed in the hope that it will be useful. *
12 * ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND *
13 * WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, *
14 * FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT, ARE *
15 * DISCLAIMED, EXCEPT TO THE EXTENT THAT SUCH DISCLAIMERS ARE HELD *
16 * TO BE LEGALLY INVALID. See the GNU General Public License for *
17 * more details, a copy of which can be found in the file COPYING *
18 * included with this package. *
19 *******************************************************************/
20 /* bsg definitions
21 * No pointers to user data are allowed, all application buffers and sizes will
22 * derived through the bsg interface.
23 *
24 * These are the vendor unique structures passed in using the bsg
25 * FC_BSG_HST_VENDOR message code type.
26 */
27 #define LPFC_BSG_VENDOR_SET_CT_EVENT 1
28 #define LPFC_BSG_VENDOR_GET_CT_EVENT 2
29 #define LPFC_BSG_VENDOR_SEND_MGMT_RESP 3
30 #define LPFC_BSG_VENDOR_DIAG_MODE 4
31 #define LPFC_BSG_VENDOR_DIAG_TEST 5
32 #define LPFC_BSG_VENDOR_GET_MGMT_REV 6
33 #define LPFC_BSG_VENDOR_MBOX 7
34 #define LPFC_BSG_VENDOR_MENLO_CMD 8
35 #define LPFC_BSG_VENDOR_MENLO_DATA 9
36
37 struct set_ct_event {
38 uint32_t command;
39 uint32_t type_mask;
40 uint32_t ev_req_id;
41 uint32_t ev_reg_id;
42 };
43
44 struct get_ct_event {
45 uint32_t command;
46 uint32_t ev_reg_id;
47 uint32_t ev_req_id;
48 };
49
50 struct get_ct_event_reply {
51 uint32_t immed_data;
52 uint32_t type;
53 };
54
55 struct send_mgmt_resp {
56 uint32_t command;
57 uint32_t tag;
58 };
59
60
61 #define INTERNAL_LOOP_BACK 0x1 /* adapter short cuts the loop internally */
62 #define EXTERNAL_LOOP_BACK 0x2 /* requires an external loopback plug */
63
64 struct diag_mode_set {
65 uint32_t command;
66 uint32_t type;
67 uint32_t timeout;
68 };
69
70 struct diag_mode_test {
71 uint32_t command;
72 };
73
74 #define LPFC_WWNN_TYPE 0
75 #define LPFC_WWPN_TYPE 1
76
77 struct get_mgmt_rev {
78 uint32_t command;
79 };
80
81 #define MANAGEMENT_MAJOR_REV 1
82 #define MANAGEMENT_MINOR_REV 0
83
84 /* the MgmtRevInfo structure */
85 struct MgmtRevInfo {
86 uint32_t a_Major;
87 uint32_t a_Minor;
88 };
89
90 struct get_mgmt_rev_reply {
91 struct MgmtRevInfo info;
92 };
93
94 struct dfc_mbox_req {
95 uint32_t command;
96 uint32_t inExtWLen;
97 uint32_t outExtWLen;
98 uint8_t mbOffset;
99 };
100
101 /* Used for menlo command or menlo data. The xri is only used for menlo data */
102 struct menlo_command {
103 uint32_t cmd;
104 uint32_t xri;
105 };
106
107 struct menlo_response {
108 uint32_t xri; /* return the xri of the iocb exchange */
109 };
110
This page took 0.082887 seconds and 5 git commands to generate.