|
@@ -309,7 +309,8 @@ int ata_build_rw_tf(struct ata_taskfile *tf, struct ata_device *dev,
|
|
|
tf->flags |= tf_flags;
|
|
|
|
|
|
if ((dev->flags & (ATA_DFLAG_PIO | ATA_DFLAG_NCQ_OFF |
|
|
|
- ATA_DFLAG_NCQ)) == ATA_DFLAG_NCQ) {
|
|
|
+ ATA_DFLAG_NCQ)) == ATA_DFLAG_NCQ &&
|
|
|
+ likely(tag != ATA_TAG_INTERNAL)) {
|
|
|
/* yay, NCQ */
|
|
|
if (!lba_48_ok(block, n_block))
|
|
|
return -ERANGE;
|
|
@@ -3533,8 +3534,7 @@ static unsigned int ata_dev_init_params(struct ata_device *dev,
|
|
|
* LOCKING:
|
|
|
* spin_lock_irqsave(host lock)
|
|
|
*/
|
|
|
-
|
|
|
-static void ata_sg_clean(struct ata_queued_cmd *qc)
|
|
|
+void ata_sg_clean(struct ata_queued_cmd *qc)
|
|
|
{
|
|
|
struct ata_port *ap = qc->ap;
|
|
|
struct scatterlist *sg = qc->__sg;
|