1. 10 4月, 2013 4 次提交
    • F
      USB: remove USB_EHCI_BIG_ENDIAN_{DESC,MMIO} depends on architecture symbol · 9296d94d
      Florian Fainelli 提交于
      Just like the OHCI counter part we just can remove the architecture
      specific symbols which prevent these configuration symbols from being
      selected by platforms/architectures requiring it. The original
      implementation did not scale at all since it required each and every
      single architecture to be added for these configuration symbols to be
      selected. Now it is up to the EHCI driver and/or platform to select
      these configuration symbols accordingly.
      Acked-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NFlorian Fainelli <florian@openwrt.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      9296d94d
    • F
      USB: regroup all depends on USB within an if USB block · 25e11ec4
      Florian Fainelli 提交于
      This patch removes the depends on USB from all config symbols in
      drivers/usb/host/Kconfig and replace that with an if USB / endif block
      as suggested by Alan Stern. Some source ... Kconfig lines have been
      shuffled around to permit a better regroupment of the Kconfig files
      depending on "config USB" item. No functionnal change is introduced.
      Acked-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NFlorian Fainelli <florian@openwrt.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      25e11ec4
    • B
      USB: option: add a D-Link DWM-156 variant · a2a2d6c7
      Bjørn Mork 提交于
      Adding support for a Mediatek based device labelled as
      D-Link Model: DWM-156, H/W Ver: A7
      
      Also adding two other device IDs found in the Debian(!)
      packages included on the embedded device driver CD.
      
      This is a composite MBIM + serial ports + card reader device:
      
      T:  Bus=04 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 14 Spd=480  MxCh= 0
      D:  Ver= 2.00 Cls=ef(misc ) Sub=02 Prot=01 MxPS=64 #Cfgs=  1
      P:  Vendor=2001 ProdID=7d01 Rev= 3.00
      S:  Manufacturer=D-Link,Inc
      S:  Product=D-Link DWM-156
      C:* #Ifs= 7 Cfg#= 1 Atr=a0 MxPwr=500mA
      A:  FirstIf#= 0 IfCount= 2 Cls=02(comm.) Sub=0e Prot=00
      I:* If#= 0 Alt= 0 #EPs= 1 Cls=02(comm.) Sub=0e Prot=00 Driver=cdc_mbim
      E:  Ad=88(I) Atr=03(Int.) MxPS=  64 Ivl=125us
      I:  If#= 1 Alt= 0 #EPs= 0 Cls=0a(data ) Sub=00 Prot=02 Driver=cdc_mbim
      I:* If#= 1 Alt= 1 #EPs= 2 Cls=0a(data ) Sub=00 Prot=02 Driver=cdc_mbim
      E:  Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
      E:  Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
      I:* If#= 2 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=02 Prot=01 Driver=option
      E:  Ad=87(I) Atr=03(Int.) MxPS=  64 Ivl=500us
      E:  Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
      E:  Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
      I:* If#= 3 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
      E:  Ad=83(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
      E:  Ad=03(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
      I:* If#= 4 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
      E:  Ad=84(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
      E:  Ad=04(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
      I:* If#= 5 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
      E:  Ad=85(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
      E:  Ad=05(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
      I:* If#= 6 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage
      E:  Ad=86(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
      E:  Ad=06(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
      
      Cc: stable <stable@vger.kernel.org>
      Signed-off-by: NBjørn Mork <bjorn@mork.no>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      a2a2d6c7
    • V
      usb: ehci-s5p: fix: Fix null pointer dereferencing · bbcd85a0
      Vivek Gautam 提交于
      7edb3daf: (USB: EHCI: make ehci-s5p a separate driver)
      raised an issue with ehci-s5p's driver data.
      Now that 's5p_ehci_hcd' doesn't maintain pointer to 'usb_hcd'
      and s5p_ehci is nothing but a pointer to hcd->priv;
      add hcd to the driver data rather than s5p_ehci.
      
      This fixes issues with null pointer dereferencing in
      s5p_ehci_shutdown(), s5p_ehci_suspend(), s5p_ehci_resume().
      Signed-off-by: NVivek Gautam <gautam.vivek@samsung.com>
      CC: Manjunath Goudar <manjunath.goudar@linaro.org>
      CC: Arnd Bergmann <arnd@arndb.de>
      CC: Jingoo Han <jg1.han@samsung.com>
      Acked-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      bbcd85a0
  2. 09 4月, 2013 9 次提交
    • G
      Merge tag 'for-usb-next-2012-04-08' of... · e5ab9f18
      Greg Kroah-Hartman 提交于
      Merge tag 'for-usb-next-2012-04-08' of git://git.kernel.org/pub/scm/linux/kernel/git/sarah/xhci into usb-next
      
      Sarah writes:
      
      	xHCI misc cleanup patches for 3.10
      
      	Hi Greg,
      
      	Here's three cleanup patches for 3.10.  Nothing big here, just some debugging
      	output changes, a macro rename, and a math macro change that should have no
      	behavioral effects.
      
      	Tested on the Intel Panther Point xHCI host, with USB storage and mouse, with
      	xHCI debugging turned on.  I don't have the TI host that causes the debugging
      	output changes to trigger.
      
      	Sarah Sharp
      e5ab9f18
    • M
      USB: EHCI: make ehci-msm a separate driver · 8c68e84f
      Manjunath Goudar 提交于
      Separate the  Qualcomm QSD/MSM on-chip host controller driver from
      ehci-hcd host code so that it can be built as a separate driver module.
      This work is part of enabling multi-platform kernels on ARM;
      however, note that other changes are still needed before Qualcomm QSD/MSM
      can be booted with a multi-platform kernel, which is not expected before
      3.11.
      
      With the infrastructure added by Alan Stern in patch 3e023203
      "USB: EHCI: prepare to make ehci-hcd a library module", we can
      avoid this problem by turning a bus glue into a separate
      module, as we do here for the msm bus glue.
      
      In V5 (arnd):
       - add FIXME about missing usb_add_hcd() or usb_remove_hcd() calls
      
      In V3:
       - Detailed commit message added here describing why this patch is required.
       - Arranged  #include's in alphabetical order.
       - driver.name initialized hcd_name[] = "ehci-msm" in platform_driver
         structure initialization instead of "msm-ehci", which was the reason
         why it broke in EHCI USB testing
      
      In V2:
      Tegra patch related changes removed from this patch.
      Signed-off-by: NManjunath Goudar <manjunath.goudar@linaro.org>
      Acked-by: NAlan Stern <stern@rowland.harvard.edu>
      Acked-by: NDavid Brown <davidb@codeaurora.org>
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      8c68e84f
    • M
      USB: EHCI: make ehci-atmel a separate driver · 97736961
      Manjunath Goudar 提交于
      Separate the Atmel host controller driver from ehci-hcd host code
      so that it can be built as a separate driver module.
      This work is part of enabling multi-platform kernels on ARM;
      however, note that other changes are still needed before Atmel can be
      booted with a multi-platform kernel. This is currently planned for
      Linux-3.11.
      
      With the infrastructure added by Alan Stern in patch 3e023203
      "USB: EHCI: prepare to make ehci-hcd a library module", we can
      avoid this problem by turning a bus glue into a separate
      module, as we do here for the Atmel bus glue.
      
      In V4 (arnd):
       - reordered #include statements.
       - removed call to ehci_shutdown and the corresponding export
      
      In V3:
       - Detailed commit message added here about why this patch is required.
       - Replaced hcd_name string "ehci-atmel" to "atmel-ehci".
       - Inserted blank line in the Makefile to separate the EHCI drivers from
         the following non-EHCI drivers.
       - Exported ehci_shutdown symbol as it is needed by the Atmel driver.
       - Eliminated ehci_atmel_setup routine because hcd registers
         can be directly set in the ehci_atmel_drv_probe function.
      
      In V2:
        Resolved below compiler error.
        drivers/usb/host/ehci-atmel.c: In function 'ehci_atmel_drv_remove':
        drivers/usb/host/ehci-atmel.c:167: error: implicit declaration of function 'ehci_shutdown'
      Signed-off-by: NManjunath Goudar <manjunath.goudar@linaro.org>
      Acked-by: NAlan Stern <stern@rowland.harvard.edu>
      Acked-by: NNicolas Ferre <nicolas.ferre@atmel.com>
      Cc: Andrew Victor <linux@maxim.org.za>
      Cc: Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com>
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      97736961
    • M
      USB: EHCI: make ehci-s5p a separate driver · 7edb3daf
      Manjunath Goudar 提交于
      Separate the  Samsung S5P/EXYNOS host controller driver from ehci-hcd
      host code so that it can be built as a separate driver module.
      This work is part of enabling multi-platform kernels on ARM;
      however, note that other changes are still needed before S5P/EXYNOS can
      be booted with a multi-platform kernel. We currently expect those
      to get merged for 3.10.
      
      With the infrastructure added by Alan Stern in patch 3e023203
      "USB: EHCI: prepare to make ehci-hcd a library module", we can
      avoid this problem by turning a bus glue into a separate
      module, as we do here for the s5p bus glue.
      
      In V4 (arnd)
       - revert some of the pointless changes.
       - fix allocation of s5p specific data structure.
      
      In V3:
       - Detailed commit message added here, why this patch is required.
       - MODULE_LICENSE is GPL v2.
       - Added .extra_priv_size to eliminate the separate allocation of
         the s5p_ehci_hcd structure and removed .reset function pointer
         initialization.
       - Arranged  #include's in alphabetical order.
       - After using extra_priv_size initialization, struct usb_hcd *hcd
         is redundant and can be removed from the probe function.
       - Eliminated s5p_ehci_phy_enable,contents of statements moved
         into the s5p_ehci_probe
       - Eliminated s5p_ehci_phy_disable, contents of statements moved into
         the s5p_ehci_remove.
      
      In V2:
       - Tegra patch related changes removed from this patch.
      Signed-off-by: NManjunath Goudar <manjunath.goudar@linaro.org>
      Acked-by: NJingoo Han <jg1.han@samsung.com>
      Acked-by: NAlan Stern <stern@rowland.harvard.edu>
      Cc: Kukjin Kim <kgene.kim@samsung.com>
      Cc: Kyungmin Park <kyungmin.park@samsung.com>
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      7edb3daf
    • M
      USB: EHCI: make ehci-spear a separate driver · 7675d6ba
      Manjunath Goudar 提交于
      Separate the SPEAr host controller driver from ehci-hcd host code
      so that it can be built as a separate driver module.
      This work is part of enabling multi-platform kernels on ARM;
      however, note that other changes are still needed before SPEAr can be
      booted with a multi-platform kernel, but they are queued in the
      arm-soc tree for 3.10.
      
      With the infrastructure added by Alan Stern in patch 3e023203
      "USB: EHCI: prepare to make ehci-hcd a library module", we can
      avoid this problem by turning a bus glue into a separate
      module, as we do here for the SPEAr bus glue.
      
      In V4 (arnd):
       - renamed all 'struct spear_ehci' pointers from 'ehci' to the
         less ambiguous 'sehci'.
       - folded trivial spear_start_ehci/spear_stop_ehci functions into
         callers.
       - brought back initialization of ehci->caps.
      
      In V3:
       - Detailed commit message added here about why this patch is required.
       - Eliminated ehci_spear_setup routine because hcd registers can
         be directly set in the spear_ehci_hcd_drv_probe function.
       - spear_overrides struct initialized.
       - Converted to using .extra_priv_size for allocating spear_ehci,
         and updated all users of that structure.
       - to_spear_ehci() macro modified for spear_ehci.
      
      In V2:
       - Replaced spear as SPEAr everywhere, leaving functions/variables/config options.
      Signed-off-by: NDeepak Saxena <dsaxena@linaro.org>
      Signed-off-by: NManjunath Goudar <manjunath.goudar@linaro.org>
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Acked-by: NViresh Kumar <viresh.linux@gmail.com>
      Acked-by: NAlan Stern <stern@rowland.harvard.edu>
      Cc: Shiraz Hashim <shiraz.hashim@st.com>
      Cc: spear-devel@list.st.com
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      7675d6ba
    • M
      USB: EHCI: make ehci-orion a separate driver · a76dd463
      Manjunath Goudar 提交于
      Separate the Orion host controller driver from ehci-hcd host
      code into its own driver module because of following reason.
      
      With the multiplatform changes in arm-soc tree, it becomes
      possible to enable the mvebu platform (which uses
      ehci-orion) at the same time as other platforms that require
      a conflicting EHCI bus glue. At the moment, this results
      in a warning like
      
      drivers/usb/host/ehci-hcd.c:1297:0: warning: "PLATFORM_DRIVER" redefined [enabled by default]
      drivers/usb/host/ehci-hcd.c:1277:0: note: this is the location of the previous definition
      drivers/usb/host/ehci-orion.c:334:31: warning: 'ehci_orion_driver' defined but not used [-Wunused-variable]
      
      and an ehci driver that only works on one of them.
      
      With the infrastructure added by Alan Stern in patch 3e023203
      "USB: EHCI: prepare to make ehci-hcd a library module", we can
      avoid this problem by turning a bus glue into a separate
      module, as we do here for the orion bus glue.
      
      An earlier version of this patch was included in 3.9 but caused
      a regression there, which has subsequently been fixed.
      
      While we are here, use the opportunity to disabiguate the two
      Marvell EHCI controller implementations in Kconfig.
      
      In V4 (arnd):
      - Improve Kconfig text
      
      In V3:
      - More detail provided in commit message regarding this patch.
      - Replaced hcd_name string "ehci-orion" into "orion-ehci".
      - MODULE_LICENSE is GPL v2.
      - In ehci_init_driver calling second argument passed  as NULL instead of
        ehci_orion_overrides because ehci_orion_overrides is removed.
      
      In V2:
      - Tegra patch related changes removed from this patch.
      Signed-off-by: NManjunath Goudar <manjunath.goudar@linaro.org>
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Acked-by: NJason Cooper <jason@lakedaemon.net>
      Tested-by: NAndrew Lunn <andrew@lunn.ch>
      Acked-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      a76dd463
    • S
      USB: add ftdi_sio USB ID for GDM Boost V1.x · 58f8b6c4
      Stefani Seibold 提交于
      This patch add a missing usb device id for the GDMBoost V1.x device
      
      The patch is against 3.9-rc5
      Signed-off-by: NStefani Seibold <stefani@seibold.net>
      Cc: stable <stable@vger.kernel.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      58f8b6c4
    • D
      usb, gadget: use appropriate warning accessors · 75bfe23a
      David Rientjes 提交于
      Use the appropriate WARN() and WARN_ON() accessors to avoid a build error
      when CONFIG_BUG=n:
      
      	drivers/usb/gadget/configfs.c: In function 'config_usb_cfg_unlink':
      	drivers/usb/gadget/configfs.c:442:2: error: implicit declaration of function '__WARN_printf'
      	drivers/usb/gadget/configfs.c: In function 'configfs_do_nothing':
      	drivers/usb/gadget/configfs.c:733:2: error: implicit declaration of function '__WARN'
      Reported-by: NRandy Dunlap <rdunlap@infradead.org>
      Signed-off-by: NDavid Rientjes <rientjes@google.com>
      Cc: Felipe Balbi <balbi@ti.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      75bfe23a
    • H
      197c58f6
  3. 08 4月, 2013 9 次提交
  4. 07 4月, 2013 1 次提交
  5. 06 4月, 2013 17 次提交
    • L
      Merge tag 'dm-3.9-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/agk/linux-dm · fe696909
      Linus Torvalds 提交于
      Pull device-mapper fixes from Alasdair Kergon:
       "A pair of patches to fix the writethrough mode of the device-mapper
        cache target when the device being cached is not itself wrapped with
        device-mapper."
      
      * tag 'dm-3.9-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/agk/linux-dm:
        dm cache: reduce bio front_pad size in writeback mode
        dm cache: fix writes to cache device in writethrough mode
      fe696909
    • L
      Merge tag 'pci-v3.9-fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci · b196553a
      Linus Torvalds 提交于
      Pull PCI fixes from Bjorn Helgaas:
       "PCI updates for v3.9:
      
        ASPM
            Revert "PCI/ACPI: Request _OSC control before scanning PCI root bus"
        kexec
            PCI: Don't try to disable Bus Master on disconnected PCI devices
        Platform ROM images
            PCI: Add PCI ROM helper for platform-provided ROM images
            nouveau: Attempt to use platform-provided ROM image
            radeon: Attempt to use platform-provided ROM image
        Hotplug
            PCI/ACPI: Always resume devices on ACPI wakeup notifications
            PCI/PM: Disable runtime PM of PCIe ports
        EISA
            EISA/PCI: Fix bus res reference
            EISA/PCI: Init EISA early, before PNP"
      
      * tag 'pci-v3.9-fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci:
        PCI/PM: Disable runtime PM of PCIe ports
        PCI/ACPI: Always resume devices on ACPI wakeup notifications
        PCI: Don't try to disable Bus Master on disconnected PCI devices
        Revert "PCI/ACPI: Request _OSC control before scanning PCI root bus"
        radeon: Attempt to use platform-provided ROM image
        nouveau: Attempt to use platform-provided ROM image
        EISA/PCI: Init EISA early, before PNP
        EISA/PCI: Fix bus res reference
        PCI: Add PCI ROM helper for platform-provided ROM images
      b196553a
    • J
      USB: io_ti, stop dereferencing potential NULL · ae3759c2
      Jiri Slaby 提交于
      tty_port_tty_get might return a tty which is NULL. But it is
      dereferenced unconditionally in edge_send. Stop dereferencing that by
      sending usb_serial_port pointer around.
      Signed-off-by: NJiri Slaby <jslaby@suse.cz>
      Cc: Johan Hovold <jhovold@gmail.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      ae3759c2
    • G
      Merge tag 'usb-for-v3.10' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-next · 64dc9e2e
      Greg Kroah-Hartman 提交于
      Felipe writes:
      
      usb: patches for v3.10 merge window
      
      Here is the big Gadget & PHY pull request. Many of us have
      been really busy lately getting multiple drivers to a better
      position.
      
      Since this pull request is so large, I will divide it in sections
      so it's easier to grasp what's included.
      
      - cleanups:
      	. UDC drivers no longer touch gadget->dev, that's now udc-core
      		responsibility
      	. Many more UDC drivers converted to usb_gadget_map/unmap_request()
      	. UDC drivers no longer initialize DMA-related fields from gadget's
      		device structure
      	. UDC drivers don't touch gadget.dev.driver directly
      	. UDC drivers don't assign gadget.dev.release directly
      	. Removal of some unused DMA_ADDR_INVALID
      	. Introduction of CONFIG_USB_PHY
      	. All phy drivers have been moved to drivers/usb/phy and renamed to
      		a common naming scheme
      	. Fix PHY layer so it never returns a NULL pointer, also fix all
      		callers to avoid using IS_ERR_OR_NULL()
      	. Sparse fixes all over the place
      	. drivers/usb/otg/ has been deleted
      	. Marvel drivers (mv_udc, ehci-mv, mv_otg and mv_u3d) improved clock
      		usage
      
      - new features:
      	. UDC core now provides a generic way for tracking and reporting
      		UDC's state (not attached, resuming, suspended, addressed,
      		default, etc)
      	. twl4030-usb learned that it shouldn't be enabled during init
      	. Full DT support for DWC3 has been implemented
      	. ab8500-usb learned about pinctrl framework
      	. nop PHY learned about DeviceTree and regulators
      	. DWC3 learned about suspend/resume
      	. DWC3 can now be compiled in host-only and gadget-only (as well as
      		DRD) configurations
      	. UVC now enables streaming endpoint based on negotiated speed
      	. isp1301 now implements the PHY API properly
      	. configfs-based interface for gadget drivers which will lead to
      		the removal of all code which just combines functions together
      		to build functional gadget drivers.
      	. f_serial and f_obex were converted to new configfs interface while
      		maintaining old interface around.
      
      - non-critical fixes:
      	. UVC gadget driver got fixes for Endpoint usage and stream calculation
      	. ab8500-usb fixed unbalanced clock and regulator API usage
      	. twl4030-usb got a fix for when OMAP3 is booted with cable connected
      	. fusb300_udc got a fix for DMA usage
      	. UVC got fixes for two assertions of the USB Video Class Compliance
      		specification revision 1.1
      	. build warning issues caused by recent addition of __must_check to
      		regulator API
      
      These are all changes which deserve a mention, all other changes are related
      to these one or minor spelling fixes and other similar tasks.
      Signed-of-by: NFelipe Balbi <balbi@ti.com>
      64dc9e2e
    • D
      USB: keyspan: add a sanity test on "len" · 01a60e76
      Dan Carpenter 提交于
      "len" comes from the USB transfer and it's probably correct.  The thing
      is that we already have similar checks like:
      
              if (data[i] >= serial->num_ports) {
      
      So adding a sanity test here matches the rest of the code and is a good
      idea.
      Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      01a60e76
    • D
      USB: keyspan: pull in one indent level · 6a3ae841
      Dan Carpenter 提交于
      We can remove the "if (urb->actual_length) {" check because checking for
      "while (i < urb->actual_length) {" is sufficient.  This lets us pull the
      code in one indent level.
      Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      6a3ae841
    • M
      usb: chipidea: udc: fix memory leak in _ep_nuke · 7ca2cd29
      Michael Grzeschik 提交于
      In hardware_enqueue code adds one extra td with dma_pool_alloc if
      mReq->req.zero is true. When _ep_nuke will be called for that endpoint,
      dma_pool_free will not be called to free that memory again. That patch
      fixes this.
      
      Cc: stable <stable@vger.kernel.org> # v3.5
      Signed-off-by: NMichael Grzeschik <m.grzeschik@pengutronix.de>
      Signed-off-by: NAlexander Shishkin <alexander.shishkin@linux.intel.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      7ca2cd29
    • L
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net · 53f63189
      Linus Torvalds 提交于
      Pull networking fixes from David Miller:
      
       1) Fix erroneous sock_orphan() leading to crashes and double
          kfree_skb() in NFC protocol.  From Thierry Escande and Samuel Ortiz.
      
       2) Fix use after free in remain-on-channel mac80211 code, from Johannes
          Berg.
      
       3) nf_reset() needs to reset the NF tracing cookie, otherwise we can
          leak it from one namespace into another.  Fix from Gao Feng and
          Patrick McHardy.
      
       4) Fix overflow in channel scanning array of mwifiex driver, from Stone
          Piao.
      
       5) Fix loss of link after suspend/shutdown in r8169, from Hayes Wang.
      
       6) Synchronization of unicast address lists to the undelying device
          doesn't work because whether to sync is maintained as a boolean
          rather than a true count.  Fix from Vlad Yasevich.
      
       7) Fix corruption of TSO packets in atl1e by limiting the segmented
          packet length.  From Hannes Frederic Sowa.
      
       8) Revert bogus AF_UNIX credential passing change and fix the
          coalescing issue properly, from Eric W Biederman.
      
       9) Changes of ipv4 address lifetime settings needs to generate a
          notification, from Jiri Pirko.
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (22 commits)
        netfilter: don't reset nf_trace in nf_reset()
        net: ipv4: notify when address lifetime changes
        ixgbe: fix registration order of driver and DCA nofitication
        af_unix: If we don't care about credentials coallesce all messages
        Revert "af_unix: dont send SCM_CREDENTIAL when dest socket is NULL"
        bonding: remove sysfs before removing devices
        atl1e: limit gso segment size to prevent generation of wrong ip length fields
        net: count hw_addr syncs so that unsync works properly.
        r8169: fix auto speed down issue
        netfilter: ip6t_NPT: Fix translation for non-multiple of 32 prefix lengths
        mwifiex: limit channel number not to overflow memory
        NFC: microread: Fix build failure due to a new MEI bus API
        iwlwifi: dvm: fix the passive-no-RX workaround
        netfilter: nf_conntrack: fix error return code
        NFC: llcp: Keep the connected socket parent pointer alive
        mac80211: fix idle handling sequence
        netfilter: nfnetlink_acct: return -EINVAL if object name is empty
        netfilter: nfnetlink_queue: fix error return code in nfnetlink_queue_init()
        netfilter: reset nf_trace in nf_reset
        mac80211: fix remain-on-channel cancel crash
        ...
      53f63189
    • J
      x86: Fix rebuild with EFI_STUB enabled · 91870824
      Jan Beulich 提交于
      eboot.o and efi_stub_$(BITS).o didn't get added to "targets", and hence
      their .cmd files don't get included by the build machinery, leading to
      the files always getting rebuilt.
      
      Rather than adding the two files individually, take the opportunity and
      add $(VMLINUX_OBJS) to "targets" instead, thus allowing the assignment
      at the top of the file to be shrunk quite a bit.
      
      At the same time, remove a pointless flags override line - the variable
      assigned to was misspelled anyway, and the options added are
      meaningless for assembly sources.
      
      [ hpa: the patch is not minimal, but I am taking it for -urgent anyway
        since the excess impact of the patch seems to be small enough. ]
      Signed-off-by: NJan Beulich <jbeulich@suse.com>
      Link: http://lkml.kernel.org/r/515C5D2502000078000CA6AD@nat28.tlf.novell.com
      Cc: Matthew Garrett <mjg@redhat.com>
      Cc: Matt Fleming <matt.fleming@intel.com>
      Signed-off-by: NH. Peter Anvin <hpa@linux.intel.com>
      91870824
    • M
      usb: chipidea: udc: fix memory access of shared memory on armv5 machines · a9c17430
      Michael Grzeschik 提交于
      The udc uses an shared dma memory space between hard and software. This
      memory layout is described in ci13xxx_qh and ci13xxx_td which are marked
      with the attribute ((packed)).
      
      The compiler currently does not know about the alignment of the memory
      layout, and will create strb and ldrb operations.
      
      The Datasheet of the synopsys core describes, that some operations on
      the mapped memory need to be atomic double word operations. I.e. the
      next pointer addressing in the qhead, as otherwise the hardware will
      read wrong data and totally stuck.
      
      This is also possible while working with the current active td queue,
      and preparing the td->ptr.next in software while the hardware is still
      working with the current active td which is supposed to be changed:
      
      writeb(0xde, &td->ptr.next + 0x0); /* strb */
      writeb(0xad, &td->ptr.next + 0x1); /* strb */
      
      <----- hardware reads value of td->ptr.next and get stuck!
      
      writeb(0xbe, &td->ptr.next + 0x2); /* strb */
      writeb(0xef, &td->ptr.next + 0x3); /* strb */
      
      This appeares on armv5 machines where the hardware does not support
      unaligned 32bit operations.
      
      This patch adds the attribute ((aligned(4))) to the structures to tell
      the compiler to use 32bit operations. It also adds an wmb() for the
      prepared TD data before it gets enqueued into the qhead.
      
      Cc: stable <stable@vger.kernel.org> # v3.5
      Signed-off-by: NMichael Grzeschik <m.grzeschik@pengutronix.de>
      Reviewed-by: NFelipe Balbi <balbi@ti.com>
      Signed-off-by: NAlexander Shishkin <alexander.shishkin@linux.intel.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      a9c17430
    • P
      netfilter: don't reset nf_trace in nf_reset() · 124dff01
      Patrick McHardy 提交于
      Commit 130549fe ("netfilter: reset nf_trace in nf_reset") added code
      to reset nf_trace in nf_reset(). This is wrong and unnecessary.
      
      nf_reset() is used in the following cases:
      
      - when passing packets up the the socket layer, at which point we want to
        release all netfilter references that might keep modules pinned while
        the packet is queued. nf_trace doesn't matter anymore at this point.
      
      - when encapsulating or decapsulating IPsec packets. We want to continue
        tracing these packets after IPsec processing.
      
      - when passing packets through virtual network devices. Only devices on
        that encapsulate in IPv4/v6 matter since otherwise nf_trace is not
        used anymore. Its not entirely clear whether those packets should
        be traced after that, however we've always done that.
      
      - when passing packets through virtual network devices that make the
        packet cross network namespace boundaries. This is the only cases
        where we clearly want to reset nf_trace and is also what the
        original patch intended to fix.
      
      Add a new function nf_reset_trace() and use it in dev_forward_skb() to
      fix this properly.
      Signed-off-by: NPatrick McHardy <kaber@trash.net>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      124dff01
    • L
      Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus · 6cfa9238
      Linus Torvalds 提交于
      Pull MIPS fixes from Ralf Baechle:
       "Fixes for a number of small glitches in various corners of the MIPS
        tree.  No particular areas is standing out.
      
        With this applied all MIPS defconfigs are building fine.  No merge
        conflicts are expected."
      
      * 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus:
        MIPS: Delete definition of SA_RESTORER.
        MIPS: Fix ISA level which causes secondary cache init bypassing and more
        MIPS: Fix build error cavium-octeon without CONFIG_SMP
        MIPS: Kconfig: Rename SNIPROM too
        MIPS: Alchemy: Fix typo "CONFIG_DEBUG_PCI"
        MIPS: Unbreak function tracer for 64-bit kernel.
      6cfa9238
    • L
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/steve/gfs2-3.0-fixes · 00fa6fe9
      Linus Torvalds 提交于
      Pull GFS2 fixes from Steven Whitehouse:
       "There are two patches which fix up a couple of minor issues in the DLM
        interface code, a missing error path in gfs2_rs_alloc(), one patch
        which fixes a problem during "withdraw" and a fix for discards/FITRIM
        when using 4k sector sized devices."
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/steve/gfs2-3.0-fixes:
        GFS2: Issue discards in 512b sectors
        GFS2: Fix unlock of fcntl locks during withdrawn state
        GFS2: return error if malloc failed in gfs2_rs_alloc()
        GFS2: use memchr_inv
        GFS2: use kmalloc for lvb bitmap
      00fa6fe9
    • M
      firmware,IB/qib: revert firmware file move · ff802e31
      Mike Marciniszyn 提交于
      Commit e2eed58b ("IB/qib: change QLogic to Intel") moved a firmware
      file potentially breaking the ABI.
      
      This patch reverts that aspect of the fix as well as reverting the
      firmware name as used in qib.
      Reported-by: NDavid Woodhouse <dwmw2@infradead.org>
      Signed-off-by: NMike Marciniszyn <mike.marciniszyn@intel.com>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      ff802e31
    • L
      Merge tag 'spi-fix-v3.9-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/misc · e0a77f26
      Linus Torvalds 提交于
      Pull spi fixes from Mark Brown:
       "A bunch of small driver fixes plus a fix for error handling in the
        core - nothing too exciting overall."
      
      * tag 'spi-fix-v3.9-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/misc:
        spi/mpc512x-psc: optionally keep PSC SS asserted across xfer segmensts
        spi: Unlock a spinlock before calling into the controller driver.
        spi/s3c64xx: modified error interrupt handling and init
        spi/bcm63xx: don't disable non enabled clocks in probe error path
        spi/bcm63xx: Remove unused variable
        spi: slink-tegra20: move runtime pm calls to transfer_one_message
      e0a77f26
    • B
      GFS2: Issue discards in 512b sectors · b2c87cae
      Bob Peterson 提交于
      This patch changes GFS2's discard issuing code so that it calls
      function sb_issue_discard rather than blkdev_issue_discard. The
      code was calling blkdev_issue_discard and specifying the correct
      sector offset and sector size, but blkdev_issue_discard expects
      these values to be in terms of 512 byte sectors, even if the native
      sector size for the device is different. Calling sb_issue_discard
      with the BLOCK size instead ensures the correct block-to-512b-sector
      translation. I verified that "minlen" is specified in blocks, so
      comparing it to a number of blocks is correct.
      Signed-off-by: NBob Peterson <rpeterso@redhat.com>
      Signed-off-by: NSteven Whitehouse <swhiteho@redhat.com>
      b2c87cae
    • J
      Revert "drivers/rtc/rtc-at91rm9200.c: use a variable for storing IMR" · e24b0bfa
      Johan Hovold 提交于
      This reverts commit 0ef1594c.
      
      This patch introduced a few races which cannot be easily fixed with a
      small follow-up patch. Furthermore, the SoC with the broken hardware
      register, which this patch intended to add support for, can only be used
      with device trees, which this driver currently does not support.
      
      [ Here is the discussion that led to this "revert" patch:
        https://lkml.org/lkml/2013/4/3/176 ]
      
      Cc: stable <stable@vger.kernel.org>
      Signed-off-by: NJohan Hovold <jhovold@gmail.com>
      Signed-off-by: NNicolas Ferre <nicolas.ferre@atmel.com>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      e24b0bfa