1. 31 8月, 2013 1 次提交
  2. 16 8月, 2013 1 次提交
  3. 15 8月, 2013 3 次提交
  4. 13 8月, 2013 4 次提交
    • M
      USBNET: support DMA SG · 638c5115
      Ming Lei 提交于
      This patch introduces support of DMA SG if the USB host controller
      which usbnet device is attached to is capable of building packet from
      discontinuous buffers.
      
      The patch supports passing the skb fragment buffers to usb stack directly
      via urb->sg.
      
      Cc: Ben Hutchings <bhutchings@solarflare.com>
      Cc: Grant Grundler <grundler@google.com>
      Cc: Freddy Xin <freddy@asix.com.tw>
      Cc: Alan Stern <stern@rowland.harvard.edu>
      Acked-by: NOliver Neukum <oneukum@suse.de>
      Signed-off-by: NMing Lei <ming.lei@canonical.com>
      Reviewed-by: NEric Dumazet <edumazet@google.com>
      Acked-by: NDavid S. Miller <davem@davemloft.net>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      638c5115
    • M
      USB: HCD: support giveback of URB in tasklet context · 94dfd7ed
      Ming Lei 提交于
      This patch implements the mechanism of giveback of URB in
      tasklet context, so that hardware interrupt handling time for
      usb host controller can be saved much, and HCD interrupt handling
      can be simplified.
      
      Motivations:
      
      1), on some arch(such as ARM), DMA mapping/unmapping is a bit
      time-consuming, for example: when accessing usb mass storage
      via EHCI on pandaboard, the common length of transfer buffer is 120KB,
      the time consumed on DMA unmapping may reach hundreds of microseconds;
      even on A15 based box, the time is still about scores of microseconds
      
      2), on some arch, reading DMA coherent memoery is very time-consuming,
      the most common example is usb video class driver[1]
      
      3), driver's complete() callback may do much things which is driver
      specific, so the time is consumed unnecessarily in hardware irq context.
      
      4), running driver's complete() callback in hardware irq context causes
      that host controller driver has to release its lock in interrupt handler,
      so reacquiring the lock after return may busy wait a while and increase
      interrupt handling time. More seriously, releasing the HCD lock makes
      HCD becoming quite complicated to deal with introduced races.
      
      So the patch proposes to run giveback of URB in tasklet context, then
      time consumed in HCD irq handling doesn't depend on drivers' complete and
      DMA mapping/unmapping any more, also we can simplify HCD since the HCD
      lock isn't needed to be released during irq handling.
      
      The patch should be reasonable and doable:
      
      1), for drivers, they don't care if the complete() is called in hard irq
      context or softirq context
      
      2), the biggest change is the situation in which usb_submit_urb() is called
      in complete() callback, so the introduced tasklet schedule delay might be a
      con, but it shouldn't be a big deal:
      
      	- control/bulk asynchronous transfer isn't sensitive to schedule
      	  delay
      
      	- the patch schedules giveback of periodic URBs using
      	  tasklet_hi_schedule, so the introduced delay should be very
      	  small
      
      	- for ISOC transfer, generally, drivers submit several URBs
      	  concurrently to avoid interrupt delay, so it is OK with the
      	  little schedule delay.
      
      	- for interrupt transfer, generally, drivers only submit one URB
      	  at the same time, but interrupt transfer is often used in event
      	  report, polling, ... situations, and a little delay should be OK.
      
      Considered that HCDs may optimize on submitting URB in complete(), the
      patch may cause the optimization not working, so introduces one flag to mark
      if the HCD supports to run giveback URB in tasklet context. When all HCDs
      are ready, the flag can be removed.
      
      [1], http://marc.info/?t=136438111600010&r=1&w=2
      
      Cc: Oliver Neukum <oliver@neukum.org>
      Acked-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NMing Lei <ming.lei@canonical.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      94dfd7ed
    • T
      usb: phy: tegra: Program new PHY parameters · e497a24d
      Tuomas Tynkkynen 提交于
      The Tegra30 TRM recommends configuration of certain PHY parameters for
      optimal quality. Program the following registers based on device tree
      parameters:
      
      - UTMIP_XCVR_HSSLEW: HS slew rate control.
      - UTMIP_HSSQUELCH_LEVEL: HS squelch detector level
      - UTMIP_HSDISCON_LEVEL: HS disconnect detector level.
      
      These registers exist in Tegra20, but programming them hasn't been
      necessary, so these parameters won't be set on Tegra20 to keep the
      device trees backward compatible.
      
      Additionally, the UTMIP_XCVR_SETUP parameter can be set from fuses
      instead of a software-programmed value, as the optimal value can
      vary between invidual boards. The boolean property
      nvidia,xcvr-setup-use-fuses can be used to enable this behaviour.
      Signed-off-by: NTuomas Tynkkynen <ttynkkynen@nvidia.com>
      Tested-by: NStephen Warren <swarren@nvidia.com>
      Reviewed-by: NStephen Warren <swarren@nvidia.com>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      e497a24d
    • T
      usb: phy: tegra: Tegra30 support · 3e635202
      Tuomas Tynkkynen 提交于
      The Tegra30 USB PHY is a bit different than the Tegra20 PHY:
      
      - The EHCI controller supports the HOSTPC register extension, and some
        of the fields that the PHY needs to modify (PHCD and PTS) have moved
        to the new HOSTPC register.
      - Some of the UTMI PLL configuration registers have moved from the USB
        register space to the Clock-And-Reset controller space. In Tegra30
        the clock driver is responsible for configuring the UTMI PLL.
      - The USBMODE register must be explicitly written to enter host mode.
      - Certain PHY parameters need to be programmed for optimal signal
        quality. Support for this will be added in the next patch.
      
      The new tegra_phy_soc_config structure is added to describe the
      differences between the SoCs.
      Signed-off-by: NTuomas Tynkkynen <ttynkkynen@nvidia.com>
      Tested-by: NStephen Warren <swarren@nvidia.com>
      Reviewed-by: NStephen Warren <swarren@nvidia.com>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      3e635202
  5. 09 8月, 2013 1 次提交
  6. 05 8月, 2013 1 次提交
  7. 30 7月, 2013 1 次提交
  8. 29 7月, 2013 8 次提交
  9. 28 7月, 2013 1 次提交
    • M
      USBNET: centralize computing of max rx/tx qlen · a88c32ae
      Ming Lei 提交于
      This patch centralizes computing of max rx/tx qlen, because:
      
      - RX_QLEN()/TX_QLEN() is called in hot path
      - computing depends on device's usb speed, now we have ls/fs, hs, ss,
      so more checks need to be involved
      - in fact, max rx/tx qlen should not only depend on device USB
      speed, but also depend on ethernet link speed, so we need to
      consider that in future.
      - if SG support is done, max tx qlen may need change too
      
      Generally, hard_mtu and rx_urb_size are changed in bind(), reset()
      and link_reset() callback, and change mtu network operation, this
      patches introduces the API of usbnet_update_max_qlen(), and calls
      it in above path.
      Signed-off-by: NMing Lei <ming.lei@canonical.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      a88c32ae
  10. 25 6月, 2013 2 次提交
  11. 18 6月, 2013 6 次提交
  12. 11 6月, 2013 2 次提交
    • S
      ehci-platform: add pre_setup() method to platform data · 743fcce0
      Sergei Shtylyov 提交于
      Sometimes there is a need  to initialize some non-standard registers mapped to
      the EHCI region before accessing the standard EHCI registers.  Add pre_setup()
      method with 'struct usb_hcd *' parameter to be called just before ehci_setup()
      to the 'ehci-platform'  driver's platform data for this purpose...
      
      While at it, add the missing incomplete declaration of 'struct platform_device'
      to <linux/usb/ehci_pdriver.h>...
      
      The patch has been tested on the Marzen and BOCK-W boards.
      Suggested-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NSergei Shtylyov <sergei.shtylyov@cogentembedded.com>
      Acked-by: NKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
      Acked-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NSimon Horman <horms+renesas@verge.net.au>
      743fcce0
    • G
      USB: serial: ports: add minor and port number · 1143832e
      Greg Kroah-Hartman 提交于
      The usb_serial_port structure had the number field, which was the minor
      number for the port, which almost no one really cared about.  They
      really wanted the number of the port within the device, which you had to
      subtract from the minor of the parent usb_serial_device structure.  To
      clean this up, provide the real minor number of the port, and the number
      of the port within the serial device separately, as these numbers might
      not be related in the future.
      
      Bonus is that this cleans up a lot of logic in the drivers, and saves
      lines overall.
      Tested-by: NTobias Winter <tobias@linuxdingsda.de>
      Reviewed-by: NJohan Hovold <jhovold@gmail.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      
      --
       drivers/staging/serqt_usb2/serqt_usb2.c |   21 +++--------
       drivers/usb/serial/ark3116.c            |    2 -
       drivers/usb/serial/bus.c                |    6 +--
       drivers/usb/serial/console.c            |    2 -
       drivers/usb/serial/cp210x.c             |    2 -
       drivers/usb/serial/cypress_m8.c         |    4 +-
       drivers/usb/serial/digi_acceleport.c    |    6 ---
       drivers/usb/serial/f81232.c             |    5 +-
       drivers/usb/serial/garmin_gps.c         |    6 +--
       drivers/usb/serial/io_edgeport.c        |   58 ++++++++++++--------------------
       drivers/usb/serial/io_ti.c              |   21 ++++-------
       drivers/usb/serial/keyspan.c            |   29 +++++++---------
       drivers/usb/serial/metro-usb.c          |    4 +-
       drivers/usb/serial/mos7720.c            |   37 +++++++++-----------
       drivers/usb/serial/mos7840.c            |   52 +++++++++-------------------
       drivers/usb/serial/opticon.c            |    2 -
       drivers/usb/serial/pl2303.c             |    2 -
       drivers/usb/serial/quatech2.c           |    7 +--
       drivers/usb/serial/sierra.c             |    2 -
       drivers/usb/serial/ti_usb_3410_5052.c   |   10 ++---
       drivers/usb/serial/usb-serial.c         |    7 ++-
       drivers/usb/serial/usb_wwan.c           |    2 -
       drivers/usb/serial/whiteheat.c          |   20 +++++------
       include/linux/usb/serial.h              |    6 ++-
       24 files changed, 133 insertions(+), 180 deletions(-)
      1143832e
  13. 07 6月, 2013 1 次提交
  14. 04 6月, 2013 1 次提交
  15. 30 5月, 2013 3 次提交
  16. 17 5月, 2013 2 次提交
  17. 15 5月, 2013 1 次提交
  18. 09 5月, 2013 1 次提交
    • D
      usbnet: allow status interrupt URB to always be active · 6eecdc5f
      Dan Williams 提交于
      Some drivers (sierra_net) need the status interrupt URB
      active even when the device is closed, because they receive
      custom indications from firmware.  Add functions to refcount
      the status interrupt URB submit/kill operation so that
      sub-drivers and the generic driver don't fight over whether
      the status interrupt URB is active or not.
      
      A sub-driver can call usbnet_status_start() at any time, but
      the URB is only submitted the first time the function is
      called.  Likewise, when the sub-driver is done with the URB,
      it calls usbnet_status_stop() but the URB is only killed when
      all users have stopped it.  The URB is still killed and
      re-submitted for suspend/resume, as before, with the same
      refcount it had at suspend.
      Signed-off-by: NDan Williams <dcbw@redhat.com>
      Acked-by: NOliver Neukum <oliver@neukum.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      6eecdc5f