lkml.org 
[lkml]   [2011]   [Mar]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v2 2/3] usb: gadget: file_storage: Make CD-ROM emulation work with Mac OS-X
Date
From
>>> On the other hand, I don't think any implementations would get upset  
>>> if we simply ended the transfer with a short packet instead of
>>> adhering strictly to the spec.

> On Wed, 23 Mar 2011, Roger Quadros wrote:
>> I tried your patch with the CD-ROM implementation and it works
>> perfectly. I do not see the unnecessary zero padded transfers
>> any more.
>>
>> Do you think we should have this patch in? with the risk of not strictly
>> adhering to spec for cases where controller cannot stall?

On Wed, 23 Mar 2011 16:17:32 +0100, Alan Stern wrote:
> There already is another place where not stalling forces the driver to
> violate the spec. I don't think this makes things much worse... but it
> is a significant change in behavior.
>
> This affects Michal's driver too; we should ask his opinion. Michal,
> in case you didn't see it, the proposed patch is here:
>
> http://marc.info/?l=linux-usb&m=130080683528607&w=2

Thanks. I don't have original message so I'll reply here:

> + /* Don't know what to do if common->fsg is NULL */
> + } else if (!common->fsg) {
> + rc = -EIO;
> +

I'd change that to "if (!fsg_is_set(common))". fsg_is_set() prints out a
warning
if common->fsg is not set and I think that's something we want.

(Come to think of it, this check should be done at the beginning of the
function
simplifying the rest of the function, but that's unrelated, I'll do it
myself I
guess.)

Other then that, looks good to me.

As for violating the spec, I don't think I have anything clever to add...

--
Best regards, _ _
.o. | Liege of Serenely Enlightened Majesty of o' \,=./ `o
..o | Computer Science, Michal "mina86" Nazarewicz (o o)
ooo +-----<email/xmpp: mnazarewicz@google.com>-----ooO--(_)--Ooo--


\
 
 \ /
  Last update: 2011-03-23 17:17    [W:0.055 / U:23.248 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site