aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/scsi/libata-scsi.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/scsi/libata-scsi.c b/drivers/scsi/libata-scsi.c
index 2007b4b6e1b4..3ce7c198ff0d 100644
--- a/drivers/scsi/libata-scsi.c
+++ b/drivers/scsi/libata-scsi.c
@@ -1921,7 +1921,7 @@ unsigned int ata_scsiop_mode_sense(struct ata_scsi_args *args, u8 *rbuf,
1921 return 0; 1921 return 0;
1922 1922
1923 dpofua = 0; 1923 dpofua = 0;
1924 if (ata_dev_supports_fua(args->id) && dev->flags & ATA_DFLAG_LBA48 && 1924 if (ata_dev_supports_fua(args->id) && (dev->flags & ATA_DFLAG_LBA48) &&
1925 (!(dev->flags & ATA_DFLAG_PIO) || dev->multi_count)) 1925 (!(dev->flags & ATA_DFLAG_PIO) || dev->multi_count))
1926 dpofua = 1 << 4; 1926 dpofua = 1 << 4;
1927 1927
@@ -2408,9 +2408,14 @@ ata_scsi_pass_thru(struct ata_queued_cmd *qc, const u8 *scsicmd)
2408{ 2408{
2409 struct ata_taskfile *tf = &(qc->tf); 2409 struct ata_taskfile *tf = &(qc->tf);
2410 struct scsi_cmnd *cmd = qc->scsicmd; 2410 struct scsi_cmnd *cmd = qc->scsicmd;
2411 struct ata_device *dev = qc->dev;
2411 2412
2412 if ((tf->protocol = ata_scsi_map_proto(scsicmd[1])) == ATA_PROT_UNKNOWN) 2413 if ((tf->protocol = ata_scsi_map_proto(scsicmd[1])) == ATA_PROT_UNKNOWN)
2413 goto invalid_fld; 2414 goto invalid_fld;
2415
2416 /* We may not issue DMA commands if no DMA mode is set */
2417 if (tf->protocol == ATA_PROT_DMA && dev->dma_mode == 0)
2418 goto invalid_fld;
2414 2419
2415 if (scsicmd[1] & 0xe0) 2420 if (scsicmd[1] & 0xe0)
2416 /* PIO multi not supported yet */ 2421 /* PIO multi not supported yet */