* [PATCH] usb: renesas_usbhs: gadget: fix giveback status code in usbhsg_pipe_disable()
@ 2015-12-25 11:26 Yoshihiro Shimoda
2016-03-03 1:32 ` Yoshihiro Shimoda
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Yoshihiro Shimoda @ 2015-12-25 11:26 UTC (permalink / raw)
To: linux-sh
A udc driver should set the giveback status to -ESHUTDOWN in
usb_ep_disable(). Otherwise, a gadget driver (e.g. g_serial) might
request next data wrongly and it is possible to cause kernel panic.
Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
---
This patch is based on Felipe's usb.git / testing/fixes branch.
(commit id = 5072cfc40a80cea3749fd3413b3896630d8c787e)
drivers/usb/renesas_usbhs/mod_gadget.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/usb/renesas_usbhs/mod_gadget.c b/drivers/usb/renesas_usbhs/mod_gadget.c
index 657f967..664b263 100644
--- a/drivers/usb/renesas_usbhs/mod_gadget.c
+++ b/drivers/usb/renesas_usbhs/mod_gadget.c
@@ -561,7 +561,7 @@ static int usbhsg_pipe_disable(struct usbhsg_uep *uep)
if (!pkt)
break;
- usbhsg_queue_pop(uep, usbhsg_pkt_to_ureq(pkt), -ECONNRESET);
+ usbhsg_queue_pop(uep, usbhsg_pkt_to_ureq(pkt), -ESHUTDOWN);
}
usbhs_pipe_disable(pipe);
--
1.9.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* RE: [PATCH] usb: renesas_usbhs: gadget: fix giveback status code in usbhsg_pipe_disable()
2015-12-25 11:26 [PATCH] usb: renesas_usbhs: gadget: fix giveback status code in usbhsg_pipe_disable() Yoshihiro Shimoda
@ 2016-03-03 1:32 ` Yoshihiro Shimoda
2016-03-03 9:21 ` Felipe Balbi
2016-03-03 9:33 ` Yoshihiro Shimoda
2 siblings, 0 replies; 4+ messages in thread
From: Yoshihiro Shimoda @ 2016-03-03 1:32 UTC (permalink / raw)
To: linux-sh
Hi Felipe,
Oops, I completely forgot this patch.
Would you review this patch? Or should I resend it?
I confirmed that this patch could be applied on your latest testing/fixes branch.
Best regards,
Yoshihiro Shimoda
> -----Original Message-----
> From: Yoshihiro Shimoda
> Sent: Friday, December 25, 2015 8:26 PM
> To: gregkh@linuxfoundation.org; balbi@ti.com
> Cc: linux-usb@vger.kernel.org; linux-sh@vger.kernel.org; Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
> Subject: [PATCH] usb: renesas_usbhs: gadget: fix giveback status code in usbhsg_pipe_disable()
>
> A udc driver should set the giveback status to -ESHUTDOWN in
> usb_ep_disable(). Otherwise, a gadget driver (e.g. g_serial) might
> request next data wrongly and it is possible to cause kernel panic.
>
> Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
> ---
> This patch is based on Felipe's usb.git / testing/fixes branch.
> (commit id = 5072cfc40a80cea3749fd3413b3896630d8c787e)
>
> drivers/usb/renesas_usbhs/mod_gadget.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/usb/renesas_usbhs/mod_gadget.c b/drivers/usb/renesas_usbhs/mod_gadget.c
> index 657f967..664b263 100644
> --- a/drivers/usb/renesas_usbhs/mod_gadget.c
> +++ b/drivers/usb/renesas_usbhs/mod_gadget.c
> @@ -561,7 +561,7 @@ static int usbhsg_pipe_disable(struct usbhsg_uep *uep)
> if (!pkt)
> break;
>
> - usbhsg_queue_pop(uep, usbhsg_pkt_to_ureq(pkt), -ECONNRESET);
> + usbhsg_queue_pop(uep, usbhsg_pkt_to_ureq(pkt), -ESHUTDOWN);
> }
>
> usbhs_pipe_disable(pipe);
> --
> 1.9.1
^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: [PATCH] usb: renesas_usbhs: gadget: fix giveback status code in usbhsg_pipe_disable()
2015-12-25 11:26 [PATCH] usb: renesas_usbhs: gadget: fix giveback status code in usbhsg_pipe_disable() Yoshihiro Shimoda
2016-03-03 1:32 ` Yoshihiro Shimoda
@ 2016-03-03 9:21 ` Felipe Balbi
2016-03-03 9:33 ` Yoshihiro Shimoda
2 siblings, 0 replies; 4+ messages in thread
From: Felipe Balbi @ 2016-03-03 9:21 UTC (permalink / raw)
To: linux-sh
[-- Attachment #1: Type: text/plain, Size: 408 bytes --]
Hi Yoshihiro,
Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> writes:
> [ text/plain ]
> Hi Felipe,
>
> Oops, I completely forgot this patch.
> Would you review this patch? Or should I resend it?
> I confirmed that this patch could be applied on your latest
> testing/fixes branch.
I don't seem to have the original patch in my inbox. Would you mind
resending ?
Thanks
--
balbi
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 818 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: [PATCH] usb: renesas_usbhs: gadget: fix giveback status code in usbhsg_pipe_disable()
2015-12-25 11:26 [PATCH] usb: renesas_usbhs: gadget: fix giveback status code in usbhsg_pipe_disable() Yoshihiro Shimoda
2016-03-03 1:32 ` Yoshihiro Shimoda
2016-03-03 9:21 ` Felipe Balbi
@ 2016-03-03 9:33 ` Yoshihiro Shimoda
2 siblings, 0 replies; 4+ messages in thread
From: Yoshihiro Shimoda @ 2016-03-03 9:33 UTC (permalink / raw)
To: linux-sh
Hi Felipe,
> From: Felipe Balbi [mailto:balbi@kernel.org]
> Sent: Thursday, March 03, 2016 6:22 PM
>
> Hi Yoshihiro,
>
> Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> writes:
> > [ text/plain ]
> > Hi Felipe,
> >
> > Oops, I completely forgot this patch.
> > Would you review this patch? Or should I resend it?
> > I confirmed that this patch could be applied on your latest
> > testing/fixes branch.
>
> I don't seem to have the original patch in my inbox. Would you mind
> resending ?
Sure. I will resend this patch soon.
Best regards,
Yoshihiro Shimoda
> Thanks
>
> --
> balbi
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-03-03 9:33 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-12-25 11:26 [PATCH] usb: renesas_usbhs: gadget: fix giveback status code in usbhsg_pipe_disable() Yoshihiro Shimoda
2016-03-03 1:32 ` Yoshihiro Shimoda
2016-03-03 9:21 ` Felipe Balbi
2016-03-03 9:33 ` Yoshihiro Shimoda
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.