1. 18 1月, 2015 5 次提交
    • H
      config_distro_bootcmd.h: Remove unnecessary magic to avoid repeated USB scans · a1d31077
      Hans de Goede 提交于
      Now that "usb start" will only start usb if not already started, we can simply
      call "usb start" whenever we (may) need access to usb devices, and it will only
      actually scan the bus at the first call.
      Signed-off-by: NHans de Goede <hdegoede@redhat.com>
      a1d31077
    • H
      USB: make "usb start" start usb only once · b5072264
      Hans de Goede 提交于
      Currently we've this magic in include/config_distro_bootcmd.h to avoid
      scanning the usb bus multiple times.
      
      And it does not work when also using an usb keyboard because then the
      preboot command has already scanned the bus, so we're still scanning it
      twice.
      
      This commit makes "usb start" only start usb if it is no already started,
      allowing us to remove all the magic for it from include/config_distro_bootcmd.h
      and just call it unconditionally.
      
      This also causes "usb start" and "usb reset" to actually do what their
      different names suggest, rather then both of them doing exactly the same.
      Signed-off-by: NHans de Goede <hdegoede@redhat.com>
      b5072264
    • A
      usb: gadget: pxa25x_udc: fix use-before-initialized bug · c0978a94
      Alex Sadovsky 提交于
      Fix use-before-initialized bug in pxa25x_udc driver.
      
      Function usb_gadget_register_driver calls udc_disable,
      and udc_disable calls pullup_off that uses dev->mach->udc_command.
      But dev->mach is initialized in usb_gadget_register_driver after
      calling udc_disable. This patch fixes the order of initialization.
      Signed-off-by: NAlex Sadovsky <Nable.MainInbox@googlemail.com>
      c0978a94
    • S
      usb: gadget: f_dfu: Add get_alt function to pass the USB compliance test · 1fd81b7c
      Stefan Roese 提交于
      Without this function the USB compliance test (USB 2.0 Command Verifier) will
      fail in the "Interface Descriptor Test" with this error message:
      
      FAIL
      (1.2.51) A successful GetInterface request must return the alternate setting
      set by a prior call to SetInterface.
      
      Lets add this function to read back the value so that the DFU device fully
      passes the USB compliance test.
      Signed-off-by: NStefan Roese <sr@denx.de>
      Cc: Roger Meier <r.meier@siemens.com>
      Cc: Samuel Egli <samuel.egli@siemens.com>
      Cc: Enrico Leto <enrico.leto@siemens.com>
      Acked-by: NHeiko Schocher <hs@denx.de>
      Cc: Lukasz Majewski <l.majewski@samsung.com>
      Cc: Marek Vasut <marex@denx.de>
      1fd81b7c
    • S
      usb: gadget: composite: Fix NULL pointer crash in USB compliance test · 87ed6b10
      Stefan Roese 提交于
      On the DXR2 board (AM335x using MUSB) the USB compliance test suite
      (USB 2.0 Command Verifier) will cause the board to crash and reset
      upon the "BOS Descriptor Test - Addressed state". Here the output
      from the DRX2 while running this test:
      
      GADGET DRIVER: usb_dnl_dfu
      musb-hdrc: peripheral reset irq lost!
      composite_setup (776)
      data abort
      pc : [<87f693ac>]          lr : [<87f6911c>]
      sp : 86f33a58  ip : 00000000     fp : 86f3bbac
      r10: 00000f00  r9 : 86f33ef4     r8 : 86f37da8
      r7 : 00000005  r6 : 86f33a90     r5 : 00000000  r4 : 86f37e30
      r3 : 00000000  r2 : 00000000     r1 : 87f9c888  r0 : 00000016
      Flags: Nzcv  IRQs off  FIQs on  Mode SVC_32
      Resetting CPU ...
      
      resetting ...
      
      By adding the case statement for USB_DT_BOS and therefore not running
      into the default case (jump to unkown label) this crash is fixed.
      Signed-off-by: NStefan Roese <sr@denx.de>
      Cc: Roger Meier <r.meier@siemens.com>
      Cc: Samuel Egli <samuel.egli@siemens.com>
      Cc: Enrico Leto <enrico.leto@siemens.com>
      Acked-by: NHeiko Schocher <hs@denx.de>
      Cc: Lukasz Majewski <l.majewski@samsung.com>
      Cc: Marek Vasut <marex@denx.de>
      87ed6b10
  2. 16 1月, 2015 4 次提交
  3. 15 1月, 2015 31 次提交