1. 17 7月, 2014 1 次提交
  2. 28 5月, 2014 1 次提交
  3. 18 12月, 2013 1 次提交
    • R
      usb: gadget: add "maxpacket_limit" field to struct usb_ep · e117e742
      Robert Baldyga 提交于
      This patch adds "maxpacket_limit" to struct usb_ep. This field contains
      maximum value of maxpacket supported by driver, and is set in driver probe.
      This value should be used by autoconfig() function, because value of field
      "maxpacket" is set to value from endpoint descriptor when endpoint becomes
      enabled. So when autoconfig() function will be called again for this endpoint,
      "maxpacket" value will contain wMaxPacketSize from descriptior instead of
      maximum packet size for this endpoint.
      
      For this reason this patch adds new field "maxpacket_limit" which contains
      value of maximum packet size (which defines maximum endpoint capabilities).
      This value is used in ep_matches() function used by autoconfig().
      
      Value of "maxpacket_limit" should be set in UDC driver probe function, using
      usb_ep_set_maxpacket_limit() function, defined in gadget.h. This function
      set choosen value to both "maxpacket_limit" and "maxpacket" fields.
      
      This patch modifies UDC drivers by adding support for maxpacket_limit.
      Signed-off-by: NRobert Baldyga <r.baldyga@samsung.com>
      Signed-off-by: NKyungmin Park <kyungmin.park@samsung.com>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      e117e742
  4. 12 10月, 2013 1 次提交
  5. 17 9月, 2013 1 次提交
    • A
      usb: gadget: fix a bug and a WARN_ON in dummy-hcd · 5f5610f6
      Alan Stern 提交于
      This patch fixes a NULL pointer dereference and a WARN_ON in
      dummy-hcd.  These things were the result of moving to the UDC core
      framework, and possibly of changes to that framework.
      
      Now unloading a gadget driver causes the UDC to be stopped after the
      gadget driver is unbound, not before.  Therefore the "driver" argument
      to dummy_udc_stop() can be NULL, so we must not try to print the
      driver's name without checking first.
      
      Also, the UDC framework automatically unregisters the gadget when the
      UDC is deleted.  Therefore a sysfs attribute file attached to the
      gadget must be removed before the UDC is deleted, not after.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      CC: <stable@vger.kernel.org>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      5f5610f6
  6. 28 8月, 2013 1 次提交
    • G
      USB: gadget: audit sysfs attribute permissions · ce26bd23
      Greg Kroah-Hartman 提交于
      Convert all USB gadget sysfs attributes to use the _RO or _RW variants,
      to make them easier to audit and ensure that the permissions are
      correct.
      
      Note, two are left using the DEVICE_ATTR() macro, as there is no
      DEVICE_ATTR_WO() in Linus's tree, that will happen after 3.12-rc1 is
      out, a follow-on patch will be sent then.
      Reviewed-by: NFelipe Balbi <balbi@ti.com>
      Acked-by: NFelipe Balbi <balbi@ti.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      
      --
       drivers/usb/gadget/composite.c      |    8 +++-----
       drivers/usb/gadget/dummy_hcd.c      |    8 ++++----
       drivers/usb/gadget/f_mass_storage.c |   14 ++++++--------
       drivers/usb/gadget/net2272.c        |    4 ++--
       drivers/usb/gadget/net2280.c        |   18 +++++++++---------
       drivers/usb/gadget/storage_common.c |   25 ++++++++++++-------------
       drivers/usb/gadget/udc-core.c       |   14 +++++++-------
       7 files changed, 43 insertions(+), 48 deletions(-)
      ce26bd23
  7. 15 5月, 2013 2 次提交
  8. 27 3月, 2013 1 次提交
  9. 18 3月, 2013 4 次提交
  10. 13 12月, 2012 1 次提交
    • S
      usb: gadget: dummy: fix enumeration with g_multi · 1d16638e
      Sebastian Andrzej Siewior 提交于
      If we do have endpoints named like "ep-a" then bEndpointAddress is
      counted internally by the gadget framework.
      
      If we do have endpoints named like "ep-1" then bEndpointAddress is
      assigned from the digit after "ep-".
      
      If we do have both, then it is likely that after we used up the
      "generic" endpoints we will use the digits and thus assign one
      bEndpointAddress to multiple endpoints.
      
      This theory can be proofed by using the completely enabled g_multi.
      Without this patch, the mass storage won't enumerate and times out
      because it shares endpoints with RNDIS.
      
      This patch also adds fills up the endpoints list so we have in total
      endpoints 1 to 15 in + out available while some of them are restricted
      to certain types like BULK or ISO. Without this change the nokia gadget
      won't load because the system does not provide enough (BULK) endpoints
      but it did before ep-a - ep-f were removed.
      
      Cc: stable@vger.kernel.org
      Signed-off-by: NSebastian Andrzej Siewior <bigeasy@linutronix.de>
      Acked-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      1d16638e
  11. 31 10月, 2012 3 次提交
  12. 07 9月, 2012 2 次提交
  13. 31 8月, 2012 1 次提交
  14. 12 5月, 2012 1 次提交
  15. 04 5月, 2012 1 次提交
  16. 19 4月, 2012 1 次提交
  17. 29 3月, 2012 1 次提交
  18. 03 3月, 2012 1 次提交
  19. 09 2月, 2012 2 次提交
  20. 24 1月, 2012 8 次提交
  21. 12 12月, 2011 2 次提交
  22. 10 9月, 2011 1 次提交
    • K
      usb gadget: clean up FSF boilerplate text · 28c9fc68
      Klaus Schwarzkopf 提交于
      remove the following two paragraphs as they are not needed:
      
      This program is distributed in the hope that it will be useful, but
      WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
      FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public
      License for more details.
      
      You should have received a copy of the GNU General Public License along with
      this program; if not, write to the Free Software Foundation, Inc.,59
      Temple Place - Suite 330, Boston, MA  02111-1307, USA.
      Signed-off-by: NKlaus Schwarzkopf <schwarzkopf@sensortherm.de>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      28c9fc68
  23. 24 8月, 2011 1 次提交
    • K
      USB: use usb_endpoint_maxp() instead of le16_to_cpu() · 29cc8897
      Kuninori Morimoto 提交于
      Now ${LINUX}/drivers/usb/* can use usb_endpoint_maxp(desc) to get maximum packet size
      instead of le16_to_cpu(desc->wMaxPacketSize).
      This patch fix it up
      
      Cc: Armin Fuerst <fuerst@in.tum.de>
      Cc: Pavel Machek <pavel@ucw.cz>
      Cc: Johannes Erdfelt <johannes@erdfelt.com>
      Cc: Vojtech Pavlik <vojtech@suse.cz>
      Cc: Oliver Neukum <oliver@neukum.name>
      Cc: David Kubicek <dave@awk.cz>
      Cc: Johan Hovold <jhovold@gmail.com>
      Cc: Brad Hards <bhards@bigpond.net.au>
      Acked-by: NFelipe Balbi <balbi@ti.com>
      Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
      Cc: Thomas Dahlmann <dahlmann.thomas@arcor.de>
      Cc: David Brownell <david-b@pacbell.net>
      Cc: David Lopo <dlopo@chipidea.mips.com>
      Cc: Alan Stern <stern@rowland.harvard.edu>
      Cc: Michal Nazarewicz <m.nazarewicz@samsung.com>
      Cc: Xie Xiaobo <X.Xie@freescale.com>
      Cc: Li Yang <leoli@freescale.com>
      Cc: Jiang Bo <tanya.jiang@freescale.com>
      Cc: Yuan-hsin Chen <yhchen@faraday-tech.com>
      Cc: Darius Augulis <augulis.darius@gmail.com>
      Cc: Xiaochen Shen <xiaochen.shen@intel.com>
      Cc: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
      Cc: OKI SEMICONDUCTOR, <toshiharu-linux@dsn.okisemi.com>
      Cc: Robert Jarzmik <robert.jarzmik@free.fr>
      Cc: Ben Dooks <ben@simtec.co.uk>
      Cc: Thomas Abraham <thomas.ab@samsung.com>
      Cc: Herbert Pötzl <herbert@13thfloor.at>
      Cc: Arnaud Patard <arnaud.patard@rtp-net.org>
      Cc: Roman Weissgaerber <weissg@vienna.at>
      Acked-by: NSarah Sharp <sarah.a.sharp@linux.intel.com>
      Cc: Tony Olech <tony.olech@elandigitalsystems.com>
      Cc: Florian Floe Echtler <echtler@fs.tum.de>
      Cc: Christian Lucht <lucht@codemercs.com>
      Cc: Juergen Stuber <starblue@sourceforge.net>
      Cc: Georges Toth <g.toth@e-biz.lu>
      Cc: Bill Ryder <bryder@sgi.com>
      Cc: Kuba Ober <kuba@mareimbrium.org>
      Cc: Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>
      Signed-off-by: NKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      29cc8897
  24. 02 7月, 2011 1 次提交