diff options
author | Martin K. Petersen <martin.petersen@oracle.com> | 2008-09-19 18:47:21 -0400 |
---|---|---|
committer | James Bottomley <James.Bottomley@HansenPartnership.com> | 2008-10-13 09:28:58 -0400 |
commit | 9e06688e7d60149cc9ef78ff29515c20186bb418 (patch) | |
tree | cb6df4657c1964244a51d6ad3a5a54b849b93894 /drivers/scsi/sd.c | |
parent | be922f478f430f8fab4db952ffc20c86f23de397 (diff) |
[SCSI] sd: Correctly handle all combinations of DIF and DIX
The old detection code couldn't handle all possible combinations of
DIX and DIF. This version does, giving priority to DIX if the
controller is capable.
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Diffstat (limited to 'drivers/scsi/sd.c')
-rw-r--r-- | drivers/scsi/sd.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c index a494a2ec67d7..7c4d2e68df1c 100644 --- a/drivers/scsi/sd.c +++ b/drivers/scsi/sd.c | |||
@@ -575,7 +575,8 @@ static int sd_prep_fn(struct request_queue *q, struct request *rq) | |||
575 | 575 | ||
576 | /* If DIF or DIX is enabled, tell HBA how to handle request */ | 576 | /* If DIF or DIX is enabled, tell HBA how to handle request */ |
577 | if (host_dif || scsi_prot_sg_count(SCpnt)) | 577 | if (host_dif || scsi_prot_sg_count(SCpnt)) |
578 | sd_dif_op(SCpnt, sdkp->protection_type, scsi_prot_sg_count(SCpnt)); | 578 | sd_dif_op(SCpnt, host_dif, scsi_prot_sg_count(SCpnt), |
579 | sdkp->protection_type); | ||
579 | 580 | ||
580 | /* | 581 | /* |
581 | * We shouldn't disconnect in the middle of a sector, so with a dumb | 582 | * We shouldn't disconnect in the middle of a sector, so with a dumb |