linux/include
Stefan Richter 850bb6f23b firewire: cdev: add PHY packet transmission
Add an FW_CDEV_IOC_SEND_PHY_PACKET ioctl() for /dev/fw* which can be
used to implement bus management related functionality in userspace.

This is also half of the functionality (the transmit part) that is
needed to support a userspace implementation of a VersaPHY transaction
layer.

Safety considerations:

  - PHY packets are generally broadcasts and may have interesting
    effects on PHYs and the bus, e.g. make asynchronous arbitration
    impossible due to too low gap count.  Hence some kind of elevated
    privileges should be required of a process to be able to send
    PHY packets.  This implementation assumes that a process that is
    allowed to open the /dev/fw* of a local node does have this
    privilege.

    There was an inconclusive discussion about introducing POSIX
    capabilities as a means to check for user privileges for these
    kinds of operations.

  - The kernel does not check integrity of the supplied packet data.
    That would be far too much code, considering the many kinds of
    PHY packets.  A process which got the privilege to send these
    packets is trusted to do it correctly.

Just like with the other "send packet" ioctls, a non-blocking API is
chosen; i.e. the ioctl may return even before AT DMA started.  After
transmission, an event for poll()/read() is enqueued.  Most users are
going to need a blocking API, but a blocking userspace wrapper is easy
to implement, and the second of the two existing libraw1394 calls
raw1394_phy_packet_write() and raw1394_start_phy_packet_write() can be
better supported that way.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2010-07-23 13:36:28 +02:00
..
acpi Merge branch 'bugzilla-14483' into release 2010-01-20 01:14:50 -05:00
asm-generic fix up O_SYNC comments 2009-12-17 11:03:24 -05:00
crypto crypto: hash - Remove legacy hash/digest code 2009-10-19 12:53:37 +09:00
drm Merge remote branch 'nouveau/for-airlied' of nouveau-2.6 2010-02-11 12:10:52 +10:00
keys RxRPC: Use uX/sX rather than uintX_t/intX_t types 2009-09-16 00:01:13 -07:00
linux firewire: cdev: add PHY packet transmission 2010-07-23 13:36:28 +02:00
math-emu math-emu: Fix thinko in _FP_DIV 2008-10-22 22:09:59 -07:00
media V4L/DVB (13670): soc-camera: Add mt9t112 camera driver 2009-12-16 09:27:41 -02:00
mtd Kill jffs2-user.h 2009-06-05 17:31:38 +01:00
net netfilter: nf_conntrack: fix hash resizing with namespaces 2010-02-08 11:18:07 -08:00
pcmcia pcmcia: CodingStyle fixes 2009-12-07 22:23:40 +01:00
rdma Merge branches 'amso1100', 'cma', 'cxgb3', 'ehca', 'ipath', 'ipoib', 'iser', 'misc', 'mlx4' and 'nes' into for-next 2009-12-15 23:39:25 -08:00
rxrpc [AF_RXRPC]: Delete the old RxRPC code. 2007-04-26 15:55:48 -07:00
scsi [SCSI] fc-transport: Use packed modifier for fc_bsg_request structure. 2010-01-17 12:36:33 -06:00
sound Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2009-12-09 19:43:33 -08:00
trace tracing: Fix sign fields in ftrace_define_fields_##call() 2009-12-30 10:27:06 -05:00
video Merge git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6 2009-12-16 10:29:52 -08:00
xen xen: move Xen-testing predicates to common header 2009-11-04 08:47:24 -08:00
Kbuild