1. 16 6月, 2009 18 次提交
    • S
      USB: Add route string to struct usb_device. · 7206b001
      Sarah Sharp 提交于
      This patch adds a hex route string to each USB device.  The route string is used
      by the USB 3.0 host controller to send packets through the device tree.  USB 3.0
      hubs use this string to route packets to the correct port.  This is fundamental
      bus change from USB 2.0, where all packets were broadcast across the bus.
      
      Devices (including hubs) under a root port receive the route string 0x0.  Every
      four bits in the route string represent a port on a hub.  This length works
      because USB 3.0 hubs are limited to 15 ports, and USB 2.0 hubs (with potentially
      more ports) will never see packets with a route string.  A port number of 0
      means the packet is destined for that hub.
      
      For example, a peripheral device might have a route string of 0x00097.
      This means the device is connected to port 9 of the hub at depth 1.
      The hub at depth 1 is connected to port 7 of a hub at depth 0.
      The hub at depth 0 is connected to a root port.
      Signed-off-by: NSarah Sharp <sarah.a.sharp@linux.intel.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      7206b001
    • S
      USB: Add SuperSpeed to the list of USB device speeds. · 6b403b02
      Sarah Sharp 提交于
      Modify the USB core to handle the new USB 3.0 speed, "SuperSpeed".  This
      is 5.0 Gbps (wire speed).  There are probably more places that check for
      speed that I've missed.
      
      SuperSpeed devices have a 512 byte endpoint 0 max packet size.  This shows
      up as a bMaxPacketSize0 set to 0x09 (see table 9-8 of the USB 3.0 bus
      spec).
      
      xHCI spec says that the xHC can handle intervals up to 2^15 microframes.  That
      might change when real silicon becomes available.
      
      Add FIXME note for SuperSpeed isochronous endpoints.  They can transmit up
      to 16 packets in one "burst" before they wait for an acknowledgment of the
      packets.  They can do up to 3 bursts per microframe (determined by the
      mult value in the endpoint companion descriptor).  The xHCI driver doesn't
      have support for isoc yet, so fix this later.
      Signed-off-by: NSarah Sharp <sarah.a.sharp@linux.intel.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      6b403b02
    • S
      USB: xhci: BIOS handoff and HW initialization. · 66d4eadd
      Sarah Sharp 提交于
      Add PCI initialization code to take control of the xHCI host controller
      away from the BIOS, halt, and reset the host controller.  The xHCI spec
      says that BIOSes must give up the host controller within 5 seconds.
      
      Add some host controller glue functions to handle hardware initialization
      and memory allocation for the host controller.  The current xHCI
      prototypes use PCI interrupts, but the xHCI spec requires MSI-X
      interrupts.  Add code to support MSI-X interrupts, but use the PCI
      interrupts for now.
      Signed-off-by: NSarah Sharp <sarah.a.sharp@linux.intel.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      66d4eadd
    • H
      USB: Add Intel Langwell USB OTG Transceiver Drive · 453f7755
      Hao Wu 提交于
      Description:
      This driver is used for Intel Langwell* USB OTG controller in Intel
      Moorestown* platform. It tries to implement host/device role switch
      according to OTG spec.  The actual hsot and device functions are
      accomplished in modified EHCI driver and Intel Langwell USB OTG client
      controller driver.
      
      * Langwell and Moorestown are names used in development. They are not
        approved official name.
      
      Note:
      This patch is the first version Intel Langwell USB OTG Transceiver
      driver. The development is not finished, and the bug fixing is on going
      for some hardware and software issues. The main purpose of this
      submission is for code view.
      
      Supported features:
      - Data-line Pulsing SRP
      - Support HNP to switch roles
      - PCI D0/D3 power management support
      
      Known issues:
      - HNP is only tested with another Moorestown platform.
      - PCI D0/D3 power management support is not fully tested.
      - VBus Pulsing SRP is not support in current version.
      Signed-off-by: NHao Wu <hao.wu@intel.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      453f7755
    • X
      USB: Add Intel Langwell USB Device Controller driver · 5be19a9d
      Xiaochen Shen 提交于
      Intel Langwell USB Device Controller is a High-Speed USB OTG device
      controller in Intel Moorestown platform. It can work in OTG device mode
      with Intel Langwell USB OTG transceiver driver as well as device-only
      mode. The number of programmable endpoints is different through
      controller revision.
      
      NOTE:
      This patch is the first version Intel Langwell USB OTG device controller
      driver. The bug fixing is on going for some hardware and software
      issues.  Intel Langwell USB OTG transceiver driver and EHCI driver
      patches will be submitted later.
      
      Supported features:
       - USB OTG protocol support with Intel Langwell USB OTG transceiver
         driver (turn on CONFIG_USB_LANGWELL_OTG)
       - Support control, bulk, interrupt and isochronous endpoints
         (isochronous not tested)
       - PCI D0/D3 power management support
       - Link Power Management (LPM) support
      
      Tested gadget drivers:
       - g_file_storage
       - g_ether
       - g_zero
      
      The passed tests:
       - g_file_storage: USBCV Chapter 9 tests
       - g_file_storage: USBCV MSC tests
       - g_file_storage: from/to host files copying
       - g_ether: ping, ftp and scp files from/to host
       - Hotplug, with and without hubs
      
      Known issues:
       - g_ether: failed part of USBCV chap9 tests
       - LPM support not fully tested
      
      TODO:
       - g_ether: pass all USBCV chap9 tests
       - g_zero: pass usbtest tests
       - Stress tests on different gadget drivers
       - On-chip private SRAM caching support
      Signed-off-by: NXiaochen Shen <xiaochen.shen@intel.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      5be19a9d
    • A
      USB: usb-serial: replace shutdown with disconnect, release · f9c99bb8
      Alan Stern 提交于
      This patch (as1254) splits up the shutdown method of usb_serial_driver
      into a disconnect and a release method.
      
      The problem is that the usb-serial core was calling shutdown during
      disconnect handling, but drivers didn't expect it to be called until
      after all the open file references had been closed.  The result was an
      oops when the close method tried to use memory that had been
      deallocated by shutdown.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      
      f9c99bb8
    • A
      USB: usb-serial: call port_probe and port_remove at the right times · c706ebdf
      Alan Stern 提交于
      This patch (as1253) prevents the usb-serial core from calling a
      driver's port_probe and port_remove methods more than once per port.
      It also removes some unnecessary try_module_get() calls and adds a
      missing port_remove method call in a failure path.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      c706ebdf
    • B
      USB: audio: add USB audio class definitions · c47d7b09
      Bryan Wu 提交于
      Signed-off-by: NBryan Wu <cooloney@kernel.org>
      Signed-off-by: NMike Frysinger <vapier@gentoo.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      c47d7b09
    • Y
      USB: r8a66597-hcd: use platform_data instead of module_param · 5effabbe
      Yoshihiro Shimoda 提交于
      CPU/board specific parameters (PLL clock, vif etc...) can be set
      by platform_data instead of module_param.
      
      v2: remove irq_sense member in platform_data because it can OR in
          IRQF_TRIGGER_LOW or IRQF_TRIGGER_FALLING against IORESOURCE_IRQ in
          the struct resource.
      Signed-off-by: NYoshihiro Shimoda <shimoda.yoshihiro@renesas.com>
      Reviewed-by: NPaul Mundt <lethal@linux-sh.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      5effabbe
    • J
      USB: serial: usb_debug,usb_generic_serial: implement sysrq and serial break · 98fcb5f7
      Jason Wessel 提交于
      The usb_debug driver was modified to implement serial break handling
      by using a "magic" data packet comprised of the sequence:
      
             0x00 0xff 0x01 0xfe   0x00 0xfe 0x01 0xff
      
      When the tty layer requests a serial break the usb_debug driver sends
      the magic packet.  On the receiving side the magic packet is thrown
      away or a sysrq is activated depending on what kernel .config options
      have been set.
      
      The generic serial driver was modified as well as the usb serial
      headers to generically implement sysrq processing in the same way the
      non usb uart based drivers implement the sysrq handling.  This will
      allow other usb serial devices to implement sysrq handling as desired.
      
      The new usb serial functions are named similarly and implemented
      similarly to the uart functions as follows:
      
      usb_serial_handle_break <-> uart_handle_break
      usb_serial_handle_sysrq_char <-> uart_handle_sysrq_char
      Signed-off-by: NJason Wessel <jason.wessel@windriver.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      98fcb5f7
    • J
      USB: usb_debug, usb_generic_serial: implement multi urb write · 715b1dc0
      Jason Wessel 提交于
      The usb_debug driver, when used as the console, will always fail to
      insert the carriage return and new line sequence as well as randomly
      drop console output.  This is a result of only having the single
      write_urb and that the tty layer will have a lock that prevents the
      processing of the back to back urb requests.
      
      The solution is to allow more than one urb to be outstanding and have
      a slightly deeper transmit queue.  The idea and some code is borrowed
      from the ftdi_sio usb driver.
      
      The generic usb serial driver was modified so as to allow the classic
      method of 1 write urb, or a multi write urb scheme with N allowed
      outstanding urbs where N is controlled by max_in_flight_urbs.  When
      max_in_flight_urbs in a "struct usb_serial_driver" is non zero the
      multi write urb scheme will be used.
      
      The size of 4000 was selected for the usb_debug driver so that the
      driver lowers possibility of losing the queued console messages during
      the kernel startup.
      Signed-off-by: NJason Wessel <jason.wessel@windriver.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      715b1dc0
    • R
      USB: usb.h: change private: kernel-doc for new format requirement · bf92c190
      Randy Dunlap 提交于
      Use "/* private:" to mark struct members as private so that
      scripts/kernel-doc will handle them correctly.
      Signed-off-by: NRandy Dunlap <randy.dunlap@oracle.com>
      Acked-by: NDavid Brownell <dbrownell@users.sourceforge.net>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      bf92c190
    • R
      USB: composite.h: mark private struct members as private: · cac85a8b
      Randy Dunlap 提交于
      Mark internal struct members as /* private: */ so that kernel-doc
      won't produce warnings about missing descriptions for them.
      Signed-off-by: NRandy Dunlap <randy.dunlap@oracle.com>
      Acked-by: NDavid Brownell <dbrownell@users.sourceforge.net>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      cac85a8b
    • A
      PCI: add power-state name strings · 00240c38
      Alan Stern 提交于
      This patch (as1235) adds an array of PCI power-state names, together
      with a simple inline accessor routine.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Acked-by: NRafael J. Wysocki <rjw@sisk.pl>
      Acked-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      00240c38
    • G
      USB: remove unused usb_host class · 820d7a25
      Greg Kroah-Hartman 提交于
      The usb_host class isn't used for anything anymore (it was used for
      debug files, but they have moved to debugfs a few kernel releases ago),
      so let's delete it before someone accidentally puts a file in it.
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      820d7a25
    • A
      NLS: update handling of Unicode · 74675a58
      Alan Stern 提交于
      This patch (as1239) updates the kernel's treatment of Unicode.  The
      character-set conversion routines are well behind the current state of
      the Unicode specification: They don't recognize the existence of code
      points beyond plane 0 or of surrogate pairs in the UTF-16 encoding.
      
      The old wchar_t 16-bit type is retained because it's still used in
      lots of places.  This shouldn't cause any new problems; if a
      conversion now results in an invalid 16-bit code then before it must
      have yielded an undefined code.
      
      Difficult-to-read names like "utf_mbstowcs" are replaced with more
      transparent names like "utf8s_to_utf16s" and the ordering of the
      parameters is rationalized (buffer lengths come immediate after the
      pointers they refer to, and the inputs precede the outputs).
      Fortunately the low-level conversion routines are used in only a few
      places; the interfaces to the higher-level uni2char and char2uni
      methods have been left unchanged.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Acked-by: NClemens Ladisch <clemens@ladisch.de>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      74675a58
    • G
      USB: add usb debugfs directory · 00048b8b
      Greg Kroah-Hartman 提交于
      Add a common usb directory in debugfs that the usb subsystem can use.
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      00048b8b
    • D
      USB: nop-usb-xceiv: behave when linked as a module · cc835e32
      David Brownell 提交于
      The NOP OTG transceiver driver needs to be usable from modules.
      Make sure its symbols are always accessible at both compile and
      link time, and make sure the device instance is allocated from
      the heap so that device lifetime rules are obeyed.
      Signed-off-by: NDavid Brownell <dbrownell@users.sourceforge.net>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      cc835e32
  2. 15 6月, 2009 7 次提交
  3. 14 6月, 2009 4 次提交
  4. 13 6月, 2009 11 次提交
    • P
      netfilter: conntrack: optional reliable conntrack event delivery · dd7669a9
      Pablo Neira Ayuso 提交于
      This patch improves ctnetlink event reliability if one broadcast
      listener has set the NETLINK_BROADCAST_ERROR socket option.
      
      The logic is the following: if an event delivery fails, we keep
      the undelivered events in the missed event cache. Once the next
      packet arrives, we add the new events (if any) to the missed
      events in the cache and we try a new delivery, and so on. Thus,
      if ctnetlink fails to deliver an event, we try to deliver them
      once we see a new packet. Therefore, we may lose state
      transitions but the userspace process gets in sync at some point.
      
      At worst case, if no events were delivered to userspace, we make
      sure that destroy events are successfully delivered. Basically,
      if ctnetlink fails to deliver the destroy event, we remove the
      conntrack entry from the hashes and we insert them in the dying
      list, which contains inactive entries. Then, the conntrack timer
      is added with an extra grace timeout of random32() % 15 seconds
      to trigger the event again (this grace timeout is tunable via
      /proc). The use of a limited random timeout value allows
      distributing the "destroy" resends, thus, avoiding accumulating
      lots "destroy" events at the same time. Event delivery may
      re-order but we can identify them by means of the tuple plus
      the conntrack ID.
      
      The maximum number of conntrack entries (active or inactive) is
      still handled by nf_conntrack_max. Thus, we may start dropping
      packets at some point if we accumulate a lot of inactive conntrack
      entries that did not successfully report the destroy event to
      userspace.
      
      During my stress tests consisting of setting a very small buffer
      of 2048 bytes for conntrackd and the NETLINK_BROADCAST_ERROR socket
      flag, and generating lots of very small connections, I noticed
      very few destroy entries on the fly waiting to be resend.
      
      A simple way to test this patch consist of creating a lot of
      entries, set a very small Netlink buffer in conntrackd (+ a patch
      which is not in the git tree to set the BROADCAST_ERROR flag)
      and invoke `conntrack -F'.
      
      For expectations, no changes are introduced in this patch.
      Currently, event delivery is only done for new expectations (no
      events from expectation expiration, removal and confirmation).
      In that case, they need a per-expectation event cache to implement
      the same idea that is exposed in this patch.
      
      This patch can be useful to provide reliable flow-accouting. We
      still have to add a new conntrack extension to store the creation
      and destroy time.
      Signed-off-by: NPablo Neira Ayuso <pablo@netfilter.org>
      Signed-off-by: NPatrick McHardy <kaber@trash.net>
      dd7669a9
    • P
      list_nulls: add hlist_nulls_add_head and hlist_nulls_del · d219dce7
      Pablo Neira Ayuso 提交于
      This patch adds the hlist_nulls_add_head() function which is
      based on hlist_nulls_add_head_rcu() but without the use of
      rcu_assign_pointer(). It also adds hlist_nulls_del which is
      exactly the same like hlist_nulls_del_rcu().
      Signed-off-by: NPablo Neira Ayuso <pablo@netfilter.org>
      Acked-by: NEric Dumazet <eric.dumazet@gmail.com>
      Signed-off-by: NPatrick McHardy <kaber@trash.net>
      d219dce7
    • P
      netfilter: conntrack: move helper destruction to nf_ct_helper_destroy() · 9858a3ae
      Pablo Neira Ayuso 提交于
      This patch moves the helper destruction to a function that lives
      in nf_conntrack_helper.c. This new function is used in the patch
      to add ctnetlink reliable event delivery.
      Signed-off-by: NPablo Neira Ayuso <pablo@netfilter.org>
      Signed-off-by: NPatrick McHardy <kaber@trash.net>
      9858a3ae
    • P
      netfilter: conntrack: move event caching to conntrack extension infrastructure · a0891aa6
      Pablo Neira Ayuso 提交于
      This patch reworks the per-cpu event caching to use the conntrack
      extension infrastructure.
      
      The main drawback is that we consume more memory per conntrack
      if event delivery is enabled. This patch is required by the
      reliable event delivery that follows to this patch.
      
      BTW, this patch allows you to enable/disable event delivery via
      /proc/sys/net/netfilter/nf_conntrack_events in runtime, although
      you can still disable event caching as compilation option.
      Signed-off-by: NPablo Neira Ayuso <pablo@netfilter.org>
      Signed-off-by: NPatrick McHardy <kaber@trash.net>
      a0891aa6
    • T
      clocksource: prevent selection of low resolution clocksourse also for nohz=on · cd6d95d8
      Thomas Gleixner 提交于
      commit 3f68535a (clocksource: sanity check sysfs clocksource
      changes) prevents selection of non high resolution capable
      clocksources when high resolution mode is active, but did not take
      into account that the same rules apply for highres=off nohz=on.
      
      Check the tick device mode instead of hrtimer_hres_active() to verify
      whether the system needs to be protected from a switch to jiffies or
      other non highres capable clock sources.
      Reported-by: NLuming Yu <luming.yu@gmail.com>
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      cd6d95d8
    • R
      i2c-ocores: Can add I2C devices to the bus · dd14be4c
      Richard Röjfors 提交于
      There is sometimes a need for the ocores driver to add devices to the
      bus when installed.
      
      i2c_register_board_info can not always be used, because the I2C devices
       are not known at an early state, they could for instance be connected
       on a I2C bus on a PCI device which has the Open Cores IP.
      
      i2c_new_device can not be used in all cases either since the resulting
      bus nummer might be unknown.
      
      The solution is the pass a list of I2C devices in the platform data to
      the Open Cores driver. This is useful for MFD drivers.
      Signed-off-by: NRichard Röjfors <richard.rojfors.ext@mocean-labs.com>
      Signed-off-by: NBen Dooks <ben-linux@fluff.org>
      dd14be4c
    • H
      PM: Add empty suspend/resume device irq functions · 5818a6e2
      Heiko Carstens 提交于
      git commit 0a0c5168 "PM: Introduce functions for suspending and resuming
      device interrupts" introduced some helper functions. However these
      functions are only available for architectures which support
      GENERIC_HARDIRQS.
      
      Other architectures will see this build error:
      
      drivers/built-in.o: In function `sysdev_suspend':
      (.text+0x15138): undefined reference to `check_wakeup_irqs'
      drivers/built-in.o: In function `device_power_up':
      (.text+0x1cb66): undefined reference to `resume_device_irqs'
      drivers/built-in.o: In function `device_power_down':
      (.text+0x1cb92): undefined reference to `suspend_device_irqs'
      
      To fix this add some empty inline functions for !GENERIC_HARDIRQS.
      Signed-off-by: NHeiko Carstens <heiko.carstens@de.ibm.com>
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      5818a6e2
    • C
      PM/Hibernate: Move NVS routines into a seperate file (v2). · fce2b111
      Cornelia Huck 提交于
      The *_nvs_* routines in swsusp.c make use of the io*map()
      functions, which are only provided for HAS_IOMEM, thus
      breaking compilation if HAS_IOMEM is not set. Fix this
      by moving the *_nvs_* routines into hibernate_nvs.c, which
      is only compiled if HAS_IOMEM is set.
      
      [rjw: Change the name of the new file to hibernate_nvs.c, add the
       license line to the header comment.]
      Signed-off-by: NCornelia Huck <cornelia.huck@de.ibm.com>
      Acked-by: NPavel Machek <pavel@ucw.cz>
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      fce2b111
    • M
      PM: Remove device_type suspend()/resume() · 00725787
      Magnus Damm 提交于
      This patch removes the legacy callbacks ->suspend() and
      ->resume() from struct device_type. These callbacks seem
      unused, and new code should instead make use of struct
      dev_pm_ops.
      Signed-off-by: NMagnus Damm <damm@igel.co.jp>
      Acked-by: NGreg Kroah-Hartman <gregkh@suse.de>
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      00725787
    • M
      PM: Remove bus_type suspend_late()/resume_early() V2 · e240b58c
      Magnus Damm 提交于
      Remove the ->suspend_late() and ->resume_early() callbacks
      from struct bus_type V2. These callbacks are legacy stuff
      at this point and since there seem to be no in-tree users
      we may as well remove them. New users should use dev_pm_ops.
      Signed-off-by: NMagnus Damm <damm@igel.co.jp>
      Acked-by: NPavel Machek <pavel@ucw.cz>
      Acked-by: NGreg Kroah-Hartman <gregkh@suse.de>
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      e240b58c
    • A
      PM core: rename suspend and resume functions · d1616302
      Alan Stern 提交于
      This patch (as1241) renames a bunch of functions in the PM core.
      Rather than go through a boring list of name changes, suffice it to
      say that in the end we have a bunch of pairs of functions:
      
      	device_resume_noirq	dpm_resume_noirq
      	device_resume		dpm_resume
      	device_complete		dpm_complete
      	device_suspend_noirq	dpm_suspend_noirq
      	device_suspend		dpm_suspend
      	device_prepare		dpm_prepare
      
      in which device_X does the X operation on a single device and dpm_X
      invokes device_X for all devices in the dpm_list.
      
      In addition, the old dpm_power_up and device_resume_noirq have been
      combined into a single function (dpm_resume_noirq).
      
      Lastly, dpm_suspend_start and dpm_resume_end are the renamed versions
      of the former top-level device_suspend and device_resume routines.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Acked-by: NMagnus Damm <damm@igel.co.jp>
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      d1616302