Skip to content

Commit

Permalink
[SCSI] isci: fix breakage caused by >16byte CDB patch
Browse files Browse the repository at this point in the history
Oops, apparently no-one I cc'd at intel actually bothered to check this
patch for the isci driver:

commit e73823f
Author: James Bottomley <JBottomley@Parallels.com>
Date:   Tue May 7 15:38:18 2013 -0700

    [SCSI] libsas: implement > 16 byte CDB support

sci_swab32_cpy needs multiples of four, so for commands that aren't that, it's
rounding the wrong way.  fix by doing (len+3)/4 instead of len/4.

Reported-by: Tony Luck <tony.luck@intel.com>
Tested-by: Tony Luck <tony.luck@intel.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
  • Loading branch information
James Bottomley authored and James Bottomley committed Jul 24, 2013
1 parent 53a983c commit e1be098
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/scsi/isci/request.c
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ static void sci_io_request_build_ssp_command_iu(struct isci_request *ireq)
cmd_iu->_r_c = 0;

sci_swab32_cpy(&cmd_iu->cdb, task->ssp_task.cmd->cmnd,
task->ssp_task.cmd->cmd_len / sizeof(u32));
(task->ssp_task.cmd->cmd_len+3) / sizeof(u32));
}

static void sci_task_request_build_ssp_task_iu(struct isci_request *ireq)
Expand Down

0 comments on commit e1be098

Please sign in to comment.