aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/lpfc/lpfc_ct.c
diff options
context:
space:
mode:
authorJames Smart <james.smart@emulex.com>2011-02-16 12:39:44 -0500
committerJames Bottomley <James.Bottomley@suse.de>2011-02-18 13:47:20 -0500
commit924941444b481fc862b2de5e1dd7692ca85274d7 (patch)
tree4a19d10d1e8803f3662b93d615c35a474b3d8328 /drivers/scsi/lpfc/lpfc_ct.c
parent1151e3ec15c32021a8a12a123459ab5e41692898 (diff)
[SCSI] lpfc 8.3.21: FC Discovery changes
FC Discovery changes - Treat received PLOGI while logged in as a relogin (unregister and reregister). - Added a timer to delay Nport discovery when clean bit is cleared and Fabric portname/nodename/FCID is changed. - Invalidate Port's DID when receiving PLOGI from p2p port with CONFIG_PORT mailbox command. 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_ct.c')
-rw-r--r--drivers/scsi/lpfc/lpfc_ct.c49
1 files changed, 49 insertions, 0 deletions
diff --git a/drivers/scsi/lpfc/lpfc_ct.c b/drivers/scsi/lpfc/lpfc_ct.c
index c004fa9a681e..d9edfd90d7ff 100644
--- a/drivers/scsi/lpfc/lpfc_ct.c
+++ b/drivers/scsi/lpfc/lpfc_ct.c
@@ -1738,6 +1738,55 @@ fdmi_cmd_exit:
1738 return 1; 1738 return 1;
1739} 1739}
1740 1740
1741/**
1742 * lpfc_delayed_disc_tmo - Timeout handler for delayed discovery timer.
1743 * @ptr - Context object of the timer.
1744 *
1745 * This function set the WORKER_DELAYED_DISC_TMO flag and wake up
1746 * the worker thread.
1747 **/
1748void
1749lpfc_delayed_disc_tmo(unsigned long ptr)
1750{
1751 struct lpfc_vport *vport = (struct lpfc_vport *)ptr;
1752 struct lpfc_hba *phba = vport->phba;
1753 uint32_t tmo_posted;
1754 unsigned long iflag;
1755
1756 spin_lock_irqsave(&vport->work_port_lock, iflag);
1757 tmo_posted = vport->work_port_events & WORKER_DELAYED_DISC_TMO;
1758 if (!tmo_posted)
1759 vport->work_port_events |= WORKER_DELAYED_DISC_TMO;
1760 spin_unlock_irqrestore(&vport->work_port_lock, iflag);
1761
1762 if (!tmo_posted)
1763 lpfc_worker_wake_up(phba);
1764 return;
1765}
1766
1767/**
1768 * lpfc_delayed_disc_timeout_handler - Function called by worker thread to
1769 * handle delayed discovery.
1770 * @vport: pointer to a host virtual N_Port data structure.
1771 *
1772 * This function start nport discovery of the vport.
1773 **/
1774void
1775lpfc_delayed_disc_timeout_handler(struct lpfc_vport *vport)
1776{
1777 struct Scsi_Host *shost = lpfc_shost_from_vport(vport);
1778
1779 spin_lock_irq(shost->host_lock);
1780 if (!(vport->fc_flag & FC_DISC_DELAYED)) {
1781 spin_unlock_irq(shost->host_lock);
1782 return;
1783 }
1784 vport->fc_flag &= ~FC_DISC_DELAYED;
1785 spin_unlock_irq(shost->host_lock);
1786
1787 lpfc_do_scr_ns_plogi(vport->phba, vport);
1788}
1789
1741void 1790void
1742lpfc_fdmi_tmo(unsigned long ptr) 1791lpfc_fdmi_tmo(unsigned long ptr)
1743{ 1792{