aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ieee1394/highlevel.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ieee1394/highlevel.h')
-rw-r--r--drivers/ieee1394/highlevel.h46
1 files changed, 1 insertions, 45 deletions
diff --git a/drivers/ieee1394/highlevel.h b/drivers/ieee1394/highlevel.h
index 55548368b190..63474f7ee69d 100644
--- a/drivers/ieee1394/highlevel.h
+++ b/drivers/ieee1394/highlevel.h
@@ -99,16 +99,6 @@ struct hpsb_address_ops {
99void highlevel_add_host(struct hpsb_host *host); 99void highlevel_add_host(struct hpsb_host *host);
100void highlevel_remove_host(struct hpsb_host *host); 100void highlevel_remove_host(struct hpsb_host *host);
101void highlevel_host_reset(struct hpsb_host *host); 101void highlevel_host_reset(struct hpsb_host *host);
102
103/*
104 * These functions are called to handle transactions. They are called when a
105 * packet arrives. The flags argument contains the second word of the first
106 * header quadlet of the incoming packet (containing transaction label, retry
107 * code, transaction code and priority). These functions either return a
108 * response code or a negative number. In the first case a response will be
109 * generated. In the latter case, no response will be sent and the driver which
110 * handled the request will send the response itself.
111 */
112int highlevel_read(struct hpsb_host *host, int nodeid, void *data, u64 addr, 102int highlevel_read(struct hpsb_host *host, int nodeid, void *data, u64 addr,
113 unsigned int length, u16 flags); 103 unsigned int length, u16 flags);
114int highlevel_write(struct hpsb_host *host, int nodeid, int destid, void *data, 104int highlevel_write(struct hpsb_host *host, int nodeid, int destid, void *data,
@@ -119,30 +109,13 @@ int highlevel_lock(struct hpsb_host *host, int nodeid, quadlet_t *store,
119int highlevel_lock64(struct hpsb_host *host, int nodeid, octlet_t *store, 109int highlevel_lock64(struct hpsb_host *host, int nodeid, octlet_t *store,
120 u64 addr, octlet_t data, octlet_t arg, int ext_tcode, 110 u64 addr, octlet_t data, octlet_t arg, int ext_tcode,
121 u16 flags); 111 u16 flags);
122
123void highlevel_iso_receive(struct hpsb_host *host, void *data, size_t length); 112void highlevel_iso_receive(struct hpsb_host *host, void *data, size_t length);
124void highlevel_fcp_request(struct hpsb_host *host, int nodeid, int direction, 113void highlevel_fcp_request(struct hpsb_host *host, int nodeid, int direction,
125 void *data, size_t length); 114 void *data, size_t length);
126 115
127/*
128 * Register highlevel driver. The name pointer has to stay valid at all times
129 * because the string is not copied.
130 */
131void hpsb_register_highlevel(struct hpsb_highlevel *hl); 116void hpsb_register_highlevel(struct hpsb_highlevel *hl);
132void hpsb_unregister_highlevel(struct hpsb_highlevel *hl); 117void hpsb_unregister_highlevel(struct hpsb_highlevel *hl);
133 118
134/*
135 * Register handlers for host address spaces. Start and end are 48 bit pointers
136 * and have to be quadlet aligned. Argument "end" points to the first address
137 * behind the handled addresses. This function can be called multiple times for
138 * a single hpsb_highlevel to implement sparse register sets. The requested
139 * region must not overlap any previously allocated region, otherwise
140 * registering will fail.
141 *
142 * It returns true for successful allocation. Address spaces can be
143 * unregistered with hpsb_unregister_addrspace. All remaining address spaces
144 * are automatically deallocated together with the hpsb_highlevel.
145 */
146u64 hpsb_allocate_and_register_addrspace(struct hpsb_highlevel *hl, 119u64 hpsb_allocate_and_register_addrspace(struct hpsb_highlevel *hl,
147 struct hpsb_host *host, 120 struct hpsb_host *host,
148 struct hpsb_address_ops *ops, 121 struct hpsb_address_ops *ops,
@@ -152,35 +125,18 @@ int hpsb_register_addrspace(struct hpsb_highlevel *hl, struct hpsb_host *host,
152 struct hpsb_address_ops *ops, u64 start, u64 end); 125 struct hpsb_address_ops *ops, u64 start, u64 end);
153int hpsb_unregister_addrspace(struct hpsb_highlevel *hl, struct hpsb_host *host, 126int hpsb_unregister_addrspace(struct hpsb_highlevel *hl, struct hpsb_host *host,
154 u64 start); 127 u64 start);
155
156/*
157 * Enable or disable receving a certain isochronous channel through the
158 * iso_receive op.
159 */
160int hpsb_listen_channel(struct hpsb_highlevel *hl, struct hpsb_host *host, 128int hpsb_listen_channel(struct hpsb_highlevel *hl, struct hpsb_host *host,
161 unsigned int channel); 129 unsigned int channel);
162void hpsb_unlisten_channel(struct hpsb_highlevel *hl, struct hpsb_host *host, 130void hpsb_unlisten_channel(struct hpsb_highlevel *hl, struct hpsb_host *host,
163 unsigned int channel); 131 unsigned int channel);
164 132
165/* Retrieve a hostinfo pointer bound to this driver/host */
166void *hpsb_get_hostinfo(struct hpsb_highlevel *hl, struct hpsb_host *host); 133void *hpsb_get_hostinfo(struct hpsb_highlevel *hl, struct hpsb_host *host);
167
168/* Allocate a hostinfo pointer of data_size bound to this driver/host */
169void *hpsb_create_hostinfo(struct hpsb_highlevel *hl, struct hpsb_host *host, 134void *hpsb_create_hostinfo(struct hpsb_highlevel *hl, struct hpsb_host *host,
170 size_t data_size); 135 size_t data_size);
171
172/* Free and remove the hostinfo pointer bound to this driver/host */
173void hpsb_destroy_hostinfo(struct hpsb_highlevel *hl, struct hpsb_host *host); 136void hpsb_destroy_hostinfo(struct hpsb_highlevel *hl, struct hpsb_host *host);
174
175/* Set an alternate lookup key for the hostinfo bound to this driver/host */
176void hpsb_set_hostinfo_key(struct hpsb_highlevel *hl, struct hpsb_host *host, 137void hpsb_set_hostinfo_key(struct hpsb_highlevel *hl, struct hpsb_host *host,
177 unsigned long key); 138 unsigned long key);
178
179/* Retrieve a hostinfo pointer bound to this driver using its alternate key */
180void *hpsb_get_hostinfo_bykey(struct hpsb_highlevel *hl, unsigned long key); 139void *hpsb_get_hostinfo_bykey(struct hpsb_highlevel *hl, unsigned long key);
181
182/* Set the hostinfo pointer to something useful. Usually follows a call to
183 * hpsb_create_hostinfo, where the size is 0. */
184int hpsb_set_hostinfo(struct hpsb_highlevel *hl, struct hpsb_host *host, 140int hpsb_set_hostinfo(struct hpsb_highlevel *hl, struct hpsb_host *host,
185 void *data); 141 void *data);
186 142