diff options
author | Joe Eykholt <jeykholt@cisco.com> | 2009-08-25 17:00:50 -0400 |
---|---|---|
committer | James Bottomley <James.Bottomley@suse.de> | 2009-09-10 13:07:41 -0400 |
commit | 9fb9d32831fd687e427ec5b147bb690f468b99a0 (patch) | |
tree | c3b6c29cb94040718ea2fe00daac05abf10db714 /include/scsi/libfc.h | |
parent | 922aa210bcad4b34a7bb98ec9d318b7e59e7a5ca (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.h | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/include/scsi/libfc.h b/include/scsi/libfc.h index 2fdd8ac12b89..df57cb762dc2 100644 --- a/include/scsi/libfc.h +++ b/include/scsi/libfc.h | |||
@@ -75,10 +75,10 @@ do { \ | |||
75 | (lport)->host->host_no, \ | 75 | (lport)->host->host_no, \ |
76 | (port_id), ##args)) | 76 | (port_id), ##args)) |
77 | 77 | ||
78 | #define FC_RPORT_DBG(rport, fmt, args...) \ | 78 | #define FC_RPORT_DBG(rdata, fmt, args...) \ |
79 | do { \ | 79 | do { \ |
80 | struct fc_rport_priv *rdata = rport->dd_data; \ | ||
81 | struct fc_lport *lport = rdata->local_port; \ | 80 | struct fc_lport *lport = rdata->local_port; \ |
81 | struct fc_rport *rport = PRIV_TO_RPORT(rdata); \ | ||
82 | FC_RPORT_ID_DBG(lport, rport->port_id, fmt, ##args); \ | 82 | FC_RPORT_ID_DBG(lport, rport->port_id, fmt, ##args); \ |
83 | } while (0) | 83 | } while (0) |
84 | 84 | ||
@@ -185,8 +185,10 @@ enum fc_rport_event { | |||
185 | */ | 185 | */ |
186 | #define fc_rport_priv fc_rport_libfc_priv | 186 | #define fc_rport_priv fc_rport_libfc_priv |
187 | 187 | ||
188 | struct fc_rport_priv; | ||
189 | |||
188 | struct fc_rport_operations { | 190 | struct fc_rport_operations { |
189 | void (*event_callback)(struct fc_lport *, struct fc_rport *, | 191 | void (*event_callback)(struct fc_lport *, struct fc_rport_priv *, |
190 | enum fc_rport_event); | 192 | enum fc_rport_event); |
191 | }; | 193 | }; |
192 | 194 | ||
@@ -422,7 +424,7 @@ struct libfc_function_template { | |||
422 | * STATUS: OPTIONAL | 424 | * STATUS: OPTIONAL |
423 | */ | 425 | */ |
424 | struct fc_seq *(*elsct_send)(struct fc_lport *lport, | 426 | struct fc_seq *(*elsct_send)(struct fc_lport *lport, |
425 | struct fc_rport *rport, | 427 | struct fc_rport_priv *, |
426 | struct fc_frame *fp, | 428 | struct fc_frame *fp, |
427 | unsigned int op, | 429 | unsigned int op, |
428 | void (*resp)(struct fc_seq *, | 430 | void (*resp)(struct fc_seq *, |
@@ -567,8 +569,8 @@ struct libfc_function_template { | |||
567 | /* | 569 | /* |
568 | * Create a remote port | 570 | * Create a remote port |
569 | */ | 571 | */ |
570 | struct fc_rport *(*rport_create)(struct fc_lport *, | 572 | struct fc_rport_priv *(*rport_create)(struct fc_lport *, |
571 | struct fc_rport_identifiers *); | 573 | struct fc_rport_identifiers *); |
572 | 574 | ||
573 | /* | 575 | /* |
574 | * Initiates the RP state machine. It is called from the LP module. | 576 | * Initiates the RP state machine. It is called from the LP module. |
@@ -581,7 +583,7 @@ struct libfc_function_template { | |||
581 | * | 583 | * |
582 | * STATUS: OPTIONAL | 584 | * STATUS: OPTIONAL |
583 | */ | 585 | */ |
584 | int (*rport_login)(struct fc_rport *rport); | 586 | int (*rport_login)(struct fc_rport_priv *); |
585 | 587 | ||
586 | /* | 588 | /* |
587 | * Logoff, and remove the rport from the transport if | 589 | * Logoff, and remove the rport from the transport if |
@@ -589,7 +591,7 @@ struct libfc_function_template { | |||
589 | * | 591 | * |
590 | * STATUS: OPTIONAL | 592 | * STATUS: OPTIONAL |
591 | */ | 593 | */ |
592 | int (*rport_logoff)(struct fc_rport *rport); | 594 | int (*rport_logoff)(struct fc_rport_priv *); |
593 | 595 | ||
594 | /* | 596 | /* |
595 | * Recieve a request from a remote port. | 597 | * Recieve a request from a remote port. |
@@ -597,14 +599,14 @@ struct libfc_function_template { | |||
597 | * STATUS: OPTIONAL | 599 | * STATUS: OPTIONAL |
598 | */ | 600 | */ |
599 | void (*rport_recv_req)(struct fc_seq *, struct fc_frame *, | 601 | void (*rport_recv_req)(struct fc_seq *, struct fc_frame *, |
600 | struct fc_rport *); | 602 | struct fc_rport_priv *); |
601 | 603 | ||
602 | /* | 604 | /* |
603 | * lookup an rport by it's port ID. | 605 | * lookup an rport by it's port ID. |
604 | * | 606 | * |
605 | * STATUS: OPTIONAL | 607 | * STATUS: OPTIONAL |
606 | */ | 608 | */ |
607 | struct fc_rport *(*rport_lookup)(const struct fc_lport *, u32); | 609 | struct fc_rport_priv *(*rport_lookup)(const struct fc_lport *, u32); |
608 | 610 | ||
609 | /* | 611 | /* |
610 | * Send a fcp cmd from fsp pkt. | 612 | * Send a fcp cmd from fsp pkt. |
@@ -694,8 +696,8 @@ struct fc_lport { | |||
694 | /* Associations */ | 696 | /* Associations */ |
695 | struct Scsi_Host *host; | 697 | struct Scsi_Host *host; |
696 | struct list_head ema_list; | 698 | struct list_head ema_list; |
697 | struct fc_rport *dns_rp; | 699 | struct fc_rport_priv *dns_rp; |
698 | struct fc_rport *ptp_rp; | 700 | struct fc_rport_priv *ptp_rp; |
699 | void *scsi_priv; | 701 | void *scsi_priv; |
700 | struct fc_disc disc; | 702 | struct fc_disc disc; |
701 | 703 | ||