mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 11:41:38 -04:00
[SCSI] sd: Correctly handle 6-byte commands with DIX
DIF does not work with 6-byte commands so we previously ignored those commands when preparing a request. However, DIX does not need RDPROTECT/WRPROTECT to be set and 6-byte commands are consequently perfectly valid in host-only mode. This patch fixes a problem where we would set the wrong DIX operation when issuing commands to a legacy disk. Signed-off-by: Martin K. Petersen <[email protected]> Reviewed-by: Matthew Wilcox <[email protected]> Signed-off-by: James Bottomley <[email protected]>
This commit is contained in:
parent
becce74b82
commit
5db524bd46
1 changed files with 4 additions and 0 deletions
|
|
@ -374,7 +374,10 @@ void sd_dif_op(struct scsi_cmnd *scmd, unsigned int dif, unsigned int dix, unsig
|
|||
else
|
||||
csum_convert = 0;
|
||||
|
||||
BUG_ON(dif && (scmd->cmnd[0] == READ_6 || scmd->cmnd[0] == WRITE_6));
|
||||
|
||||
switch (scmd->cmnd[0]) {
|
||||
case READ_6:
|
||||
case READ_10:
|
||||
case READ_12:
|
||||
case READ_16:
|
||||
|
|
@ -390,6 +393,7 @@ void sd_dif_op(struct scsi_cmnd *scmd, unsigned int dif, unsigned int dix, unsig
|
|||
|
||||
break;
|
||||
|
||||
case WRITE_6:
|
||||
case WRITE_10:
|
||||
case WRITE_12:
|
||||
case WRITE_16:
|
||||
|
|
|
|||
Loading…
Reference in a new issue