diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-07-23 14:13:11 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-07-23 14:13:11 -0400 |
commit | d4e06701b89286a306b31e20ec69a904fae374a1 (patch) | |
tree | f6adefd65b021ccddb7655109ea8b9ab4e714292 /drivers/target/tcm_fc | |
parent | e4980371059ca4a81ccdcb4381c41af8869ca711 (diff) | |
parent | 87045b033a62777337ae4aa62834876da09b5fb5 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6: (77 commits)
[SCSI] fix crash in scsi_dispatch_cmd()
[SCSI] sr: check_events() ignore GET_EVENT when TUR says otherwise
[SCSI] bnx2i: Fixed kernel panic due to illegal usage of sc->request->cpu
[SCSI] bfa: Update the driver version to 3.0.2.1
[SCSI] bfa: Driver and BSG enhancements.
[SCSI] bfa: Added support to query PHY.
[SCSI] bfa: Added HBA diagnostics support.
[SCSI] bfa: Added support for flash configuration
[SCSI] bfa: Added support to obtain SFP info.
[SCSI] bfa: Added support for CEE info and stats query.
[SCSI] bfa: Extend BSG interface.
[SCSI] bfa: FCS bug fixes.
[SCSI] bfa: DMA memory allocation enhancement.
[SCSI] bfa: Brocade-1860 Fabric Adapter vHBA support.
[SCSI] bfa: Brocade-1860 Fabric Adapter PLL init fixes.
[SCSI] bfa: Added Fabric Assigned Address(FAA) support
[SCSI] bfa: IOC bug fixes.
[SCSI] bfa: Enable ASIC block configuration and query.
[SCSI] bnx2i: Updated copyright and bump version
[SCSI] bnx2i: Modified to skip CNIC registration if iSCSI is not supported
...
Fix up some trivial conflicts in:
- drivers/scsi/bnx2fc/{bnx2fc.h,bnx2fc_fcoe.c}:
Crazy broadcom version number conflicts
- drivers/target/tcm_fc/tfc_cmd.c
Just trivial cleanups done on adjacent lines
Diffstat (limited to 'drivers/target/tcm_fc')
-rw-r--r-- | drivers/target/tcm_fc/tfc_cmd.c | 26 |
1 files changed, 19 insertions, 7 deletions
diff --git a/drivers/target/tcm_fc/tfc_cmd.c b/drivers/target/tcm_fc/tfc_cmd.c index a9e9a31da11d..a6bfb6deba94 100644 --- a/drivers/target/tcm_fc/tfc_cmd.c +++ b/drivers/target/tcm_fc/tfc_cmd.c | |||
@@ -264,8 +264,9 @@ int ft_write_pending(struct se_cmd *se_cmd) | |||
264 | cmd->sg_cnt = | 264 | cmd->sg_cnt = |
265 | se_cmd->t_tasks_sg_chained_no; | 265 | se_cmd->t_tasks_sg_chained_no; |
266 | } | 266 | } |
267 | if (cmd->sg && lport->tt.ddp_setup(lport, ep->xid, | 267 | if (cmd->sg && lport->tt.ddp_target(lport, ep->xid, |
268 | cmd->sg, cmd->sg_cnt)) | 268 | cmd->sg, |
269 | cmd->sg_cnt)) | ||
269 | cmd->was_ddp_setup = 1; | 270 | cmd->was_ddp_setup = 1; |
270 | } | 271 | } |
271 | } | 272 | } |
@@ -371,12 +372,23 @@ static void ft_send_resp_status(struct fc_lport *lport, | |||
371 | 372 | ||
372 | /* | 373 | /* |
373 | * Send error or task management response. | 374 | * Send error or task management response. |
374 | * Always frees the cmd and associated state. | ||
375 | */ | 375 | */ |
376 | static void ft_send_resp_code(struct ft_cmd *cmd, enum fcp_resp_rsp_codes code) | 376 | static void ft_send_resp_code(struct ft_cmd *cmd, |
377 | enum fcp_resp_rsp_codes code) | ||
377 | { | 378 | { |
378 | ft_send_resp_status(cmd->sess->tport->lport, | 379 | ft_send_resp_status(cmd->sess->tport->lport, |
379 | cmd->req_frame, SAM_STAT_GOOD, code); | 380 | cmd->req_frame, SAM_STAT_GOOD, code); |
381 | } | ||
382 | |||
383 | |||
384 | /* | ||
385 | * Send error or task management response. | ||
386 | * Always frees the cmd and associated state. | ||
387 | */ | ||
388 | static void ft_send_resp_code_and_free(struct ft_cmd *cmd, | ||
389 | enum fcp_resp_rsp_codes code) | ||
390 | { | ||
391 | ft_send_resp_code(cmd, code); | ||
380 | ft_free_cmd(cmd); | 392 | ft_free_cmd(cmd); |
381 | } | 393 | } |
382 | 394 | ||
@@ -414,7 +426,7 @@ static void ft_send_tm(struct ft_cmd *cmd) | |||
414 | * tm_flags set is invalid. | 426 | * tm_flags set is invalid. |
415 | */ | 427 | */ |
416 | pr_debug("invalid FCP tm_flags %x\n", fcp->fc_tm_flags); | 428 | pr_debug("invalid FCP tm_flags %x\n", fcp->fc_tm_flags); |
417 | ft_send_resp_code(cmd, FCP_CMND_FIELDS_INVALID); | 429 | ft_send_resp_code_and_free(cmd, FCP_CMND_FIELDS_INVALID); |
418 | return; | 430 | return; |
419 | } | 431 | } |
420 | 432 | ||
@@ -422,7 +434,7 @@ static void ft_send_tm(struct ft_cmd *cmd) | |||
422 | tmr = core_tmr_alloc_req(&cmd->se_cmd, cmd, tm_func); | 434 | tmr = core_tmr_alloc_req(&cmd->se_cmd, cmd, tm_func); |
423 | if (!tmr) { | 435 | if (!tmr) { |
424 | pr_debug("alloc failed\n"); | 436 | pr_debug("alloc failed\n"); |
425 | ft_send_resp_code(cmd, FCP_TMF_FAILED); | 437 | ft_send_resp_code_and_free(cmd, FCP_TMF_FAILED); |
426 | return; | 438 | return; |
427 | } | 439 | } |
428 | cmd->se_cmd.se_tmr_req = tmr; | 440 | cmd->se_cmd.se_tmr_req = tmr; |
@@ -661,7 +673,7 @@ static void ft_send_cmd(struct ft_cmd *cmd) | |||
661 | return; | 673 | return; |
662 | 674 | ||
663 | err: | 675 | err: |
664 | ft_send_resp_code(cmd, FCP_CMND_FIELDS_INVALID); | 676 | ft_send_resp_code_and_free(cmd, FCP_CMND_FIELDS_INVALID); |
665 | } | 677 | } |
666 | 678 | ||
667 | /* | 679 | /* |