mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-27 19:29:37 +00:00
driver/user: Don't warn for DMA_NONE data direction
Some SCSI commands (for example the TEST UNIT READY command) do not carry data and so data_direction is DMA_NONE. Patch TCMU to not print a warning message about unknown data direction, when it is DMA_NONE. Signed-off-by: Ilias Tsitsimpis <iliastsi@arrikto.com> Signed-off-by: Vangelis Koukis <vkoukis@arrikto.com> Reviewed-by: Andy Grover <agrover@redhat.com> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
This commit is contained in:
parent
814e5b4518
commit
2bc396a252
1 changed files with 3 additions and 2 deletions
|
@ -518,8 +518,9 @@ static void tcmu_handle_completion(struct tcmu_cmd *cmd, struct tcmu_cmd_entry *
|
|||
|
||||
} else if (se_cmd->data_direction == DMA_TO_DEVICE) {
|
||||
UPDATE_HEAD(udev->data_tail, cmd->data_length, udev->data_size);
|
||||
} else {
|
||||
pr_warn("TCMU: data direction was %d!\n", se_cmd->data_direction);
|
||||
} else if (se_cmd->data_direction != DMA_NONE) {
|
||||
pr_warn("TCMU: data direction was %d!\n",
|
||||
se_cmd->data_direction);
|
||||
}
|
||||
|
||||
target_complete_cmd(cmd->se_cmd, entry->rsp.scsi_status);
|
||||
|
|
Loading…
Reference in a new issue