lkml.org 
[lkml]   [2011]   [May]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH v12 4/8] usb:gadget: Add SuperSpeed support to the Gadget Framework
On Mon, May 23, 2011 at 08:31, Sebastian Andrzej Siewior wrote:
> * Tatyana Brokhman | 2011-05-23 09:41:13 [+0300]:
>>diff --git a/drivers/usb/gadget/composite.c
>>b/drivers/usb/gadget/composite.c
>>index 1c6bd66..7738302 100644
>>--- a/drivers/usb/gadget/composite.c
>>+++ b/drivers/usb/gadget/composite.c
>>@@ -1015,6 +1175,62 @@ composite_setup(struct usb_gadget *gadget, const struct usb_ctrlrequest *ctrl)
>>               *((u8 *)req->buf) = value;
>>               value = min(w_length, (u16) 1);
>>               break;
>>+
>>+      /*
>>+       * USB 3.0 additions:
>>+       * Function driver should handle get_status request. If such cb
>>+       * wasn't supplied we respond with default value = 0
>>+       * Note: function driver should supply such cb only for the first
>>+       * interface of the function
>>+       */
>>+      case USB_REQ_GET_STATUS:
>>+              if (!gadget_is_superspeed(gadget))
>>+                      goto unknown;
>>+              if (ctrl->bRequestType != (USB_DIR_IN | USB_RECIP_INTERFACE))
>>+                      goto unknown;
>>+              value = 2;      /* This is the length of the get_status reply */
>>+              *((__le16 *)req->buf) = 0;
>
> Mike please correct me if I'm wrong bug this looks like a case for
> put_unaligned_le16().
> Is someone actually using gadget support on blackfin? I'm asking because
> config_buf() (same file, upstream) is using req->buf to build the
> descriptors in place and one element is le16 which should be affected.

yes, we do gadget stuff heavily on Blackfin with a few different
controllers. if things broke, we'd be unhappy ;).
-mike
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2011-05-24 00:21    [W:0.044 / U:41.060 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site