From: "Vladimir 'φ-coder/phcoder' Serbinenko" <phcoder@gmail.com>
To: grub-devel@gnu.org
Subject: Re: [PATCH] Long USB transfers problem
Date: Sun, 20 Jan 2013 22:46:04 +0100 [thread overview]
Message-ID: <50FC659C.6020105@gmail.com> (raw)
In-Reply-To: <1354402009.2479.108.camel@pracovna>
[-- Attachment #1: Type: text/plain, Size: 2329 bytes --]
Committed, thanks
On 01.12.2012 23:46, Aleš Nesrsta wrote:
> Hi,
> I found some USB problem:
>
> Some part of GRUB wants read "long" data block from USB mass storage
> device when GRUB opens USB disk, e.g. when "ls" command is entered first
> time after EHCI/UHCI/OHCI module is loaded.
> "Long" means data block of 0x8000 bytes length - it is not too much
> nowadays :-)
>
> But:
> Some USB devices have too low limit of bulk data packet size, e.g. 32
> bytes or less - so, in such case the USB driver needs to use lot of
> Transfer Descriptors (TDs) to transfer 32Kbytes of data.
> Unfortunately, number of TDs is limited in GRUB driver(s) - and there is
> not enough TDs in this situation.
> The result is internal error, no data transfer is initiated by driver
> and error code is returned to calling function from usbms.c.
>
> It is vary bad situation: USB device receives CBW command to transfer
> 0x8000 bytes - but transfer of data is never started because driver run
> out of TDs...
> Some devices could be automatically recovered from such situation and
> works normally later when GRUB tries read disk by smaller parts.
> But some devices remains confused even if they are reset by USBMS
> specific reset command.
>
> So, I wrote simple experimental patch which splits "long" transfer into
> smaller parts - it looks to solve this issue.
> Patch solves only read transfer - AFAIK GRUB loader is not designed to
> write some data into disk, so there probably never be transfer of "long"
> data block in direction into USB mass storage device.
> Maximal size 2Kbyte of USB data transfer data block (defined in
> usbtrans.h) looks to be more or less optimal value.
>
> It is probably not critical patch because this situation happens mainly
> if USB device is full speed device - i.e. this problem is related mainly
> to very old USB flash disks or some (older) special mass storage devices
> like GPS devices, cameras, card readers etc. - which will be probably
> never used as boot devices... (but - who knows...) :-)
>
> BR,
> Ales
>
>
>
> _______________________________________________
> Grub-devel mailing list
> Grub-devel@gnu.org
> https://lists.gnu.org/mailman/listinfo/grub-devel
--
Regards
Vladimir 'φ-coder/phcoder' Serbinenko
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 294 bytes --]
next prev parent reply other threads:[~2013-01-20 21:46 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-01 22:46 [PATCH] Long USB transfers problem Aleš Nesrsta
2012-12-10 10:57 ` Vladimir 'φ-coder/phcoder' Serbinenko
2012-12-10 17:49 ` Aleš Nesrsta
2012-12-10 20:33 ` Vladimir 'φ-coder/phcoder' Serbinenko
2012-12-11 20:40 ` Aleš Nesrsta
2013-01-20 21:46 ` Vladimir 'φ-coder/phcoder' Serbinenko [this message]
2013-02-11 23:13 ` Aleš Nesrsta
2013-02-24 18:37 ` Vladimir 'φ-coder/phcoder' Serbinenko
2013-02-24 19:09 ` Vladimir 'φ-coder/phcoder' Serbinenko
2013-02-24 19:25 ` Vladimir 'φ-coder/phcoder' Serbinenko
2013-03-07 19:19 ` Aleš Nesrsta
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=50FC659C.6020105@gmail.com \
--to=phcoder@gmail.com \
--cc=grub-devel@gnu.org \
/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.