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.h21
1 files changed, 17 insertions, 4 deletions
diff --git a/drivers/scsi/lpfc/lpfc.h b/drivers/scsi/lpfc/lpfc.h
index ec0b0f6e5e1a..e0e018d12653 100644
--- a/drivers/scsi/lpfc/lpfc.h
+++ b/drivers/scsi/lpfc/lpfc.h
@@ -33,6 +33,7 @@ struct lpfc_sli2_slim;
33#define LPFC_MAX_SG_SEG_CNT 256 /* sg element count per scsi cmnd */ 33#define LPFC_MAX_SG_SEG_CNT 256 /* sg element count per scsi cmnd */
34#define LPFC_IOCB_LIST_CNT 2250 /* list of IOCBs for fast-path usage. */ 34#define LPFC_IOCB_LIST_CNT 2250 /* list of IOCBs for fast-path usage. */
35#define LPFC_Q_RAMP_UP_INTERVAL 120 /* lun q_depth ramp up interval */ 35#define LPFC_Q_RAMP_UP_INTERVAL 120 /* lun q_depth ramp up interval */
36#define LPFC_VNAME_LEN 100 /* vport symbolic name length */
36 37
37/* 38/*
38 * Following time intervals are used of adjusting SCSI device 39 * Following time intervals are used of adjusting SCSI device
@@ -59,6 +60,9 @@ struct lpfc_sli2_slim;
59 60
60#define MAX_HBAEVT 32 61#define MAX_HBAEVT 32
61 62
63/* lpfc wait event data ready flag */
64#define LPFC_DATA_READY (1<<0)
65
62enum lpfc_polling_flags { 66enum lpfc_polling_flags {
63 ENABLE_FCP_RING_POLLING = 0x1, 67 ENABLE_FCP_RING_POLLING = 0x1,
64 DISABLE_FCP_RING_INT = 0x2 68 DISABLE_FCP_RING_INT = 0x2
@@ -425,9 +429,6 @@ struct lpfc_hba {
425 429
426 uint16_t pci_cfg_value; 430 uint16_t pci_cfg_value;
427 431
428 uint8_t work_found;
429#define LPFC_MAX_WORKER_ITERATION 4
430
431 uint8_t fc_linkspeed; /* Link speed after last READ_LA */ 432 uint8_t fc_linkspeed; /* Link speed after last READ_LA */
432 433
433 uint32_t fc_eventTag; /* event tag for link attention */ 434 uint32_t fc_eventTag; /* event tag for link attention */
@@ -489,8 +490,9 @@ struct lpfc_hba {
489 uint32_t work_hs; /* HS stored in case of ERRAT */ 490 uint32_t work_hs; /* HS stored in case of ERRAT */
490 uint32_t work_status[2]; /* Extra status from SLIM */ 491 uint32_t work_status[2]; /* Extra status from SLIM */
491 492
492 wait_queue_head_t *work_wait; 493 wait_queue_head_t work_waitq;
493 struct task_struct *worker_thread; 494 struct task_struct *worker_thread;
495 long data_flags;
494 496
495 uint32_t hbq_in_use; /* HBQs in use flag */ 497 uint32_t hbq_in_use; /* HBQs in use flag */
496 struct list_head hbqbuf_in_list; /* in-fly hbq buffer list */ 498 struct list_head hbqbuf_in_list; /* in-fly hbq buffer list */
@@ -637,6 +639,17 @@ lpfc_is_link_up(struct lpfc_hba *phba)
637 phba->link_state == LPFC_HBA_READY; 639 phba->link_state == LPFC_HBA_READY;
638} 640}
639 641
642static inline void
643lpfc_worker_wake_up(struct lpfc_hba *phba)
644{
645 /* Set the lpfc data pending flag */
646 set_bit(LPFC_DATA_READY, &phba->data_flags);
647
648 /* Wake up worker thread */
649 wake_up(&phba->work_waitq);
650 return;
651}
652
640#define FC_REG_DUMP_EVENT 0x10 /* Register for Dump events */ 653#define FC_REG_DUMP_EVENT 0x10 /* Register for Dump events */
641#define FC_REG_TEMPERATURE_EVENT 0x20 /* Register for temperature 654#define FC_REG_TEMPERATURE_EVENT 0x20 /* Register for temperature
642 event */ 655 event */