ACPI/PCI/IRQ: assign ISA IRQ directly during early boot stages
[cascardo/linux.git] / drivers / ata / libata-scsi.c
index 35b1f9e..9cceb4a 100644 (file)
@@ -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 |
@@ -3560,9 +3562,9 @@ static unsigned int ata_scsiop_maint_in(struct ata_scsi_args *args, u8 *rbuf)
                supported = 3;
                break;
        case WRITE_SAME_16:
-               if (ata_id_sct_write_same(dev->id))
-                       supported = 3;
-               break;
+               if (!ata_id_sct_write_same(dev->id))
+                       break;
+               /* fallthrough: if SCT ... only enable for ZBC */
        case ZBC_IN:
        case ZBC_OUT:
                if (ata_id_zoned_cap(dev->id) ||