Re: [PATCH 1/3] ata: add ata_id_pio_need_iordy() helper

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

 



Hello.

Bartlomiej Zolnierkiewicz wrote:

Cc: Jeff Garzik <jgarzik@xxxxxxxxx>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@xxxxxxxxx>
---
against Linus' tree

 include/linux/ata.h |   11 +++++++++++
 1 file changed, 11 insertions(+)

Index: b/include/linux/ata.h
===================================================================
--- a/include/linux/ata.h
+++ b/include/linux/ata.h
@@ -800,6 +800,17 @@ static inline int ata_id_is_ssd(const u1
 	return id[ATA_ID_ROT_SPEED] == 0x01;
 }
+static inline int ata_id_pio_need_iordy(const u16 *id, const u8 pio)
+{
+	/* CF spec. r4.1 Table 22 says no IORDY on PIO5 and PIO6.  */
+	if (ata_id_is_cfa(id) && pio > 4)
+		return 0;
+	/* PIO3 and higher it is mandatory. */

You need some puncuation between "higher" and "it" -- colon or long dash... either that or "for" at the start of the statement. :-)

+	if (pio > 2 || ata_id_has_iordy(id))
+		return 1;
+	return 0;
+}
+
 static inline int ata_drive_40wire(const u16 *dev_id)
 {
 	if (ata_id_is_sata(dev_id))

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