]> git.baikalelectronics.ru Git - kernel.git/commit
firewire: cdev: require quadlet-aligned headers for transmit packets
authorClemens Ladisch <clemens@ladisch.de>
Wed, 31 Mar 2010 14:26:46 +0000 (16:26 +0200)
committerStefan Richter <stefanr@s5r6.in-berlin.de>
Sat, 10 Apr 2010 14:51:13 +0000 (16:51 +0200)
commit3bb73354cee79ee29b6972733a0e29bda505ac63
tree76b56fc42e4f11aeb4cfdcc6e98b16220927ca04
parent1a178ad1f332a971efa6734220b717aa39958d28
firewire: cdev: require quadlet-aligned headers for transmit packets

The definition of struct fw_cdev_iso_packet seems to imply that the
header_length must be quadlet-aligned, and in fact, specifying an
unaligned header has never really worked when using multiple packet
structures, because the position of the next control word is computed by
rounding the header_length _down_, so the last one to three bytes of the
header would overlap the next control word.

To avoid this problem, check that the header length is properly aligned.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
drivers/firewire/core-cdev.c