aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/libfc/fc_lport.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/libfc/fc_lport.c')
-rw-r--r--drivers/scsi/libfc/fc_lport.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/drivers/scsi/libfc/fc_lport.c b/drivers/scsi/libfc/fc_lport.c
index 7159bcfa8ec3..79c9e3ccd341 100644
--- a/drivers/scsi/libfc/fc_lport.c
+++ b/drivers/scsi/libfc/fc_lport.c
@@ -565,7 +565,7 @@ void __fc_linkup(struct fc_lport *lport)
565void fc_linkup(struct fc_lport *lport) 565void fc_linkup(struct fc_lport *lport)
566{ 566{
567 printk(KERN_INFO "host%d: libfc: Link up on port (%6.6x)\n", 567 printk(KERN_INFO "host%d: libfc: Link up on port (%6.6x)\n",
568 lport->host->host_no, fc_host_port_id(lport->host)); 568 lport->host->host_no, lport->port_id);
569 569
570 mutex_lock(&lport->lp_mutex); 570 mutex_lock(&lport->lp_mutex);
571 __fc_linkup(lport); 571 __fc_linkup(lport);
@@ -595,7 +595,7 @@ void __fc_linkdown(struct fc_lport *lport)
595void fc_linkdown(struct fc_lport *lport) 595void fc_linkdown(struct fc_lport *lport)
596{ 596{
597 printk(KERN_INFO "host%d: libfc: Link down on port (%6.6x)\n", 597 printk(KERN_INFO "host%d: libfc: Link down on port (%6.6x)\n",
598 lport->host->host_no, fc_host_port_id(lport->host)); 598 lport->host->host_no, lport->port_id);
599 599
600 mutex_lock(&lport->lp_mutex); 600 mutex_lock(&lport->lp_mutex);
601 __fc_linkdown(lport); 601 __fc_linkdown(lport);
@@ -697,7 +697,7 @@ void fc_lport_disc_callback(struct fc_lport *lport, enum fc_disc_event event)
697 case DISC_EV_FAILED: 697 case DISC_EV_FAILED:
698 printk(KERN_ERR "host%d: libfc: " 698 printk(KERN_ERR "host%d: libfc: "
699 "Discovery failed for port (%6.6x)\n", 699 "Discovery failed for port (%6.6x)\n",
700 lport->host->host_no, fc_host_port_id(lport->host)); 700 lport->host->host_no, lport->port_id);
701 mutex_lock(&lport->lp_mutex); 701 mutex_lock(&lport->lp_mutex);
702 fc_lport_enter_reset(lport); 702 fc_lport_enter_reset(lport);
703 mutex_unlock(&lport->lp_mutex); 703 mutex_unlock(&lport->lp_mutex);
@@ -745,7 +745,11 @@ static void fc_lport_set_port_id(struct fc_lport *lport, u32 port_id,
745 printk(KERN_INFO "host%d: Assigned Port ID %6.6x\n", 745 printk(KERN_INFO "host%d: Assigned Port ID %6.6x\n",
746 lport->host->host_no, port_id); 746 lport->host->host_no, port_id);
747 747
748 lport->port_id = port_id;
749
750 /* Update the fc_host */
748 fc_host_port_id(lport->host) = port_id; 751 fc_host_port_id(lport->host) = port_id;
752
749 if (lport->tt.lport_set_port_id) 753 if (lport->tt.lport_set_port_id)
750 lport->tt.lport_set_port_id(lport, port_id, fp); 754 lport->tt.lport_set_port_id(lport, port_id, fp);
751} 755}
@@ -950,7 +954,7 @@ static void fc_lport_reset_locked(struct fc_lport *lport)
950 lport->tt.exch_mgr_reset(lport, 0, 0); 954 lport->tt.exch_mgr_reset(lport, 0, 0);
951 fc_host_fabric_name(lport->host) = 0; 955 fc_host_fabric_name(lport->host) = 0;
952 956
953 if (fc_host_port_id(lport->host)) 957 if (lport->port_id)
954 fc_lport_set_port_id(lport, 0, NULL); 958 fc_lport_set_port_id(lport, 0, NULL);
955} 959}
956 960
@@ -1695,7 +1699,7 @@ static int fc_lport_els_request(struct fc_bsg_job *job,
1695 fh = fc_frame_header_get(fp); 1699 fh = fc_frame_header_get(fp);
1696 fh->fh_r_ctl = FC_RCTL_ELS_REQ; 1700 fh->fh_r_ctl = FC_RCTL_ELS_REQ;
1697 hton24(fh->fh_d_id, did); 1701 hton24(fh->fh_d_id, did);
1698 hton24(fh->fh_s_id, fc_host_port_id(lport->host)); 1702 hton24(fh->fh_s_id, lport->port_id);
1699 fh->fh_type = FC_TYPE_ELS; 1703 fh->fh_type = FC_TYPE_ELS;
1700 hton24(fh->fh_f_ctl, FC_FC_FIRST_SEQ | 1704 hton24(fh->fh_f_ctl, FC_FC_FIRST_SEQ |
1701 FC_FC_END_SEQ | FC_FC_SEQ_INIT); 1705 FC_FC_END_SEQ | FC_FC_SEQ_INIT);
@@ -1755,7 +1759,7 @@ static int fc_lport_ct_request(struct fc_bsg_job *job,
1755 fh = fc_frame_header_get(fp); 1759 fh = fc_frame_header_get(fp);
1756 fh->fh_r_ctl = FC_RCTL_DD_UNSOL_CTL; 1760 fh->fh_r_ctl = FC_RCTL_DD_UNSOL_CTL;
1757 hton24(fh->fh_d_id, did); 1761 hton24(fh->fh_d_id, did);
1758 hton24(fh->fh_s_id, fc_host_port_id(lport->host)); 1762 hton24(fh->fh_s_id, lport->port_id);
1759 fh->fh_type = FC_TYPE_CT; 1763 fh->fh_type = FC_TYPE_CT;
1760 hton24(fh->fh_f_ctl, FC_FC_FIRST_SEQ | 1764 hton24(fh->fh_f_ctl, FC_FC_FIRST_SEQ |
1761 FC_FC_END_SEQ | FC_FC_SEQ_INIT); 1765 FC_FC_END_SEQ | FC_FC_SEQ_INIT);