diff options
author | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-16 18:20:36 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-16 18:20:36 -0400 |
commit | 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 (patch) | |
tree | 0bba044c4ce775e45a88a51686b5d9f90697ea9d /drivers/ieee1394/ieee1394_transactions.h |
Linux-2.6.12-rc2v2.6.12-rc2
Initial git repository build. I'm not bothering with the full history,
even though we have it. We can create a separate "historical" git
archive of that later if we want to, and in the meantime it's about
3.2GB when imported into git - space that would just make the early
git days unnecessarily complicated, when we don't have a lot of good
infrastructure for it.
Let it rip!
Diffstat (limited to 'drivers/ieee1394/ieee1394_transactions.h')
-rw-r--r-- | drivers/ieee1394/ieee1394_transactions.h | 64 |
1 files changed, 64 insertions, 0 deletions
diff --git a/drivers/ieee1394/ieee1394_transactions.h b/drivers/ieee1394/ieee1394_transactions.h new file mode 100644 index 000000000000..526a43ceb496 --- /dev/null +++ b/drivers/ieee1394/ieee1394_transactions.h | |||
@@ -0,0 +1,64 @@ | |||
1 | #ifndef _IEEE1394_TRANSACTIONS_H | ||
2 | #define _IEEE1394_TRANSACTIONS_H | ||
3 | |||
4 | #include "ieee1394_core.h" | ||
5 | |||
6 | |||
7 | /* | ||
8 | * Get and free transaction labels. | ||
9 | */ | ||
10 | int hpsb_get_tlabel(struct hpsb_packet *packet); | ||
11 | void hpsb_free_tlabel(struct hpsb_packet *packet); | ||
12 | |||
13 | struct hpsb_packet *hpsb_make_readpacket(struct hpsb_host *host, nodeid_t node, | ||
14 | u64 addr, size_t length); | ||
15 | struct hpsb_packet *hpsb_make_lockpacket(struct hpsb_host *host, nodeid_t node, | ||
16 | u64 addr, int extcode, quadlet_t *data, | ||
17 | quadlet_t arg); | ||
18 | struct hpsb_packet *hpsb_make_lock64packet(struct hpsb_host *host, nodeid_t node, | ||
19 | u64 addr, int extcode, octlet_t *data, | ||
20 | octlet_t arg); | ||
21 | struct hpsb_packet *hpsb_make_phypacket(struct hpsb_host *host, | ||
22 | quadlet_t data) ; | ||
23 | struct hpsb_packet *hpsb_make_isopacket(struct hpsb_host *host, | ||
24 | int length, int channel, | ||
25 | int tag, int sync); | ||
26 | struct hpsb_packet *hpsb_make_writepacket (struct hpsb_host *host, nodeid_t node, | ||
27 | u64 addr, quadlet_t *buffer, size_t length); | ||
28 | struct hpsb_packet *hpsb_make_streampacket(struct hpsb_host *host, u8 *buffer, | ||
29 | int length, int channel, int tag, int sync); | ||
30 | |||
31 | /* | ||
32 | * hpsb_packet_success - Make sense of the ack and reply codes and | ||
33 | * return more convenient error codes: | ||
34 | * 0 success | ||
35 | * -EBUSY node is busy, try again | ||
36 | * -EAGAIN error which can probably resolved by retry | ||
37 | * -EREMOTEIO node suffers from an internal error | ||
38 | * -EACCES this transaction is not allowed on requested address | ||
39 | * -EINVAL invalid address at node | ||
40 | */ | ||
41 | int hpsb_packet_success(struct hpsb_packet *packet); | ||
42 | |||
43 | |||
44 | /* | ||
45 | * The generic read, write and lock functions. All recognize the local node ID | ||
46 | * and act accordingly. Read and write automatically use quadlet commands if | ||
47 | * length == 4 and and block commands otherwise (however, they do not yet | ||
48 | * support lengths that are not a multiple of 4). You must explicitly specifiy | ||
49 | * the generation for which the node ID is valid, to avoid sending packets to | ||
50 | * the wrong nodes when we race with a bus reset. | ||
51 | */ | ||
52 | int hpsb_read(struct hpsb_host *host, nodeid_t node, unsigned int generation, | ||
53 | u64 addr, quadlet_t *buffer, size_t length); | ||
54 | int hpsb_write(struct hpsb_host *host, nodeid_t node, unsigned int generation, | ||
55 | u64 addr, quadlet_t *buffer, size_t length); | ||
56 | int hpsb_lock(struct hpsb_host *host, nodeid_t node, unsigned int generation, | ||
57 | u64 addr, int extcode, quadlet_t *data, quadlet_t arg); | ||
58 | int hpsb_lock64(struct hpsb_host *host, nodeid_t node, unsigned int generation, | ||
59 | u64 addr, int extcode, octlet_t *data, octlet_t arg); | ||
60 | int hpsb_send_gasp(struct hpsb_host *host, int channel, unsigned int generation, | ||
61 | quadlet_t *buffer, size_t length, u32 specifier_id, | ||
62 | unsigned int version); | ||
63 | |||
64 | #endif /* _IEEE1394_TRANSACTIONS_H */ | ||