ieee1394_transactions.h 1.6 KB
Newer Older
L
Linus Torvalds 已提交
1 2 3
#ifndef _IEEE1394_TRANSACTIONS_H
#define _IEEE1394_TRANSACTIONS_H

4 5 6 7 8 9
#include <linux/types.h>

#include "ieee1394_types.h"

struct hpsb_packet;
struct hpsb_host;
L
Linus Torvalds 已提交
10 11 12 13 14 15

int hpsb_get_tlabel(struct hpsb_packet *packet);
void hpsb_free_tlabel(struct hpsb_packet *packet);
struct hpsb_packet *hpsb_make_readpacket(struct hpsb_host *host, nodeid_t node,
					 u64 addr, size_t length);
struct hpsb_packet *hpsb_make_lockpacket(struct hpsb_host *host, nodeid_t node,
16
					 u64 addr, int extcode, quadlet_t *data,
L
Linus Torvalds 已提交
17
					 quadlet_t arg);
18 19 20 21 22 23 24 25 26
struct hpsb_packet *hpsb_make_lock64packet(struct hpsb_host *host,
					   nodeid_t node, u64 addr, int extcode,
					   octlet_t *data, octlet_t arg);
struct hpsb_packet *hpsb_make_phypacket(struct hpsb_host *host, quadlet_t data);
struct hpsb_packet *hpsb_make_isopacket(struct hpsb_host *host, int length,
					int channel, int tag, int sync);
struct hpsb_packet *hpsb_make_writepacket(struct hpsb_host *host,
					  nodeid_t node, u64 addr,
					  quadlet_t *buffer, size_t length);
L
Linus Torvalds 已提交
27
struct hpsb_packet *hpsb_make_streampacket(struct hpsb_host *host, u8 *buffer,
28 29
                                           int length, int channel, int tag,
					   int sync);
L
Linus Torvalds 已提交
30 31 32 33 34 35
int hpsb_packet_success(struct hpsb_packet *packet);
int hpsb_read(struct hpsb_host *host, nodeid_t node, unsigned int generation,
	      u64 addr, quadlet_t *buffer, size_t length);
int hpsb_write(struct hpsb_host *host, nodeid_t node, unsigned int generation,
	       u64 addr, quadlet_t *buffer, size_t length);

36 37 38 39
#ifdef HPSB_DEBUG_TLABELS
extern spinlock_t hpsb_tlabel_lock;
#endif

L
Linus Torvalds 已提交
40
#endif /* _IEEE1394_TRANSACTIONS_H */