* [PATCH] usb: uhci-hcd: fix uhci_alloc_int_td() @ 2017-03-22 21:36 Peter Mamonov 2017-03-24 6:20 ` Sascha Hauer 0 siblings, 1 reply; 4+ messages in thread From: Peter Mamonov @ 2017-03-22 21:36 UTC (permalink / raw) To: barebox; +Cc: Peter Mamonov Signed-off-by: Peter Mamonov <pmamonov@gmail.com> --- drivers/usb/host/uhci-hcd.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/usb/host/uhci-hcd.c b/drivers/usb/host/uhci-hcd.c index 9ad4644e8..04d167ee3 100644 --- a/drivers/usb/host/uhci-hcd.c +++ b/drivers/usb/host/uhci-hcd.c @@ -554,8 +554,12 @@ static int submit_bulk_msg(struct usb_device *dev, unsigned long pipe, */ static struct uhci_td *uhci_alloc_int_td(struct uhci_priv *uhci) { - return &uhci->tmp_int_td[0]; + int i; + for (i = 0; i < USB_MAX_TEMP_INT_TD; i++) + if (uhci->tmp_int_td[i].dev_ptr == 0) + return &uhci->tmp_int_td[i]; + return NULL; } /* -- 2.11.0 _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] usb: uhci-hcd: fix uhci_alloc_int_td() 2017-03-22 21:36 [PATCH] usb: uhci-hcd: fix uhci_alloc_int_td() Peter Mamonov @ 2017-03-24 6:20 ` Sascha Hauer 2017-04-05 10:05 ` Peter Mamonov 0 siblings, 1 reply; 4+ messages in thread From: Sascha Hauer @ 2017-03-24 6:20 UTC (permalink / raw) To: Peter Mamonov; +Cc: barebox Hi Peter, On Thu, Mar 23, 2017 at 12:36:15AM +0300, Peter Mamonov wrote: > Signed-off-by: Peter Mamonov <pmamonov@gmail.com> > --- > drivers/usb/host/uhci-hcd.c | 6 +++++- > 1 file changed, 5 insertions(+), 1 deletion(-) > > diff --git a/drivers/usb/host/uhci-hcd.c b/drivers/usb/host/uhci-hcd.c > index 9ad4644e8..04d167ee3 100644 > --- a/drivers/usb/host/uhci-hcd.c > +++ b/drivers/usb/host/uhci-hcd.c > @@ -554,8 +554,12 @@ static int submit_bulk_msg(struct usb_device *dev, unsigned long pipe, > */ > static struct uhci_td *uhci_alloc_int_td(struct uhci_priv *uhci) > { > - return &uhci->tmp_int_td[0]; > + int i; > > + for (i = 0; i < USB_MAX_TEMP_INT_TD; i++) > + if (uhci->tmp_int_td[i].dev_ptr == 0) > + return &uhci->tmp_int_td[i]; > + return NULL; You have to upstream the uhci driver first before I can apply fixes for it ;) Sascha -- Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] usb: uhci-hcd: fix uhci_alloc_int_td() 2017-03-24 6:20 ` Sascha Hauer @ 2017-04-05 10:05 ` Peter Mamonov 2017-04-06 7:04 ` Sascha Hauer 0 siblings, 1 reply; 4+ messages in thread From: Peter Mamonov @ 2017-04-05 10:05 UTC (permalink / raw) To: Sascha Hauer; +Cc: barebox Hi Sasha, On Fri, Mar 24, 2017 at 07:20:55AM +0100, Sascha Hauer wrote: > Hi Peter, > > On Thu, Mar 23, 2017 at 12:36:15AM +0300, Peter Mamonov wrote: > > Signed-off-by: Peter Mamonov <pmamonov@gmail.com> > > --- > > drivers/usb/host/uhci-hcd.c | 6 +++++- > > 1 file changed, 5 insertions(+), 1 deletion(-) > > > > diff --git a/drivers/usb/host/uhci-hcd.c b/drivers/usb/host/uhci-hcd.c > > index 9ad4644e8..04d167ee3 100644 > > --- a/drivers/usb/host/uhci-hcd.c > > +++ b/drivers/usb/host/uhci-hcd.c > > @@ -554,8 +554,12 @@ static int submit_bulk_msg(struct usb_device *dev, unsigned long pipe, > > */ > > static struct uhci_td *uhci_alloc_int_td(struct uhci_priv *uhci) > > { > > - return &uhci->tmp_int_td[0]; > > + int i; > > > > + for (i = 0; i < USB_MAX_TEMP_INT_TD; i++) > > + if (uhci->tmp_int_td[i].dev_ptr == 0) > > + return &uhci->tmp_int_td[i]; > > + return NULL; > > You have to upstream the uhci driver first before I can apply fixes for > it ;) Right =) I've just realized it was not accepted... for a good reason: http://lists.infradead.org/pipermail/barebox/2016-January/026016.html Regards, Peter > > Sascha > > -- > Pengutronix e.K. | | > Industrial Linux Solutions | http://www.pengutronix.de/ | > Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | > Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] usb: uhci-hcd: fix uhci_alloc_int_td() 2017-04-05 10:05 ` Peter Mamonov @ 2017-04-06 7:04 ` Sascha Hauer 0 siblings, 0 replies; 4+ messages in thread From: Sascha Hauer @ 2017-04-06 7:04 UTC (permalink / raw) To: Peter Mamonov; +Cc: barebox On Wed, Apr 05, 2017 at 01:05:47PM +0300, Peter Mamonov wrote: > Hi Sasha, > > On Fri, Mar 24, 2017 at 07:20:55AM +0100, Sascha Hauer wrote: > > Hi Peter, > > > > On Thu, Mar 23, 2017 at 12:36:15AM +0300, Peter Mamonov wrote: > > > Signed-off-by: Peter Mamonov <pmamonov@gmail.com> > > > --- > > > drivers/usb/host/uhci-hcd.c | 6 +++++- > > > 1 file changed, 5 insertions(+), 1 deletion(-) > > > > > > diff --git a/drivers/usb/host/uhci-hcd.c b/drivers/usb/host/uhci-hcd.c > > > index 9ad4644e8..04d167ee3 100644 > > > --- a/drivers/usb/host/uhci-hcd.c > > > +++ b/drivers/usb/host/uhci-hcd.c > > > @@ -554,8 +554,12 @@ static int submit_bulk_msg(struct usb_device *dev, unsigned long pipe, > > > */ > > > static struct uhci_td *uhci_alloc_int_td(struct uhci_priv *uhci) > > > { > > > - return &uhci->tmp_int_td[0]; > > > + int i; > > > > > > + for (i = 0; i < USB_MAX_TEMP_INT_TD; i++) > > > + if (uhci->tmp_int_td[i].dev_ptr == 0) > > > + return &uhci->tmp_int_td[i]; > > > + return NULL; > > > > You have to upstream the uhci driver first before I can apply fixes for > > it ;) > > Right =) > > I've just realized it was not accepted... for a good reason: > http://lists.infradead.org/pipermail/barebox/2016-January/026016.html Well the driver doesn't look bad from a first glance. You could repost it with your fixup applied and see what the maintainer says ;) Sascha -- Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2017-04-06 7:04 UTC | newest] Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2017-03-22 21:36 [PATCH] usb: uhci-hcd: fix uhci_alloc_int_td() Peter Mamonov 2017-03-24 6:20 ` Sascha Hauer 2017-04-05 10:05 ` Peter Mamonov 2017-04-06 7:04 ` Sascha Hauer
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox