From 922611569572d3c1aa0ed6491d21583fb3fcca22 Mon Sep 17 00:00:00 2001 From: Joe Eykholt Date: Tue, 20 Jul 2010 15:21:12 -0700 Subject: [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 Signed-off-by: Robert Love Signed-off-by: James Bottomley --- include/scsi/libfc.h | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) (limited to 'include/scsi') 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 { /** * 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. -- cgit v1.2.3-59-g8ed1b