summaryrefslogtreecommitdiffstats
path: root/include/scsi/libfc.h
diff options
context:
space:
mode:
authorJoe Eykholt <jeykholt@cisco.com>2009-08-25 14:00:50 -0700
committerJames Bottomley <James.Bottomley@suse.de>2009-09-10 12:07:41 -0500
commit9fb9d32831fd687e427ec5b147bb690f468b99a0 (patch)
treec3b6c29cb94040718ea2fe00daac05abf10db714 /include/scsi/libfc.h
parent922aa210bcad4b34a7bb98ec9d318b7e59e7a5ca (diff)
[SCSI] libfc: make fc_rport_priv the primary rport interface.
The rport and discovery modules deal with remote ports before fc_remote_port_add() can be done, because the full set of rport identifiers is not known at early stages. In preparation for splitting the fc_rport/fc_rport_priv allocation, make fc_rport_priv the primary interface for the remote port and discovery engines. The FCP / SCSI layers still deal with fc_rport and fc_rport_libfc_priv, however. 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/libfc.h')
-rw-r--r--include/scsi/libfc.h26
1 files changed, 14 insertions, 12 deletions
diff --git a/include/scsi/libfc.h b/include/scsi/libfc.h
index 2fdd8ac12b8..df57cb762dc 100644
--- a/include/scsi/libfc.h
+++ b/include/scsi/libfc.h
@@ -75,10 +75,10 @@ do { \
(lport)->host->host_no, \
(port_id), ##args))
-#define FC_RPORT_DBG(rport, fmt, args...) \
+#define FC_RPORT_DBG(rdata, fmt, args...) \
do { \
- struct fc_rport_priv *rdata = rport->dd_data; \
struct fc_lport *lport = rdata->local_port; \
+ struct fc_rport *rport = PRIV_TO_RPORT(rdata); \
FC_RPORT_ID_DBG(lport, rport->port_id, fmt, ##args); \
} while (0)
@@ -185,8 +185,10 @@ enum fc_rport_event {
*/
#define fc_rport_priv fc_rport_libfc_priv
+struct fc_rport_priv;
+
struct fc_rport_operations {
- void (*event_callback)(struct fc_lport *, struct fc_rport *,
+ void (*event_callback)(struct fc_lport *, struct fc_rport_priv *,
enum fc_rport_event);
};
@@ -422,7 +424,7 @@ struct libfc_function_template {
* STATUS: OPTIONAL
*/
struct fc_seq *(*elsct_send)(struct fc_lport *lport,
- struct fc_rport *rport,
+ struct fc_rport_priv *,
struct fc_frame *fp,
unsigned int op,
void (*resp)(struct fc_seq *,
@@ -567,8 +569,8 @@ struct libfc_function_template {
/*
* Create a remote port
*/
- struct fc_rport *(*rport_create)(struct fc_lport *,
- struct fc_rport_identifiers *);
+ struct fc_rport_priv *(*rport_create)(struct fc_lport *,
+ struct fc_rport_identifiers *);
/*
* Initiates the RP state machine. It is called from the LP module.
@@ -581,7 +583,7 @@ struct libfc_function_template {
*
* STATUS: OPTIONAL
*/
- int (*rport_login)(struct fc_rport *rport);
+ int (*rport_login)(struct fc_rport_priv *);
/*
* Logoff, and remove the rport from the transport if
@@ -589,7 +591,7 @@ struct libfc_function_template {
*
* STATUS: OPTIONAL
*/
- int (*rport_logoff)(struct fc_rport *rport);
+ int (*rport_logoff)(struct fc_rport_priv *);
/*
* Recieve a request from a remote port.
@@ -597,14 +599,14 @@ struct libfc_function_template {
* STATUS: OPTIONAL
*/
void (*rport_recv_req)(struct fc_seq *, struct fc_frame *,
- struct fc_rport *);
+ struct fc_rport_priv *);
/*
* lookup an rport by it's port ID.
*
* STATUS: OPTIONAL
*/
- struct fc_rport *(*rport_lookup)(const struct fc_lport *, u32);
+ struct fc_rport_priv *(*rport_lookup)(const struct fc_lport *, u32);
/*
* Send a fcp cmd from fsp pkt.
@@ -694,8 +696,8 @@ struct fc_lport {
/* Associations */
struct Scsi_Host *host;
struct list_head ema_list;
- struct fc_rport *dns_rp;
- struct fc_rport *ptp_rp;
+ struct fc_rport_priv *dns_rp;
+ struct fc_rport_priv *ptp_rp;
void *scsi_priv;
struct fc_disc disc;