From: Tejun Heo <htejun@gmail.com>
To: jeff@garzik.org, linux-ide@vger.kernel.org
Cc: Tejun Heo <htejun@gmail.com>
Subject: [PATCH 2/8] libata: add protocol data transfer tests
Date: Mon, 5 Nov 2007 14:45:09 +0900 [thread overview]
Message-ID: <1194241516284-git-send-email-htejun@gmail.com> (raw)
In-Reply-To: <1194241515653-git-send-email-htejun@gmail.com>
Add protocol data transfer tests.
Signed-off-by: Tejun Heo <htejun@gmail.com>
---
include/linux/ata.h | 21 +++++++++++++++++++++
1 files changed, 21 insertions(+), 0 deletions(-)
diff --git a/include/linux/ata.h b/include/linux/ata.h
index 61535e7..2318531 100644
--- a/include/linux/ata.h
+++ b/include/linux/ata.h
@@ -323,6 +323,27 @@ enum ata_tf_protocols {
ATA_PROT_ATAPI_DMA, /* packet command with special DMA sauce */
};
+static inline int ata_is_nodata(u8 prot)
+{
+ return prot == ATA_PROT_NODATA || prot == ATA_PROT_ATAPI_NODATA;
+}
+
+static inline int ata_is_pio_data(u8 prot)
+{
+ return prot == ATA_PROT_PIO || prot == ATA_PROT_ATAPI;
+}
+
+static inline int ata_is_dma_data(u8 prot)
+{
+ return prot == ATA_PROT_DMA || prot == ATA_PROT_NCQ ||
+ prot == ATA_PROT_ATAPI_DMA;
+}
+
+static inline int ata_is_data(u8 prot)
+{
+ return ata_is_pio_data(prot) || ata_is_dma_data(prot);
+}
+
enum ata_ioctls {
ATA_IOC_GET_IO32 = 0x309,
ATA_IOC_SET_IO32 = 0x324,
--
1.5.2.4
next prev parent reply other threads:[~2007-11-05 5:45 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-05 5:45 [PATCHSET] libata: update EH speed down logic, take #2 Tejun Heo
2007-11-05 5:45 ` [PATCH 1/8] libata: rearrange ATA_DFLAG_* Tejun Heo
2007-11-05 5:45 ` Tejun Heo [this message]
2007-11-05 5:45 ` [PATCH 3/8] libata: factor out ata_eh_schedule_probe() Tejun Heo
2007-11-05 10:36 ` Bartlomiej Zolnierkiewicz
2007-11-05 12:29 ` Tejun Heo
2007-11-06 4:53 ` [PATCH 3/8 UPDATED] " Tejun Heo
2007-11-05 5:45 ` [PATCH 4/8] libata: move ata_set_mode() to libata-eh.c Tejun Heo
2007-11-05 5:45 ` [PATCH 5/8] libata: clean up EH speed down implementation Tejun Heo
2007-11-05 5:45 ` [PATCH 6/8] libata: adjust speed down rules Tejun Heo
2007-11-05 5:45 ` [PATCH 7/8] libata: implement ATA_DFLAG_DUBIOUS_XFER Tejun Heo
2007-11-05 5:45 ` [PATCH 8/8] libata: implement fast speed down for unverified data transfer mode Tejun Heo
2007-11-23 1:07 ` [PATCHSET] libata: update EH speed down logic, take #2 Tejun Heo
2007-11-24 1:04 ` Jeff Garzik
-- strict thread matches above, loose matches on Subject: below --
2007-11-01 15:51 [PATCHSET] libata: update EH speed down logic Tejun Heo
2007-11-01 15:51 ` [PATCH 2/8] libata: add protocol data transfer tests Tejun Heo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1194241516284-git-send-email-htejun@gmail.com \
--to=htejun@gmail.com \
--cc=jeff@garzik.org \
--cc=linux-ide@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.