Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 204271
b: refs/heads/master
c: 239e810
h: refs/heads/master
i:
  204269: e1d5b97
  204267: 7ff3e2f
  204263: 858d189
  204255: 17969c6
v: v3
  • Loading branch information
Joe Eykholt authored and James Bottomley committed Jul 28, 2010
1 parent eb21128 commit 11bc9e7
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 24f089e2f2c800f88039e9d536d558ec6e349fad
refs/heads/master: 239e81048b7dcd27448db40c845f88ac7c68424e
25 changes: 25 additions & 0 deletions trunk/drivers/scsi/libfc/fc_exch.c
Original file line number Diff line number Diff line change
Expand Up @@ -1230,6 +1230,28 @@ static void fc_exch_recv_abts(struct fc_exch *ep, struct fc_frame *rx_fp)
fc_frame_free(rx_fp);
}

/**
* fc_seq_assign() - Assign exchange and sequence for incoming request
* @lport: The local port that received the request
* @fp: The request frame
*
* On success, the sequence pointer will be returned and also in fr_seq(@fp).
*/
static struct fc_seq *fc_seq_assign(struct fc_lport *lport, struct fc_frame *fp)
{
struct fc_exch_mgr_anchor *ema;

WARN_ON(lport != fr_dev(fp));
WARN_ON(fr_seq(fp));
fr_seq(fp) = NULL;

list_for_each_entry(ema, &lport->ema_list, ema_list)
if ((!ema->match || ema->match(fp)) &&
fc_seq_lookup_recip(lport, ema->mp, fp) != FC_RJT_NONE)
break;
return fr_seq(fp);
}

/**
* fc_exch_recv_req() - Handler for an incoming request where is other
* end is originating the sequence
Expand Down Expand Up @@ -2283,6 +2305,9 @@ int fc_exch_init(struct fc_lport *lport)
if (!lport->tt.seq_exch_abort)
lport->tt.seq_exch_abort = fc_seq_exch_abort;

if (!lport->tt.seq_assign)
lport->tt.seq_assign = fc_seq_assign;

return 0;
}
EXPORT_SYMBOL(fc_exch_init);
Expand Down
7 changes: 7 additions & 0 deletions trunk/include/scsi/libfc.h
Original file line number Diff line number Diff line change
Expand Up @@ -555,6 +555,13 @@ struct libfc_function_template {
*/
struct fc_seq *(*seq_start_next)(struct fc_seq *);

/*
* Assign a sequence for an incoming request frame.
*
* STATUS: OPTIONAL
*/
struct fc_seq *(*seq_assign)(struct fc_lport *, struct fc_frame *);

/*
* Reset an exchange manager, completing all sequences and exchanges.
* If s_id is non-zero, reset only exchanges originating from that FID.
Expand Down

0 comments on commit 11bc9e7

Please sign in to comment.