summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Stefan Richter 2010-06-20 19:02:53 +0200
committerGravatar Stefan Richter 2010-09-07 11:26:58 +0200
commit3fc1f00be39abe13d603f020d3f257c62d9f97ea (patch)
tree35205e78d9a8d959bbe19b99c7ab82d94c3b9e95
parentDo not use a random FW_CDEV_VERSION as our implemented ABI version (diff)
Rename a few kernel ABI testing helpers
Use more uniform names along the lines of abi_has_some_feature(...). Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Diffstat (limited to '')
-rw-r--r--src/fw-iso.c15
-rw-r--r--src/fw.c8
2 files changed, 14 insertions, 9 deletions
diff --git a/src/fw-iso.c b/src/fw-iso.c
index 5193b9a..253ce1d 100644
--- a/src/fw-iso.c
+++ b/src/fw-iso.c
@@ -156,9 +156,14 @@ int fw_iso_xmit_start(raw1394handle_t handle, int start_on_cycle,
return 0;
}
+static inline int abi_has_iso_rx_timestamps(fw_handle_t handle)
+{
+ return handle->abi_version >= 2;
+}
+
static inline int recv_header_length(fw_handle_t handle)
{
- return handle->abi_version >= 2 ? 8 : 4;
+ return abi_has_iso_rx_timestamps(handle) ? 8 : 4;
}
static int
@@ -179,11 +184,9 @@ flush_recv_packets(raw1394handle_t handle,
quadlet_t header, *p, *end;
unsigned int len, cycle, dropped;
unsigned char channel, tag, sy;
- int header_has_timestamp;
p = interrupt->header;
end = (void *) interrupt->header + interrupt->header_length;
- header_has_timestamp = fwhandle->abi_version >= 2;
/*
* This is bogus, but it's the best we can do without accurate
* timestamps. Assume that the first packet was received
@@ -192,7 +195,7 @@ flush_recv_packets(raw1394handle_t handle,
* later. This also assumes that the interrupt event happened
* immediately after the last packet was received.
*/
- if (!header_has_timestamp) {
+ if (!abi_has_iso_rx_timestamps(fwhandle)) {
cycle = interrupt->cycle;
cycle &= 0x1fff;
cycle += 8000;
@@ -209,7 +212,7 @@ flush_recv_packets(raw1394handle_t handle,
channel = (header >> 8) & 0x3f;
sy = header & 0x0f;
- if (header_has_timestamp)
+ if (abi_has_iso_rx_timestamps(fwhandle))
cycle = be32_to_cpu(*p++) & 0x1fff;
else {
cycle++;
@@ -293,6 +296,8 @@ static int handle_iso_event(raw1394handle_t handle,
int cycle;
fwhandle->iso.packet_count -= fwhandle->iso.irq_interval;
+
+ /* Check whether the ABI version provides iso tx timestamps. */
if (interrupt->header_length) {
/*
* Take the cycle of the last packet transmitted, add
diff --git a/src/fw.c b/src/fw.c
index df825c9..5f5bc69 100644
--- a/src/fw.c
+++ b/src/fw.c
@@ -1445,7 +1445,7 @@ iso_resource_modify(raw1394handle_t handle, unsigned int bandwidth,
return 0;
}
-static inline int abi_v2_available(raw1394handle_t handle)
+static inline int abi_has_iso_resource_management(raw1394handle_t handle)
{
return handle->mode.fw->abi_version >= 2;
}
@@ -1459,7 +1459,7 @@ iso_resource_modify(raw1394handle_t handle, unsigned int bandwidth,
return -1;
}
-static inline int abi_v2_available(raw1394handle_t handle)
+static inline int abi_has_iso_resource_management(raw1394handle_t handle)
{
return 0;
}
@@ -1470,7 +1470,7 @@ int
fw_bandwidth_modify(raw1394handle_t handle, unsigned int bandwidth,
enum raw1394_modify_mode mode)
{
- if (abi_v2_available(handle))
+ if (abi_has_iso_resource_management(handle))
return iso_resource_modify(handle, bandwidth, -1, mode);
else
return ieee1394_bandwidth_modify(handle, bandwidth, mode);
@@ -1480,7 +1480,7 @@ int
fw_channel_modify(raw1394handle_t handle, unsigned int channel,
enum raw1394_modify_mode mode)
{
- if (abi_v2_available(handle))
+ if (abi_has_iso_resource_management(handle))
return iso_resource_modify(handle, 0, channel, mode);
else
return ieee1394_channel_modify(handle, channel, mode);
/> bencollins 7-200/+199 raw1394_request's. git-svn-id: svn://svn.linux1394.org/libraw1394/trunk@128 53a565d1-3bb7-0310-b661-cf11e63c67ab 2003-07-17Patch from Dan Maas to add raw1394_iso_recv_flush() call to API, using theGravatar bencollins 2-3/+25 RAW1394_IOC_ISO_RECV_FLUSH ioctl. Updated the ieee1394-ioctl.h file aswell. git-svn-id: svn://svn.linux1394.org/libraw1394/trunk@127 53a565d1-3bb7-0310-b661-cf11e63c67ab 2003-07-17pkg-config support from Kristian Hogsberg.Gravatar bencollins 3-1/+15 git-svn-id: svn://svn.linux1394.org/libraw1394/trunk@126 53a565d1-3bb7-0310-b661-cf11e63c67ab 2003-07-17Remove trailing whitespace, which automake chokes on.Gravatar bencollins 1-1/+1 Patch from Manish Singh. git-svn-id: svn://svn.linux1394.org/libraw1394/trunk@125 53a565d1-3bb7-0310-b661-cf11e63c67ab 2003-07-13Fixed section for -dev package.Gravatar bencollins 1-1/+1 git-svn-id: svn://svn.linux1394.org/libraw1394/trunk@124 53a565d1-3bb7-0310-b661-cf11e63c67ab 2003-07-13Re-add the pdf buildGravatar bencollins 1-0/+1 git-svn-id: svn://svn.linux1394.org/libraw1394/trunk@121 53a565d1-3bb7-0310-b661-cf11e63c67ab 2003-07-13Update Debian files.Gravatar bencollins 4-25/+73 git-svn-id: svn://svn.linux1394.org/libraw1394/trunk@120 53a565d1-3bb7-0310-b661-cf11e63c67ab 2003-07-13Ok, the Debian package was way out of sync with upstreamGravatar bencollins 1-1/+1 git-svn-id: svn://svn.linux1394.org/libraw1394/trunk@119 53a565d1-3bb7-0310-b661-cf11e63c67ab 2003-07-13Ooops...libtool works a bit different than I thought, but atleast it worksGravatar bencollins 2-6/+1 like it is supposed to. git-svn-id: svn://svn.linux1394.org/libraw1394/trunk@117 53a565d1-3bb7-0310-b661-cf11e63c67ab 2003-07-13Generate and install the pdf in the Debian package.Gravatar bencollins 3-3/+4 git-svn-id: svn://svn.linux1394.org/libraw1394/trunk@114 53a565d1-3bb7-0310-b661-cf11e63c67ab 2003-07-13Don't run configure at the end of autogen.sh. Also, remove autom4te.cache.Gravatar bencollins 1-1/+1 git-svn-id: svn://svn.linux1394.org/libraw1394/trunk@113 53a565d1-3bb7-0310-b661-cf11e63c67ab 2003-07-13Update Debian maintainerGravatar bencollins 1-1/+2 git-svn-id: svn://svn.linux1394.org/libraw1394/trunk@112 53a565d1-3bb7-0310-b661-cf11e63c67ab 2003-07-13Update Debian changelog.Gravatar bencollins 1-0/+8 git-svn-id: svn://svn.linux1394.org/libraw1394/trunk@111 53a565d1-3bb7-0310-b661-cf11e63c67ab 2003-07-13File doesn't really seem needed. The NEWS file gives a good overview, andGravatar bencollins 1-4/+0 the svn log is more than verbose enough for info seekers. git-svn-id: svn://svn.linux1394.org/libraw1394/trunk@110 53a565d1-3bb7-0310-b661-cf11e63c67ab 2003-07-13Fix compiler warnings.Gravatar bencollins 4-12/+22 git-svn-id: svn://svn.linux1394.org/libraw1394/trunk@109 53a565d1-3bb7-0310-b661-cf11e63c67ab 2003-07-13Updates from 0.10.0 release.Gravatar bencollins 4-5/+14 git-svn-id: svn://svn.linux1394.org/libraw1394/trunk@108 53a565d1-3bb7-0310-b661-cf11e63c67ab 2003-04-23add libtoolize to bootstrapGravatar ddennedy 1-1/+10 git-svn-id: svn://svn.linux1394.org/libraw1394/trunk@107 53a565d1-3bb7-0310-b661-cf11e63c67ab 2003-04-21added Dan Maas' rawiso docsGravatar ddennedy 1-32/+295 git-svn-id: svn://svn.linux1394.org/libraw1394/trunk@106 53a565d1-3bb7-0310-b661-cf11e63c67ab 2003-04-07new_handle_on_port() error path fix from Jim RadfordGravatar dmaas 1-1/+3 git-svn-id: svn://svn.linux1394.org/libraw1394/trunk@105 53a565d1-3bb7-0310-b661-cf11e63c67ab 2003-03-26add raw1394_new_handle_on_port() convenience functionGravatar dmaas 2-1/+41 git-svn-id: svn://svn.linux1394.org/libraw1394/trunk@104 53a565d1-3bb7-0310-b661-cf11e63c67ab 2003-02-22Updates for new rawiso ioctl interface.Gravatar bencollins 3-37/+125 git-svn-id: svn://svn.linux1394.org/libraw1394/trunk@103 53a565d1-3bb7-0310-b661-cf11e63c67ab 2003-01-15add iso_xmit_sync() and iso_xmit_write(); clean up iso handling a bitGravatar dmaas 5-39/+161 git-svn-id: svn://svn.linux1394.org/libraw1394/trunk@102 53a565d1-3bb7-0310-b661-cf11e63c67ab 2003-01-15implement tag matching for rawiso receptionGravatar dmaas 3-4/+12 git-svn-id: svn://svn.linux1394.org/libraw1394/trunk@101 53a565d1-3bb7-0310-b661-cf11e63c67ab 2003-01-06back out previous commit - don't drop the legacy API just yetGravatar dmaas 6-173/+130 git-svn-id: svn://svn.linux1394.org/libraw1394/trunk@100 53a565d1-3bb7-0310-b661-cf11e63c67ab 2003-01-05emulate legacy ISO reception API on top of new rawiso APIGravatar dmaas 7-131/+174 git-svn-id: svn://svn.linux1394.org/libraw1394/trunk@99 53a565d1-3bb7-0310-b661-cf11e63c67ab 2002-12-24update iso API for multi-channel reception and new packet buffer layoutGravatar dmaas 4-123/+236 git-svn-id: svn://svn.linux1394.org/libraw1394/trunk@98 53a565d1-3bb7-0310-b661-cf11e63c67ab 2002-12-20oops, irq_interval needs to be signedGravatar anonymous 1-1/+1 git-svn-id: svn://svn.linux1394.org/libraw1394/trunk@97 53a565d1-3bb7-0310-b661-cf11e63c67ab 2002-12-20dmaas - renamed exported arm definitions into the raw1394_ namespace; ↵Gravatar anonymous 3-124/+48 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 2002-12-16rawiso updates:Gravatar dmaas 3-18/+25 - 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 2002-11-18fix cplusplus extern C blockGravatar ddennedy 1-4/+4 git-svn-id: svn://svn.linux1394.org/libraw1394/trunk@94 53a565d1-3bb7-0310-b661-cf11e63c67ab 2002-11-18merged rawiso branchGravatar ddennedy 7-6/+488 git-svn-id: svn://svn.linux1394.org/libraw1394/trunk@93 53a565d1-3bb7-0310-b661-cf11e63c67ab