All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marek Vasut <marex@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v1] Revert "fastboot: OUT transaction length must be aligned to wMaxPacketSize"
Date: Tue, 05 Apr 2016 14:59:02 +0200	[thread overview]
Message-ID: <5703B696.7040602@denx.de> (raw)
In-Reply-To: <CAKaJLVvk9Z=fjRO_RXCvDjYd5Wmmjr+2JM6upF3RdvuLNXAAgw@mail.gmail.com>

On 04/05/2016 02:09 PM, Sam Protsenko wrote:
> On Mon, Apr 4, 2016 at 8:16 PM, Steve Rae <steve.rae@broadcom.com> wrote:
>> That one fails for me too....
>>
>> So I suspect that a conditional is required - something like:
>>
>> diff --git a/drivers/usb/gadget/f_fastboot.c
>> b/drivers/usb/gadget/f_fastboot.c
>> index a54b4ee..41ec211 100644
>> --- a/drivers/usb/gadget/f_fastboot.c
>> +++ b/drivers/usb/gadget/f_fastboot.c
>> @@ -422,17 +422,19 @@ static void cb_getvar(struct usb_ep *ep, struct
>> usb_request *req)
>>  static unsigned int rx_bytes_expected(unsigned int maxpacket)
>>  {
>>         int rx_remain = download_size - download_bytes;
>> -       int rem = 0;
>> +       int __maybe_unused rem = 0;
>>         if (rx_remain < 0)
>>                 return 0;
>>         if (rx_remain > EP_BUFFER_SIZE)
>>                 return EP_BUFFER_SIZE;
>> +#if XXX_alignment_required
>>         if (rx_remain < maxpacket) {
>>                 rx_remain = maxpacket;
>>         } else if (rx_remain % maxpacket != 0) {
>>                 rem = rx_remain % maxpacket;
>>                 rx_remain = rx_remain + (maxpacket - rem);
>>         }
>> +#endif
>>         return rx_remain;
>>  }
>>
>> If you submit a PATCH like this, then I will abort the request to "revert"
>> this PATCH....
>> Thanks, Steve
> 
> Well, I'm pretty busy doing another work right now, and obviously
> revert shouldn't be merged anyway (as it breaks another platforms).

The revert is not applied.

> But you can go ahead and send v2 of this patch, adding corresponding
> options (perhaps to Kconfig) and testing them via #ifdef, and I will
> verify if it works fine for TI platforms.
> 
> Also, it would be good to know why that stuck is happening for you in
> the first place, so we can come up with real solution to this problem
> instead of fixing it with hack.

Right

Best regards,
Marek Vasut

      reply	other threads:[~2016-04-05 12:59 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-23  0:50 [U-Boot] [PATCH v1] Revert "fastboot: OUT transaction length must be aligned to wMaxPacketSize" Steve Rae
2016-03-23  2:04 ` Marek Vasut
2016-03-23  9:49   ` Lukasz Majewski
2016-03-23 15:54     ` Sam Protsenko
2016-03-23 17:40       ` Steve Rae
2016-03-23 19:40         ` Sam Protsenko
2016-03-23 19:49           ` Steve Rae
2016-04-03 14:07             ` Sam Protsenko
2016-03-24 17:15 ` Tom Rini
2016-04-03 14:19   ` Sam Protsenko
2016-04-04 17:16     ` Steve Rae
2016-04-05 12:09       ` Sam Protsenko
2016-04-05 12:59         ` Marek Vasut [this message]

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=5703B696.7040602@denx.de \
    --to=marex@denx.de \
    --cc=u-boot@lists.denx.de \
    /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 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.