diff options
-rw-r--r-- | drivers/scsi/sd.c | 7 | ||||
-rw-r--r-- | drivers/scsi/sd_dif.c | 1 |
2 files changed, 2 insertions, 6 deletions
diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c index fec034557c38..a494a2ec67d7 100644 --- a/drivers/scsi/sd.c +++ b/drivers/scsi/sd.c @@ -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: @@ -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; } diff --git a/drivers/scsi/sd_dif.c b/drivers/scsi/sd_dif.c index 4d17f3d35aac..943fde7e7ffb 100644 --- a/drivers/scsi/sd_dif.c +++ b/drivers/scsi/sd_dif.c @@ -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; } |