1*607ca46eSDavid Howells /* 2*607ca46eSDavid Howells * IEEE 1394 constants. 3*607ca46eSDavid Howells * 4*607ca46eSDavid Howells * Copyright (C) 2005-2007 Kristian Hoegsberg <krh@bitplanet.net> 5*607ca46eSDavid Howells * 6*607ca46eSDavid Howells * Permission is hereby granted, free of charge, to any person obtaining a 7*607ca46eSDavid Howells * copy of this software and associated documentation files (the "Software"), 8*607ca46eSDavid Howells * to deal in the Software without restriction, including without limitation 9*607ca46eSDavid Howells * the rights to use, copy, modify, merge, publish, distribute, sublicense, 10*607ca46eSDavid Howells * and/or sell copies of the Software, and to permit persons to whom the 11*607ca46eSDavid Howells * Software is furnished to do so, subject to the following conditions: 12*607ca46eSDavid Howells * 13*607ca46eSDavid Howells * The above copyright notice and this permission notice (including the next 14*607ca46eSDavid Howells * paragraph) shall be included in all copies or substantial portions of the 15*607ca46eSDavid Howells * Software. 16*607ca46eSDavid Howells * 17*607ca46eSDavid Howells * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18*607ca46eSDavid Howells * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19*607ca46eSDavid Howells * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 20*607ca46eSDavid Howells * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR 21*607ca46eSDavid Howells * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 22*607ca46eSDavid Howells * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 23*607ca46eSDavid Howells * DEALINGS IN THE SOFTWARE. 24*607ca46eSDavid Howells */ 25*607ca46eSDavid Howells 26*607ca46eSDavid Howells #ifndef _LINUX_FIREWIRE_CONSTANTS_H 27*607ca46eSDavid Howells #define _LINUX_FIREWIRE_CONSTANTS_H 28*607ca46eSDavid Howells 29*607ca46eSDavid Howells #define TCODE_WRITE_QUADLET_REQUEST 0x0 30*607ca46eSDavid Howells #define TCODE_WRITE_BLOCK_REQUEST 0x1 31*607ca46eSDavid Howells #define TCODE_WRITE_RESPONSE 0x2 32*607ca46eSDavid Howells #define TCODE_READ_QUADLET_REQUEST 0x4 33*607ca46eSDavid Howells #define TCODE_READ_BLOCK_REQUEST 0x5 34*607ca46eSDavid Howells #define TCODE_READ_QUADLET_RESPONSE 0x6 35*607ca46eSDavid Howells #define TCODE_READ_BLOCK_RESPONSE 0x7 36*607ca46eSDavid Howells #define TCODE_CYCLE_START 0x8 37*607ca46eSDavid Howells #define TCODE_LOCK_REQUEST 0x9 38*607ca46eSDavid Howells #define TCODE_STREAM_DATA 0xa 39*607ca46eSDavid Howells #define TCODE_LOCK_RESPONSE 0xb 40*607ca46eSDavid Howells 41*607ca46eSDavid Howells #define EXTCODE_MASK_SWAP 0x1 42*607ca46eSDavid Howells #define EXTCODE_COMPARE_SWAP 0x2 43*607ca46eSDavid Howells #define EXTCODE_FETCH_ADD 0x3 44*607ca46eSDavid Howells #define EXTCODE_LITTLE_ADD 0x4 45*607ca46eSDavid Howells #define EXTCODE_BOUNDED_ADD 0x5 46*607ca46eSDavid Howells #define EXTCODE_WRAP_ADD 0x6 47*607ca46eSDavid Howells #define EXTCODE_VENDOR_DEPENDENT 0x7 48*607ca46eSDavid Howells 49*607ca46eSDavid Howells /* Linux firewire-core (Juju) specific tcodes */ 50*607ca46eSDavid Howells #define TCODE_LOCK_MASK_SWAP (0x10 | EXTCODE_MASK_SWAP) 51*607ca46eSDavid Howells #define TCODE_LOCK_COMPARE_SWAP (0x10 | EXTCODE_COMPARE_SWAP) 52*607ca46eSDavid Howells #define TCODE_LOCK_FETCH_ADD (0x10 | EXTCODE_FETCH_ADD) 53*607ca46eSDavid Howells #define TCODE_LOCK_LITTLE_ADD (0x10 | EXTCODE_LITTLE_ADD) 54*607ca46eSDavid Howells #define TCODE_LOCK_BOUNDED_ADD (0x10 | EXTCODE_BOUNDED_ADD) 55*607ca46eSDavid Howells #define TCODE_LOCK_WRAP_ADD (0x10 | EXTCODE_WRAP_ADD) 56*607ca46eSDavid Howells #define TCODE_LOCK_VENDOR_DEPENDENT (0x10 | EXTCODE_VENDOR_DEPENDENT) 57*607ca46eSDavid Howells 58*607ca46eSDavid Howells #define RCODE_COMPLETE 0x0 59*607ca46eSDavid Howells #define RCODE_CONFLICT_ERROR 0x4 60*607ca46eSDavid Howells #define RCODE_DATA_ERROR 0x5 61*607ca46eSDavid Howells #define RCODE_TYPE_ERROR 0x6 62*607ca46eSDavid Howells #define RCODE_ADDRESS_ERROR 0x7 63*607ca46eSDavid Howells 64*607ca46eSDavid Howells /* Linux firewire-core (Juju) specific rcodes */ 65*607ca46eSDavid Howells #define RCODE_SEND_ERROR 0x10 66*607ca46eSDavid Howells #define RCODE_CANCELLED 0x11 67*607ca46eSDavid Howells #define RCODE_BUSY 0x12 68*607ca46eSDavid Howells #define RCODE_GENERATION 0x13 69*607ca46eSDavid Howells #define RCODE_NO_ACK 0x14 70*607ca46eSDavid Howells 71*607ca46eSDavid Howells #define SCODE_100 0x0 72*607ca46eSDavid Howells #define SCODE_200 0x1 73*607ca46eSDavid Howells #define SCODE_400 0x2 74*607ca46eSDavid Howells #define SCODE_800 0x3 75*607ca46eSDavid Howells #define SCODE_1600 0x4 76*607ca46eSDavid Howells #define SCODE_3200 0x5 77*607ca46eSDavid Howells #define SCODE_BETA 0x3 78*607ca46eSDavid Howells 79*607ca46eSDavid Howells #define ACK_COMPLETE 0x1 80*607ca46eSDavid Howells #define ACK_PENDING 0x2 81*607ca46eSDavid Howells #define ACK_BUSY_X 0x4 82*607ca46eSDavid Howells #define ACK_BUSY_A 0x5 83*607ca46eSDavid Howells #define ACK_BUSY_B 0x6 84*607ca46eSDavid Howells #define ACK_DATA_ERROR 0xd 85*607ca46eSDavid Howells #define ACK_TYPE_ERROR 0xe 86*607ca46eSDavid Howells 87*607ca46eSDavid Howells #define RETRY_1 0x00 88*607ca46eSDavid Howells #define RETRY_X 0x01 89*607ca46eSDavid Howells #define RETRY_A 0x02 90*607ca46eSDavid Howells #define RETRY_B 0x03 91*607ca46eSDavid Howells 92*607ca46eSDavid Howells #endif /* _LINUX_FIREWIRE_CONSTANTS_H */ 93