aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/lpfc/lpfc.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/lpfc/lpfc.h')
-rw-r--r--drivers/scsi/lpfc/lpfc.h35
1 files changed, 33 insertions, 2 deletions
diff --git a/drivers/scsi/lpfc/lpfc.h b/drivers/scsi/lpfc/lpfc.h
index 8d718964f281..74f4d18842cc 100644
--- a/drivers/scsi/lpfc/lpfc.h
+++ b/drivers/scsi/lpfc/lpfc.h
@@ -63,6 +63,11 @@ struct lpfc_dma_pool {
63 uint32_t current_count; 63 uint32_t current_count;
64}; 64};
65 65
66struct hbq_dmabuf {
67 struct lpfc_dmabuf dbuf;
68 uint32_t tag;
69};
70
66/* Priority bit. Set value to exceed low water mark in lpfc_mem. */ 71/* Priority bit. Set value to exceed low water mark in lpfc_mem. */
67#define MEM_PRI 0x100 72#define MEM_PRI 0x100
68 73
@@ -276,8 +281,25 @@ struct lpfc_vport {
276 281
277}; 282};
278 283
284
285struct hbq_s {
286 uint16_t entry_count; /* Current number of HBQ slots */
287 uint32_t next_hbqPutIdx; /* Index to next HBQ slot to use */
288 uint32_t hbqPutIdx; /* HBQ slot to use */
289 uint32_t local_hbqGetIdx; /* Local copy of Get index from Port */
290};
291
292#define MAX_HBQS 16
293
279struct lpfc_hba { 294struct lpfc_hba {
280 struct lpfc_sli sli; 295 struct lpfc_sli sli;
296 uint32_t sli_rev; /* SLI2 or SLI3 */
297 uint32_t sli3_options; /* Mask of enabled SLI3 options */
298#define LPFC_SLI3_ENABLED 0x01
299#define LPFC_SLI3_HBQ_ENABLED 0x02
300#define LPFC_SLI3_INB_ENABLED 0x04
301 uint32_t iocb_cmd_size;
302 uint32_t iocb_rsp_size;
281 303
282 enum hba_state link_state; 304 enum hba_state link_state;
283 uint32_t link_flag; /* link state flags */ 305 uint32_t link_flag; /* link state flags */
@@ -286,8 +308,6 @@ struct lpfc_hba {
286 /* INIT_LINK mailbox command */ 308 /* INIT_LINK mailbox command */
287#define LS_IGNORE_ERATT 0x80000 /* intr handler should ignore ERATT */ 309#define LS_IGNORE_ERATT 0x80000 /* intr handler should ignore ERATT */
288 310
289 uint32_t pgpOffset; /* PGP offset within host memory */
290
291 struct lpfc_sli2_slim *slim2p; 311 struct lpfc_sli2_slim *slim2p;
292 struct lpfc_dmabuf hbqslimp; 312 struct lpfc_dmabuf hbqslimp;
293 313
@@ -371,6 +391,12 @@ struct lpfc_hba {
371 wait_queue_head_t *work_wait; 391 wait_queue_head_t *work_wait;
372 struct task_struct *worker_thread; 392 struct task_struct *worker_thread;
373 393
394 struct hbq_dmabuf *hbq_buffer_pool;
395 uint32_t hbq_buffer_count;
396 uint32_t hbq_buff_count; /* Current hbq buffers */
397 uint32_t hbq_count; /* Count of configured HBQs */
398 struct hbq_s hbqs[MAX_HBQS]; /* local copy of hbq indicies */
399
374 unsigned long pci_bar0_map; /* Physical address for PCI BAR0 */ 400 unsigned long pci_bar0_map; /* Physical address for PCI BAR0 */
375 unsigned long pci_bar2_map; /* Physical address for PCI BAR2 */ 401 unsigned long pci_bar2_map; /* Physical address for PCI BAR2 */
376 void __iomem *slim_memmap_p; /* Kernel memory mapped address for 402 void __iomem *slim_memmap_p; /* Kernel memory mapped address for
@@ -385,6 +411,10 @@ struct lpfc_hba {
385 reg */ 411 reg */
386 void __iomem *HCregaddr; /* virtual address for host ctl reg */ 412 void __iomem *HCregaddr; /* virtual address for host ctl reg */
387 413
414 struct lpfc_hgp __iomem *host_gp; /* Host side get/put pointers */
415 uint32_t __iomem *hbq_put; /* Address in SLIM to HBQ put ptrs */
416 uint32_t __iomem *hbq_get; /* Address in SLIM to HBQ get ptrs */
417
388 int brd_no; /* FC board number */ 418 int brd_no; /* FC board number */
389 419
390 char SerialNumber[32]; /* adapter Serial Number */ 420 char SerialNumber[32]; /* adapter Serial Number */
@@ -425,6 +455,7 @@ struct lpfc_hba {
425 /* pci_mem_pools */ 455 /* pci_mem_pools */
426 struct pci_pool *lpfc_scsi_dma_buf_pool; 456 struct pci_pool *lpfc_scsi_dma_buf_pool;
427 struct pci_pool *lpfc_mbuf_pool; 457 struct pci_pool *lpfc_mbuf_pool;
458 struct pci_pool *lpfc_hbq_pool;
428 struct lpfc_dma_pool lpfc_mbuf_safety_pool; 459 struct lpfc_dma_pool lpfc_mbuf_safety_pool;
429 460
430 mempool_t *mbox_mem_pool; 461 mempool_t *mbox_mem_pool;