Skip to content

Commit

Permalink
target: Fix WRITE_SAME_16 lba assignment breakage
Browse files Browse the repository at this point in the history
This patch fixes a bug in WRITE_SAME_16 LBA assignment where get_unaligned_be16()
is incorrectly being used instead of get_unaligned_be64() for a 64-bit LBA.

This was introduced with:

commit a1d8b49
Author: Andy Grover <agrover@redhat.com>
Date:   Mon May 2 17:12:10 2011 -0700

    target: Updates from AGrover and HCH (round 3)

    (target: inline struct se_transport_task into struct se_cmd)

Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
  • Loading branch information
Nicholas Bellinger committed Jul 28, 2011
1 parent b9f5edc commit 5db0753
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/target/target_core_transport.c
Original file line number Diff line number Diff line change
Expand Up @@ -3324,7 +3324,7 @@ static int transport_generic_cmd_sequencer(
goto out_invalid_cdb_field;
}

cmd->t_task_lba = get_unaligned_be16(&cdb[2]);
cmd->t_task_lba = get_unaligned_be64(&cdb[2]);
passthrough = (dev->transport->transport_type ==
TRANSPORT_PLUGIN_PHBA_PDEV);
/*
Expand Down

0 comments on commit 5db0753

Please sign in to comment.