diff options
Diffstat (limited to 'hw/usb/dump.h')
-rw-r--r-- | hw/usb/dump.h | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/hw/usb/dump.h b/hw/usb/dump.h index a54bc5862d..247016f259 100644 --- a/hw/usb/dump.h +++ b/hw/usb/dump.h @@ -54,9 +54,27 @@ typedef struct UsbDumpState UsbDumpState; * - setup(setup_len == 0, OUT) / status(OUT) (BROKEN!) * * handle_data is called for all non-EP0 transfers. PID is either IN or OUT. - * Sequence for the PID cases: - * - IN: submit(); make data; complete(data); usb_packet_copy(data) + * Sequence for the PID cases (interrupt): + * - IN: make data; complete(data); usb_packet_copy(data); submit() * - OUT: usb_packet_copy(data); submit(data); process data; complete() + * + * If there is no data for IN, just return NAK without dumping to avoid log + * flood (due to the periodic polling by interrupts and isoc). + * Isoc has probably the same sequence as interrupt; bulk less so. + * In the IN sequence, note that complete(data) is called before submit. See the + * below diagram for the reason. + * ___________ + * _____ \ ev_type / + * | dir \ | S | C | + * | +---+---+ + * | IN | n | y | (whether the packet has data for this + * | OUT | y | n | combination of ev_type and direction) + * --------+---+---+ + * + * Control: DONE + * Int: IN PROGRESS + * Bulk: TODO + * Isoc: TODO */ /* |