aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ieee1394/iso.h
diff options
context:
space:
mode:
authorStefan Richter <stefanr@s5r6.in-berlin.de>2007-03-04 21:06:23 -0500
committerStefan Richter <stefanr@s5r6.in-berlin.de>2007-04-29 18:00:28 -0400
commitafd6546d8d2d8ba1dbe1d2508baf81eebdca3d79 (patch)
treec6f5d115d7cb7eb6daad6c8a27b4854809e5ed50 /drivers/ieee1394/iso.h
parentef8153348f82688af87e19d594162ca81741fe6a (diff)
ieee1394: move some comments from declaration to definition
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Diffstat (limited to 'drivers/ieee1394/iso.h')
-rw-r--r--drivers/ieee1394/iso.h35
1 files changed, 2 insertions, 33 deletions
diff --git a/drivers/ieee1394/iso.h b/drivers/ieee1394/iso.h
index 1210a97e868..b94e55e6eaa 100644
--- a/drivers/ieee1394/iso.h
+++ b/drivers/ieee1394/iso.h
@@ -150,8 +150,6 @@ struct hpsb_iso {
150 150
151/* functions available to high-level drivers (e.g. raw1394) */ 151/* functions available to high-level drivers (e.g. raw1394) */
152 152
153/* allocate the buffer and DMA context */
154
155struct hpsb_iso* hpsb_iso_xmit_init(struct hpsb_host *host, 153struct hpsb_iso* hpsb_iso_xmit_init(struct hpsb_host *host,
156 unsigned int data_buf_size, 154 unsigned int data_buf_size,
157 unsigned int buf_packets, 155 unsigned int buf_packets,
@@ -159,8 +157,6 @@ struct hpsb_iso* hpsb_iso_xmit_init(struct hpsb_host *host,
159 int speed, 157 int speed,
160 int irq_interval, 158 int irq_interval,
161 void (*callback)(struct hpsb_iso*)); 159 void (*callback)(struct hpsb_iso*));
162
163/* note: if channel = -1, multi-channel receive is enabled */
164struct hpsb_iso* hpsb_iso_recv_init(struct hpsb_host *host, 160struct hpsb_iso* hpsb_iso_recv_init(struct hpsb_host *host,
165 unsigned int data_buf_size, 161 unsigned int data_buf_size,
166 unsigned int buf_packets, 162 unsigned int buf_packets,
@@ -168,56 +164,29 @@ struct hpsb_iso* hpsb_iso_recv_init(struct hpsb_host *host,
168 int dma_mode, 164 int dma_mode,
169 int irq_interval, 165 int irq_interval,
170 void (*callback)(struct hpsb_iso*)); 166 void (*callback)(struct hpsb_iso*));
171
172/* multi-channel only */
173int hpsb_iso_recv_listen_channel(struct hpsb_iso *iso, unsigned char channel); 167int hpsb_iso_recv_listen_channel(struct hpsb_iso *iso, unsigned char channel);
174int hpsb_iso_recv_unlisten_channel(struct hpsb_iso *iso, unsigned char channel); 168int hpsb_iso_recv_unlisten_channel(struct hpsb_iso *iso, unsigned char channel);
175int hpsb_iso_recv_set_channel_mask(struct hpsb_iso *iso, u64 mask); 169int hpsb_iso_recv_set_channel_mask(struct hpsb_iso *iso, u64 mask);
176
177/* start/stop DMA */
178int hpsb_iso_xmit_start(struct hpsb_iso *iso, int start_on_cycle, 170int hpsb_iso_xmit_start(struct hpsb_iso *iso, int start_on_cycle,
179 int prebuffer); 171 int prebuffer);
180int hpsb_iso_recv_start(struct hpsb_iso *iso, int start_on_cycle, 172int hpsb_iso_recv_start(struct hpsb_iso *iso, int start_on_cycle,
181 int tag_mask, int sync); 173 int tag_mask, int sync);
182void hpsb_iso_stop(struct hpsb_iso *iso); 174void hpsb_iso_stop(struct hpsb_iso *iso);
183
184/* deallocate buffer and DMA context */
185void hpsb_iso_shutdown(struct hpsb_iso *iso); 175void hpsb_iso_shutdown(struct hpsb_iso *iso);
186
187/* queue a packet for transmission.
188 * 'offset' is relative to the beginning of the DMA buffer, where the packet's
189 * data payload should already have been placed. */
190int hpsb_iso_xmit_queue_packet(struct hpsb_iso *iso, u32 offset, u16 len, 176int hpsb_iso_xmit_queue_packet(struct hpsb_iso *iso, u32 offset, u16 len,
191 u8 tag, u8 sy); 177 u8 tag, u8 sy);
192
193/* wait until all queued packets have been transmitted to the bus */
194int hpsb_iso_xmit_sync(struct hpsb_iso *iso); 178int hpsb_iso_xmit_sync(struct hpsb_iso *iso);
195 179int hpsb_iso_recv_release_packets(struct hpsb_iso *recv,
196/* N packets have been read out of the buffer, re-use the buffer space */ 180 unsigned int n_packets);
197int hpsb_iso_recv_release_packets(struct hpsb_iso *recv,
198 unsigned int n_packets);
199
200/* check for arrival of new packets immediately (even if irq_interval
201 * has not yet been reached) */
202int hpsb_iso_recv_flush(struct hpsb_iso *iso); 181int hpsb_iso_recv_flush(struct hpsb_iso *iso);
203
204/* returns # of packets ready to send or receive */
205int hpsb_iso_n_ready(struct hpsb_iso *iso); 182int hpsb_iso_n_ready(struct hpsb_iso *iso);
206 183
207/* the following are callbacks available to low-level drivers */ 184/* the following are callbacks available to low-level drivers */
208 185
209/* call after a packet has been transmitted to the bus (interrupt context is OK)
210 * 'cycle' is the _exact_ cycle the packet was sent on
211 * 'error' should be non-zero if some sort of error occurred when sending the
212 * packet */
213void hpsb_iso_packet_sent(struct hpsb_iso *iso, int cycle, int error); 186void hpsb_iso_packet_sent(struct hpsb_iso *iso, int cycle, int error);
214
215/* call after a packet has been received (interrupt context OK) */
216void hpsb_iso_packet_received(struct hpsb_iso *iso, u32 offset, u16 len, 187void hpsb_iso_packet_received(struct hpsb_iso *iso, u32 offset, u16 len,
217 u16 total_len, u16 cycle, u8 channel, u8 tag, 188 u16 total_len, u16 cycle, u8 channel, u8 tag,
218 u8 sy); 189 u8 sy);
219
220/* call to wake waiting processes after buffer space has opened up. */
221void hpsb_iso_wake(struct hpsb_iso *iso); 190void hpsb_iso_wake(struct hpsb_iso *iso);
222 191
223#endif /* IEEE1394_ISO_H */ 192#endif /* IEEE1394_ISO_H */