Re: [PATCH] libata: IORDY handling, quiet handling

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello, I wrote:

@@ -3466,8 +3529,18 @@
     tf.command = ATA_CMD_SET_FEATURES;
     tf.feature = SETFEATURES_XFER;
     tf.flags |= ATA_TFLAG_ISADDR | ATA_TFLAG_DEVICE;
+
+    /* Older CFA may not support this command */
+    if (ata_id_is_cfa(dev->id))
+            tf.flags |= ATA_TFLAG_QUIET;
+
     tf.protocol = ATA_PROT_NODATA;
-    tf.nsect = dev->xfer_mode;
+
+    /* Ancient devices may need us to avoid IORDY */
+    if (ata_pio_need_iordy(dev))
+        tf.nsect = dev->xfer_mode;
+    else
+        tf.nsect = 0x01;

Note that ATA-1 did *not* yet define this subcode (only 0 for "block transfer"). I think that we should not change the PIO modes at all on non-IORDY drives, otherwise it's becoming pointless and messy -- you're

After thinking a bit more: we should not do it on non-EIDE drives (however, this is probably the same thing). If our host by some mischance has no IORDY support and an EIDE drive has it and supports disabling (otherwise there's little we can do), we must issue subcode 0x01 and tune our host controller to the default PIO mode.

not setting what you're told here and force the drive's default mode instead... why then change it at all?

   Anyway, all this logic should be one layer higher than this function...

MBR, Sergei
-
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Filesystems]     [Linux SCSI]     [Linux RAID]     [Git]     [Kernel Newbies]     [Linux Newbie]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Samba]     [Device Mapper]

  Powered by Linux