Back to home page

OSCL-LXR

 
 

    


0001 /*
0002  * IEEE 1394 constants.
0003  *
0004  * Copyright (C) 2005-2007  Kristian Hoegsberg <krh@bitplanet.net>
0005  *
0006  * Permission is hereby granted, free of charge, to any person obtaining a
0007  * copy of this software and associated documentation files (the "Software"),
0008  * to deal in the Software without restriction, including without limitation
0009  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
0010  * and/or sell copies of the Software, and to permit persons to whom the
0011  * Software is furnished to do so, subject to the following conditions:
0012  *
0013  * The above copyright notice and this permission notice (including the next
0014  * paragraph) shall be included in all copies or substantial portions of the
0015  * Software.
0016  *
0017  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
0018  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
0019  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
0020  * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
0021  * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
0022  * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
0023  * DEALINGS IN THE SOFTWARE.
0024  */
0025 
0026 #ifndef _LINUX_FIREWIRE_CONSTANTS_H
0027 #define _LINUX_FIREWIRE_CONSTANTS_H
0028 
0029 #define TCODE_WRITE_QUADLET_REQUEST 0x0
0030 #define TCODE_WRITE_BLOCK_REQUEST   0x1
0031 #define TCODE_WRITE_RESPONSE        0x2
0032 #define TCODE_READ_QUADLET_REQUEST  0x4
0033 #define TCODE_READ_BLOCK_REQUEST    0x5
0034 #define TCODE_READ_QUADLET_RESPONSE 0x6
0035 #define TCODE_READ_BLOCK_RESPONSE   0x7
0036 #define TCODE_CYCLE_START       0x8
0037 #define TCODE_LOCK_REQUEST      0x9
0038 #define TCODE_STREAM_DATA       0xa
0039 #define TCODE_LOCK_RESPONSE     0xb
0040 
0041 #define EXTCODE_MASK_SWAP       0x1
0042 #define EXTCODE_COMPARE_SWAP        0x2
0043 #define EXTCODE_FETCH_ADD       0x3
0044 #define EXTCODE_LITTLE_ADD      0x4
0045 #define EXTCODE_BOUNDED_ADD     0x5
0046 #define EXTCODE_WRAP_ADD        0x6
0047 #define EXTCODE_VENDOR_DEPENDENT    0x7
0048 
0049 /* Linux firewire-core (Juju) specific tcodes */
0050 #define TCODE_LOCK_MASK_SWAP        (0x10 | EXTCODE_MASK_SWAP)
0051 #define TCODE_LOCK_COMPARE_SWAP     (0x10 | EXTCODE_COMPARE_SWAP)
0052 #define TCODE_LOCK_FETCH_ADD        (0x10 | EXTCODE_FETCH_ADD)
0053 #define TCODE_LOCK_LITTLE_ADD       (0x10 | EXTCODE_LITTLE_ADD)
0054 #define TCODE_LOCK_BOUNDED_ADD      (0x10 | EXTCODE_BOUNDED_ADD)
0055 #define TCODE_LOCK_WRAP_ADD     (0x10 | EXTCODE_WRAP_ADD)
0056 #define TCODE_LOCK_VENDOR_DEPENDENT (0x10 | EXTCODE_VENDOR_DEPENDENT)
0057 
0058 #define RCODE_COMPLETE          0x0
0059 #define RCODE_CONFLICT_ERROR        0x4
0060 #define RCODE_DATA_ERROR        0x5
0061 #define RCODE_TYPE_ERROR        0x6
0062 #define RCODE_ADDRESS_ERROR     0x7
0063 
0064 /* Linux firewire-core (Juju) specific rcodes */
0065 #define RCODE_SEND_ERROR        0x10
0066 #define RCODE_CANCELLED         0x11
0067 #define RCODE_BUSY          0x12
0068 #define RCODE_GENERATION        0x13
0069 #define RCODE_NO_ACK            0x14
0070 
0071 #define SCODE_100           0x0
0072 #define SCODE_200           0x1
0073 #define SCODE_400           0x2
0074 #define SCODE_800           0x3
0075 #define SCODE_1600          0x4
0076 #define SCODE_3200          0x5
0077 #define SCODE_BETA          0x3
0078 
0079 #define ACK_COMPLETE            0x1
0080 #define ACK_PENDING         0x2
0081 #define ACK_BUSY_X          0x4
0082 #define ACK_BUSY_A          0x5
0083 #define ACK_BUSY_B          0x6
0084 #define ACK_DATA_ERROR          0xd
0085 #define ACK_TYPE_ERROR          0xe
0086 
0087 #define RETRY_1             0x00
0088 #define RETRY_X             0x01
0089 #define RETRY_A             0x02
0090 #define RETRY_B             0x03
0091 
0092 #endif /* _LINUX_FIREWIRE_CONSTANTS_H */