summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* firewire: clean up includesStefan Richter2009-06-057-22/+61
| | | | | | | Include required headers which were only indirectly included. Remove unused includes and an unused constant. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* firewire: ohci: access bus_seconds atomicallyStefan Richter2009-06-051-3/+4
| | | | | | | | | | | In the unlikely event that card->driver->get_bus_time() is called during a cycle64Seconds interrupt, we could read garbage unless atomic accesses are used. The switch to atomic ops requires to change the 64 seconds counter from unsigned to signed, but this shouldn't matter to the end result. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* firewire: also use vendor ID in root directory for driver matchesStefan Richter2009-06-051-6/+16
| | | | | | | | Due to AV/C protocol extensions, FireDTV devices need a vendor-specific driver. But their configuration ROM features a vendor ID only in the root directory, not in the unit directory. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* firewire: share device ID table type with ieee1394Stefan Richter2009-06-053-25/+15
| | | | | | | That way, the new firedtv driver will be able to use a single ID table in builds against ieee1394 core and/or against firewire core. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* firewire: core: add sysfs attribute for easier udev rulesStefan Richter2009-06-012-1/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds the attribute /sys/bus/firewire/devices/fw[0-9]+/units. It can be used in udev rules like the following ones: # IIDC devices: industrial cameras and some webcams SUBSYSTEM=="firewire", ATTR{units}=="*0x00a02d:0x00010?*", GROUP="video" # AV/C devices: camcorders, set-top boxes, TV sets, audio devices, ... SUBSYSTEM=="firewire", ATTR{units}=="*0x00a02d:0x010001*", GROUP="video" Background: firewire-core manages two device types: - fw_device is a FireWire node. A character device file is associated with it. - fw_unit is a unit directory on a node. Each fw_device may have 0..n children of type fw_unit. The units tell us what kinds of protocols a node implements. We want to set ownership or ACLs or permissions of the character device file of an fw_device, or/and create symlinks to it, based on available protocols. Until now udev rules had to look at the fw_unit devices and then modify their parent's character device file accordingly. This is problematic for two reasons: 1) It happens sometime after the creation of the fw_device, 2) an access policy may require that information from all children is evaluated before a decision about the parent is made. Problem 1) can ultimately not be avoided since this is the nature of FireWire nodes: They may add or remove unit directories at any point in time. However, we can still help userland a lot by providing the protocol type information of all units in a summary sysfs attribute directly at the fw_device. This way, - the information is immediately available at the affected device when userspace goes about to handle an ADD or CHANGE event of the fw_device, - with most policies, it won't be necessary anymore to dig through child attributes. The new attribute is called "units". It contains space-separated tuples of specifier_id and version of each present unit. The delimiter within tuples is a colon. Specifier_id and version are printed as 0x%06x. Here is an example of a node which implements an IPv4 unit and an IPv6 unit: $ cat /sys/bus/firewire/devices/fw2/units 0x00005e:0x000001 0x00005e:0x000002 Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* firewire: core: check for missing struct update at build time, not run timeStefan Richter2009-06-011-2/+9
| | | | | | | | | | | | struct fw_attribute_group.attrs.[] must have enough room for all attributes. This can and should be checked at build time. Our previous check at run time was a little late and not reliable since most of the time less than the available attributes are populated. Furthermore, omit an increment of an index at its last usage. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* firewire: core: improve check for local nodeStefan Richter2009-05-173-6/+4
| | | | | | | | | | | | | | | | | My recently added test for a device being local in fw-cdev.c got it slightly wrong: Comparisons of node IDs are only valid if the generation is current, which I forgot to check. Normally, serialization by card->lock takes care of this, but a device in FW_DEVICE_GONE state will necessarily have a wrong generation and invalid node_id. The "is it local?" check is made 100% correct and simpler now by means of a struct fw_device flag which is set at fw_device creation. Besides the fw-cdev site which was to be fixed, there is another site which can make use of the new flag, and an RFC-2734 driver will benefit from it too. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* DVB: firedtv: FireDTV S2 problems with tuning solvedBeat Michel Liechti2009-03-271-1/+5
| | | | | | | | | | | Signed-off-by: Beat Michel Liechti <bml303@gmail.com> Tuning was broken on FireDTV S2 (and presumably FloppyDTV S2) because a wrong opcode was sent. The box only gave "not implemented" responses. Changing the opcode to _TUNE_QPSK2 fixes this for good. Cc: stable@kernel.org Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* DVB: firedtv: fix printk format mismatchStefan Richter2009-03-241-2/+2
| | | | | | | | | Eliminate drivers/media/dvb/firewire/firedtv-avc.c: In function 'debug_fcp': drivers/media/dvb/firewire/firedtv-avc.c:156: warning: format '%d' expects type 'int', but argument 5 has type 'size_t' Acked-by: Mauro Carvalho Chehab <mchehab@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* ieee1394: constify device ID tablesStefan Richter2009-03-247-8/+8
| | | | Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* ieee1394: raw1394: add sparse annotations to raw1394_compat_writeStefan Richter2009-03-241-3/+7
| | | | | | | | | | | | | | | | | Eliminate the following warnings in raw1394_compat_write()'s error return path, seen on x86-64 with CONFIG_COMPAT=y: drivers/ieee1394/raw1394.c:381:17: warning: incorrect type in return expression (different address spaces) drivers/ieee1394/raw1394.c:381:17: expected char const [noderef] <asn:1>* drivers/ieee1394/raw1394.c:381:17: got void * drivers/ieee1394/raw1394.c:2252:14: warning: incorrect type in argument 1 (different address spaces) drivers/ieee1394/raw1394.c:2252:14: expected void const *ptr drivers/ieee1394/raw1394.c:2252:14: got char const [noderef] <asn:1>*[assigned] buffer drivers/ieee1394/raw1394.c:2253:19: warning: incorrect type in argument 1 (different address spaces) drivers/ieee1394/raw1394.c:2253:19: expected void const *ptr drivers/ieee1394/raw1394.c:2253:19: got char const [noderef] <asn:1>*[assigned] buffer Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* ieee1394: Storage class should be before const qualifierTobias Klauser2009-03-245-9/+9
| | | | | | | | | | | The C99 specification states in section 6.11.5: The placement of a storage-class specifier other than at the beginning of the declaration specifiers in a declaration is an obsolescent feature. Signed-off-by: Tobias Klauser <tklauser@distanz.ch> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* ieee1394: sbp2: follow up on "ieee1394: inherit ud vendor_id from node ↵Stefan Richter2009-03-241-2/+1
| | | | | | vendor_id" Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* firewire: core: optimize propagation of BROADCAST_CHANNELStefan Richter2009-03-245-90/+52
| | | | | | | | | | | | | | | | | Cache the test result of whether a device implements BROADCAST_CHANNEL. This minimizes traffic on the bus after each bus reset. A majority of devices does not implement BROADCAST_CHANNEL. Remove busy retries; just rely on the hardware to retry requests to busy responders. Remove unnecessary log messages. Rename the flag is_irm to broadcast_channel_allocated to better reflect its meaning. Reset the flag earlier in fw_core_handle_bus_reset. Pass the generation down as a call parameter; that way generation can't be newer than card->broadcast_channel_allocated and device->node_id. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* firewire: core: simplify broadcast channel allocationStefan Richter2009-03-241-92/+34
| | | | | | fw-iso.c has channel allocation code now, use it. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* firewire: core: increase bus manager grace periodStefan Richter2009-03-241-5/+6
| | | | | | | | Per IEEE 1394 clause 8.4.2.5, bus manager capable nodes which are not incumbent shall wait at least 125ms before trying to establish themselves as bus manager. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* firewire: core: drop unused call parameters of close_transactionStefan Richter2009-03-241-9/+8
| | | | | | All callers inserted NULL and 0 here. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* firewire: cdev: add closure to async stream ioctlStefan Richter2009-03-244-72/+56
| | | | | | | | | | | This changes the as yet unreleased FW_CDEV_IOC_SEND_STREAM_PACKET ioctl to generate an fw_cdev_event_response event just like the other two ioctls for asynchronous request transmission do. This way, clients get feedback on successful or unsuccessful transmission. This also adds input validation for length, tag, channel, sy, speed. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* firewire: cdev: simplify FW_CDEV_IOC_SEND_REQUEST return valueStefan Richter2009-03-241-8/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | This changes the ioctl() return value of FW_CDEV_IOC_SEND_REQUEST and of the as yet unreleased FW_CDEV_IOC_SEND_BROADCAST_REQUEST. They used to return sizeof(struct fw_cdev_send_request *) + data_length which is obviously a failed attempt to emulate the return value of raw1394's respective interface which uses write() instead of ioctl(). However, the first summand, as size of a kernel pointer, is entirely meaningless to clients and the second summand is already known to clients. And the result does not resemble raw1394's write() return code anyway. So simplify it to a constant non-negative value, i.e. 0. The only dangers here would be that future client implementations check for error by ret != 0 instead of ret < 0 when running on top of an old kernel; or that current clients interpret ret = 0 or more as failure. But both are hypothetical cases which don't justify to return irritating values. While we touch this code, also remove "& 0x1f" from tcode in the call of fw_send_request. The tcode cannot be bigger than 0x1f at this point. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* firewire: cdev: fix race of ioctl_send_request with bus resetStefan Richter2009-03-241-1/+1
| | | | | | | | The bus reset handler concurrently frees client->device->node. Use device->node_id instead. This is equivalent to device->node->node_id while device->generation is current. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* firewire: cdev: secure add_descriptor ioctlStefan Richter2009-03-242-1/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The access permissions and ownership or ACL of /dev/fw* character device files will typically be set based on the device type of the respective nodes, as obtained by firewire-core from descriptors in the device's configuration ROM. An example policy is to deny write permission by default but grant write permission to files of AV/C video and audio devices and IIDC video devices. The FW_CDEV_IOC_ADD_DESCRIPTOR ioctl could be used to partly subvert such a policy: Find a device file with relaxed permissions, use the ioctl to add a descriptor with AV/C marker to the local node's ROM, thus gain access to the local node's character device file. (This is only possible if there are udev scripts installed which actively relax permissions for known device types and if there is a device of such a type connected.) Accessibility of the local node's device file is relevant to host security if the host contains two or more IEEE 1394 link layer controllers which are plugged into a single bus. Therefore change the ABI to deny FW_CDEV_IOC_ADD_DESCRIPTOR if the file belongs to a remote node. (This change has no impact on known implementers of the ABI: None of them uses the ioctl yet.) Also clarify the documentation: The ioctl affects all local nodes, not just one local node. Cc: stable@kernel.org Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* firewire: cdev: amendment to "add ioctl to query maximum transmission speed"Stefan Richter2009-03-242-28/+20
| | | | | | | | | | The as yet unreleased FW_CDEV_IOC_GET_SPEED ioctl puts only a single integer into the parameter buffer. We can use ioctl()'s return value instead. (Also: Some whitespace change in firewire-cdev.h.) Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* firewire: broadcast channel supportJay Fenlason2009-03-243-6/+177
| | | | | | | | | | | | | | | | This patch adds the ISO broadcast channel support that is required of a 1394a IRM. In specific, if the local device the IRM, it allocates ISO channel 31 and sets the broadcast channel register of all devices on the local bus to BROADCAST_CHANNEL_INITIAL | BROADCAST_CHANNEL_VALID to indicate that channel 31 can be use for broadcast messages. One minor complication is that on startup the local device may become IRM before all the devices on the bus have been enumerated by the stack. Therefore we have to keep a "the local device is IRM" flag and possibly set the broadcast channel register of new devices at enumeration time. Signed-off-by: Jay Fenlason <fenlason@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* firewire: implement asynchronous stream transmissionJay Fenlason2009-03-245-2/+108
| | | | | | | | | Allow userspace and other firewire drivers (fw-ipv4 I'm looking at you!) to send Asynchronous Transmit Streams as described in 7.8.3 of release 1.1 of the 1394 Open Host Controller Interface Specification. Signed-off-by: Jay Fenlason <fenlason@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de> (tweaks)
* firewire: core: normalize a function argument nameStefan Richter2009-03-242-5/+5
| | | | | | | It's called "payload" rather than "data" almost everywhere in fw-transaction.c. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* firewire: normalize a variable nameStefan Richter2009-03-244-12/+16
| | | | | | | | | | | | | Standardize on if (err) handle_error; and if (ret < 0) handle_error; Don't call a variable err if we store values in it which mean success. Also, offset some return statements by a blank line since this how we do it in drivers/firewire. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* firewire: core: remove condition which is always falseStefan Richter2009-03-241-1/+1
| | | | | | | reread_bus_info_block() only gets to see devices whose config_rom_length is at least 6 (ROM header, bus info block, root directory header). Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* firewire: core: move some functionsStefan Richter2009-03-241-46/+44
| | | | Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* firewire: core: clean up includesStefan Richter2009-03-242-11/+22
| | | | Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* firewire: cdev: simplify a schedule_delayed_work wrapperStefan Richter2009-03-241-12/+6
| | | | | | | | | | | The kernel API documentation says that queue_delayed_work() returns 0 (only) if the work was already queued. The return codes of schedule_delayed_work() are not documented but the same. In init_iso_resource(), the work has never been queued yet, hence we can assume schedule_delayed_work() to be a guaranteed success there. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* firewire: cdev: add ioctls for iso resource management, amendmentStefan Richter2009-03-243-23/+27
| | | | | | | | | | | | | | | | | | | | Some fixes: - Remove stale documentation. - Fix a != vs. == thinko that got in the way of channel management. - Try bandwidth deallocation even if channel deallocation failed. A simplification: - fw_cdev_allocate_iso_resource.channels is now ordered like libdc1394's dc1394_iso_allocate_channel() channels_allowed argument. By the way, I looked closer at cards from NEC, TI, and VIA, and noticed that they all don't implement IEEE 1394a behaviour which is meant to deviate from IEEE 1212's notion of lock compare-swap. This means that we have to do two lock transactions instead of one in many cases where one transaction would already succeed on a fully 1394a compliant IRM. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* firewire: cdev: increment fw_cdev_version, update documentationStefan Richter2009-03-241-5/+30
| | | | | | | | | | | | | | | | | | | Necessary due to Date: Tue, 22 Jul 2008 23:23:40 -0700 From: David Moore <dcm@acm.org> Subject: firewire: Include iso timestamp in headers when header_size > 4 Side note: The lack of upwards compatibility sounds worse than it is. All existing client implementations, libraw1394 and libdc1394, set header_size = 4. And since the ABI v1 behaviour does not offer any advantages over the new behaviour, we deliberately do not provide the old behaviour anymore. Also add documentation about the format of fw_cdev_get_cycle_timer which may be used in conjunction with the timestamp of iso packets but has a different format. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* firewire: cdev: shut down iso context before freeing the bufferStefan Richter2009-03-241-3/+3
| | | | | | | | DMA must be halted before we DMA-unmap and free the DMA buffer. Since we cannot rely on the client to stop the context before it closes the fd, we have to reorder fw_iso_buffer_destroy vs. fw_iso_context_destroy. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* firewire: cdev: replace some spin_lock_irqsave by spin_lock_irqStefan Richter2009-03-241-12/+8
| | | | | | | | | | | | | All of these functions are entered with IRQs enabled. Hence the unconditional spin_unlock_irq can be used. Function: Caller context: dequeue_event() client process, via read(2) fill_bus_reset_event() fw-device.c update worqueue job release_client_resource() client process, via ioctl(2) fw_device_op_release() client process, via close(2) Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* firewire: cdev: extend transaction payload size checkStefan Richter2009-03-241-3/+2
| | | | | | | | | | | | Make the size check of ioctl_send_request and ioctl_send_broadcast_request speed dependent. Also change the error return code from -EINVAL to -EIO to distinguish this from other errors concerning the ioctl parameters. Another payload size limit for which we don't check here though is the remote node's Bus_Info_Block.max_rec. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* firewire: cdev: restrict broadcast write requests to Units SpaceStefan Richter2009-03-241-0/+4
| | | | | | | | | | | | | | We don't want random users write to Memory Space (e.g. PCs with physical DMA filters down) or to core CSRs like Reset_Start. This does not protect SBP-2 target CSRs. But properly behaving SBP-2 targets ignore broadcast write requests to these registers, and the maximum damage which can happen with laxer targets is DOS. But there are ways to create DOS situations anyway if there are devices with weak device file permissions (like audio/video devices) present at the same bus as an SBP-2 target. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* firewire: cdev: add ioctl for broadcast write requestsJay Fenlason, Stefan Richter2009-03-242-27/+48
| | | | | | | | | | | | | | | | Write transactions to the broadcast node ID are a convenient way to trigger functions of multiple nodes at once. IIDC is a protocol which can make use of this if multiple cameras with same command_regs_base are connected at the same bus. Based on Date: Wed, 10 Sep 2008 11:32:16 -0400 From: Jay Fenlason <fenlason@redhat.com> Subject: [patch] SEND_BROADCAST_REQUEST Changes: ioctl_send_request() and ioctl_send_broadcast_request() now share code. Broadcast speed corrected to S100. Check for proper tcode. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* firewire: cdev: add ioctl to query maximum transmission speedStefan Richter2009-03-242-0/+20
| | | | | | | | | | | | | | | | | While the speed of asynchronous transactions is automatically chosen by the kernel, the speed of isochronous streams has to be chosen by the initiating client. In case of 1394a bus topologies, the maximum possible speed could be figured out with some effort by evaluation of the remote node's link speed field in the config ROM, the local node's link speed field, and the PHY speeds and topologic information in the local node's or IRM's topology map CSR. However, this does not work in case of 1394b buses. Hence add an ioctl to export the maximum speed which the kernel already determined. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* firewire: cdev: add ioctls for manual iso resource managementStefan Richter2009-03-242-23/+86
| | | | | | | | | | | This adds ioctls for allocation and deallocation of a channel or/and bandwidth without auto-reallocation and without auto-deallocation. The benefit of these ioctls is that libraw1394-style isochronous resource management can be implemented without write access to the IRM's character device file. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* firewire: cdev: add ioctls for isochronous resource managementJay Fenlason, Stefan Richter2009-03-244-20/+475
| | | | | | | | | | | | | | | | | | | | | | | | | | Based on Date: Tue, 18 Nov 2008 11:41:27 -0500 From: Jay Fenlason <fenlason@redhat.com> Subject: [Patch V4] Add ISO resource management support with several changes to the ABI and implementation. Only the part of the ABI which enables auto-reallocation and auto-deallocation is included here. This implements ioctls for kernel-assisted allocation of isochronous channels and isochronous bandwidth. The benefits are: - The client does not have to have write access to the /dev/fw* device corresponding to the IRM. - The client does not have to perform reallocation after bus resets. - Channel and bandwidth are deallocated by the kernel if the file is closed before the client deallocated the resources. Thus resources are released even if the client crashes. It is anticipated that future in-kernel code (firewire-core IRM code; the firewire port of firedtv), will use the fw-iso.c portions of this code too. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de> Tested-by: David Moore <dcm@acm.org>
* firewire: core: topology header fixStefan Richter2009-03-241-0/+6
| | | | Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* firewire: cdev: sort includesStefan Richter2009-03-241-13/+15
| | | | Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* firewire: cdev: unify names of struct types and of their instancesStefan Richter2009-03-241-168/+169
| | | | | | | | | | | | | | | to indicate that they are specializations of struct event or of struct client_resource, respectively. struct response was both an event and a client_resource; it is now split into struct outbound_transaction_resource and ~_event in order to document more explicitly which types of client resources exist. struct request and struct_request_event are renamed to struct inbound_transaction_resource and ~_event because requests and responses occur in outbound and in inbound transactions. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* firewire: cdev: reference-count client instancesStefan Richter2009-03-241-9/+46
| | | | | | | | | | | | The lifetime of struct client instances must be longer than the lifetime of any client resource. This fixes a possible race between fw_device_op_release and transaction completions. It also prepares for new ioctls for isochronous resource management which will involve delayed processing of client resources. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de> Reviewed-by: David Moore <dcm@acm.org>
* firewire: cdev: fix documentation of FW_CDEV_IOC_GET_INFOStefan Richter2009-03-241-1/+1
| | | | | | | | | | | | The FW_CDEV_IOC_GET_INFO ioctl looks at client->device->config_rom, not at the local node's config ROM. We could fix the implementation or the documentation. I believe the way how it is currently implemented is more useful than the way how it is currently documented. In fact, libdc1394 uses the ABI already as implemented, not as documented. Hence let's change the documentation. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* firewire: prevent creation of multiple IR DMA contexts for the same channelStefan Richter2009-03-243-5/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | OHCI-1394 1.1 clause 10.4.3 says: "If more than one IR DMA context specifies receives for packets from the same isochronous channel, the context destination for that channel's packets is undefined." Any userspace client and in the future also kernelspace clients can allocate IR DMA contexts for any channel. We don't want them to interfere with each other, hence it is preferable to return -EBUSY if allocation of a second context for a channel is attempted. Notes: - This limitation is OHCI-1394 specific, therefore its proper place of implementation is down in the low-level driver. - Since the <linux/firewire-cdev.h> ABI simply maps one userspace iso client context to one hardware iso context, this OHCI-1394 limitation alas requires userspace to implement its own multiplexing of iso reception from the same channel and card to multiple clients when needed. - The limitation is independent of channel allocation at the IRM; the latter is really only important for the initiation of iso transmission but not of iso reception. - We don't need to do the same for IT DMA because OHCI-1394 does not have any ties between IT contexts and channels. Only the voluntary channel allocation protocol via the IRM, globally to the FireWire bus, can ensure proper isochronous transmit behaviour anyway. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* firewire: cdev: use list_first_entryStefan Richter2009-03-241-1/+1
| | | | Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* firewire: core: remove unused definitionsStefan Richter2009-03-241-12/+0
| | | | Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* firewire: remove line breaks before function namesStefan Richter2009-03-2411-377/+249
| | | | | | | | | type function_name(parameters); is nice to look at but was not used consistently. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* firewire: standardize a variable nameStefan Richter2009-03-244-58/+57
| | | | | | "ret" is the new "retval". Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
OpenPOWER on IntegriCloud