[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>
This commit is contained in:
Joe Eykholt
2010-07-20 15:21:12 -07:00
committed by James Bottomley
parent 239e81048b
commit 9226115695
6 changed files with 174 additions and 228 deletions

View File

@@ -249,14 +249,12 @@ struct fcoe_dev_stats {
/**
* struct fc_seq_els_data - ELS data used for passing ELS specific responses
* @fp: The ELS frame
* @reason: The reason for rejection
* @explan: The explaination of the rejection
*
* Mainly used by the exchange manager layer.
*/
struct fc_seq_els_data {
struct fc_frame *fp;
enum fc_els_rjt_reason reason;
enum fc_els_rjt_explan explan;
};
@@ -519,12 +517,11 @@ struct libfc_function_template {
struct fc_frame *);
/*
* Send an ELS response using infomation from a previous
* exchange and sequence.
* Send an ELS response using infomation from the received frame.
*
* STATUS: OPTIONAL
*/
void (*seq_els_rsp_send)(struct fc_seq *, enum fc_els_cmd,
void (*seq_els_rsp_send)(struct fc_frame *, enum fc_els_cmd,
struct fc_seq_els_data *);
/*
@@ -583,8 +580,7 @@ struct libfc_function_template {
*
* STATUS: OPTIONAL
*/
void (*lport_recv)(struct fc_lport *, struct fc_seq *,
struct fc_frame *);
void (*lport_recv)(struct fc_lport *, struct fc_frame *);
/*
* Reset the local port.
@@ -646,8 +642,7 @@ struct libfc_function_template {
*
* STATUS: OPTIONAL
*/
void (*rport_recv_req)(struct fc_seq *, struct fc_frame *,
struct fc_lport *);
void (*rport_recv_req)(struct fc_lport *, struct fc_frame *);
/*
* lookup an rport by it's port ID.
@@ -693,8 +688,7 @@ struct libfc_function_template {
*
* STATUS: OPTIONAL
*/
void (*disc_recv_req)(struct fc_seq *, struct fc_frame *,
struct fc_lport *);
void (*disc_recv_req)(struct fc_lport *, struct fc_frame *);
/*
* Start discovery for a local port.