aboutsummaryrefslogtreecommitdiffstats
path: root/include/scsi
diff options
context:
space:
mode:
authorRobert Love <robert.w.love@intel.com>2009-08-25 17:02:59 -0400
committerJames Bottomley <James.Bottomley@suse.de>2009-09-10 13:07:57 -0400
commit9737e6a7b5b8af48f983cd565df93493597c565b (patch)
tree2bb3e50171af1fbc18d0f739d760b6218031fb31 /include/scsi
parent935d0fce44b906268b8a29de4e72ebb57a3a06d8 (diff)
[SCSI] libfc: Initialize fc_rport_identifiers inside fc_rport_create
Currently these values are initialized by the callers. This was exposed by a later patch that adds PLOGI request support. The patch failed to initialize the new remote port's roles and it caused problems. This patch has the rport_create routine initialize the identifiers and then the callers can override them with real values. Signed-off-by: Robert Love <robert.w.love@intel.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'include/scsi')
-rw-r--r--include/scsi/libfc.h17
1 files changed, 9 insertions, 8 deletions
diff --git a/include/scsi/libfc.h b/include/scsi/libfc.h
index 517dce5c8d0d..cd410c123b99 100644
--- a/include/scsi/libfc.h
+++ b/include/scsi/libfc.h
@@ -148,16 +148,16 @@ enum fc_rport_state {
148 148
149/** 149/**
150 * struct fc_disc_port - temporary discovery port to hold rport identifiers 150 * struct fc_disc_port - temporary discovery port to hold rport identifiers
151 * @lp: Fibre Channel host port instance 151 * @lp: Fibre Channel host port instance
152 * @peers: node for list management during discovery and RSCN processing 152 * @peers: Node for list management during discovery and RSCN processing
153 * @ids: identifiers structure to pass to fc_remote_port_add() 153 * @rport_work: Work struct for starting the rport state machine
154 * @rport_work: work struct for starting the rport state machine 154 * @port_id: Port ID of the discovered port
155 */ 155 */
156struct fc_disc_port { 156struct fc_disc_port {
157 struct fc_lport *lp; 157 struct fc_lport *lp;
158 struct list_head peers; 158 struct list_head peers;
159 struct fc_rport_identifiers ids;
160 struct work_struct rport_work; 159 struct work_struct rport_work;
160 u32 port_id;
161}; 161};
162 162
163enum fc_rport_event { 163enum fc_rport_event {
@@ -565,10 +565,11 @@ struct libfc_function_template {
565 int (*lport_reset)(struct fc_lport *); 565 int (*lport_reset)(struct fc_lport *);
566 566
567 /* 567 /*
568 * Create a remote port 568 * Create a remote port with a given port ID
569 *
570 * STATUS: OPTIONAL
569 */ 571 */
570 struct fc_rport_priv *(*rport_create)(struct fc_lport *, 572 struct fc_rport_priv *(*rport_create)(struct fc_lport *, u32);
571 struct fc_rport_identifiers *);
572 573
573 /* 574 /*
574 * Initiates the RP state machine. It is called from the LP module. 575 * Initiates the RP state machine. It is called from the LP module.