From: Shaun Tancheff Date: Mon, 22 Aug 2016 04:23:21 +0000 (-0500) Subject: libata: SCT Write Same handle ATA_DFLAG_PIO X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=7d36dd00ab8d57134cce86ad4febc2f5bbdf3e72;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git libata: SCT Write Same handle ATA_DFLAG_PIO Use non DMA write log when ATA_DFLAG_PIO is set. Signed-off-by: Shaun Tancheff Reviewed-by: Hannes Reinecke Acked-by: Tejun Heo --- diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c index 35b1f9e475cc..2f5487f02de1 100644 --- a/drivers/ata/libata-scsi.c +++ b/drivers/ata/libata-scsi.c @@ -3485,6 +3485,8 @@ static unsigned int ata_scsi_write_same_xlat(struct ata_queued_cmd *qc) tf->device = ATA_CMD_STANDBYNOW1; tf->protocol = ATA_PROT_DMA; tf->command = ATA_CMD_WRITE_LOG_DMA_EXT; + if (unlikely(dev->flags & ATA_DFLAG_PIO)) + tf->command = ATA_CMD_WRITE_LOG_EXT; } tf->flags |= ATA_TFLAG_ISADDR | ATA_TFLAG_DEVICE | ATA_TFLAG_LBA48 |