lkml.org 
[lkml]   [2011]   [Apr]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectRe: [PATCH 2/2] usb: gadget: f_mass_storage: Make us pass USBCV MSC Compliance tests
    Date
    From
    On Tue, 19 Apr 2011 15:33:53 +0200, Roger Quadros  
    <roger.quadros@nokia.com> wrote:
    > @@ -2468,7 +2469,7 @@ static int fsg_set_alt(struct usb_function *f,
    > unsigned intf, unsigned alt)
    > struct fsg_dev *fsg = fsg_from_func(f);
    > fsg->common->new_fsg = fsg;
    > raise_exception(fsg->common, FSG_STATE_CONFIG_CHANGE);
    > - return 0;
    > + return USB_GADGET_DELAYED_STATUS;
    > }
    > static void fsg_disable(struct usb_function *f)
    > @@ -2604,6 +2605,8 @@ static void handle_exception(struct fsg_common
    > *common)
    > case FSG_STATE_CONFIG_CHANGE:
    > do_set_interface(common, common->new_fsg);
    > + if (common->new_fsg)
    > + usb_composite_setup_continue(common->cdev);
    > break;
    > case FSG_STATE_EXIT:

    At first I thought that it's a mismatch since USB_GADGET_DELAYED_STATUS
    is returned all the time but usb_composite_setup_continue() is called
    only if common->new_fsg is set but after more careful investigation
    this seems to be correct.

    > @@ -3083,6 +3086,7 @@ static int fsg_bind_config(struct
    > usb_composite_dev *cdev,
    > fsg->function.disable = fsg_disable;
    > fsg->common = common;
    > + fsg->common->cdev = cdev;
    > /*
    > * Our caller holds a reference to common structure so we
    > * don't have to be worry about it being freed until we return

    common->cdev initialisation should be moved to fsg_common_init().

    --
    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-04-19 16:37    [W:2.555 / U:0.112 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site