summaryrefslogtreecommitdiffstats
path: root/include/scsi/fc_encode.h
diff options
context:
space:
mode:
authorJoe Eykholt <jeykholt@cisco.com>2009-08-25 14:00:55 -0700
committerJames Bottomley <James.Bottomley@suse.de>2009-09-10 12:07:41 -0500
commita46f327aa5caf2cce138e98ddd863b6cca0e71e2 (patch)
treedbb230e8d4e024085e126445e6d819d5088e0406 /include/scsi/fc_encode.h
parent9fb9d32831fd687e427ec5b147bb690f468b99a0 (diff)
downloadlinux-a46f327aa5caf2cce138e98ddd863b6cca0e71e2.tar.bz2
[SCSI] libfc: change elsct to use FC_ID instead of rdata
tt.elsct_send is used by both FCP and by the rport state machine. After further patches, these two modules will use different structures for the remote port. So, change elsct_send to use the FC_ID instead of the fc_rport_priv as its argument. It currently only uses the FC_ID anyway. For CT requests the destination FC_ID is still implicitly 0xfffffc. After further patches the did arg on CT requests will be used to specify the FC_ID being inquired about for GPN_ID or other queries. Signed-off-by: Joe Eykholt <jeykholt@cisco.com> Signed-off-by: Robert Love <robert.w.love@intel.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'include/scsi/fc_encode.h')
-rw-r--r--include/scsi/fc_encode.h26
1 files changed, 5 insertions, 21 deletions
diff --git a/include/scsi/fc_encode.h b/include/scsi/fc_encode.h
index 3ede1abad4b7..24bf764f9884 100644
--- a/include/scsi/fc_encode.h
+++ b/include/scsi/fc_encode.h
@@ -79,8 +79,9 @@ static inline struct fc_ct_req *fc_ct_hdr_fill(const struct fc_frame *fp,
/**
* fc_ct_fill - Fill in a name service request frame
*/
-static inline int fc_ct_fill(struct fc_lport *lport, struct fc_frame *fp,
- unsigned int op, enum fc_rctl *r_ctl, u32 *did,
+static inline int fc_ct_fill(struct fc_lport *lport,
+ struct fc_frame *fp,
+ unsigned int op, enum fc_rctl *r_ctl,
enum fc_fh_type *fh_type)
{
struct fc_ct_req *ct;
@@ -110,7 +111,6 @@ static inline int fc_ct_fill(struct fc_lport *lport, struct fc_frame *fp,
return -EINVAL;
}
*r_ctl = FC_RCTL_DD_UNSOL_CTL;
- *did = FC_FID_DIR_SERV;
*fh_type = FC_TYPE_CT;
return 0;
}
@@ -250,53 +250,37 @@ static inline void fc_scr_fill(struct fc_lport *lport, struct fc_frame *fp)
* fc_els_fill - Fill in an ELS request frame
*/
static inline int fc_els_fill(struct fc_lport *lport,
- struct fc_rport_priv *rdata,
+ u32 did,
struct fc_frame *fp, unsigned int op,
- enum fc_rctl *r_ctl, u32 *did, enum fc_fh_type *fh_type)
+ enum fc_rctl *r_ctl, enum fc_fh_type *fh_type)
{
- struct fc_rport *rport = PRIV_TO_RPORT(rdata);
-
switch (op) {
case ELS_PLOGI:
fc_plogi_fill(lport, fp, ELS_PLOGI);
- *did = rport->port_id;
break;
case ELS_FLOGI:
fc_flogi_fill(lport, fp);
- *did = FC_FID_FLOGI;
break;
case ELS_LOGO:
fc_logo_fill(lport, fp);
- *did = FC_FID_FLOGI;
- /*
- * if rport is valid then it
- * is port logo, therefore
- * set did to rport id.
- */
- if (rdata)
- *did = rport->port_id;
break;
case ELS_RTV:
fc_rtv_fill(lport, fp);
- *did = rport->port_id;
break;
case ELS_REC:
fc_rec_fill(lport, fp);
- *did = rport->port_id;
break;
case ELS_PRLI:
fc_prli_fill(lport, fp);
- *did = rport->port_id;
break;
case ELS_SCR:
fc_scr_fill(lport, fp);
- *did = FC_FID_FCTRL;
break;
default: