Skip to content

Commit 0421621

Browse files
committed
Merge tag 'firewire-fixes-6.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394
Pull firewire fixes from Takashi Sakamoto: "The recent integration of compiler collections introduced the technology to check flexible array length at runtime by providing proper annotations. In v6.10 kernel, a patch was merged into firewire subsystem to utilize it, however the annotation was inadequate. There is also the related change for the flexible array in sound subsystem, but it causes a regression where the data in the payload of isochronous packet is incorrect for some devices. These bugs are now fixed" * tag 'firewire-fixes-6.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394: ALSA: firewire-lib: fix wrong value as length of header for CIP_NO_HEADER case Revert "firewire: Annotate struct fw_iso_packet with __counted_by()"
2 parents ab11658 + c183950 commit 0421621

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

include/linux/firewire.h

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -462,9 +462,8 @@ struct fw_iso_packet {
462462
/* rx: Sync bit, wait for matching sy */
463463
u32 tag:2; /* tx: Tag in packet header */
464464
u32 sy:4; /* tx: Sy in packet header */
465-
u32 header_length:8; /* Length of immediate header */
466-
/* tx: Top of 1394 isoch. data_block */
467-
u32 header[] __counted_by(header_length);
465+
u32 header_length:8; /* Size of immediate header */
466+
u32 header[]; /* tx: Top of 1394 isoch. data_block */
468467
};
469468

470469
#define FW_ISO_CONTEXT_TRANSMIT 0

sound/firewire/amdtp-stream.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1180,8 +1180,7 @@ static void process_rx_packets(struct fw_iso_context *context, u32 tstamp, size_
11801180
(void)fw_card_read_cycle_time(fw_parent_device(s->unit)->card, &curr_cycle_time);
11811181

11821182
for (i = 0; i < packets; ++i) {
1183-
DEFINE_FLEX(struct fw_iso_packet, template, header,
1184-
header_length, CIP_HEADER_QUADLETS);
1183+
DEFINE_RAW_FLEX(struct fw_iso_packet, template, header, CIP_HEADER_QUADLETS);
11851184
bool sched_irq = false;
11861185

11871186
build_it_pkt_header(s, desc->cycle, template, pkt_header_length,

0 commit comments

Comments
 (0)