diff options
Diffstat (limited to 'drivers/scsi/lpfc/lpfc.h')
-rw-r--r-- | drivers/scsi/lpfc/lpfc.h | 72 |
1 files changed, 46 insertions, 26 deletions
diff --git a/drivers/scsi/lpfc/lpfc.h b/drivers/scsi/lpfc/lpfc.h index f8f64d6485cd..ba3ecab9baf3 100644 --- a/drivers/scsi/lpfc/lpfc.h +++ b/drivers/scsi/lpfc/lpfc.h | |||
@@ -45,7 +45,7 @@ struct lpfc_sli2_slim; | |||
45 | #define LPFC_DISC_IOCB_BUFF_COUNT 20 | 45 | #define LPFC_DISC_IOCB_BUFF_COUNT 20 |
46 | 46 | ||
47 | #define LPFC_HB_MBOX_INTERVAL 5 /* Heart beat interval in seconds. */ | 47 | #define LPFC_HB_MBOX_INTERVAL 5 /* Heart beat interval in seconds. */ |
48 | #define LPFC_HB_MBOX_TIMEOUT 30 /* Heart beat timeout in seconds. */ | 48 | #define LPFC_HB_MBOX_TIMEOUT 30 /* Heart beat timeout in seconds. */ |
49 | 49 | ||
50 | /* Define macros for 64 bit support */ | 50 | /* Define macros for 64 bit support */ |
51 | #define putPaddrLow(addr) ((uint32_t) (0xffffffff & (u64)(addr))) | 51 | #define putPaddrLow(addr) ((uint32_t) (0xffffffff & (u64)(addr))) |
@@ -78,6 +78,7 @@ struct lpfc_dma_pool { | |||
78 | 78 | ||
79 | struct hbq_dmabuf { | 79 | struct hbq_dmabuf { |
80 | struct lpfc_dmabuf dbuf; | 80 | struct lpfc_dmabuf dbuf; |
81 | uint32_t size; | ||
81 | uint32_t tag; | 82 | uint32_t tag; |
82 | }; | 83 | }; |
83 | 84 | ||
@@ -329,13 +330,30 @@ struct lpfc_vport { | |||
329 | #define FC_LOADING 0x1 /* HBA in process of loading drvr */ | 330 | #define FC_LOADING 0x1 /* HBA in process of loading drvr */ |
330 | #define FC_UNLOADING 0x2 /* HBA in process of unloading drvr */ | 331 | #define FC_UNLOADING 0x2 /* HBA in process of unloading drvr */ |
331 | char *vname; /* Application assigned name */ | 332 | char *vname; /* Application assigned name */ |
333 | |||
334 | /* Vport Config Parameters */ | ||
335 | uint32_t cfg_scan_down; | ||
336 | uint32_t cfg_lun_queue_depth; | ||
337 | uint32_t cfg_nodev_tmo; | ||
338 | uint32_t cfg_devloss_tmo; | ||
339 | uint32_t cfg_restrict_login; | ||
340 | uint32_t cfg_peer_port_login; | ||
341 | uint32_t cfg_fcp_class; | ||
342 | uint32_t cfg_use_adisc; | ||
343 | uint32_t cfg_fdmi_on; | ||
344 | uint32_t cfg_discovery_threads; | ||
345 | uint32_t cfg_log_verbose; | ||
346 | uint32_t cfg_max_luns; | ||
347 | |||
348 | uint32_t dev_loss_tmo_changed; | ||
349 | |||
332 | struct fc_vport *fc_vport; | 350 | struct fc_vport *fc_vport; |
333 | 351 | ||
334 | #ifdef CONFIG_LPFC_DEBUG_FS | 352 | #ifdef CONFIG_LPFC_DEBUG_FS |
335 | struct dentry *debug_disc_trc; | 353 | struct dentry *debug_disc_trc; |
336 | struct dentry *debug_nodelist; | 354 | struct dentry *debug_nodelist; |
337 | struct dentry *vport_debugfs_root; | 355 | struct dentry *vport_debugfs_root; |
338 | struct lpfc_disc_trc *disc_trc; | 356 | struct lpfc_debugfs_trc *disc_trc; |
339 | atomic_t disc_trc_cnt; | 357 | atomic_t disc_trc_cnt; |
340 | #endif | 358 | #endif |
341 | }; | 359 | }; |
@@ -345,17 +363,25 @@ struct hbq_s { | |||
345 | uint32_t next_hbqPutIdx; /* Index to next HBQ slot to use */ | 363 | uint32_t next_hbqPutIdx; /* Index to next HBQ slot to use */ |
346 | uint32_t hbqPutIdx; /* HBQ slot to use */ | 364 | uint32_t hbqPutIdx; /* HBQ slot to use */ |
347 | uint32_t local_hbqGetIdx; /* Local copy of Get index from Port */ | 365 | uint32_t local_hbqGetIdx; /* Local copy of Get index from Port */ |
366 | void *hbq_virt; /* Virtual ptr to this hbq */ | ||
367 | struct list_head hbq_buffer_list; /* buffers assigned to this HBQ */ | ||
368 | /* Callback for HBQ buffer allocation */ | ||
369 | struct hbq_dmabuf *(*hbq_alloc_buffer) (struct lpfc_hba *); | ||
370 | /* Callback for HBQ buffer free */ | ||
371 | void (*hbq_free_buffer) (struct lpfc_hba *, | ||
372 | struct hbq_dmabuf *); | ||
348 | }; | 373 | }; |
349 | 374 | ||
350 | #define LPFC_MAX_HBQS 16 | 375 | #define LPFC_MAX_HBQS 4 |
351 | /* this matches the possition in the lpfc_hbq_defs array */ | 376 | /* this matches the position in the lpfc_hbq_defs array */ |
352 | #define LPFC_ELS_HBQ 0 | 377 | #define LPFC_ELS_HBQ 0 |
378 | #define LPFC_EXTRA_HBQ 1 | ||
353 | 379 | ||
354 | struct lpfc_hba { | 380 | struct lpfc_hba { |
355 | struct lpfc_sli sli; | 381 | struct lpfc_sli sli; |
356 | uint32_t sli_rev; /* SLI2 or SLI3 */ | 382 | uint32_t sli_rev; /* SLI2 or SLI3 */ |
357 | uint32_t sli3_options; /* Mask of enabled SLI3 options */ | 383 | uint32_t sli3_options; /* Mask of enabled SLI3 options */ |
358 | #define LPFC_SLI3_ENABLED 0x01 | 384 | #define LPFC_SLI3_ENABLED 0x01 |
359 | #define LPFC_SLI3_HBQ_ENABLED 0x02 | 385 | #define LPFC_SLI3_HBQ_ENABLED 0x02 |
360 | #define LPFC_SLI3_NPIV_ENABLED 0x04 | 386 | #define LPFC_SLI3_NPIV_ENABLED 0x04 |
361 | #define LPFC_SLI3_VPORT_TEARDOWN 0x08 | 387 | #define LPFC_SLI3_VPORT_TEARDOWN 0x08 |
@@ -364,7 +390,7 @@ struct lpfc_hba { | |||
364 | 390 | ||
365 | enum hba_state link_state; | 391 | enum hba_state link_state; |
366 | uint32_t link_flag; /* link state flags */ | 392 | uint32_t link_flag; /* link state flags */ |
367 | #define LS_LOOPBACK_MODE 0x1 /* NPort is in Loopback mode */ | 393 | #define LS_LOOPBACK_MODE 0x1 /* NPort is in Loopback mode */ |
368 | /* This flag is set while issuing */ | 394 | /* This flag is set while issuing */ |
369 | /* INIT_LINK mailbox command */ | 395 | /* INIT_LINK mailbox command */ |
370 | #define LS_NPIV_FAB_SUPPORTED 0x2 /* Fabric supports NPIV */ | 396 | #define LS_NPIV_FAB_SUPPORTED 0x2 /* Fabric supports NPIV */ |
@@ -413,28 +439,16 @@ struct lpfc_hba { | |||
413 | uint8_t wwpn[8]; | 439 | uint8_t wwpn[8]; |
414 | uint32_t RandomData[7]; | 440 | uint32_t RandomData[7]; |
415 | 441 | ||
416 | uint32_t cfg_log_verbose; | 442 | /* HBA Config Parameters */ |
417 | uint32_t cfg_lun_queue_depth; | ||
418 | uint32_t cfg_nodev_tmo; | ||
419 | uint32_t cfg_devloss_tmo; | ||
420 | uint32_t cfg_hba_queue_depth; | ||
421 | uint32_t cfg_peer_port_login; | ||
422 | uint32_t cfg_vport_restrict_login; | ||
423 | uint32_t cfg_npiv_enable; | ||
424 | uint32_t cfg_fcp_class; | ||
425 | uint32_t cfg_use_adisc; | ||
426 | uint32_t cfg_ack0; | 443 | uint32_t cfg_ack0; |
444 | uint32_t cfg_enable_npiv; | ||
427 | uint32_t cfg_topology; | 445 | uint32_t cfg_topology; |
428 | uint32_t cfg_scan_down; | ||
429 | uint32_t cfg_link_speed; | 446 | uint32_t cfg_link_speed; |
430 | uint32_t cfg_cr_delay; | 447 | uint32_t cfg_cr_delay; |
431 | uint32_t cfg_cr_count; | 448 | uint32_t cfg_cr_count; |
432 | uint32_t cfg_multi_ring_support; | 449 | uint32_t cfg_multi_ring_support; |
433 | uint32_t cfg_multi_ring_rctl; | 450 | uint32_t cfg_multi_ring_rctl; |
434 | uint32_t cfg_multi_ring_type; | 451 | uint32_t cfg_multi_ring_type; |
435 | uint32_t cfg_fdmi_on; | ||
436 | uint32_t cfg_discovery_threads; | ||
437 | uint32_t cfg_max_luns; | ||
438 | uint32_t cfg_poll; | 452 | uint32_t cfg_poll; |
439 | uint32_t cfg_poll_tmo; | 453 | uint32_t cfg_poll_tmo; |
440 | uint32_t cfg_use_msi; | 454 | uint32_t cfg_use_msi; |
@@ -442,8 +456,8 @@ struct lpfc_hba { | |||
442 | uint32_t cfg_sg_dma_buf_size; | 456 | uint32_t cfg_sg_dma_buf_size; |
443 | uint64_t cfg_soft_wwnn; | 457 | uint64_t cfg_soft_wwnn; |
444 | uint64_t cfg_soft_wwpn; | 458 | uint64_t cfg_soft_wwpn; |
459 | uint32_t cfg_hba_queue_depth; | ||
445 | 460 | ||
446 | uint32_t dev_loss_tmo_changed; | ||
447 | 461 | ||
448 | lpfc_vpd_t vpd; /* vital product data */ | 462 | lpfc_vpd_t vpd; /* vital product data */ |
449 | 463 | ||
@@ -457,7 +471,6 @@ struct lpfc_hba { | |||
457 | wait_queue_head_t *work_wait; | 471 | wait_queue_head_t *work_wait; |
458 | struct task_struct *worker_thread; | 472 | struct task_struct *worker_thread; |
459 | 473 | ||
460 | struct list_head hbq_buffer_list; | ||
461 | uint32_t hbq_count; /* Count of configured HBQs */ | 474 | uint32_t hbq_count; /* Count of configured HBQs */ |
462 | struct hbq_s hbqs[LPFC_MAX_HBQS]; /* local copy of hbq indicies */ | 475 | struct hbq_s hbqs[LPFC_MAX_HBQS]; /* local copy of hbq indicies */ |
463 | 476 | ||
@@ -526,12 +539,14 @@ struct lpfc_hba { | |||
526 | mempool_t *nlp_mem_pool; | 539 | mempool_t *nlp_mem_pool; |
527 | 540 | ||
528 | struct fc_host_statistics link_stats; | 541 | struct fc_host_statistics link_stats; |
542 | uint8_t using_msi; | ||
529 | 543 | ||
530 | struct list_head port_list; | 544 | struct list_head port_list; |
531 | struct lpfc_vport *pport; /* physical lpfc_vport pointer */ | 545 | struct lpfc_vport *pport; /* physical lpfc_vport pointer */ |
532 | uint16_t max_vpi; /* Maximum virtual nports */ | 546 | uint16_t max_vpi; /* Maximum virtual nports */ |
533 | #define LPFC_MAX_VPI 100 /* Max number of VPorts supported */ | 547 | #define LPFC_MAX_VPI 100 /* Max number of VPI supported */ |
534 | unsigned long *vpi_bmask; /* vpi allocation table */ | 548 | #define LPFC_MAX_VPORTS (LPFC_MAX_VPI+1)/* Max number of VPorts supported */ |
549 | unsigned long *vpi_bmask; /* vpi allocation table */ | ||
535 | 550 | ||
536 | /* Data structure used by fabric iocb scheduler */ | 551 | /* Data structure used by fabric iocb scheduler */ |
537 | struct list_head fabric_iocb_list; | 552 | struct list_head fabric_iocb_list; |
@@ -547,6 +562,11 @@ struct lpfc_hba { | |||
547 | #ifdef CONFIG_LPFC_DEBUG_FS | 562 | #ifdef CONFIG_LPFC_DEBUG_FS |
548 | struct dentry *hba_debugfs_root; | 563 | struct dentry *hba_debugfs_root; |
549 | atomic_t debugfs_vport_count; | 564 | atomic_t debugfs_vport_count; |
565 | struct dentry *debug_hbqinfo; | ||
566 | struct dentry *debug_dumpslim; | ||
567 | struct dentry *debug_slow_ring_trc; | ||
568 | struct lpfc_debugfs_trc *slow_ring_trc; | ||
569 | atomic_t slow_ring_trc_cnt; | ||
550 | #endif | 570 | #endif |
551 | 571 | ||
552 | /* Fields used for heart beat. */ | 572 | /* Fields used for heart beat. */ |