• Thinh Nguyen's avatar
    usb: dwc3: gadget: Look ahead when setting IOC · f9cc581b
    Thinh Nguyen authored
    Previously if we run out of TRBs for the last SG entry that requires
    an extra TRB, we set interrupt-on-completion (IOC) bit to an already
    prepared TRB (i.e. HWO=1). This logic is not clean, and it's not a
    typical way to prepare TRB. Also, this prevents showing IOC setup in
    tracepoint when __dwc3_prepare_one_trb() is executed. Instead, let's
    look ahead when preparing TRB to know whether to set the IOC bit before
    the last SG entry. This requires adding a new parameter "must_interrupt"
    to dwc3_prepare_one_trb().
    Signed-off-by: default avatarThinh Nguyen <Thinh.Nguyen@synopsys.com>
    Signed-off-by: default avatarFelipe Balbi <balbi@kernel.org>
    f9cc581b
gadget.c 101 KB