Skip to content

Commit

Permalink
usb: gadget: mass storage: fix return of delayed status
Browse files Browse the repository at this point in the history
Mass storage gadget returns DELAYED_STATUS in stead of
USB_GADGET_DELAYED_STATUS while handling bulk reset request. Since
peripheral driver uses USB_GADGET_DELAYED_STATUS for delayed status
handling, therefore replace DELAYED_STATUS by USB_GADGET_DELAYED_STATUS
in mass storage driver.

Since, DELAYED_STATUS and hence EP0_BUFSIZE will no longer be used now,
so remove them.

Signed-off-by: Pratyush Anand <pratyush.anand@st.com>
Cc: Paul Zimmerman <Paul.Zimmerman@synopsys.com>
Cc: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Felipe Balbi <balbi@ti.com>
  • Loading branch information
Pratyush Anand authored and Felipe Balbi committed Nov 25, 2013
1 parent bc912b0 commit 655403c
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
2 changes: 1 addition & 1 deletion drivers/usb/gadget/f_mass_storage.c
Original file line number Diff line number Diff line change
Expand Up @@ -523,7 +523,7 @@ static int fsg_setup(struct usb_function *f,
*/
DBG(fsg, "bulk reset request\n");
raise_exception(fsg->common, FSG_STATE_RESET);
return DELAYED_STATUS;
return USB_GADGET_DELAYED_STATUS;

case US_BULK_GET_MAX_LUN:
if (ctrl->bRequestType !=
Expand Down
4 changes: 0 additions & 4 deletions drivers/usb/gadget/storage_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -119,10 +119,6 @@ static inline bool fsg_lun_is_open(struct fsg_lun *curlun)
return curlun->filp != NULL;
}

/* Big enough to hold our biggest descriptor */
#define EP0_BUFSIZE 256
#define DELAYED_STATUS (EP0_BUFSIZE + 999) /* An impossibly large value */

/* Default size of buffer length. */
#define FSG_BUFLEN ((u32)16384)

Expand Down

0 comments on commit 655403c

Please sign in to comment.