Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 115465
b: refs/heads/master
c: be922f4
h: refs/heads/master
i:
  115463: 2705848
v: v3
  • Loading branch information
Martin K. Petersen authored and James Bottomley committed Oct 13, 2008
1 parent eea6528 commit aa897d0
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: bd623e79fb6bca7ab685bb1f7376476a81ce10bb
refs/heads/master: be922f478f430f8fab4db952ffc20c86f23de397
7 changes: 2 additions & 5 deletions trunk/drivers/scsi/sd.c
Original file line number Diff line number Diff line change
Expand Up @@ -1253,14 +1253,12 @@ void sd_read_protection_type(struct scsi_disk *sdkp, unsigned char *buffer)
else
type = ((buffer[12] >> 1) & 7) + 1; /* P_TYPE 0 = Type 1 */

sdkp->protection_type = type;

switch (type) {
case SD_DIF_TYPE0_PROTECTION:
sdkp->protection_type = 0;
break;

case SD_DIF_TYPE1_PROTECTION:
case SD_DIF_TYPE3_PROTECTION:
sdkp->protection_type = type;
break;

case SD_DIF_TYPE2_PROTECTION:
Expand All @@ -1278,7 +1276,6 @@ void sd_read_protection_type(struct scsi_disk *sdkp, unsigned char *buffer)
return;

disable:
sdkp->protection_type = 0;
sdkp->capacity = 0;
}

Expand Down
1 change: 0 additions & 1 deletion trunk/drivers/scsi/sd_dif.c
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,6 @@ void sd_dif_config_host(struct scsi_disk *sdkp)
if (scsi_host_dif_capable(sdp->host, type) == 0) {
sd_printk(KERN_INFO, sdkp, "Type %d protection " \
"unsupported by HBA. Disabling DIF.\n", type);
sdkp->protection_type = 0;
return;
}

Expand Down

0 comments on commit aa897d0

Please sign in to comment.