diff options
author | James Smart <James.Smart@Emulex.Com> | 2007-06-17 20:56:38 -0400 |
---|---|---|
committer | James Bottomley <jejb@mulgrave.il.steeleye.com> | 2007-06-17 23:27:39 -0400 |
commit | 92d7f7b0cde3ad2260e7462b40867b57efd49851 (patch) | |
tree | fadb1d8f1a817c2f85937b5e9c3b830bdecb5555 /drivers/scsi/lpfc/lpfc_sli.h | |
parent | ed957684294618602b48f1950b0c9bbcb036583f (diff) |
[SCSI] lpfc: NPIV: add NPIV support on top of SLI-3
NPIV support is added to the driver. It utilizes the interfaces of
the fc transport for the creation and deletion of vports. Within the
driver, a new Scsi_Host is created for each NPIV instance, and is
paired with a new instance of a FC port. This allows N FC Port
elements to share a single Adapter.
Signed-off-by: James Smart <James.Smart@emulex.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi/lpfc/lpfc_sli.h')
-rw-r--r-- | drivers/scsi/lpfc/lpfc_sli.h | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/drivers/scsi/lpfc/lpfc_sli.h b/drivers/scsi/lpfc/lpfc_sli.h index 190d55a69b2a..4c43a8fd699c 100644 --- a/drivers/scsi/lpfc/lpfc_sli.h +++ b/drivers/scsi/lpfc/lpfc_sli.h | |||
@@ -44,6 +44,7 @@ struct lpfc_iocbq { | |||
44 | #define LPFC_IO_WAKE 2 /* High Priority Queue signal flag */ | 44 | #define LPFC_IO_WAKE 2 /* High Priority Queue signal flag */ |
45 | #define LPFC_IO_FCP 4 /* FCP command -- iocbq in scsi_buf */ | 45 | #define LPFC_IO_FCP 4 /* FCP command -- iocbq in scsi_buf */ |
46 | #define LPFC_DRIVER_ABORTED 8 /* driver aborted this request */ | 46 | #define LPFC_DRIVER_ABORTED 8 /* driver aborted this request */ |
47 | #define LPFC_IO_FABRIC 0x10 /* Iocb send using fabric scheduler */ | ||
47 | 48 | ||
48 | uint8_t abort_count; | 49 | uint8_t abort_count; |
49 | uint8_t rsvd2; | 50 | uint8_t rsvd2; |
@@ -58,6 +59,8 @@ struct lpfc_iocbq { | |||
58 | struct lpfcMboxq *mbox; | 59 | struct lpfcMboxq *mbox; |
59 | } context_un; | 60 | } context_un; |
60 | 61 | ||
62 | void (*fabric_iocb_cmpl) (struct lpfc_hba *, struct lpfc_iocbq *, | ||
63 | struct lpfc_iocbq *); | ||
61 | void (*iocb_cmpl) (struct lpfc_hba *, struct lpfc_iocbq *, | 64 | void (*iocb_cmpl) (struct lpfc_hba *, struct lpfc_iocbq *, |
62 | struct lpfc_iocbq *); | 65 | struct lpfc_iocbq *); |
63 | 66 | ||
@@ -173,7 +176,7 @@ struct lpfc_sli_ring { | |||
173 | /* Structure used for configuring rings to a specific profile or rctl / type */ | 176 | /* Structure used for configuring rings to a specific profile or rctl / type */ |
174 | struct lpfc_hbq_init { | 177 | struct lpfc_hbq_init { |
175 | uint32_t rn; /* Receive buffer notification */ | 178 | uint32_t rn; /* Receive buffer notification */ |
176 | uint32_t entry_count; /* # of entries in HBQ */ | 179 | uint32_t entry_count; /* max # of entries in HBQ */ |
177 | uint32_t headerLen; /* 0 if not profile 4 or 5 */ | 180 | uint32_t headerLen; /* 0 if not profile 4 or 5 */ |
178 | uint32_t logEntry; /* Set to 1 if this HBQ used for LogEntry */ | 181 | uint32_t logEntry; /* Set to 1 if this HBQ used for LogEntry */ |
179 | uint32_t profile; /* Selection profile 0=all, 7=logentry */ | 182 | uint32_t profile; /* Selection profile 0=all, 7=logentry */ |
@@ -188,6 +191,11 @@ struct lpfc_hbq_init { | |||
188 | uint32_t cmdmatch[8]; | 191 | uint32_t cmdmatch[8]; |
189 | uint32_t mask_count; /* number of mask entries in prt array */ | 192 | uint32_t mask_count; /* number of mask entries in prt array */ |
190 | struct hbq_mask hbqMasks[6]; | 193 | struct hbq_mask hbqMasks[6]; |
194 | |||
195 | /* Non-config rings fields to keep track of buffer allocations */ | ||
196 | uint32_t buffer_count; /* number of buffers allocated */ | ||
197 | uint32_t init_count; /* number to allocate when initialized */ | ||
198 | uint32_t add_count; /* number to allocate when starved */ | ||
191 | } ; | 199 | } ; |
192 | 200 | ||
193 | #define LPFC_MAX_HBQ 16 | 201 | #define LPFC_MAX_HBQ 16 |
@@ -238,6 +246,7 @@ struct lpfc_sli { | |||
238 | uint16_t mboxq_cnt; /* current length of queue */ | 246 | uint16_t mboxq_cnt; /* current length of queue */ |
239 | uint16_t mboxq_max; /* max length */ | 247 | uint16_t mboxq_max; /* max length */ |
240 | LPFC_MBOXQ_t *mbox_active; /* active mboxq information */ | 248 | LPFC_MBOXQ_t *mbox_active; /* active mboxq information */ |
249 | struct list_head mboxq_cmpl; | ||
241 | 250 | ||
242 | struct timer_list mbox_tmo; /* Hold clk to timeout active mbox | 251 | struct timer_list mbox_tmo; /* Hold clk to timeout active mbox |
243 | cmd */ | 252 | cmd */ |
@@ -250,12 +259,6 @@ struct lpfc_sli { | |||
250 | struct lpfc_lnk_stat lnk_stat_offsets; | 259 | struct lpfc_lnk_stat lnk_stat_offsets; |
251 | }; | 260 | }; |
252 | 261 | ||
253 | /* Given a pointer to the start of the ring, and the slot number of | ||
254 | * the desired iocb entry, calc a pointer to that entry. | ||
255 | * (assume iocb entry size is 32 bytes, or 8 words) | ||
256 | */ | ||
257 | #define IOCB_ENTRY(ring,slot) ((IOCB_t *)(((char *)(ring)) + ((slot) * 32))) | ||
258 | |||
259 | #define LPFC_MBOX_TMO 30 /* Sec tmo for outstanding mbox | 262 | #define LPFC_MBOX_TMO 30 /* Sec tmo for outstanding mbox |
260 | command */ | 263 | command */ |
261 | #define LPFC_MBOX_TMO_FLASH_CMD 300 /* Sec tmo for outstanding FLASH write | 264 | #define LPFC_MBOX_TMO_FLASH_CMD 300 /* Sec tmo for outstanding FLASH write |