Skip to contentSkip to conversation

mpt2sas: Fix missing reference tag seed with Type 2 devices

PATCH New Martin K. Petersen 1 participant 1 message Oct 21, 2010 SCSI

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mpt2sas: Fix missing reference tag seed with Type 2 devices

Eric,

I just pulled 2.6.36 and discovered Type 2 devices were not working. Turns out you tweaked my mpt2sas Type 2 patch a bit before submitting it to James. Your change left the initial reference tag unset in the Type 2 case, causing all I/O to fail. The following patch fixes things up.

[PATCH] mpt2sas: Fix missing reference tag seed with Type 2 devices

Ensure that the initial reference tag is passed on to the HBA firmware for DIF Type 2 devices.

drivers/scsi/mpt2sas/mpt2sas_scsih.c +1 -7
index 16e99b6..f423fe9 100644
@@ -3230,6 +3230,7 @@ _scsih_setup_eedp(struct scsi_cmnd *scmd, Mpi2SCSIIORequest_t *mpi_request)
 
 	switch (prot_type) {
 	case SCSI_PROT_DIF_TYPE1:
+	case SCSI_PROT_DIF_TYPE2:
 
 		/*
 		* enable ref/guard checking
@@ -3242,13 +3243,6 @@ _scsih_setup_eedp(struct scsi_cmnd *scmd, Mpi2SCSIIORequest_t *mpi_request)
 		    cpu_to_be32(scsi_get_lba(scmd));
 		break;
 
-	case SCSI_PROT_DIF_TYPE2:
-
-		eedp_flags |= MPI2_SCSIIO_EEDPFLAGS_INC_PRI_REFTAG |
-		    MPI2_SCSIIO_EEDPFLAGS_CHECK_REFTAG |
-		    MPI2_SCSIIO_EEDPFLAGS_CHECK_GUARD;
-		break;
-
 	case SCSI_PROT_DIF_TYPE3:
 
 		/*