firewire: cdev: freeze FW_CDEV_VERSION due to libraw1394 bug
authorStefan Richter <stefanr@s5r6.in-berlin.de>
Sun, 20 Jun 2010 20:52:55 +0000 (22:52 +0200)
committerStefan Richter <stefanr@s5r6.in-berlin.de>
Sun, 20 Jun 2010 21:11:56 +0000 (23:11 +0200)
commit604f45167824e18ad5766e51ecf1d4d65f15118d
tree40deeca88e1788e98d54d82f429a45ce276c4135
parent0244f57302f7e8bebd2f1ab58767eac2e9f678a6
firewire: cdev: freeze FW_CDEV_VERSION due to libraw1394 bug

libraw1394 v2.0.0...v2.0.5 takes FW_CDEV_VERSION from an externally
installed header file and uses it to declare its own implementation
level in FW_CDEV_IOC_GET_INFO.  This is wrong; it should set the real
version for which it was actually written.

If we add features to the kernel ABI that require the kernel to check
a client's implementation level, we can not trust the client version if
it was set from FW_CDEV_VERSION.

Hence freeze FW_CDEV_VERSION at the current value (no damage has been
done yet), clearly document FW_CDEV_VERSION as a dummy version and what
clients are expected to do with fw_cdev_get_info.version, and use a new
defined constant (which is not placed into the exported header file) as
kernel implementation level.

Note, in order to check in client program source code which features are
present in an externally installed linux/firewire-cdev.h, use
preprocessor directives like
  #ifdef FW_CDEV_IOC_ALLOCATE_ISO_RESOURCE
or
  #ifdef FW_CDEV_EVENT_ISO_RESOURCE_ALLOCATED
instead of a check of FW_CDEV_VERSION.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
drivers/firewire/core-cdev.c
include/linux/firewire-cdev.h
This page took 0.025677 seconds and 5 git commands to generate.