From 9e06688e7d60149cc9ef78ff29515c20186bb418 Mon Sep 17 00:00:00 2001 From: "Martin K. Petersen" Date: Fri, 19 Sep 2008 18:47:21 -0400 Subject: [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 Signed-off-by: James Bottomley --- drivers/scsi/sd.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'drivers/scsi/sd.c') diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c index a494a2ec67d..7c4d2e68df1 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 -- cgit v1.2.3