aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/libfc
diff options
context:
space:
mode:
authorVasu Dev <vasu.dev@intel.com>2010-03-12 19:08:39 -0500
committerJames Bottomley <James.Bottomley@suse.de>2010-04-11 10:23:41 -0400
commit3e22760d4db6fd89e0be46c3d132390a251da9c6 (patch)
treed5a80fbf99483362473956913f8a136dbb2c3c66 /drivers/scsi/libfc
parenta104c844576c6bdc44c6f1336e30a5fcd90fef1c (diff)
[SCSI] libfc: use offload EM instance again instead jumping to next EM
Since use of offloads is more efficient than switching to non-offload EM. However kept logic same to call em_match if it is provided in the list of EMs. Converted fc_exch_alloc to inline being now tiny a function and already not an exported libfc API any more. Signed-off-by: Vasu Dev <vasu.dev@intel.com> Signed-off-by: Robert Love <robert.w.love@intel.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/scsi/libfc')
-rw-r--r--drivers/scsi/libfc/fc_exch.c15
1 files changed, 5 insertions, 10 deletions
diff --git a/drivers/scsi/libfc/fc_exch.c b/drivers/scsi/libfc/fc_exch.c
index 981021edfba9..dc12a2bf0c9b 100644
--- a/drivers/scsi/libfc/fc_exch.c
+++ b/drivers/scsi/libfc/fc_exch.c
@@ -734,19 +734,14 @@ err:
734 * EM is selected when a NULL match function pointer is encountered 734 * EM is selected when a NULL match function pointer is encountered
735 * or when a call to a match function returns true. 735 * or when a call to a match function returns true.
736 */ 736 */
737static struct fc_exch *fc_exch_alloc(struct fc_lport *lport, 737static inline struct fc_exch *fc_exch_alloc(struct fc_lport *lport,
738 struct fc_frame *fp) 738 struct fc_frame *fp)
739{ 739{
740 struct fc_exch_mgr_anchor *ema; 740 struct fc_exch_mgr_anchor *ema;
741 struct fc_exch *ep;
742 741
743 list_for_each_entry(ema, &lport->ema_list, ema_list) { 742 list_for_each_entry(ema, &lport->ema_list, ema_list)
744 if (!ema->match || ema->match(fp)) { 743 if (!ema->match || ema->match(fp))
745 ep = fc_exch_em_alloc(lport, ema->mp); 744 return fc_exch_em_alloc(lport, ema->mp);
746 if (ep)
747 return ep;
748 }
749 }
750 return NULL; 745 return NULL;
751} 746}
752 747