aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/lpfc/lpfc_init.c
diff options
context:
space:
mode:
authorJames Smart <james.smart@emulex.com>2010-11-20 23:11:55 -0500
committerJames Bottomley <James.Bottomley@suse.de>2010-12-21 13:24:01 -0500
commit19ca760979e4be41a3eb215fb8d0e96637161947 (patch)
treede6c32815eb813ba770a26178c1612015acf719b /drivers/scsi/lpfc/lpfc_init.c
parent76a95d75ede64e4f1684ddb8c626fdfdb641bda2 (diff)
[SCSI] lpfc 8.3.19: Added support for ELS RRQ command
Added support for ELS RRQ command - Add new routine lpfc_set_rrq_active() to track XRI qualifier state. - Add new module parameter lpfc_enable_rrq to control RRQ operation. - Add logic to ELS RRQ completion handler and xri qualifier timeout to clear XRI qualifier state. - Use OX_ID from XRI_ABORTED_CQE for RRQ payload. - Tie abort and XRI_ABORTED_CQE andler to RRQ generation. Signed-off-by: Alex Iannicelli <alex.iannicelli@emulex.com> Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/scsi/lpfc/lpfc_init.c')
-rw-r--r--drivers/scsi/lpfc/lpfc_init.c34
1 files changed, 34 insertions, 0 deletions
diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c
index 432afc7db1cc..70ba1895b0a1 100644
--- a/drivers/scsi/lpfc/lpfc_init.c
+++ b/drivers/scsi/lpfc/lpfc_init.c
@@ -930,6 +930,35 @@ lpfc_hb_timeout(unsigned long ptr)
930} 930}
931 931
932/** 932/**
933 * lpfc_rrq_timeout - The RRQ-timer timeout handler
934 * @ptr: unsigned long holds the pointer to lpfc hba data structure.
935 *
936 * This is the RRQ-timer timeout handler registered to the lpfc driver. When
937 * this timer fires, a RRQ timeout event shall be posted to the lpfc driver
938 * work-port-events bitmap and the worker thread is notified. This timeout
939 * event will be used by the worker thread to invoke the actual timeout
940 * handler routine, lpfc_rrq_handler. Any periodical operations will
941 * be performed in the timeout handler and the RRQ timeout event bit shall
942 * be cleared by the worker thread after it has taken the event bitmap out.
943 **/
944static void
945lpfc_rrq_timeout(unsigned long ptr)
946{
947 struct lpfc_hba *phba;
948 uint32_t tmo_posted;
949 unsigned long iflag;
950
951 phba = (struct lpfc_hba *)ptr;
952 spin_lock_irqsave(&phba->pport->work_port_lock, iflag);
953 tmo_posted = phba->hba_flag & HBA_RRQ_ACTIVE;
954 if (!tmo_posted)
955 phba->hba_flag |= HBA_RRQ_ACTIVE;
956 spin_unlock_irqrestore(&phba->pport->work_port_lock, iflag);
957 if (!tmo_posted)
958 lpfc_worker_wake_up(phba);
959}
960
961/**
933 * lpfc_hb_mbox_cmpl - The lpfc heart-beat mailbox command callback function 962 * lpfc_hb_mbox_cmpl - The lpfc heart-beat mailbox command callback function
934 * @phba: pointer to lpfc hba data structure. 963 * @phba: pointer to lpfc hba data structure.
935 * @pmboxq: pointer to the driver internal queue element for mailbox command. 964 * @pmboxq: pointer to the driver internal queue element for mailbox command.
@@ -3990,6 +4019,9 @@ lpfc_sli4_driver_resource_setup(struct lpfc_hba *phba)
3990 init_timer(&phba->hb_tmofunc); 4019 init_timer(&phba->hb_tmofunc);
3991 phba->hb_tmofunc.function = lpfc_hb_timeout; 4020 phba->hb_tmofunc.function = lpfc_hb_timeout;
3992 phba->hb_tmofunc.data = (unsigned long)phba; 4021 phba->hb_tmofunc.data = (unsigned long)phba;
4022 init_timer(&phba->rrq_tmr);
4023 phba->rrq_tmr.function = lpfc_rrq_timeout;
4024 phba->rrq_tmr.data = (unsigned long)phba;
3993 4025
3994 psli = &phba->sli; 4026 psli = &phba->sli;
3995 /* MBOX heartbeat timer */ 4027 /* MBOX heartbeat timer */
@@ -8192,6 +8224,8 @@ lpfc_pci_probe_one_s4(struct pci_dev *pdev, const struct pci_device_id *pid)
8192 goto out_unset_driver_resource_s4; 8224 goto out_unset_driver_resource_s4;
8193 } 8225 }
8194 8226
8227 INIT_LIST_HEAD(&phba->active_rrq_list);
8228
8195 /* Set up common device driver resources */ 8229 /* Set up common device driver resources */
8196 error = lpfc_setup_driver_resource_phase2(phba); 8230 error = lpfc_setup_driver_resource_phase2(phba);
8197 if (error) { 8231 if (error) {