if (rcode == RCODE_COMPLETE && substream != NULL)
snd_rawmidi_transmit_ack(substream, port->consume_bytes);
+
+ port->idling = true;
}
static void midi_port_work(struct work_struct *work)
int generation;
int type;
+ /* Under transacting. */
+ if (!port->idling)
+ return;
+
/* Nothing to do. */
if (substream == NULL || snd_rawmidi_transmit_empty(substream))
return;
type = TCODE_WRITE_BLOCK_REQUEST;
/* Start this transaction. */
+ port->idling = false;
+
/*
* In Linux FireWire core, when generation is updated with memory
* barrier, node id has already been updated. In this module, After
port->parent = fw_parent_device(unit);
port->addr = addr;
port->fill = fill;
+ port->idling = true;
INIT_WORK(&port->work, midi_port_work);