From: Felipe Balbi <balbi@ti.com>
To: Andreas Larsson <andreas@gaisler.com>
Cc: Felipe Balbi <balbi@ti.com>, <linux-usb@vger.kernel.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
<linux-kernel@vger.kernel.org>, <devicetree@vger.kernel.org>,
<software@gaisler.com>
Subject: Re: [PATCH v3] usb: gadget: Add UDC driver for Aeroflex Gaisler GRUSBDC
Date: Thu, 12 Dec 2013 12:01:07 -0600 [thread overview]
Message-ID: <20131212180106.GF1939@saruman.home> (raw)
In-Reply-To: <1386144838-16403-1-git-send-email-andreas@gaisler.com>
[-- Attachment #1: Type: text/plain, Size: 1670 bytes --]
Hi,
On Wed, Dec 04, 2013 at 09:13:58AM +0100, Andreas Larsson wrote:
> +static void gr_finish_request(struct gr_ep *ep, struct gr_request *req,
> + int status)
> +{
> + struct gr_udc *dev;
> +
> + list_del_init(&req->queue);
> +
> + if (likely(req->req.status == -EINPROGRESS))
> + req->req.status = status;
> + else
> + status = req->req.status;
> +
> + dev = ep->dev;
> + usb_gadget_unmap_request(&dev->gadget, &req->req, ep->is_in);
> + gr_free_dma_desc_chain(dev, req);
> +
> + if (ep->is_in) /* For OUT, actual gets updated bit by bit */
> + req->req.actual = req->req.length;
> +
> + if (!status) {
> + if (ep->is_in)
> + gr_dbgprint_request("SENT", ep, req);
> + else
> + gr_dbgprint_request("RECV", ep, req);
> + }
> +
> + /* Prevent changes to ep->queue during callback */
> + ep->callback = 1;
> + if (req == dev->ep0reqo && !status) {
> + if (req->setup)
> + gr_ep0_setup(dev, req);
> + else
> + dev_err(dev->dev,
> + "Unexpected non setup packet on ep0in\n");
> + } else if (req->req.complete) {
> + unsigned long flags;
> +
> + /*
> + * Complete should be called with interrupts disabled according
> + * to the contract of struct usb_request
> + */
> + local_irq_save(flags);
sorry but this driver isn't ready for inclusion. local_irq_save() is a
pretty good hint that there's something wrong in the driver. Consider
the fact that local_irq_save() will disable preemption even when
CONFIG_PREEMPT_FULL is enabled and you have a bit a problem.
Also, the way you're using thread IRQs is quite wrong. I can't let that
pass and get merged upstream, sorry.
--
balbi
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
next prev parent reply other threads:[~2013-12-12 18:01 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-04 8:13 Andreas Larsson
2013-12-12 18:01 ` Felipe Balbi [this message]
2013-12-13 7:48 ` Andreas Larsson
2013-12-13 19:52 ` Felipe Balbi
2013-12-15 22:24 ` Andreas Larsson
2013-12-16 21:25 ` Felipe Balbi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20131212180106.GF1939@saruman.home \
--to=balbi@ti.com \
--cc=andreas@gaisler.com \
--cc=devicetree@vger.kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=software@gaisler.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®