aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorRoland Dreier <roland@purestorage.com>2013-02-08 18:18:38 -0500
committerNicholas Bellinger <nab@linux-iscsi.org>2013-02-13 14:54:50 -0500
commit33633676df0d16d0685f2fbc571143801bc16e3b (patch)
treea439b1714313e53af48192c83908d203f1a4b337 /drivers
parentbbf344e54ed9a76e344d08feedc70ab2c5a8a64c (diff)
target: Fix sense data for out-of-bounds IO operations
We're supposed to return LOGICAL BLOCK ADDRESS OUT OF RANGE, not INVALID FIELD IN CDB. Signed-off-by: Roland Dreier <roland@purestorage.com> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/target/target_core_sbc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/target/target_core_sbc.c b/drivers/target/target_core_sbc.c
index a664c664a31a..170f1f75d2d8 100644
--- a/drivers/target/target_core_sbc.c
+++ b/drivers/target/target_core_sbc.c
@@ -486,7 +486,7 @@ sbc_parse_cdb(struct se_cmd *cmd, struct sbc_ops *ops)
486 */ 486 */
487 if (cmd->t_task_lba || sectors) { 487 if (cmd->t_task_lba || sectors) {
488 if (sbc_check_valid_sectors(cmd) < 0) 488 if (sbc_check_valid_sectors(cmd) < 0)
489 return TCM_INVALID_CDB_FIELD; 489 return TCM_ADDRESS_OUT_OF_RANGE;
490 } 490 }
491 cmd->execute_cmd = ops->execute_sync_cache; 491 cmd->execute_cmd = ops->execute_sync_cache;
492 break; 492 break;