1. 12 6月, 2012 1 次提交
  2. 11 5月, 2012 4 次提交
  3. 04 5月, 2012 2 次提交
    • D
      usb: gadget: add a sparse endian notation · 20c5e74c
      Dan Carpenter 提交于
      The original code works fine, but Sparse complains because it isn't
      annotated properly.
      
      drivers/usb/gadget/composite.c:793:26: warning: incorrect type in assignment (different base types)
      drivers/usb/gadget/composite.c:793:26:    expected unsigned short [unsigned] [usertype] language
      devel/drivers/usb/gadget/composite.c:793:26:    got restricted __le16 [usertype] <noident>
      devel/drivers/usb/gadget/composite.c:795:29: warning: restricted __le16 degrades to integer
      drivers/usb/gadget/composite.c:798:24: warning: incorrect type in assignment (different base types)
      drivers/usb/gadget/composite.c:798:24:    expected restricted __le16 [usertype] <noident>
      devel/drivers/usb/gadget/composite.c:798:24:    got unsigned short [unsigned] [usertype] language
      Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      20c5e74c
    • Y
      usb: gadget: composite: prevent a memory leak when configuration bind fails · 124ef389
      Yongsul Oh 提交于
      In some USB composite gadget drivers, the configuration's bind function called
      by the usb_add_config() calls multiple bind config functions. (for example cdc2
      configuration bind function in the cdc_do_config() of the cdc2.c has two
      functionality bind config functions.
        - the ecm_bind_config() & the acm_bind_config())
      
      In each functionality bind config function, new instance is allocated and
      finally added by the usb_add_function().
      
      So if an error occurred during the second functionality bind config (for
      example an error occurred at the acm_bind_config() after succeeding of the
      ecm_bind_function()), the instance created by the acm_bind_config() cannot be
      freed creating a memory leak.
      
      This patch fixes this issue.
      Signed-off-by: NYongsul Oh <yongsul96.oh@samsung.com>
      Acked-by: NMichal Nazarewicz <mina86@mina86.com>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      124ef389
  4. 24 1月, 2012 1 次提交
  5. 12 12月, 2011 1 次提交
    • M
      usb: gadget: rename usb_gadget_driver::speed to max_speed · 7177aed4
      Michal Nazarewicz 提交于
      This commit renames the “speed” field of the usb_gadget_driver
      structure to “max_speed”.  This is so that to make it more
      apparent that the field represents the maximum speed gadget
      driver can support.
      
      This also make the field look more like fields with the same
      name in usb_gadget and usb_composite_driver structures.  All
      of those represent the *maximal* speed given entity supports.
      
      After this commit, there are the following fields in various
      structures:
      * usb_gadget::speed - the current connection speed,
      * usb_gadget::max_speed - maximal speed UDC supports,
      * usb_gadget_driver::max_speed - maximal speed gadget driver
        supports, and
      * usb_composite_driver::max_speed - maximal speed composite
        gadget supports.
      Signed-off-by: NMichal Nazarewicz <mina86@mina86.com>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      7177aed4
  6. 01 11月, 2011 1 次提交
  7. 14 10月, 2011 1 次提交
  8. 18 9月, 2011 1 次提交
    • M
      usb: Provide usb_speed_string() function · e538dfda
      Michal Nazarewicz 提交于
      In a few places in the kernel, the code prints
      a human-readable USB device speed (eg. "high speed").
      This involves a switch statement sometimes wrapped
      around in ({ ... }) block leading to code repetition.
      
      To mitigate this issue, this commit introduces
      usb_speed_string() function, which returns
      a human-readable name of provided speed.
      
      It also changes a few places switch was used to use
      this new function.  This changes a bit the way the
      speed is printed in few instances at the same time
      standardising it.
      Signed-off-by: NMichal Nazarewicz <mina86@mina86.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      e538dfda
  9. 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
  10. 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
  11. 12 8月, 2011 1 次提交
  12. 02 8月, 2011 1 次提交
  13. 02 7月, 2011 3 次提交
  14. 29 6月, 2011 2 次提交
  15. 11 5月, 2011 1 次提交
    • R
      usb: gadget: composite: Allow function drivers to pause control transfers · 1b9ba000
      Roger Quadros 提交于
      Some USB function drivers (e.g. f_mass_storage.c) need to delay or defer the
      data/status stages of standard control requests like SET_CONFIGURATION or
      SET_INTERFACE till they are done with their bookkeeping and are actually ready
      for accepting new commands to their interface.
      
      They can now achieve this functionality by returning USB_GADGET_DELAYED_STATUS
      in their setup handlers (e.g. set_alt()). The composite framework will then
      defer completion of the control transfer by not completing the data/status stages.
      
      This ensures that the host does not send new packets to the interface till the
      function driver is ready to take them.
      
      When the function driver that requested for USB_GADGET_DELAYED_STATUS is done
      with its bookkeeping, it should signal the composite framework to continue with
      the data/status stages of the control transfer. It can do so by invoking
      the new API usb_composite_setup_continue(). This is where the control transfer's
      data/status stages are completed and host can initiate new transfers.
      
      The DELAYED_STATUS mechanism is currently only supported if the expected data phase
      is 0 bytes (i.e. w_length == 0). Since SET_CONFIGURATION and SET_INTERFACE are the
      only cases that will use this mechanism, this is not a limitation.
      Signed-off-by: NRoger Quadros <roger.quadros@nokia.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      1b9ba000
  16. 31 3月, 2011 1 次提交
  17. 26 2月, 2011 1 次提交
  18. 18 2月, 2011 2 次提交
  19. 23 1月, 2011 1 次提交
  20. 17 12月, 2010 2 次提交
  21. 01 12月, 2010 1 次提交
  22. 11 11月, 2010 1 次提交
  23. 23 10月, 2010 6 次提交
  24. 24 8月, 2010 1 次提交
  25. 11 8月, 2010 2 次提交