aboutsummaryrefslogtreecommitdiffstats
path: root/include/scsi/libfc.h
diff options
context:
space:
mode:
authorJoe Eykholt <jeykholt@cisco.com>2010-07-20 18:21:12 -0400
committerJames Bottomley <James.Bottomley@suse.de>2010-07-28 10:06:02 -0400
commit922611569572d3c1aa0ed6491d21583fb3fcca22 (patch)
treef7cb42bf5519d1c42853808f2f784188afe1bc2e /include/scsi/libfc.h
parent239e81048b7dcd27448db40c845f88ac7c68424e (diff)
[SCSI] libfc: don't require a local exchange for incoming requests
Incoming requests shouldn't require a local exchange if we're just going to reply with one or two frames and don't expect anything further. Don't allocate exchanges for such requests until requested by the upper-layer protocol. The sequence is always NULL for new requests, so remove that as an argument to request handlers. Also change the first argument to lport->tt.seq_els_rsp_send from the sequence pointer to the received frame pointer, to supply the exchange IDs and destination ID info. 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.h16
1 files changed, 5 insertions, 11 deletions
diff --git a/include/scsi/libfc.h b/include/scsi/libfc.h
index 605f1d7861a7..14be49b44e84 100644
--- a/include/scsi/libfc.h
+++ b/include/scsi/libfc.h
@@ -249,14 +249,12 @@ struct fcoe_dev_stats {
249 249
250/** 250/**
251 * struct fc_seq_els_data - ELS data used for passing ELS specific responses 251 * struct fc_seq_els_data - ELS data used for passing ELS specific responses
252 * @fp: The ELS frame
253 * @reason: The reason for rejection 252 * @reason: The reason for rejection
254 * @explan: The explaination of the rejection 253 * @explan: The explaination of the rejection
255 * 254 *
256 * Mainly used by the exchange manager layer. 255 * Mainly used by the exchange manager layer.
257 */ 256 */
258struct fc_seq_els_data { 257struct fc_seq_els_data {
259 struct fc_frame *fp;
260 enum fc_els_rjt_reason reason; 258 enum fc_els_rjt_reason reason;
261 enum fc_els_rjt_explan explan; 259 enum fc_els_rjt_explan explan;
262}; 260};
@@ -519,12 +517,11 @@ struct libfc_function_template {
519 struct fc_frame *); 517 struct fc_frame *);
520 518
521 /* 519 /*
522 * Send an ELS response using infomation from a previous 520 * Send an ELS response using infomation from the received frame.
523 * exchange and sequence.
524 * 521 *
525 * STATUS: OPTIONAL 522 * STATUS: OPTIONAL
526 */ 523 */
527 void (*seq_els_rsp_send)(struct fc_seq *, enum fc_els_cmd, 524 void (*seq_els_rsp_send)(struct fc_frame *, enum fc_els_cmd,
528 struct fc_seq_els_data *); 525 struct fc_seq_els_data *);
529 526
530 /* 527 /*
@@ -583,8 +580,7 @@ struct libfc_function_template {
583 * 580 *
584 * STATUS: OPTIONAL 581 * STATUS: OPTIONAL
585 */ 582 */
586 void (*lport_recv)(struct fc_lport *, struct fc_seq *, 583 void (*lport_recv)(struct fc_lport *, struct fc_frame *);
587 struct fc_frame *);
588 584
589 /* 585 /*
590 * Reset the local port. 586 * Reset the local port.
@@ -646,8 +642,7 @@ struct libfc_function_template {
646 * 642 *
647 * STATUS: OPTIONAL 643 * STATUS: OPTIONAL
648 */ 644 */
649 void (*rport_recv_req)(struct fc_seq *, struct fc_frame *, 645 void (*rport_recv_req)(struct fc_lport *, struct fc_frame *);
650 struct fc_lport *);
651 646
652 /* 647 /*
653 * lookup an rport by it's port ID. 648 * lookup an rport by it's port ID.
@@ -693,8 +688,7 @@ struct libfc_function_template {
693 * 688 *
694 * STATUS: OPTIONAL 689 * STATUS: OPTIONAL
695 */ 690 */
696 void (*disc_recv_req)(struct fc_seq *, struct fc_frame *, 691 void (*disc_recv_req)(struct fc_lport *, struct fc_frame *);
697 struct fc_lport *);
698 692
699 /* 693 /*
700 * Start discovery for a local port. 694 * Start discovery for a local port.