blob: 20b693be14b22f558491285e895e7cad5bf20828 [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001#ifndef _IEEE1394_TRANSACTIONS_H
2#define _IEEE1394_TRANSACTIONS_H
3
Stefan Richterde4394f2006-07-03 12:02:29 -04004#include <linux/types.h>
5
6#include "ieee1394_types.h"
7
8struct hpsb_packet;
9struct hpsb_host;
Linus Torvalds1da177e2005-04-16 15:20:36 -070010
Linus Torvalds1da177e2005-04-16 15:20:36 -070011int hpsb_get_tlabel(struct hpsb_packet *packet);
12void hpsb_free_tlabel(struct hpsb_packet *packet);
Linus Torvalds1da177e2005-04-16 15:20:36 -070013struct hpsb_packet *hpsb_make_readpacket(struct hpsb_host *host, nodeid_t node,
14 u64 addr, size_t length);
15struct hpsb_packet *hpsb_make_lockpacket(struct hpsb_host *host, nodeid_t node,
Stefan Richtere1d118f2006-07-03 12:02:28 -040016 u64 addr, int extcode, quadlet_t *data,
Linus Torvalds1da177e2005-04-16 15:20:36 -070017 quadlet_t arg);
Stefan Richtere1d118f2006-07-03 12:02:28 -040018struct hpsb_packet *hpsb_make_lock64packet(struct hpsb_host *host,
19 nodeid_t node, u64 addr, int extcode,
20 octlet_t *data, octlet_t arg);
21struct hpsb_packet *hpsb_make_phypacket(struct hpsb_host *host, quadlet_t data);
Stefan Richtere1d118f2006-07-03 12:02:28 -040022struct hpsb_packet *hpsb_make_writepacket(struct hpsb_host *host,
23 nodeid_t node, u64 addr,
24 quadlet_t *buffer, size_t length);
Linus Torvalds1da177e2005-04-16 15:20:36 -070025struct hpsb_packet *hpsb_make_streampacket(struct hpsb_host *host, u8 *buffer,
Stefan Richtere1d118f2006-07-03 12:02:28 -040026 int length, int channel, int tag,
27 int sync);
Linus Torvalds1da177e2005-04-16 15:20:36 -070028int hpsb_packet_success(struct hpsb_packet *packet);
Linus Torvalds1da177e2005-04-16 15:20:36 -070029int hpsb_read(struct hpsb_host *host, nodeid_t node, unsigned int generation,
30 u64 addr, quadlet_t *buffer, size_t length);
31int hpsb_write(struct hpsb_host *host, nodeid_t node, unsigned int generation,
32 u64 addr, quadlet_t *buffer, size_t length);
Stefan Richter612262a2008-08-26 00:17:30 +020033int hpsb_lock(struct hpsb_host *host, nodeid_t node, unsigned int generation,
34 u64 addr, int extcode, quadlet_t *data, quadlet_t arg);
Linus Torvalds1da177e2005-04-16 15:20:36 -070035
Stefan Richter99519032006-07-02 14:17:00 +020036#ifdef HPSB_DEBUG_TLABELS
37extern spinlock_t hpsb_tlabel_lock;
38#endif
39
Linus Torvalds1da177e2005-04-16 15:20:36 -070040#endif /* _IEEE1394_TRANSACTIONS_H */