lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220826190420.msfmhv2kxsv4qsdu@synopsys.com>
Date:   Fri, 26 Aug 2022 19:04:25 +0000
From:   Thinh Nguyen <Thinh.Nguyen@...opsys.com>
To:     Sebastian Andrzej Siewior <bigeasy@...utronix.de>
CC:     Thinh Nguyen <Thinh.Nguyen@...opsys.com>,
        Felipe Balbi <balbi@...nel.org>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        "linux-usb@...r.kernel.org" <linux-usb@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        Dmitry Bogdanov <d.bogdanov@...ro.com>,
        "linux-scsi@...r.kernel.org" <linux-scsi@...r.kernel.org>,
        "target-devel@...r.kernel.org" <target-devel@...r.kernel.org>
Subject: Re: [PATCH v2 17/25] usb: gadget: f_tcm: Handle abort command

On Fri, Aug 26, 2022, Sebastian Andrzej Siewior wrote:
> On 2022-07-18 18:27:51 [-0700], Thinh Nguyen wrote:
> > diff --git a/drivers/usb/gadget/function/f_tcm.c b/drivers/usb/gadget/function/f_tcm.c
> > --- a/drivers/usb/gadget/function/f_tcm.c
> > +++ b/drivers/usb/gadget/function/f_tcm.c
> > @@ -1278,6 +1278,22 @@ static void usbg_queue_tm_rsp(struct se_cmd *se_cmd)
> >  
> >  static void usbg_aborted_task(struct se_cmd *se_cmd)
> >  {
> > +	struct usbg_cmd *cmd = container_of(se_cmd, struct usbg_cmd, se_cmd);
> > +	struct f_uas *fu = cmd->fu;
> > +	struct uas_stream *stream = cmd->stream;
> > +	int ret = 0;
> > +
> > +	if (stream->req_out->status == -EINPROGRESS)
> > +		ret = usb_ep_dequeue(fu->ep_out, stream->req_out);
> > +	else if (stream->req_in->status == -EINPROGRESS)
> > +		ret = usb_ep_dequeue(fu->ep_in, stream->req_in);
> > +	else if (stream->req_status->status == -EINPROGRESS)
> > +		ret = usb_ep_dequeue(fu->ep_status, stream->req_status);
> > +
> > +	if (ret)
> > +		pr_err("Unable to dequeue se_cmd out %p\n", se_cmd);
> 
> I know I wasn't the best example here. But if you continue to work on
> that one, if would be nice if you could replace all the pr_err() here
> with a dev_err() (or so) so it is bound to an actual device and the
> reader can actually pin point the message to the actually device/
> subsystem. I'm not sure if we lack a device or I was extremely lazy.
> Again, not something you need change now.

Yes. I noticed that too. However, I think that can be done later as it
doesn't seem critical. I tried to keep the code consistent for now.

Thanks,
Thinh

> 
> > +	cmd->state = UASP_QUEUE_COMMAND;
> >  }
> >  
> >  static const char *usbg_check_wwn(const char *name)
> 
> Sebastian

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ