if (IS_ERR(context))
return PTR_ERR(context);
if (client->version < FW_CDEV_VERSION_AUTO_FLUSH_ISO_OVERFLOW)
- context->drop_overflow_headers = true;
+ context->flags |= FW_ISO_CONTEXT_FLAG_DROP_OVERFLOW_HEADERS;
// We only support one context at this time.
scoped_guard(mutex, &client->iso_context_mutex) {
ctx->type = type;
ctx->channel = channel;
ctx->speed = speed;
+ ctx->flags = 0;
ctx->header_size = header_size;
ctx->callback = callback;
ctx->callback_data = callback_data;
u32 *ctx_hdr;
if (ctx->sc.header_length + ctx->base.header_size > PAGE_SIZE) {
- if (ctx->base.drop_overflow_headers)
+ if (ctx->base.flags & FW_ISO_CONTEXT_FLAG_DROP_OVERFLOW_HEADERS)
return;
flush_iso_completions(ctx, FW_ISO_CONTEXT_COMPLETIONS_CAUSE_HEADER_OVERFLOW);
}
sync_it_packet_for_cpu(context, d);
if (ctx->sc.header_length + 4 > PAGE_SIZE) {
- if (ctx->base.drop_overflow_headers)
+ if (ctx->base.flags & FW_ISO_CONTEXT_FLAG_DROP_OVERFLOW_HEADERS)
return 1;
flush_iso_completions(ctx, FW_ISO_CONTEXT_COMPLETIONS_CAUSE_HEADER_OVERFLOW);
}
fw_iso_mc_callback_t mc;
};
+enum fw_iso_context_flag {
+ FW_ISO_CONTEXT_FLAG_DROP_OVERFLOW_HEADERS = BIT(0),
+};
+
struct fw_iso_context {
struct fw_card *card;
struct work_struct work;
int type;
int channel;
int speed;
- bool drop_overflow_headers;
+ int flags;
size_t header_size;
union fw_iso_callback callback;
void *callback_data;