lkml.org 
[lkml]   [2022]   [Aug]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH v2 11/25] usb: gadget: f_tcm: Execute command on write completion
    On 2022-07-18 18:27:12 [-0700], Thinh Nguyen wrote:
    > index 6fea80afe2d7..ec83f2f9a858 100644
    > --- a/drivers/usb/gadget/function/f_tcm.c
    > +++ b/drivers/usb/gadget/function/f_tcm.c
    > @@ -955,7 +949,7 @@ static void usbg_data_write_cmpl(struct usb_ep *ep, struct usb_request *req)
    > se_cmd->data_length);
    > }
    >
    > - complete(&cmd->write_complete);
    > + target_execute_cmd(se_cmd);

    usbg_data_write_cmpl() is invoked from interrupt service routing which
    may run with disabled interrupts. From looking at target_execute_cmd():
    | void target_execute_cmd(struct se_cmd *cmd)
    | {

    | spin_lock_irq(&cmd->t_state_lock);

    | spin_unlock_irq(&cmd->t_state_lock);

    | }

    which means interrupts will remain open after leaving
    target_execute_cmd(). Now, why didn't the WARN_ONCE() in
    __handle_irq_event_percpu() trigger? Am I missing something?

    > return;

    Sebastian

    \
     
     \ /
      Last update: 2022-08-26 09:03    [W:2.651 / U:0.136 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site