summaryrefslogtreecommitdiffstats
path: root/src/raw1394.h (follow)
Commit message (Collapse)AuthorAgeFilesLines
* add copyright notices; change version to v3.0.0-mcgoron-devv3.0.0-mcgoron-devGravatar Peter McGoron 2022-09-201-0/+1
|
* Implement virtual memory for ARM managerGravatar Peter McGoron 2022-09-201-6/+44
| | | | | | | | | | | | | | | | Instead of allocating memory for address range mappings (ARM) and handling all reads and writes to said memory, the new ARM manager calls a function for each received request with the data, transaction code, and allocation information. The ARM tag manager now must handle validation of memory accesses and retreive/write the data. This allows implementations to use network resources or generated data as memory. The ARM manager no longer automatically sends response packets. It is the responsibility of the user to send response packets using raw1394_send_rw_response(). The interface is not implemented for raw1394 and will probably never be implemented for raw1394. It is for firewire-cdev (modern Linux) only.
* Documentation improvement: return code of raw1394_read_cycle_timer{,_and_clock}Gravatar Stefan Richter 2012-07-311-1/+1
| | | | | | | "the error code of the ioctl" is always -1. And ioctl() sets errno for us. So let's say this in a way which is less likely to be misunderstood. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* Add raw1394_get_speed() APIGravatar Stefan Richter 2012-06-301-0/+16
| | | | | | | | | | | | | | | | | | | | | | This lets initiators of isochronous streams or asynchronous streams from or to the local node figure out what maximum speed can be configured. Furthermore it can be used to display connection speeds for informative purposes without having to perform topology analysis (in case of 1394a buses) or extensive phy port status queries (in case of 1394b buses). To be in line with other existing libraw1394 APIs which use nodeid_t variables, this API identifies a node only via a card:nodeID tuple which is unsafe against generation changes. A node can only be properly identified by card:generation:nodeID tuples. However, since this new API extension and libraw1394 as a whole is mainly aimed towards existing libraw1394 client code bases rather than new developments, I decided against making this call race free but somewhat more difficult to use in typical existing client code. A unit test for the new call is added to testlibraw as well. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* Trivial whitespace normalization in ieee1394.h and raw1394.hGravatar Stefan Richter 2012-06-301-154/+148
| | | | Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* Add 1394b speed codes to <libraw1394/{ieee,raw}1394.h>Gravatar Stefan Richter 2012-06-301-3/+7
| | | | | | | | | | | | This catapults the libraw1394 API into the year 2002. Actually, passing speed codes of 3...5 into the relevant libraw1394 functions should be working already since the kernel gained 1394b support a long time ago and libraw1394 does not check values. The added definitions are only for clarity and to fully match the argument type in the function declarations. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* Fix documentation of raw1394_iso_multichannel_recv_init()Gravatar Stefan Richter 2012-06-301-1/+0
| | | | | | There is no speed argument. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* Add raw1394_read_cycle_timer_and_clock() APIGravatar Stefan Richter 2012-06-181-3/+29
| | | | | | | | | | | | | | | | | | | This is an extension relative to raw1394_read_cycle_timer(). It lets the client choose a system clock other than CLOCK_REALTIME. Use case: http://subversion.ffado.org/ticket/242 The underlying ioctl supports reading the system clock with nanoseconds resolution. The new libraw1394 call sticks with microseconds resolution though. This makes transition from (or parallel use with) raw1394_read_cycle_timer() easier. Besides, the call itself takes longer than a microsecond, primarily due to a costly MMIO read (on many controllers even three or more MMIO reads). Unit tests with CLOCK_MONOTONIC and CLOCK_MONOTONIC_RAW are added to testlibraw as well. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* Tweak raw1394_add_config_rom_descriptor() API, add documentation and test caseGravatar Stefan Richter 2012-06-181-6/+57
| | | | | | | | | | | | | | | | | | | | To conform with 'size' arguments of other libraw1394 calls, change the one in raw1394_add_config_rom_descriptor() from quadlets to bytes. This breaks runtime compatibility with potential clients that were written against B.J.'s original patch, hence reorder arguments just to break compatibility also at compile time. Change errno to ENOSYS (function not implemented) when called while running on top of raw1394. Allow &token to be NULL for convenience of clients which don't require raw1394_remove_config_rom_descriptor(). Add exhaustive documentation. Much of it is copied from the documentation of the underlying ioctl. Add example code which doubles as unit test in testlibraw. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* Add raw1394_add_config_rom_descriptor() and ↵Gravatar B.J. Buchalter 2012-06-171-0/+9
| | | | | | | | | | | raw1394_remove_config_rom_descriptor() API This adds support of the firewire-core (juju) ABI to add and remove config ROM directories or descriptors. The raw1394 ABI supports similar requests, but for now we leave the two functions unimplemented when running on top of raw1394. Signed-off-by: Benjamin Buchalter <bj@mhlabs.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de> (whitespace changes)
* Fix documentation of return values of raw1394_start_ family of functionsGravatar Stefan Richter 2010-02-011-7/+7
| | | | | | | | | | | | | | | | | | | If running on top of the raw1394 kernel driver (any kernel version) or on top of firewire-core (kernel version <= 2.6.29), raw1394_start_* functions will return a value > 0 on success, not == 0. Only with firewire-core of kernel 2.6.30 or later, == 0 is returned on success. The exact value depends on which driver is used, on CPU architecture, and on request payload size in case of some types of requests. In any case, only that the value is > or == 0 on success (but == -1 on failure) is significant to libraw1394 client applications. This mismatch between documentation and implementation was already present in older libraw1394 versions, including v1.x. For the time being, do not change the implementation, only adjust the documentation. Reported-by: Dr. David Alan Gilbert Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* Fix "make doc".Gravatar Stefan Richter 2010-01-101-11/+7
| | | | | | | | | | | | | | | | | | | | Reported by Guus Sliepen: "make doc" failed due to missing doctype, unknown elements, and duplicate element IDs in libraw1394.sgml. The fix is to declare a recent DTD (matching the one which is used in current Linux kernel documentation docbooks) and to make the conflicting element IDs unique. The latter part of the fix is just temporary. In order to avoid the conflict when the documentation is updated the next time, also fix the kerneldoc comments of the respective API elements: These are typedefs, hence kernel-doc needs their comments prepended by "typedef ". Tested with Gentoo's docbook-xml-dtd 4.5, docbook-xsl-stylesheets 1.75.2, docbook-sgml-utils 0.6.14, and openjade 1.3.2-r1. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de> Signed-off-by: Dan Dennedy <dan@dennedy.org>
* [libraw1394 patch] Fix raw1394_channel_modify() on firewire-coreGravatar Stefan Richter 2008-12-031-1/+1
| | | | | | | | | | | | | | | | | | | (juju) Reported by Adrian Knoth: fw_channel_modify() was unable to allocate some channels which were actually free. http://marc.info/?l=linux1394-devel&t=122818128900002 This can be easily fixed by replacing fw_channel_modify() by ieee1394_channel_modify() because this is highlevel enough to work with Juju as well. We only may want a separate fw_channel_modify() in the future when firewire-core gains a special ioctl() for that. Also fix a documentation typo: raw1394_channel_modify() did not show up in extracted API documentation due to a cut'n'paste typo in raw1394.h. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de> Signed-off-by: Dan Dennedy <dan@dennedy.org>
* Change handle validation to prevent segfault and be more informative.Gravatar Dan Dennedy 2008-07-061-6/+8
|
* Fix raw1394_read_cycle_timer after juju integrationGravatar Stefan Richter 2008-07-051-1/+1
| | | | | | | | The ieee1394 version of raw1394_read_cycle_timer() fell over the cliff in "First cut at integrating juju". This brings it back and adds a juju version of it. Also correct a typo in the inline documentation: s/get/read/
* libraw1394.sgml, raw1394.h: remove information about deprecated isochronousGravatar Dan Dennedy 2008-04-291-2/+2
| | | | API that has been removed.
* First cut at integrating jujuGravatar Dan Dennedy 2008-04-231-95/+1
| | | | This is currently working with legacy ieee1394 and tools/testlibraw.
* fix documentation on raw1394_update_config_romGravatar ddennedy 2007-10-141-1/+1
| | | | git-svn-id: svn://svn.linux1394.org/libraw1394/trunk@175 53a565d1-3bb7-0310-b661-cf11e63c67ab
* add documentation about existence of RAW1394DEVGravatar ddennedy 2007-02-171-2/+12
| | | | git-svn-id: svn://svn.linux1394.org/libraw1394/trunk@171 53a565d1-3bb7-0310-b661-cf11e63c67ab
* added raw1394_read_cycle_timer, contributed by Pieter PalmersGravatar ddennedy 2007-02-141-1/+19
| | | | git-svn-id: svn://svn.linux1394.org/libraw1394/trunk@169 53a565d1-3bb7-0310-b661-cf11e63c67ab
* Added a new callback response for iso_xmit handlers: RAW1394_ISO_AGAIN.Gravatar ddennedy 2006-03-041-0/+5
| | | | | | | | | | | | | | | This would be returned when the callback doesn't have enough data to create a complete packet. This can occur when the xmit buffers are bigger than the buffers supplying the data. It is not nescessarily an error, because there are enough packets in the xmit buffer. This response could give the data supplyer more time to fill the intermediate buffer without losing any packets. Signed-off-by: Pieter Palmers <pieterp@joow.be> Signed-off-by: Dan Dennedy <dan@dennedy.org> git-svn-id: svn://svn.linux1394.org/libraw1394/trunk@161 53a565d1-3bb7-0310-b661-cf11e63c67ab
* add sanity check to queuing of packets in rawiso xmitGravatar ddennedy 2005-07-041-5/+11
| | | | git-svn-id: svn://svn.linux1394.org/libraw1394/trunk@159 53a565d1-3bb7-0310-b661-cf11e63c67ab
* Add a comment that libraw does not allocate channels and bandwidth. ThisGravatar ddennedy 2005-07-011-0/+1
| | | | | | | | | | is already mentioned in doc/libraw1394.sgml but an existing comment about raw1394_iso_xmit_init may be misleading. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de> git-svn-id: svn://svn.linux1394.org/libraw1394/trunk@158 53a565d1-3bb7-0310-b661-cf11e63c67ab
* documentation and header comment corrections from Stefan RichterGravatar ddennedy 2005-06-021-19/+23
| | | | git-svn-id: svn://svn.linux1394.org/libraw1394/trunk@155 53a565d1-3bb7-0310-b661-cf11e63c67ab
* add functions for allocating and releasing bandwidth and channelsGravatar ddennedy 2005-02-161-1/+53
| | | | git-svn-id: svn://svn.linux1394.org/libraw1394/trunk@154 53a565d1-3bb7-0310-b661-cf11e63c67ab
* improve reference documentationGravatar ddennedy 2004-11-251-75/+192
| | | | git-svn-id: svn://svn.linux1394.org/libraw1394/trunk@150 53a565d1-3bb7-0310-b661-cf11e63c67ab
* port iso examples to rawiso APIGravatar ddennedy 2004-11-181-1/+1
| | | | git-svn-id: svn://svn.linux1394.org/libraw1394/trunk@147 53a565d1-3bb7-0310-b661-cf11e63c67ab
* reorganize and update documentation; fix compiler warningGravatar ddennedy 2004-11-111-256/+800
| | | | git-svn-id: svn://svn.linux1394.org/libraw1394/trunk@144 53a565d1-3bb7-0310-b661-cf11e63c67ab
* Patch from Jim Radford. Other half of packet_per_buffer ABI cleanup.Gravatar bencollins 2003-12-091-3/+3
| | | | git-svn-id: svn://svn.linux1394.org/libraw1394/trunk@139 53a565d1-3bb7-0310-b661-cf11e63c67ab
* Patch from Alexander Neundorf to support differing ISO rx modes. CurrentlyGravatar bencollins 2003-11-201-0/+8
| | | | | | | supported only by OHCI. git-svn-id: svn://svn.linux1394.org/libraw1394/trunk@138 53a565d1-3bb7-0310-b661-cf11e63c67ab
* sync with driverGravatar weihs 2003-11-091-0/+30
| | | | | | (addition of functions raw1394_arm_get_buf raw1394_arm_set_buf to get and set buffers of mapped address ranges) git-svn-id: svn://svn.linux1394.org/libraw1394/trunk@137 53a565d1-3bb7-0310-b661-cf11e63c67ab
* Patch from Alexander Neundorf to add proto for raw1394_iso_recv_flush()Gravatar bencollins 2003-10-071-0/+3
| | | | git-svn-id: svn://svn.linux1394.org/libraw1394/trunk@135 53a565d1-3bb7-0310-b661-cf11e63c67ab
* Async stream support from Jim Radford.Gravatar bencollins 2003-09-111-0/+7
| | | | git-svn-id: svn://svn.linux1394.org/libraw1394/trunk@130 53a565d1-3bb7-0310-b661-cf11e63c67ab
* add raw1394_new_handle_on_port() convenience functionGravatar dmaas 2003-03-261-1/+9
| | | | git-svn-id: svn://svn.linux1394.org/libraw1394/trunk@104 53a565d1-3bb7-0310-b661-cf11e63c67ab
* add iso_xmit_sync() and iso_xmit_write(); clean up iso handling a bitGravatar dmaas 2003-01-151-0/+15
| | | | git-svn-id: svn://svn.linux1394.org/libraw1394/trunk@102 53a565d1-3bb7-0310-b661-cf11e63c67ab
* implement tag matching for rawiso receptionGravatar dmaas 2003-01-151-1/+1
| | | | git-svn-id: svn://svn.linux1394.org/libraw1394/trunk@101 53a565d1-3bb7-0310-b661-cf11e63c67ab
* update iso API for multi-channel reception and new packet buffer layoutGravatar dmaas 2002-12-241-6/+18
| | | | git-svn-id: svn://svn.linux1394.org/libraw1394/trunk@98 53a565d1-3bb7-0310-b661-cf11e63c67ab
* dmaas - renamed exported arm definitions into the raw1394_ namespace; ↵Gravatar anonymous 2002-12-201-12/+12
| | | | | | brought kernel-raw1394.h back in sync with the kernel version git-svn-id: svn://svn.linux1394.org/libraw1394/trunk@96 53a565d1-3bb7-0310-b661-cf11e63c67ab
* rawiso updates:Gravatar dmaas 2002-12-161-16/+16
| | | | | | | | | | | | | | | - changed return type of rawiso xmit/recv handlers from int to enum raw1394_iso_disposition - added an ioctl (RAW1394_ISO_QUEUE_ACTIVITY) to force an ISO_ACTIVITY event into the queue. This is needed for handling RAW1394_ISO_DEFER, to kick us out of the next read() instead of sleeping forever. - removed references to "8-byte" isochronous header - this is an OHCI-specific implementation detail git-svn-id: svn://svn.linux1394.org/libraw1394/trunk@95 53a565d1-3bb7-0310-b661-cf11e63c67ab
* fix cplusplus extern C blockGravatar ddennedy 2002-11-181-4/+4
| | | | git-svn-id: svn://svn.linux1394.org/libraw1394/trunk@94 53a565d1-3bb7-0310-b661-cf11e63c67ab
* merged rawiso branchGravatar ddennedy 2002-11-181-0/+60
| | | | git-svn-id: svn://svn.linux1394.org/libraw1394/trunk@93 53a565d1-3bb7-0310-b661-cf11e63c67ab
* merged weihs branchGravatar ddennedy 2002-10-231-0/+199
| | | | git-svn-id: svn://svn.linux1394.org/libraw1394/trunk@84 53a565d1-3bb7-0310-b661-cf11e63c67ab
* Add kernel-doc style documentation headers for most exported functions.Gravatar aeb 2002-10-131-1/+0
| | | | git-svn-id: svn://svn.linux1394.org/libraw1394/trunk@81 53a565d1-3bb7-0310-b661-cf11e63c67ab
* Handle generation number is not automatically advanced with bus reset.Gravatar aeb 2001-05-141-3/+15
| | | | | | | | | Function raw1394_update_generation() added for manual update. Bus reset handler get current generation number as argument. Default bus reset handler calls raw1394_update_generation(). git-svn-id: svn://svn.linux1394.org/libraw1394/trunk@60 53a565d1-3bb7-0310-b661-cf11e63c67ab
* Add libraw1394 autoconf macro (not yet complete).Gravatar aeb 2001-02-051-0/+7
| | | | | | | Add functions and symbols to let macro determine version. git-svn-id: svn://svn.linux1394.org/libraw1394/trunk@53 53a565d1-3bb7-0310-b661-cf11e63c67ab
* Put 'extern "C"' for C++ back in.Gravatar aeb 2001-01-311-1/+1
| | | | git-svn-id: svn://svn.linux1394.org/libraw1394/trunk@52 53a565d1-3bb7-0310-b661-cf11e63c67ab
* First implementation of new error reporting API.Gravatar aeb 2001-01-191-14/+23
| | | | git-svn-id: svn://svn.linux1394.org/libraw1394/trunk@49 53a565d1-3bb7-0310-b661-cf11e63c67ab
* Added missing prototypes for iso send functions.Gravatar aeb 2000-09-011-0/+7
| | | | git-svn-id: svn://svn.linux1394.org/libraw1394/trunk@36 53a565d1-3bb7-0310-b661-cf11e63c67ab
* Added raw1394_get_irm_id().Gravatar aeb 2000-08-081-0/+1
| | | | git-svn-id: svn://svn.linux1394.org/libraw1394/trunk@35 53a565d1-3bb7-0310-b661-cf11e63c67ab
* Added raw1394_reset_bus() call.Gravatar aeb 2000-07-051-0/+4
| | | | git-svn-id: svn://svn.linux1394.org/libraw1394/trunk@33 53a565d1-3bb7-0310-b661-cf11e63c67ab