rpms/libraw1394/F-7 firewire-cdev.h, 1.2, 1.3 libraw1394-juju.patch, 1.6, 1.7 libraw1394.spec, 1.35, 1.36 libraw1394-juju-no-double-free-on-shutdown.patch, 1.1, NONE libraw1394-underquoted.patch, 1.1, NONE

Jarod Wilson (jwilson) fedora-extras-commits at redhat.com
Thu Oct 25 00:48:50 UTC 2007


Author: jwilson

Update of /cvs/pkgs/rpms/libraw1394/F-7
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv19728

Modified Files:
	firewire-cdev.h libraw1394-juju.patch libraw1394.spec 
Removed Files:
	libraw1394-juju-no-double-free-on-shutdown.patch 
	libraw1394-underquoted.patch 
Log Message:
* Wed Oct 24 2007 Jarod Wilson <jwilson at redhat.com> - 1.2.1-11
- Update firewire-cdev.h to match kernel and eliminate
  bitfield usage, fixes capture on big-endian systems (#345221)
- Resync with krh's libraw1394 juju tree



Index: firewire-cdev.h
===================================================================
RCS file: /cvs/pkgs/rpms/libraw1394/F-7/firewire-cdev.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- firewire-cdev.h	18 Apr 2007 14:55:42 -0000	1.2
+++ firewire-cdev.h	25 Oct 2007 00:48:17 -0000	1.3
@@ -1,6 +1,5 @@
-/*						-*- c-basic-offset: 8 -*-
- *
- * fw-device-cdev.h -- Char device interface.
+/*
+ * Char device interface.
  *
  * Copyright (C) 2005-2006  Kristian Hoegsberg <krh at bitplanet.net>
  *
@@ -19,66 +18,50 @@
  * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  */
 
-#ifndef __fw_cdev_h
-#define __fw_cdev_h
-
-#include <asm/ioctl.h>
-#include <asm/types.h>
+#ifndef _LINUX_FIREWIRE_CDEV_H
+#define _LINUX_FIREWIRE_CDEV_H
 
-#define TCODE_WRITE_QUADLET_REQUEST	0
-#define TCODE_WRITE_BLOCK_REQUEST	1
-#define TCODE_WRITE_RESPONSE		2
-#define TCODE_READ_QUADLET_REQUEST	4
-#define TCODE_READ_BLOCK_REQUEST	5
-#define TCODE_READ_QUADLET_RESPONSE	6
-#define TCODE_READ_BLOCK_RESPONSE	7
-#define TCODE_CYCLE_START		8
-#define TCODE_LOCK_REQUEST		9
-#define TCODE_STREAM_DATA		10
-#define TCODE_LOCK_RESPONSE		11
-
-#define TCODE_LOCK_MASK_SWAP		0x11
-#define TCODE_LOCK_COMPARE_SWAP		0x12
-#define TCODE_LOCK_FETCH_ADD		0x13
-#define TCODE_LOCK_LITTLE_ADD		0x14
-#define TCODE_LOCK_BOUNDED_ADD		0x15
-#define TCODE_LOCK_WRAP_ADD		0x16
-#define TCODE_LOCK_VENDOR_DEPENDENT	0x17
-
-#define RCODE_COMPLETE			0x0
-#define RCODE_CONFLICT_ERROR		0x4
-#define RCODE_DATA_ERROR		0x5
-#define RCODE_TYPE_ERROR		0x6
-#define RCODE_ADDRESS_ERROR		0x7
-
-#define RCODE_SEND_ERROR		0x10
-#define RCODE_CANCELLED			0x11
-#define RCODE_BUSY			0x12
-#define RCODE_GENERATION		0x13
-#define RCODE_NO_ACK			0x14
-
-#define SCODE_100			0x0
-#define SCODE_200			0x1
-#define SCODE_400			0x2
-#define SCODE_800			0x3
-#define SCODE_1600			0x4
-#define SCODE_3200			0x5
+#include <linux/ioctl.h>
+#include <linux/types.h>
+#include <linux/firewire-constants.h>
 
 #define FW_CDEV_EVENT_BUS_RESET		0x00
 #define FW_CDEV_EVENT_RESPONSE		0x01
 #define FW_CDEV_EVENT_REQUEST		0x02
 #define FW_CDEV_EVENT_ISO_INTERRUPT	0x03
 
-/* The 'closure' fields are for user space to use.  Data passed in the
- * 'closure' field for a request will be returned in the corresponding
- * event.  It's a 64-bit type so that it's a fixed size type big
- * enough to hold a pointer on all platforms. */
-
+/**
+ * struct fw_cdev_event_common - Common part of all fw_cdev_event_ types
+ * @closure:	For arbitrary use by userspace
+ * @type:	Discriminates the fw_cdev_event_ types
+ *
+ * This struct may be used to access generic members of all fw_cdev_event_
+ * types regardless of the specific type.
+ *
+ * Data passed in the @closure field for a request will be returned in the
+ * corresponding event.  It is big enough to hold a pointer on all platforms.
+ * The ioctl used to set @closure depends on the @type of event.
+ */
 struct fw_cdev_event_common {
 	__u64 closure;
 	__u32 type;
 };
 
+/**
+ * struct fw_cdev_event_bus_reset - Sent when a bus reset occurred
+ * @closure:	See &fw_cdev_event_common; set by %FW_CDEV_IOC_GET_INFO ioctl
+ * @type:	See &fw_cdev_event_common; always %FW_CDEV_EVENT_BUS_RESET
+ * @node_id:       New node ID of this node
+ * @local_node_id: Node ID of the local node, i.e. of the controller
+ * @bm_node_id:    Node ID of the bus manager
+ * @irm_node_id:   Node ID of the iso resource manager
+ * @root_node_id:  Node ID of the root node
+ * @generation:    New bus generation
+ *
+ * This event is sent when the bus the device belongs to goes through a bus
+ * reset.  It provides information about the new bus configuration, such as
+ * new node ID for this device, new root ID, and others.
+ */
 struct fw_cdev_event_bus_reset {
 	__u64 closure;
 	__u32 type;
@@ -90,6 +73,20 @@
 	__u32 generation;
 };
 
+/**
+ * struct fw_cdev_event_response - Sent when a response packet was received
+ * @closure:	See &fw_cdev_event_common;
+ *		set by %FW_CDEV_IOC_SEND_REQUEST ioctl
+ * @type:	See &fw_cdev_event_common; always %FW_CDEV_EVENT_RESPONSE
+ * @rcode:	Response code returned by the remote node
+ * @length:	Data length, i.e. the response's payload size in bytes
+ * @data:	Payload data, if any
+ *
+ * This event is sent when the stack receives a response to an outgoing request
+ * sent by %FW_CDEV_IOC_SEND_REQUEST ioctl.  The payload data for responses
+ * carrying data (read and lock responses) follows immediately and can be
+ * accessed through the @data field.
+ */
 struct fw_cdev_event_response {
 	__u64 closure;
 	__u32 type;
@@ -98,6 +95,25 @@
 	__u32 data[0];
 };
 
+/**
+ * struct fw_cdev_event_request - Sent on incoming request to an address region
+ * @closure:	See &fw_cdev_event_common; set by %FW_CDEV_IOC_ALLOCATE ioctl
+ * @type:	See &fw_cdev_event_common; always %FW_CDEV_EVENT_REQUEST
+ * @tcode:	Transaction code of the incoming request
+ * @offset:	The offset into the 48-bit per-node address space
+ * @handle:	Reference to the kernel-side pending request
+ * @length:	Data length, i.e. the request's payload size in bytes
+ * @data:	Incoming data, if any
+ *
+ * This event is sent when the stack receives an incoming request to an address
+ * region registered using the %FW_CDEV_IOC_ALLOCATE ioctl.  The request is
+ * guaranteed to be completely contained in the specified region.  Userspace is
+ * responsible for sending the response by %FW_CDEV_IOC_SEND_RESPONSE ioctl,
+ * using the same @handle.
+ *
+ * The payload data for requests carrying data (write and lock requests)
+ * follows immediately and can be accessed through the @data field.
+ */
 struct fw_cdev_event_request {
 	__u64 closure;
 	__u32 type;
@@ -108,14 +124,39 @@
 	__u32 data[0];
 };
 
+/**
+ * struct fw_cdev_event_iso_interrupt - Sent when an iso packet was completed
+ * @closure:	See &fw_cdev_event_common;
+ *		set by %FW_CDEV_CREATE_ISO_CONTEXT ioctl
+ * @type:	See &fw_cdev_event_common; always %FW_CDEV_EVENT_ISO_INTERRUPT
+ * @cycle:	Cycle counter of the interrupt packet
+ * @header_length: Total length of following headers, in bytes
+ * @header:	Stripped headers, if any
+ *
+ * This event is sent when the controller has completed an &fw_cdev_iso_packet
+ * with the %FW_CDEV_ISO_INTERRUPT bit set.  In the receive case, the headers
+ * stripped of all packets up until and including the interrupt packet are
+ * returned in the @header field.
+ */
 struct fw_cdev_event_iso_interrupt {
 	__u64 closure;
 	__u32 type;
 	__u32 cycle;
-	__u32 header_length;	/* Length in bytes of following headers. */
+	__u32 header_length;
 	__u32 header[0];
 };
 
+/**
+ * union fw_cdev_event - Convenience union of fw_cdev_event_ types
+ * @common:        Valid for all types
+ * @bus_reset:     Valid if @common.type == %FW_CDEV_EVENT_BUS_RESET
+ * @response:      Valid if @common.type == %FW_CDEV_EVENT_RESPONSE
+ * @request:       Valid if @common.type == %FW_CDEV_EVENT_REQUEST
+ * @iso_interrupt: Valid if @common.type == %FW_CDEV_EVENT_ISO_INTERRUPT
+ *
+ * Convenience union for userspace use.  Events could be read(2) into a char
+ * buffer and then cast to this union for further processing.
+ */
 union fw_cdev_event {
 	struct fw_cdev_event_common common;
 	struct fw_cdev_event_bus_reset bus_reset;
@@ -144,35 +185,47 @@
  */
 #define FW_CDEV_VERSION		1
 
+/**
+ * struct fw_cdev_get_info - General purpose information ioctl
+ * @version:	The version field is just a running serial number.
+ *		We never break backwards compatibility, but may add more
+ *		structs and ioctls in later revisions.
+ * @rom_length:	If @rom is non-zero, at most rom_length bytes of configuration
+ *		ROM will be copied into that user space address.  In either
+ *		case, @rom_length is updated with the actual length of the
+ *		configuration ROM.
+ * @rom:	If non-zero, address of a buffer to be filled by a copy of the
+ *		local node's configuration ROM
+ * @bus_reset:	If non-zero, address of a buffer to be filled by a
+ *		&struct fw_cdev_event_bus_reset with the current state
+ *		of the bus.  This does not cause a bus reset to happen.
+ * @bus_reset_closure: Value of &closure in this and subsequent bus reset events
+ * @card:	The index of the card this device belongs to
+ */
 struct fw_cdev_get_info {
-	/* The version field is just a running serial number.  We
-	 * never break backwards compatibility.  Userspace passes in
-	 * the version it expects and the kernel passes back the
-	 * highest version it can provide.  Even if the structs in
-	 * this interface are extended in a later version, the kernel
-	 * will not copy back more data than what was present in the
-	 * interface version userspace expects. */
 	__u32 version;
-
-	/* If non-zero, at most rom_length bytes of config rom will be
-	 * copied into that user space address.  In either case,
-	 * rom_length is updated with the actual length of the config
-	 * rom. */
 	__u32 rom_length;
 	__u64 rom;
-
-	/* If non-zero, a fw_cdev_event_bus_reset struct will be
-	 * copied here with the current state of the bus.  This does
-	 * not cause a bus reset to happen.  The value of closure in
-	 * this and sub-sequent bus reset events is set to
-	 * bus_reset_closure. */
 	__u64 bus_reset;
 	__u64 bus_reset_closure;
-
-	/* The index of the card this devices belongs to. */
 	__u32 card;
 };
 
+/**
+ * struct fw_cdev_send_request - Send an asynchronous request packet
+ * @tcode:	Transaction code of the request
+ * @length:	Length of outgoing payload, in bytes
+ * @offset:	48-bit offset at destination node
+ * @closure:	Passed back to userspace in the response event
+ * @data:	Userspace pointer to payload
+ * @generation:	The bus generation where packet is valid
+ *
+ * Send a request to the device.  This ioctl implements all outgoing requests.
+ * Both quadlet and block request specify the payload as a pointer to the data
+ * in the @data field.  Once the transaction completes, the kernel writes an
+ * &fw_cdev_event_request event back.  The @closure field is passed back to
+ * user space in the response event.
+ */
 struct fw_cdev_send_request {
 	__u32 tcode;
 	__u32 length;
@@ -182,6 +235,19 @@
 	__u32 generation;
 };
 
+/**
+ * struct fw_cdev_send_response - Send an asynchronous response packet
+ * @rcode:	Response code as determined by the userspace handler
+ * @length:	Length of outgoing payload, in bytes
+ * @data:	Userspace pointer to payload
+ * @handle:	The handle from the &fw_cdev_event_request
+ *
+ * Send a response to an incoming request.  By setting up an address range using
+ * the %FW_CDEV_IOC_ALLOCATE ioctl, userspace can listen for incoming requests.  An
+ * incoming request will generate an %FW_CDEV_EVENT_REQUEST, and userspace must
+ * send a reply using this ioctl.  The event has a handle to the kernel-side
+ * pending transaction, which should be used with this ioctl.
+ */
 struct fw_cdev_send_response {
 	__u32 rcode;
 	__u32 length;
@@ -189,6 +255,21 @@
 	__u32 handle;
 };
 
+/**
+ * struct fw_cdev_allocate - Allocate a CSR address range
+ * @offset:	Start offset of the address range
+ * @closure:	To be passed back to userspace in request events
+ * @length:	Length of the address range, in bytes
+ * @handle:	Handle to the allocation, written by the kernel
+ *
+ * Allocate an address range in the 48-bit address space on the local node
+ * (the controller).  This allows userspace to listen for requests with an
+ * offset within that address range.  When the kernel receives a request
+ * within the range, an &fw_cdev_event_request event will be written back.
+ * The @closure field is passed back to userspace in the response event.
+ * The @handle field is an out parameter, returning a handle to the allocated
+ * range to be used for later deallocation of the range.
+ */
 struct fw_cdev_allocate {
 	__u64 offset;
 	__u64 closure;
@@ -196,6 +277,11 @@
 	__u32 handle;
 };
 
+/**
+ * struct fw_cdev_deallocate - Free an address range allocation
+ * @handle:	Handle to the address range, as returned by the kernel when the
+ *		range was allocated
+ */
 struct fw_cdev_deallocate {
 	__u32 handle;
 };
@@ -203,10 +289,41 @@
 #define FW_CDEV_LONG_RESET	0
 #define FW_CDEV_SHORT_RESET	1
 
+/**
+ * struct fw_cdev_initiate_bus_reset - Initiate a bus reset
+ * @type:	%FW_CDEV_SHORT_RESET or %FW_CDEV_LONG_RESET
+ *
+ * Initiate a bus reset for the bus this device is on.  The bus reset can be
+ * either the original (long) bus reset or the arbitrated (short) bus reset
+ * introduced in 1394a-2000.
+ */
 struct fw_cdev_initiate_bus_reset {
-	__u32 type;
+	__u32 type;	/* FW_CDEV_SHORT_RESET or FW_CDEV_LONG_RESET */
 };
 
+/**
+ * struct fw_cdev_add_descriptor - Add contents to the local node's config ROM
+ * @immediate:	If non-zero, immediate key to insert before pointer
+ * @key:	Upper 8 bits of root directory pointer
+ * @data:	Userspace pointer to contents of descriptor block
+ * @length:	Length of descriptor block data, in bytes
+ * @handle:	Handle to the descriptor, written by the kernel
+ *
+ * Add a descriptor block and optionally a preceding immediate key to the local
+ * node's configuration ROM.
+ *
+ * The @key field specifies the upper 8 bits of the descriptor root directory
+ * pointer and the @data and @length fields specify the contents. The @key
+ * should be of the form 0xXX000000. The offset part of the root directory entry
+ * will be filled in by the kernel.
+ *
+ * If not 0, the @immediate field specifies an immediate key which will be
+ * inserted before the root directory pointer.
+ *
+ * If successful, the kernel adds the descriptor and writes back a handle to the
+ * kernel-side object to be used for later removal of the descriptor block and
+ * immediate key.
+ */
 struct fw_cdev_add_descriptor {
 	__u32 immediate;
 	__u32 key;
@@ -215,6 +332,14 @@
 	__u32 handle;
 };
 
+/**
+ * struct fw_cdev_remove_descriptor - Remove contents from the configuration ROM
+ * @handle:	Handle to the descriptor, as returned by the kernel when the
+ *		descriptor was added
+ *
+ * Remove a descriptor block and accompanying immediate key from the local
+ * node's configuration ROM.
+ */
 struct fw_cdev_remove_descriptor {
 	__u32 handle;
 };
@@ -222,12 +347,24 @@
 #define FW_CDEV_ISO_CONTEXT_TRANSMIT	0
 #define FW_CDEV_ISO_CONTEXT_RECEIVE	1
 
-#define FW_CDEV_ISO_CONTEXT_MATCH_TAG0		 1
-#define FW_CDEV_ISO_CONTEXT_MATCH_TAG1		 2
-#define FW_CDEV_ISO_CONTEXT_MATCH_TAG2		 4
-#define FW_CDEV_ISO_CONTEXT_MATCH_TAG3		 8
-#define FW_CDEV_ISO_CONTEXT_MATCH_ALL_TAGS	15
-
+/**
+ * struct fw_cdev_create_iso_context - Create a context for isochronous IO
+ * @type:	%FW_CDEV_ISO_CONTEXT_TRANSMIT or %FW_CDEV_ISO_CONTEXT_RECEIVE
+ * @header_size: Header size to strip for receive contexts
+ * @channel:	Channel to bind to
+ * @speed:	Speed to transmit at
+ * @closure:	To be returned in &fw_cdev_event_iso_interrupt
+ * @handle:	Handle to context, written back by kernel
+ *
+ * Prior to sending or receiving isochronous I/O, a context must be created.
+ * The context records information about the transmit or receive configuration
+ * and typically maps to an underlying hardware resource.  A context is set up
+ * for either sending or receiving.  It is bound to a specific isochronous
+ * channel.
+ *
+ * If a context was successfully created, the kernel writes back a handle to the
+ * context, which must be passed in for subsequent operations on that context.
+ */
 struct fw_cdev_create_iso_context {
 	__u32 type;
 	__u32 header_size;
@@ -237,16 +374,52 @@
 	__u32 handle;
 };
 
+#define FW_CDEV_ISO_PAYLOAD_LENGTH(v)	(v)
+#define FW_CDEV_ISO_INTERRUPT		(1 << 16)
+#define FW_CDEV_ISO_SKIP		(1 << 17)
+#define FW_CDEV_ISO_SYNC		(1 << 17)
+#define FW_CDEV_ISO_TAG(v)		((v) << 18)
+#define FW_CDEV_ISO_SY(v)		((v) << 20)
+#define FW_CDEV_ISO_HEADER_LENGTH(v)	((v) << 24)
+
+/**
+ * struct fw_cdev_iso_packet - Isochronous packet
+ * @control:	Contains the header length (8 uppermost bits), the sy field
+ *		(4 bits), the tag field (2 bits), a sync flag (1 bit),
+ *		a skip flag (1 bit), an interrupt flag (1 bit), and the
+ *		payload length (16 lowermost bits)
+ * @header:	Header and payload
+ *
+ * &struct fw_cdev_iso_packet is used to describe isochronous packet queues.
+ *
+ * Use the FW_CDEV_ISO_ macros to fill in @control.  The sy and tag fields are
+ * specified by IEEE 1394a and IEC 61883.
+ *
+ * FIXME - finish this documentation
+ */
 struct fw_cdev_iso_packet {
-	__u16 payload_length;	/* Length of indirect payload. */
-	__u32 interrupt : 1;	/* Generate interrupt on this packet */
-	__u32 skip : 1;		/* Set to not send packet at all. */
-	__u32 tag : 2;
-	__u32 sy : 4;
-	__u32 header_length : 8;	/* Length of immediate header. */
+	__u32 control;
 	__u32 header[0];
 };
 
+/**
+ * struct fw_cdev_queue_iso - Queue isochronous packets for I/O
+ * @packets:	Userspace pointer to packet data
+ * @data:	Pointer into mmap()'ed payload buffer
+ * @size:	Size of packet data in bytes
+ * @handle:	Isochronous context handle
+ *
+ * Queue a number of isochronous packets for reception or transmission.
+ * This ioctl takes a pointer to an array of &fw_cdev_iso_packet structs,
+ * which describe how to transmit from or receive into a contiguous region
+ * of a mmap()'ed payload buffer.  As part of the packet descriptors,
+ * a series of headers can be supplied, which will be prepended to the
+ * payload during DMA.
+ *
+ * The kernel may or may not queue all packets, but will write back updated
+ * values of the @packets, @data and @size fields, so the ioctl can be
+ * resubmitted easily.
+ */
 struct fw_cdev_queue_iso {
 	__u64 packets;
 	__u64 data;
@@ -254,6 +427,23 @@
 	__u32 handle;
 };
 
+#define FW_CDEV_ISO_CONTEXT_MATCH_TAG0		 1
+#define FW_CDEV_ISO_CONTEXT_MATCH_TAG1		 2
+#define FW_CDEV_ISO_CONTEXT_MATCH_TAG2		 4
+#define FW_CDEV_ISO_CONTEXT_MATCH_TAG3		 8
+#define FW_CDEV_ISO_CONTEXT_MATCH_ALL_TAGS	15
+
+/**
+ * struct fw_cdev_start_iso - Start an isochronous transmission or reception
+ * @cycle:	Cycle in which to start I/O.  If @cycle is greater than or
+ *		equal to 0, the I/O will start on that cycle.
+ * @sync:	Determines the value to wait for for receive packets that have
+ *		the %FW_CDEV_ISO_SYNC bit set
+ * @tags:	Tag filter bit mask.  Only valid for isochronous reception.
+ *		Determines the tag values for which packets will be accepted.
+ *		Use FW_CDEV_ISO_CONTEXT_MATCH_ macros to set @tags.
+ * @handle:	Isochronous context handle within which to transmit or receive
+ */
 struct fw_cdev_start_iso {
 	__s32 cycle;
 	__u32 sync;
@@ -261,8 +451,12 @@
 	__u32 handle;
 };
 
+/**
+ * struct fw_cdev_stop_iso - Stop an isochronous transmission or reception
+ * @handle:	Handle of isochronous context to stop
+ */
 struct fw_cdev_stop_iso {
 	__u32 handle;
 };
 
-#endif /* __fw_cdev_h */
+#endif /* _LINUX_FIREWIRE_CDEV_H */

libraw1394-juju.patch:

Index: libraw1394-juju.patch
===================================================================
RCS file: /cvs/pkgs/rpms/libraw1394/F-7/libraw1394-juju.patch,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- libraw1394-juju.patch	18 Apr 2007 00:59:15 -0000	1.6
+++ libraw1394-juju.patch	25 Oct 2007 00:48:17 -0000	1.7
@@ -67,10 +67,10 @@
 +pkginclude_HEADERS = ../src/raw1394.h ../src/csr.h ../src/ieee1394.h
 diff --git a/juju/juju.h b/juju/juju.h
 new file mode 100644
-index 0000000..c7a2ebd
+index 0000000..8746ac2
 --- /dev/null
 +++ b/juju/juju.h
-@@ -0,0 +1,143 @@
+@@ -0,0 +1,141 @@
 +/*						-*- c-basic-offset: 8 -*-
 + *
 + * juju.h -- Internal header file for raw1394 emulation
@@ -102,8 +102,6 @@
 +#include "../src/csr.h"
 +#include "config.h"
 +
-+#define ACK_COMPLETE 1
-+
 +#define ptr_to_u64(p) ((__u64)(unsigned long)(p))
 +#define u64_to_ptr(p) ((void *)(unsigned long)(p))
 +
@@ -216,7 +214,7 @@
 +#endif
 diff --git a/juju/raw1394-iso.c b/juju/raw1394-iso.c
 new file mode 100644
-index 0000000..5e18dab
+index 0000000..ae8aaad
 --- /dev/null
 +++ b/juju/raw1394-iso.c
 @@ -0,0 +1,522 @@
@@ -262,13 +260,14 @@
 +	int err;
 +
 +	p = &handle->iso.packets[handle->iso.packet_index];
-+	p->payload_length = length;
-+	p->interrupt =
-+		handle->iso.packet_phase == handle->iso.irq_interval - 1;
-+	p->skip = 0;
-+	p->tag = tag;
-+	p->sy = sy;
-+	p->header_length = header_length;
++	p->control =
++		FW_CDEV_ISO_PAYLOAD_LENGTH(length) |
++		FW_CDEV_ISO_TAG(tag) |
++		FW_CDEV_ISO_SY(sy) |
++		FW_CDEV_ISO_HEADER_LENGTH(header_length);
++
++	if (handle->iso.packet_phase == handle->iso.irq_interval - 1)
++		p->control |= FW_CDEV_ISO_INTERRUPT;
 +
 +	handle->iso.head += length;
 +	handle->iso.packet_count++;
@@ -513,13 +512,7 @@
 +	struct fw_cdev_queue_iso queue_iso;
 +	int len;
 +
-+	skip.payload_length = 0;
-+	skip.interrupt = 1;
-+	skip.skip = 1;
-+	skip.tag = 0;
-+	skip.sy = 0;
-+	skip.header_length = 0;
-+
++	skip.control = FW_CDEV_ISO_INTERRUPT | FW_CDEV_ISO_SKIP;
 +	queue_iso.packets = ptr_to_u64(&skip);
 +	queue_iso.size    = sizeof skip;
 +	queue_iso.data    = 0;
@@ -616,6 +609,7 @@
 +	handle->iso.fd = open(handle->local_filename, O_RDWR);
 +	if (handle->iso.fd < 0) {
 +		free(handle->iso.packets);
++		handle->iso.packets = NULL;
 +		return -1;
 +	}
 +
@@ -626,6 +620,7 @@
 +		      handle->iso.fd, &ep) < 0) {
 +		close(handle->iso.fd);
 +		free(handle->iso.packets);
++		handle->iso.packets = NULL;
 +		return -1;
 +	}
 +
@@ -639,6 +634,7 @@
 +	if (retval < 0) {
 +		close(handle->iso.fd);
 +		free(handle->iso.packets);
++		handle->iso.packets = NULL;
 +		return retval;
 +	}
 +
@@ -649,6 +645,7 @@
 +	if (handle->iso.buffer == MAP_FAILED) {
 +		close(handle->iso.fd);
 +		free(handle->iso.packets);
++		handle->iso.packets = NULL;
 +		return -1;
 +	}
 +
@@ -741,6 +738,7 @@
 +	       handle->iso.buf_packets * handle->iso.max_packet_size);
 +	close(handle->iso.fd);
 +	free(handle->iso.packets);
++	handle->iso.packets = NULL;
 +}
 diff --git a/juju/raw1394.c b/juju/raw1394.c
 new file mode 100644


Index: libraw1394.spec
===================================================================
RCS file: /cvs/pkgs/rpms/libraw1394/F-7/libraw1394.spec,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -r1.35 -r1.36
--- libraw1394.spec	21 Oct 2007 19:51:07 -0000	1.35
+++ libraw1394.spec	25 Oct 2007 00:48:17 -0000	1.36
@@ -1,7 +1,7 @@
 Summary:        Library providing low-level IEEE-1394 access
 Name:           libraw1394
 Version:        1.2.1
-Release:        10%{?dist}
+Release:        11%{?dist}
 License:        LGPL
 Group:          System Environment/Libraries
 Source:         http://www.linux1394.org/dl/libraw1394-%{version}.tar.gz
@@ -12,7 +12,6 @@
 
 Source1:        firewire-cdev.h
 Patch0:         libraw1394-juju.patch
-Patch1:         libraw1394-juju-no-double-free-on-shutdown.patch
 
 %description
 The libraw1394 library provides direct access to the IEEE-1394 bus through
@@ -28,9 +27,7 @@
 
 %prep
 %setup -q
-
 %patch0 -p1 -b .juju
-%patch1 -p1 -b .free
 
 %build
 
@@ -79,6 +76,11 @@
 
 
 %changelog
+* Wed Oct 24 2007 Jarod Wilson <jwilson at redhat.com> - 1.2.1-11
+- Update firewire-cdev.h to match kernel and eliminate
+  bitfield usage, fixes capture on big-endian systems (#345221)
+- Resync with krh's libraw1394 juju tree
+
 * Sun Oct 21 2007 Jarod Wilson <jwilson at redhat.com> - 1.2.1-10
 - Fix double-free triggered on pre-ohci 1.1 controllers (#328011)
 


--- libraw1394-juju-no-double-free-on-shutdown.patch DELETED ---


--- libraw1394-underquoted.patch DELETED ---




More information about the fedora-extras-commits mailing list