aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/firewire/core.h
diff options
context:
space:
mode:
authorClemens Ladisch <clemens@ladisch.de>2010-11-30 08:24:47 +0100
committerStefan Richter <stefanr@s5r6.in-berlin.de>2010-12-13 20:39:14 +0100
commit5b06db166c4d38638980283505259fa165d4f369 (patch)
tree3384d55b420987325ffabf523ded740b1daac2c4 /drivers/firewire/core.h
parent8327b37b18addfc6f8cf41a2f1a4490b656377b9 (diff)
downloadkernel_samsung_smdk4412-5b06db166c4d38638980283505259fa165d4f369.zip
kernel_samsung_smdk4412-5b06db166c4d38638980283505259fa165d4f369.tar.gz
kernel_samsung_smdk4412-5b06db166c4d38638980283505259fa165d4f369.tar.bz2
firewire: make PHY packet header format consistent
Change the header of PHY packets to be sent to include a pseudo transaction code. This makes the header consistent with that of received PHY packets, and allows at_context_queue_packet() and log_ar_at_event() to see the packet type directly instead of having to deduce it from the header length or even from the header contents. Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Diffstat (limited to 'drivers/firewire/core.h')
-rw-r--r--drivers/firewire/core.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/firewire/core.h b/drivers/firewire/core.h
index e6239f9..f8dfcf1 100644
--- a/drivers/firewire/core.h
+++ b/drivers/firewire/core.h
@@ -215,9 +215,11 @@ static inline bool is_next_generation(int new_generation, int old_generation)
/* -transaction */
+#define TCODE_LINK_INTERNAL 0xe
+
#define TCODE_IS_READ_REQUEST(tcode) (((tcode) & ~1) == 4)
#define TCODE_IS_BLOCK_PACKET(tcode) (((tcode) & 1) != 0)
-#define TCODE_IS_LINK_INTERNAL(tcode) ((tcode) == 0xe)
+#define TCODE_IS_LINK_INTERNAL(tcode) ((tcode) == TCODE_LINK_INTERNAL)
#define TCODE_IS_REQUEST(tcode) (((tcode) & 2) == 0)
#define TCODE_IS_RESPONSE(tcode) (((tcode) & 2) != 0)
#define TCODE_HAS_REQUEST_DATA(tcode) (((tcode) & 12) != 4)