1. 19 Feb, 2011 2 commits
    • Simon Glass's avatar
      Add USB host ethernet adapter support · 89d48367
      Simon Glass authored
      
      
      This adds support for using USB Ethernet dongles in host mode. This is just
      the framework - drivers will come later. A new config option called
      CONFIG_USB_HOST_ETHER can be defined in board config files to switch this
      on.
      
      The was originally written by NVIDIA and was cleaned up for release by the
      Chromium authors.
      Signed-off-by: default avatarSimon Glass <sjg@chromium.org>
      89d48367
    • Simon Glass's avatar
      Fix EHCI usb submit timeout and unify with OHCI · 96820a35
      Simon Glass authored
      
      
      Changed both to use a common timeout for URB submission, since they were using
      different values and EHCI's was too short.
      
      Also fixed EHCI to actually check if urb submission succeeded, rather than
      silently continuing into the weeds.
      
      Change-Id: I7f71499ffaa05187d8e5618db2419e1606007b82
      Signed-off-by: default avatarSimon Glass <sjg@chromium.org>
      96820a35
  2. 19 Jan, 2011 3 commits
  3. 26 Nov, 2010 4 commits
    • Stefan Roese's avatar
      usb: Remove usb_dev_init() from ehci-ppc4xx.c · a42a9d71
      Stefan Roese authored
      
      
      Calling usb_dev_init() from within the EHCI host driver is wrong.
      The EHCI host driver should have no dependency/interconnection to the
      USB device driver.
      Signed-off-by: default avatarStefan Roese <sr@denx.de>
      Cc: Remy Bohmer <linux@bohmer.net>
      a42a9d71
    • Stefan Roese's avatar
      usb: Clear CMD_RUN while issuing CMD_RESET in ehci_reset() · 273d7204
      Stefan Roese authored
      
      
      This patch fixes a problem noticed on lwmon5 (PPC440EPx) using the
      common EHCI driver, when "usb reset" is issued multiple times.
      Upon the 2nd (and further) "usb reset" command, the command fails
      with the following messages:
      
      => usb reset
      (Re)start USB...
      USB:   Register 1111 NbrPorts 1
      USB EHCI 1.00
      scanning bus for devices... 5 USB Device(s) found
             scanning bus for storage devices... 2 Storage Device(s) found
      => usb reset
      (Re)start USB...
      USB:   EHCI fail to reset
      Error, couldn't init Lowlevel part
      
      This patch fixes this problem. Now "usb reset" can be called multiple
      times.
      Signed-off-by: default avatarStefan Roese <sr@denx.de>
      Cc: Remy Bohmer <linux@bohmer.net>
      273d7204
    • Stefan Roese's avatar
      usb: Add WATCHDOG_RESET call to polling loop · 67333f76
      Stefan Roese authored
      
      
      This watchdog reset call is needed here, otherwise the lwmon5 board
      (PPC440EPx based) will reset upon the "usb reset" command.
      Signed-off-by: default avatarStefan Roese <sr@denx.de>
      Cc: Remy Bohmer <linux@bohmer.net>
      67333f76
    • Anatolij Gustschin's avatar
      usb: fix for USB_ST_STALLED status reporting in ehci_submit_async() · 222d6dff
      Anatolij Gustschin authored
      
      
      Checking the status field of the qTD token in the current code
      do not take into acount cases where endpoint stall (halted) bit
      is set together with XactErr status bit. As a result clearing
      stall on an endpoint won't be done if this status bit was also
      set. Check for halted bit and report USB_ST_STALLED status
      if the host controller also indicates endpoit stall condition.
      Signed-off-by: default avatarAnatolij Gustschin <agust@denx.de>
      222d6dff
  4. 17 Nov, 2010 1 commit
    • Sebastien Carlier's avatar
      Switch from archive libraries to partial linking · 6d8962e8
      Sebastien Carlier authored
      Before this commit, weak symbols were not overridden by non-weak symbols
      found in archive libraries when linking with recent versions of
      binutils.  As stated in the System V ABI, "the link editor does not
      extract archive members to resolve undefined weak symbols".
      
      This commit changes all Makefiles to use partial linking (ld -r) instead
      of creating library archives, which forces all symbols to participate in
      linking, allowing non-weak symbols to override weak symbols as intended.
      This approach is also used by Linux, from which the gmake function
      cmd_link_o_target (defined in config.mk and used in all Makefiles) is
      inspired.
      
      The name of each former library archive is preserved except for
      extensions which change from ".a" to ".o".  This commit updates
      references accordingly where needed, in particular in some linker
      scripts.
      
      This commit reveals board configurations that exclude some features but
      include source files that depend these disabled features in th...
      6d8962e8
  5. 27 Oct, 2010 1 commit
  6. 22 Oct, 2010 5 commits
    • Wolfgang Denk's avatar
      ehci-hcd.c: fix hanging under higher load · 09c83a45
      Wolfgang Denk authored
      
      
      This patch solves a problem with USB hanging under higher load on a
      i.MX31 board.  It falls into class of typical USB problems and fixes:
      if you don't understand the real cause, add a delay somewhere.
      
      The problem appeared after introduction of ELF relocation, which
      results in smaller code, which appears to run faster (probably because
      it fits better in the cache); turning off the instruction cache,
      adding debug printf()s and increasing the delay have all been found to
      make the problem go away.
      
      Moving the original "udelay(1)" up in the code to it's new place made
      the problem appear much less frequently. Increasing the delay to 2
      microseconds then made the code run reliably in all (hour-long) tests.
      To be on the safe side, we set it to 5 microseconds here.
      Signed-off-by: default avatarHeiko schocher <hs@denx.de>
      Signed-off-by: default avatarWolfgang Denk <wd@denx.de>
      Cc: Remy Bohmer <linux@bohmer.net>
      Cc: Stefano Babic <sbabic@denx.de>
      09c83a45
    • Mike Frysinger's avatar
      usb: musb: constify a bit · 0228348e
      Mike Frysinger authored
      
      
      These ep and root hub structures need not be writable.
      Signed-off-by: default avatarMike Frysinger <vapier@gentoo.org>
      0228348e
    • Wolfgang Denk's avatar
      USB: fix Queue Element Transfer Descriptor changes · 8b675fe1
      Wolfgang Denk authored
      Commit 3ed16071
      
       "USB: sync Queue Element Transfer Descriptor against
      EHCI spec" added an "__attribute__ ((aligned (32)))" to the
      declaration of struct qTD, as used for example in the Linux kernel as
      well.
      
      However, it turns out that this attribute causes errors in "usb start"
      (like "ERROR: NOT USB_CONFIG_DESC 7b" and similar). Drop the attribute
      again.
      Signed-off-by: default avatarWolfgang Denk <wd@denx.de>
      Cc: Dan Lykowski <lykowdk@gmail.com>
      Cc: Remy Bohmer <linux@bohmer.net>
      Cc: Stefano Babic <sbabic@denx.de>
      8b675fe1
    • Florian Fainelli's avatar
      ehci-pci: print hccr, hcor and hc_lenght · af68c066
      Florian Fainelli authored
      
      
      It is useful to know the EHCI-PCI hccr, hcor and hc_lenght to make sure it was
      successfully registered, and at the correct location.
      Signed-off-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
      af68c066
    • Wolfgang Denk's avatar
      ehci-hcd.c: fix hanging under higher load · 9038e0e7
      Wolfgang Denk authored
      
      
      This patch solves a problem with USB hanging under higher load on a
      i.MX31 board.  It falls into class of typical USB problems and fixes:
      if you don't understand the real cause, add a delay somewhere.
      
      The problem appeared after introduction of ELF relocation, which
      results in smaller code, which appears to run faster (probably because
      it fits better in the cache); turning off the instruction cache,
      adding debug printf()s and increasing the delay have all been found to
      make the problem go away.
      
      Moving the original "udelay(1)" up in the code to it's new place made
      the problem appear much less frequently. Increasing the delay to 2
      microseconds then made the code run reliably in all (hour-long) tests.
      To be on the safe side, we set it to 5 microseconds here.
      Signed-off-by: default avatarHeiko schocher <hs@denx.de>
      Signed-off-by: default avatarWolfgang Denk <wd@denx.de>
      Cc: Remy Bohmer <linux@bohmer.net>
      Cc: Stefano Babic <sbabic@denx.de>
      9038e0e7
  7. 19 Oct, 2010 1 commit
  8. 18 Oct, 2010 2 commits
  9. 13 Oct, 2010 5 commits
    • Stefano Babic's avatar
      MX31: Add support for MXC EHCI controller · 5b591502
      Stefano Babic authored
      
      
      The patch adds the EHCI controller for the i.MX31 Soc.
      Signed-off-by: default avatarStefano Babic <sbabic@denx.de>
      5b591502
    • Bryan Wu's avatar
      usb: musb: only write CLRDATATOG when appropriate · 4ee691f6
      Bryan Wu authored
      
      
      This is a change similar to what is already in the Linux driver.  We
      should only program the CLRDATATOG bit when the current mode indicates
      that it is needed.
      Signed-off-by: default avatarBryan Wu <bryan.wu@analog.com>
      Signed-off-by: default avatarCliff Cai <cliff.cai@analog.com>
      Signed-off-by: default avatarMike Frysinger <vapier@gentoo.org>
      4ee691f6
    • Vitaly Kuzmichev's avatar
      USB-CDC: Prevent rx_req being enqueued twice · 98fae970
      Vitaly Kuzmichev authored
      
      
      After gadget reinitializaton (after tftp has been done once)
      packet_received may become equal to 1 due to nuking OUT_EP
      while disabling it in eth_reset_config.
      
      rx_submit called from usb_eth_init queues rx_req first time.
      But the first call of usb_eth_recv from NetLoop queues rx_req
      again due to packet_received = 1.
      
      The following flow shows the path of functions calls when
      this happens:
      
       net/net.c:NetLoop
       |
       +-net/eth.c:eth_init
       |   ether.c:usb_eth_init
       |   |
       |   +-udc_driver:usb_gadget_handle_interrupts
       |   |   udc_driver:...
       |   |     ether.c:eth_setup
       |   |       ether.c:eth_set_config
       |   |         ether.c:eth_reset_config
       |   |           udc_driver:usb_ep_disable
       |   |             udc_driver:nuke
       |   |               ether.c:rx_complete
       |   |                 ether.c: packet_received = 1;
       |   |
       |   +-ether.c:rx_submit
       |       udc_driver:usb_ep_queue --- The first time when rx_req is queued
       |
       +-net/eth.c:eth_rx
           ether.c:usb_eth_recv
           |
           +-udc_driver:usb_gadget_handle_interrupts
           |   udc_driver:... --- no interrupts, returning
           +-ether.c: if (packet_received) { ...
               ether.c:rx_submit
                 udc_driver:usb_ep_queue --- The second time!
      Signed-off-by: default avatarVitaly Kuzmichev <vkuzmichev@mvista.com>
      98fae970
    • Vitaly Kuzmichev's avatar
      USB-CDC: Fix tx/rx_req memory leaks · ac5d32d1
      Vitaly Kuzmichev authored
      
      
      Remove and fix needless and destructive operations with tx/rx_req.
      
      1) 'req' in rx_complete is always not NULL and always equals to rx_req
      2) Free allocated tx_req if rx_req allocation has failed
      3) Do not zero out tx/rx_req in usb_eth_init, leave this for
      eth_reset_config which will be called at the next use of usb0
      4) Additional check in usb_eth_recv is not required
      Signed-off-by: default avatarVitaly Kuzmichev <vkuzmichev@mvista.com>
      ac5d32d1
    • Marek Vasut's avatar
      USB: Make non-bulk delay longer in OHCI · f2443d10
      Marek Vasut authored
      
      
      This fixes TIMEOUT with my Kingston 32GB USB3.0 flashdrive, which I experienced
      on my PXA270 (USB 1.1) Vpac270 board.
      Signed-off-by: default avatarMarek Vasut <marek.vasut@gmail.com>
      f2443d10
  10. 20 Sep, 2010 13 commits
  11. 11 Sep, 2010 2 commits
  12. 12 Aug, 2010 1 commit