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) | |
download | op-kernel-dev-9e06688e7d60149cc9ef78ff29515c20186bb418.zip op-kernel-dev-9e06688e7d60149cc9ef78ff29515c20186bb418.tar.gz |
[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 a494a2e..7c4d2e6 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) /* If DIF or DIX is enabled, tell HBA how to handle request */ if (host_dif || scsi_prot_sg_count(SCpnt)) - sd_dif_op(SCpnt, sdkp->protection_type, scsi_prot_sg_count(SCpnt)); + sd_dif_op(SCpnt, host_dif, scsi_prot_sg_count(SCpnt), + sdkp->protection_type); /* * We shouldn't disconnect in the middle of a sector, so with a dumb |