]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit03b384b9c9ce9768d23c258d8fe50efc27e3fec2
tree40deeca88e1788e98d54d82f429a45ce276c4135
parenta5cc3dbd5ed4e30a144d9c4763f6d8fd250b1416
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