From: David Brownell <david-b@pacbell.net>
To: Alan Stern <stern@rowland.harvard.edu>
Cc: sangsu <sangsu@gmail.com>,
linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
gregkh@suse.de
Subject: Re: [PATCH] USB: g_file_storage: fix handling zero-length packet
Date: Sat, 6 Sep 2008 21:32:56 -0700 [thread overview]
Message-ID: <200809062132.56859.david-b@pacbell.net> (raw)
In-Reply-To: <Pine.LNX.4.44L0.0809061615340.30019-100000@netrider.rowland.org>
On Saturday 06 September 2008, Alan Stern wrote:
> Secondly, the patch is not needed. g_file_storage doesn't have to
> check whether the data size is a multiple of MaxPacketSize because the
> device controller driver already is supposed to make that check.
Exactly.
The only fuzziness here is what to do if the host misbehaves and
sends another IN packet when all its data has been sent, instead
of the OUT/STATUS packet. (Host error...)
Most peripheral controller hardware is well enough designed that
it can detect this and send a zero length packet rather than STALL
the transfer. It's polite to do so, because that host bug isn't
exactly unknown. (Some old versions of Linux did that...)
prev parent reply other threads:[~2008-09-07 4:35 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-09-06 4:51 [PATCH] USB: g_file_storage: fix handling zero-length packet sangsu
2008-09-06 20:27 ` Alan Stern
2008-09-07 4:32 ` David Brownell [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=200809062132.56859.david-b@pacbell.net \
--to=david-b@pacbell.net \
--cc=gregkh@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=sangsu@gmail.com \
--cc=stern@rowland.harvard.edu \
/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