diff options
Diffstat (limited to 'drivers/scsi/libfc')
-rw-r--r-- | drivers/scsi/libfc/fc_exch.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/scsi/libfc/fc_exch.c b/drivers/scsi/libfc/fc_exch.c index 1f124c0351b4..a3d640289dcc 100644 --- a/drivers/scsi/libfc/fc_exch.c +++ b/drivers/scsi/libfc/fc_exch.c | |||
@@ -1282,6 +1282,8 @@ free: | |||
1282 | * @fp: The request frame | 1282 | * @fp: The request frame |
1283 | * | 1283 | * |
1284 | * On success, the sequence pointer will be returned and also in fr_seq(@fp). | 1284 | * On success, the sequence pointer will be returned and also in fr_seq(@fp). |
1285 | * A reference will be held on the exchange/sequence for the caller, which | ||
1286 | * must call fc_seq_release(). | ||
1285 | */ | 1287 | */ |
1286 | static struct fc_seq *fc_seq_assign(struct fc_lport *lport, struct fc_frame *fp) | 1288 | static struct fc_seq *fc_seq_assign(struct fc_lport *lport, struct fc_frame *fp) |
1287 | { | 1289 | { |
@@ -1299,6 +1301,15 @@ static struct fc_seq *fc_seq_assign(struct fc_lport *lport, struct fc_frame *fp) | |||
1299 | } | 1301 | } |
1300 | 1302 | ||
1301 | /** | 1303 | /** |
1304 | * fc_seq_release() - Release the hold | ||
1305 | * @sp: The sequence. | ||
1306 | */ | ||
1307 | static void fc_seq_release(struct fc_seq *sp) | ||
1308 | { | ||
1309 | fc_exch_release(fc_seq_exch(sp)); | ||
1310 | } | ||
1311 | |||
1312 | /** | ||
1302 | * fc_exch_recv_req() - Handler for an incoming request | 1313 | * fc_exch_recv_req() - Handler for an incoming request |
1303 | * @lport: The local port that received the request | 1314 | * @lport: The local port that received the request |
1304 | * @mp: The EM that the exchange is on | 1315 | * @mp: The EM that the exchange is on |
@@ -2369,6 +2380,9 @@ int fc_exch_init(struct fc_lport *lport) | |||
2369 | if (!lport->tt.seq_assign) | 2380 | if (!lport->tt.seq_assign) |
2370 | lport->tt.seq_assign = fc_seq_assign; | 2381 | lport->tt.seq_assign = fc_seq_assign; |
2371 | 2382 | ||
2383 | if (!lport->tt.seq_release) | ||
2384 | lport->tt.seq_release = fc_seq_release; | ||
2385 | |||
2372 | return 0; | 2386 | return 0; |
2373 | } | 2387 | } |
2374 | EXPORT_SYMBOL(fc_exch_init); | 2388 | EXPORT_SYMBOL(fc_exch_init); |