1
0
Fork 0
Commit Graph

401083 Commits (f55055b4648416a9d31e5666a5425d406c05f626)

Author SHA1 Message Date
Huang Rui f55055b464 usb: usbtest: fix checkpatch warning as sizeof code style
Script checkpatch.pl always complains incorrect code style like below:

WARNING: sizeof *udev->bos->desc should be sizeof(*udev->bos->desc)

This patch fixes the warning for usbtest module.

Signed-off-by: Huang Rui <ray.huang@amd.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-29 16:43:36 -07:00
Greg Kroah-Hartman 2fc74ac227 UWB: clean up attribute use by using ATTRIBUTE_GROUPS()
The ATTRIBUTE_GROUPS() macro can be used in the uwb code to reduce the
number of lines of code.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-29 16:43:36 -07:00
Andrzej Pietrasiewicz a1924d8a1d usb/gadget: f_mass_storage: use string literal as format in dev_set_name
Fix commit b27c08c953 where dev_set_name()
is used without a string literal as format.

Reported-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Acked-by: Michal Nazarewicz <mina86@mina86.com>
Cc: Kees Cook <keescook@chromium.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-25 09:12:14 +01:00
Rui li 0636fc507a USB:add new zte 3g-dongle's pid to option.c
Signed-off-by: Rui li <li.rui27@zte.com.cn>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-25 06:37:25 +01:00
Greg Kroah-Hartman 5328f35b15 usb: patches for v3.13
Final conversions to configfs for mass storage, acm_ms, and
 multi gadgets.
 
 MUSB should now work out of the box on AM335x-based boards
 (beagle bone white and black) with DMA thanks to Sebastian's
 work.
 
 We can now enable VERBOSE_DEBUG on builds of drivers/usb/gadget/
 by selecting CONFIG_USB_GADGET_VERBOSE.
 
 s3c-hsotg got quite a few non-critical fixes but also learned
 a few new tricks (isochronous transfers, multi count support).
 
 The Marvel USB3 Controller driver got a memory leak fix.
 
 devm_usb_get_phy() learned not to return NULL, ever.
 
 Other than these patches, we have the usual set of cleanups
 ranging from removal of unnecessary *_set_drvdata() to using
 SIMPLE_DEV_PM_OPS.
 
 Signed-of-by: Felipe Balbi <balbi@ti.com>
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.15 (GNU/Linux)
 
 iQIcBAABAgAGBQJSZRSSAAoJEIaOsuA1yqRE6EAP/AuF0dWV3wNSuv5h3ZPOybu8
 uULX0E/VA2aGs8/55FeuQIJAn499zdt0KH5l8P3CGrKBPk8BN/rD55a6uwYEfWO8
 wwTJpVeRyRQS8jes22vPqA22TXgl88SJO0RrsCarrzOcMNloVtOA4zyorITuGZQB
 jEKmf9BdjIUlzZkH9t33v3O8kB5pJ1YvBQGRWXbBZvxSzohPC2LYerZKMPN99hDB
 2YnJXVKZqZzKbcQQmJklWqRo0RTprWz0Mqcu2r8Lnnn2ZqnT3RBmCBsYXefsp4nF
 egRJy51DiypEYt3/OEBf21BySjZHjO6+9jfzOmuOGoEiqw6XCRFMydVpqJJHC8WX
 MoCs31VnGwwwBpSOz9ECS9QYXne9jx/bJ6iKoS736sgA20ZA6wBbEDhJlTckcZtm
 TEC+UTKevNACAP8cjhGEquqwt5H/rMaYFMXEYQj+gvO2jDsNUGWb74l5VDaBiIm7
 GzdUmgmYym8HKT80tgEcgvsUoUphDeNE84OW/jo1nFUDvCniLfQBAYZooEnTHY2H
 AW+DqimJzNnKcHo4w/HUQhRgK9147aRbskmVIbepIIW7WQdFQBOPVy7BbfnVD2vA
 j01JPshgtnjb+MZb6VqnbcaWKPnJr3KTnOpTTMyk5pKnBOf6PHb1S1Tq5uqtW2Ki
 gqi/SXZJ1bYDVaaspNWr
 =LDY7
 -----END PGP SIGNATURE-----

Merge tag 'usb-for-v3.13' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-next

Felipe writes:

usb: patches for v3.13

Final conversions to configfs for mass storage, acm_ms, and
multi gadgets.

MUSB should now work out of the box on AM335x-based boards
(beagle bone white and black) with DMA thanks to Sebastian's
work.

We can now enable VERBOSE_DEBUG on builds of drivers/usb/gadget/
by selecting CONFIG_USB_GADGET_VERBOSE.

s3c-hsotg got quite a few non-critical fixes but also learned
a few new tricks (isochronous transfers, multi count support).

The Marvel USB3 Controller driver got a memory leak fix.

devm_usb_get_phy() learned not to return NULL, ever.

Other than these patches, we have the usual set of cleanups
ranging from removal of unnecessary *_set_drvdata() to using
SIMPLE_DEV_PM_OPS.

Signed-of-by: Felipe Balbi <balbi@ti.com>
2013-10-24 16:18:40 +01:00
Sylwester Nawrocki e3967e7b28 phy: exynos-mipi-video: Fix phy_power_off() callback
Fix argument passed to the register setup helper function so
the phy is actually disabled. Now due to cut&paste error 1 is
passed to both phy_power_on() and phy_power_off().

Reported by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Reviewed-by: Jingoo Han <jg1.han@samsung.com>
Acked-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-19 19:55:43 -07:00
Alexey Khoroshilov f2c28cfc26 USB: wusbcore: fix usb_dev leaks
cbaf_probe() does cbaf->usb_dev = usb_get_dev(interface_to_usbdev(iface)),
but there is no usb_put_dev() anywhere in cbaf.

The patch adds usb_put_dev() to cbaf_disconnect() and to an error path in cbaf_probe().
Also it adds missed usb_put_intf(iface) to the error path.

Found by Linux Driver Verification project (linuxtesting.org).

Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-19 14:23:15 -07:00
H Hartley Sweeten f7d4ffa923 ARM: ep93xx_defconfig: cleanup ep93xx_defconfig
Generate ep93xx_defconfig by doing:

make ep93xx_defconfig
make savedefconfig
mv defconfig arch/arm/configs/ep93xx_defconfig

No function change. This just refreshes the ep93xx_defconfig to make it
easier and cleaner when adding new entries.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Acked-by: Ryan Mallon <rmallon@gmail.com>
Cc: Alan Stern <stern@rowland.harvard.edu>
Cc: Lennert Buytenhek <kernel@wantstofly.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Olof Johansson <olof@lixom.net>
Cc: Russell King <linux@arm.linux.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-19 14:21:09 -07:00
Alan Stern 1c124c9962 USB: UHCI: check for wakeup/suspend race
hcd-pci.c in usbcore contains a check for wakeup requests racing with
controller suspend.  This check is going to be moved out of usbcore
and into the individual controller drivers, where it can apply to all
platforms, not just PCI.

This patch adds the check to uhci-hcd.  Ironically, none of the
non-PCI platform drivers for uhci-hcd implement suspend/resume.
Nevertheless, this change is needed to accomodate the upcoming change
to usbcore.

The patch also removes an outdated check of the root hub state.  For
one thing, the PM layer has long been quite reliable about suspending
root hubs before controllers.  For another, virtually the same check
is also made in hcd-pci.c; there's no point in repeating it.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-19 14:12:14 -07:00
Alan Stern b8efdafb40 USB: EHCI: add check for wakeup/suspend race
hcd-pci.c in usbcore contains a check for wakeup requests racing with
controller suspend.  This check is going to be moved out of usbcore
and into the individual controller drivers, where it can apply to all
platforms, not just PCI.

This patch adds the check to ehci-hcd.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-19 14:10:16 -07:00
Alan Stern 0a56b4fa68 USB: change dev_warn about missing reset-resume to dev_dbg
This patch changes a dev_warn() call in usbcore to dev_dbg().  It's
not necessary to warn about drivers missing a reset-resume callback,
since the reset-resume method is optional.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
CC: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-19 14:10:16 -07:00
Alan Stern 7c71c6e6be USB: OHCI: fix and explain sparse errors
This patch fixes an endian-related error in ohci-hcd (detected by
sparse) and clarifies a comment explaining a peculiar locking
arrangement that sparse warns about.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-19 14:08:04 -07:00
Alan Stern 4a71f242e5 USB: EHCI: fix sparse errors
This patch fixes several sparse errors in ehci-hcd introduced by
commit 3d091a6f70 (USB: EHCI: AMD periodic frame list table quirk).
Although the problem fixed by that commit affects only little-endian
systems, the source code has to use types appropriate for big-endian
too.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-19 14:08:04 -07:00
Alan Stern 5d8f681f3d USB: EHCI: fix type mismatch in check_intr_schedule
This patch fixes a type mismatch in ehci-hcd caused by commit
b35c5009bb (USB: EHCI: create per-TT bandwidth tables).  The c_maskp
parameter in check_intr_schedule() was changed to point to unsigned
int rather than __hc32, but the prototype declaration wasn't adjusted
accordingly.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-19 14:06:00 -07:00
Greg Kroah-Hartman 9afcdb10ad xhci: Final patches for 3.13
Hi Greg,
 
 Here's my pull request for usb-next and 3.13.  My xHCI tree is closed
 after this point, since I won't be able to run my full tests while I'm in
 Scotland.  After Kernel Summit, I'll be on vacation with access to email
 from Oct 26th to Nov 6th.
 
 Here's what's in this request:
 
  - Patches to fix USB 2.0 Link PM issues that cause USB 3.0 devices to not
    enumerate or misbehave when plugged into a USB 2.0 port.  Those are
    marked for stable.
 
  - A msec vs jiffies bug fix by xiao jin, which results in fairly harmless
    behavior, and thus isn't marked for stable.
 
  - Xenia's patches to refactor the xHCI command handling code, which makes
    it much more readable and consistent.
 
  - Misc cleanup patches, one by Sachin Kamat and three from Dan Williams.
 
 Here's what's not in this request:
 
  - Dan's two patches to allow the xHCI host to use the "Windows" or "new"
    enumeration scheme.  I did not have time to test those, and I want to
    run them with as many USB devices as I can get a hold of.  That will
    have to wait for 3.14.
 
  - Xenia's patches to remove xhci_readl in favor of readl.  I'll queue
    those for 3.14 after I test them.
 
  - The xHCI streams update, UAS fixes, and usbfs streams support.  I'm not
    comfortable with changes and fixes to that patchset coming in this late.
    I would rather wait for 3.14 and be really sure the streams support is
    stable before we add new userspace API and remove CONFIG_BROKEN from the
    uas driver.
 
  - Julius' patch to clear the port reset bit on hub resume that came in
    a couple days ago.  It looks harmless, but I would rather take the time
    to test and queue it for usb-linus and the stable trees once 3.13-rc1
    is out.
 
 Sarah Sharp
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iQIcBAABAgAGBQJSYH+2AAoJEBMGWMLi1Gc5XnkP/RN7Npl576unFyKV9alGn+yw
 imimJBKXpzoWomnSQWO/AcPyFxYA2sm22WFVNIyz/qMq2koo5xk9dM1atxr1lAmJ
 NaLnyf0yCKmyTWW+EGlIUa+FBM29WyXnSwMF2UAIN35ZVwqfpJmunLs8kLxW3Sie
 ZJoz2MMZNrgNW83Bj1e3HaRFez4goYx1pslM4MpLuno8pHumrWFu5ySk8naxjRyk
 Yz6DRBHaa8fYLA36Pk+KkmtE9a5JO+ZCe6yMljmj0T6wiawjtzgukO2pUdxjC+b7
 nb/4dsR3nxlpf6O3wR7BRDLcY3zrQM2RjjOuvpyoZ1/kPgtl83RfwkuSWzQ2o+bT
 3tV4K5mIdfwHU+oUqlvzjjGHmjN62bO5g3b0HFRKxcMQL4QxmjuEW9mymXzLx/BT
 9UG9vta6mW6F/dwL2olLIha64a+vTvV3U4Jn4DDAYUtFtEmH0EYLgzBwSLHKm/ZE
 YuroUT7CK6JgLsQHohXQ5jw3sUgsqF4zBL4SvtZrCHSp4agOi+WocMfnPWkETqAo
 mOyw7F9ZouG04hsRs3kbCAwaXiBreSgElVeJXcDtZ8W/zbumLChR9jenM52UxFgk
 TAJ6ymRP7BKdVree9u3i+usQkxLGvf6imtbAiYveR+1EReDxCV7+NRJz/uEdxTDX
 5rLqvhV+1WllJhzRnbao
 =H4xp
 -----END PGP SIGNATURE-----

Merge tag 'for-usb-next-2013-10-17' of git://git.kernel.org/pub/scm/linux/kernel/git/sarah/xhci into usb-next

Sarah writes:

xhci: Final patches for 3.13

Hi Greg,

Here's my pull request for usb-next and 3.13.  My xHCI tree is closed
after this point, since I won't be able to run my full tests while I'm in
Scotland.  After Kernel Summit, I'll be on vacation with access to email
from Oct 26th to Nov 6th.

Here's what's in this request:

 - Patches to fix USB 2.0 Link PM issues that cause USB 3.0 devices to not
   enumerate or misbehave when plugged into a USB 2.0 port.  Those are
   marked for stable.

 - A msec vs jiffies bug fix by xiao jin, which results in fairly harmless
   behavior, and thus isn't marked for stable.

 - Xenia's patches to refactor the xHCI command handling code, which makes
   it much more readable and consistent.

 - Misc cleanup patches, one by Sachin Kamat and three from Dan Williams.

Here's what's not in this request:

 - Dan's two patches to allow the xHCI host to use the "Windows" or "new"
   enumeration scheme.  I did not have time to test those, and I want to
   run them with as many USB devices as I can get a hold of.  That will
   have to wait for 3.14.

 - Xenia's patches to remove xhci_readl in favor of readl.  I'll queue
   those for 3.14 after I test them.

 - The xHCI streams update, UAS fixes, and usbfs streams support.  I'm not
   comfortable with changes and fixes to that patchset coming in this late.
   I would rather wait for 3.14 and be really sure the streams support is
   stable before we add new userspace API and remove CONFIG_BROKEN from the
   uas driver.

 - Julius' patch to clear the port reset bit on hub resume that came in
   a couple days ago.  It looks harmless, but I would rather take the time
   to test and queue it for usb-linus and the stable trees once 3.13-rc1
   is out.

Sarah Sharp
2013-10-19 14:03:44 -07:00
Greg Kroah-Hartman 5584cfbafc Merge 3.12-rc6 into usb-next.
We want those USB fixes in here as well.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-19 13:19:07 -07:00
Linus Torvalds 31d141e3a6 Linux 3.12-rc6 2013-10-19 12:28:15 -07:00
Thomas Pugliese 1653d2f88f usb: wusbcore: preserve endianness of cached descriptors
Do not overwrite the multi-byte fields of usb_wa_descriptor with their
cpu format values after reading the descriptor.  Leave the values as
__le16 and swap on use.  This is more consistent with other uses of USB
descriptors.

Signed-off-by: Thomas Pugliese <thomas.pugliese@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-19 05:19:21 -07:00
Thomas Pugliese 679ee475a1 usb: wusbcore: serialize access to the HWA data out endpoint
This patch serializes access to the HWA data transfer out (DTO)
endpoint.  This prevents a situation where two transfer requests being
sent concurrently to separate downstream endpoints could interleave
their transfer request and transfer data packets causing data
corruption.  The transfer processing code will now attempt to acquire
the DTO resource before sending a transfer to the HWA.  If it cannot
acquire the resource, the RPIPE that the transfer is assigned to will
be placed on a waiting list.  When the DTO resource is released, the
actor releasing the resource will serivce the RPIPEs that are waiting.

Signed-off-by: Thomas Pugliese <thomas.pugliese@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-19 05:19:21 -07:00
Linus Torvalds bdeeab62a6 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs
Pull btrfs fix from Chris Mason:
 "Sage hit a deadlock with ceph on btrfs, and Josef tracked it down to a
  regression in our initial rc1 pull.  When doing nocow writes we were
  sometimes starting a transaction with locks held"

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs:
  Btrfs: release path before starting transaction in can_nocow_extent
2013-10-18 16:46:21 -07:00
Linus Torvalds 797afdf708 ACPI and power management fixes for 3.12-rc6
- intel_pstate fix for misbehavior after system resume if sysfs
    attributes are set in a specific way before the corresponding
    suspend from Dirk Brandewie.
 
  - A recent intel_pstate fix has no effect if unsigned long is 32-bit,
    so fix it up to cover that case as well.
 
  - The s3c64xx cpufreq driver was not updated when the index field of
    struct cpufreq_frequency_table was replaced with driver_data, so
    update it now.  From Charles Keepax.
 
  - The Kconfig help text for ACPI_BUTTON still refers to /proc/acpi/event
    that has been dropped recently, so modify it to remove that reference.
    From Krzysztof Mazur.
 
  - A Lan Tianyu's change adds a missing mutex unlock to an error code
    path in acpi_resume_power_resources().
 
  - Some code related to ACPI power resources, whose very purpose is
    questionable to put it lightly, turns out to cause problems to
    happen during testing on real systems, so remove it completely
    (we may revisit that in the future if there's a compelling enough
    reason).  From Rafael J Wysocki and Aaron Lu.
 
 /
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.19 (GNU/Linux)
 
 iQIcBAABCAAGBQJSYZQiAAoJEILEb/54YlRxed8QAJxDNJ4sHEzahsEFREZWwUy6
 KN6yLRFs80aplbiCdNyYQnp5RZ0QqEVq0Vwkur/pxk5j00XJWTMknKvJhiAlIaHd
 l1T1X0Oh3w4Z8h+0l49QaU0z5tHt+dAxzl4ArMlcQ3BQuKf5/8c+dIfNutkWpOWP
 xHIDjEV+Y+8JCQoP92we7BbJpBRqzC3AOr05iH0wUN/i4dZzfqEca6KxTBPSXAcX
 CbEBOXauG4BR4LyEQ2rlEt53FTp7XjZ9my1kKVH6LmtA+HiHeQmZMHTUf9dlaYAH
 1n38ebeIHpskRYhu7nknto1S/mTVKxkzuSQ8TyKM+QOZz9x+WT/uiZjwbxINmxKk
 fLi8TdMdv+WwALAqI36AjgfxdTtQ8Fhs/jSOoCY3KqoE4LMUInq2izWy8ALTQCPm
 8PhM2WiYPFt6qSCqaKLfbbYH3ou6t2PQZihRfqpGEaTatNvwL2AYgl5QhOhs90EV
 kYwZpfxodTNLnk4UfLGASjVEDRxgN7DUSrUvn0z7HmhbH/0YK3OVdLU0UQalAvfR
 eUKYO+aWXzGsJO/ym3qfHkehumReCM62ykf295ApYnt134oqGDe3+Ajgx53WPj/P
 ruIrfkmqDHCXjlVJ8f+UaZ/HXlDLcLrjlIVF1Dp0MKnl49pe+va4OmAxyImvTtFC
 gciZiW+n5uowNojt8yye
 =MV4Q
 -----END PGP SIGNATURE-----

Merge tag 'pm+acpi-3.12-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm

Pull ACPI and power management fixes from Rafael Wysocki:

 - intel_pstate fix for misbehavior after system resume if sysfs
   attributes are set in a specific way before the corresponding suspend
   from Dirk Brandewie.

 - A recent intel_pstate fix has no effect if unsigned long is 32-bit,
   so fix it up to cover that case as well.

 - The s3c64xx cpufreq driver was not updated when the index field of
   struct cpufreq_frequency_table was replaced with driver_data, so
   update it now.  From Charles Keepax.

 - The Kconfig help text for ACPI_BUTTON still refers to
   /proc/acpi/event that has been dropped recently, so modify it to
   remove that reference.  From Krzysztof Mazur.

 - A Lan Tianyu's change adds a missing mutex unlock to an error code
   path in acpi_resume_power_resources().

 - Some code related to ACPI power resources, whose very purpose is
   questionable to put it lightly, turns out to cause problems to happen
   during testing on real systems, so remove it completely (we may
   revisit that in the future if there's a compelling enough reason).
   From Rafael J Wysocki and Aaron Lu.

* tag 'pm+acpi-3.12-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
  ACPI / PM: Drop two functions that are not used any more
  ATA / ACPI: remove power dependent device handling
  cpufreq: s3c64xx: Rename index to driver_data
  ACPI / power: Drop automaitc resume of power resource dependent devices
  intel_pstate: Fix type mismatch warning
  cpufreq / intel_pstate: Fix max_perf_pct on resume
  ACPI: remove /proc/acpi/event from ACPI_BUTTON help
  ACPI / power: Release resource_lock after acpi_power_get_state() return error
2013-10-18 14:26:51 -07:00
Linus Torvalds 9219cec5f2 Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull x86 fixes from Ingo Molnar:
 "Two fixlets:

   - fix a (rare-config) build bug
   - fix a next-gen SGI/UV hw/firmware enumeration bug"

* 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  x86: Update UV3 hub revision ID
  x86/microcode: Correct Kconfig dependencies
2013-10-18 12:25:11 -07:00
Josef Bacik 1bda19eb73 Btrfs: release path before starting transaction in can_nocow_extent
We can't be holding tree locks while we try to start a transaction, we will
deadlock.  Thanks,

Reported-by: Sage Weil <sage@inktank.com>
Signed-off-by: Josef Bacik <jbacik@fusionio.com>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
2013-10-18 12:43:40 -04:00
Rafael J. Wysocki 981984cbd0 Merge branch 'acpi-fixes'
* acpi-fixes:
  ACPI / PM: Drop two functions that are not used any more
  ATA / ACPI: remove power dependent device handling
  ACPI / power: Drop automaitc resume of power resource dependent devices
  ACPI: remove /proc/acpi/event from ACPI_BUTTON help
  ACPI / power: Release resource_lock after acpi_power_get_state() return error
2013-10-18 13:42:10 +02:00
Rafael J. Wysocki bdbff71653 Merge branch 'pm-fixes'
* pm-fixes:
  cpufreq: s3c64xx: Rename index to driver_data
  intel_pstate: Fix type mismatch warning
  cpufreq / intel_pstate: Fix max_perf_pct on resume
2013-10-18 13:41:56 +02:00
Linus Torvalds 04919afb85 Merge branch 'for-linus' of git://git.samba.org/sfrench/cifs-2.6
Pull CIFS fixes from Steve French:
 "Five small cifs fixes (includes fixes for: unmount hang, 2 security
  related, symlink, large file writes)"

* 'for-linus' of git://git.samba.org/sfrench/cifs-2.6:
  cifs: ntstatus_to_dos_map[] is not terminated
  cifs: Allow LANMAN auth method for servers supporting unencapsulated authentication methods
  cifs: Fix inability to write files >2GB to SMB2/3 shares
  cifs: Avoid umount hangs with smb2 when server is unresponsive
  do not treat non-symlink reparse points as valid symlinks
2013-10-17 18:49:21 -07:00
Linus Torvalds 83f11a9cf2 Driver core fix for 3.12-rc6
Here is one fix for the hotplug memory path that resolves a regression
 when removing memory that showed up in 3.12-rc1.
 
 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.19 (GNU/Linux)
 
 iEYEABECAAYFAlJgHqMACgkQMUfUDdst+ykplQCgym3aZCnwCAASgrM5g0fyM5LW
 eR4AmQGqYBZBticsmGqLWDyUksrnL/6S
 =zRIr
 -----END PGP SIGNATURE-----

Merge tag 'driver-core-3.12-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core

Pull driver core fix from Greg KH:
 "Here is one fix for the hotplug memory path that resolves a regression
  when removing memory that showed up in 3.12-rc1"

* tag 'driver-core-3.12-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core:
  driver core: Release device_hotplug_lock when store_mem_state returns EINVAL
2013-10-17 10:39:01 -07:00
Linus Torvalds 02a3250fd3 USB fixes for 3.12-rc6
Here are some USB fixes and new device ids for 3.12-rc6
 
 The largest change here is a bunch of new device ids for the option USB
 serial driver for new Huawei devices.  Other than that, just some small
 bug fixes for issues that people have reported (run-time and
 build-time), nothing major.
 
 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.19 (GNU/Linux)
 
 iEYEABECAAYFAlJgHZMACgkQMUfUDdst+yl5xgCePinICkasywmkWO0CgndCelCx
 nyMAoIQ51ot0igMbmXoSAyq5u0EgVHmG
 =/iU9
 -----END PGP SIGNATURE-----

Merge tag 'usb-3.12-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb

Pull USB fixes from Greg KH:
 "Here are some USB fixes and new device ids for 3.12-rc6

  The largest change here is a bunch of new device ids for the option
  USB serial driver for new Huawei devices.  Other than that, just some
  small bug fixes for issues that people have reported (run-time and
  build-time), nothing major"

* tag 'usb-3.12-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb:
  usb: usb_phy_gen: refine conditional declaration of usb_nop_xceiv_register
  usb: misc: usb3503: Fix compile error due to incorrect regmap depedency
  usb/chipidea: fix oops on memory allocation failure
  usb-storage: add quirk for mandatory READ_CAPACITY_16
  usb: serial: option: blacklist Olivetti Olicard200
  USB: quirks: add touchscreen that is dazzeled by remote wakeup
  Revert "usb: musb: gadget: fix otg active status flag"
  USB: quirks.c: add one device that cannot deal with suspension
  USB: serial: option: add support for Inovia SEW858 device
  USB: serial: ti_usb_3410_5052: add Abbott strip port ID to combined table as well.
  USB: support new huawei devices in option.c
  usb: musb: start musb on the udc side, too
  xhci: Fix spurious wakeups after S5 on Haswell
  xhci: fix write to USB3_PSSEN and XUSB2PRM pci config registers
  xhci: quirk for extra long delay for S4
  xhci: Don't enable/disable RWE on bus suspend/resume.
2013-10-17 10:38:18 -07:00
Linus Torvalds 7b4a515509 Serial driver fixes for 3.12-rc6
Here are two serial driver fixes for your tree.  One is a revert of a
 patch that causes a build error, the other is a fix to provide the
 correct brace placement which resolves a bug where the driver was not
 working properly.
 
 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.19 (GNU/Linux)
 
 iEYEABECAAYFAlJgH5oACgkQMUfUDdst+yn5ywCfU4Xq4jDcUyc3pEoKfX2kkNZk
 7a8An2brQo3h20xHsIv2NprgYqCjfZpx
 =rcEE
 -----END PGP SIGNATURE-----

Merge tag 'tty-3.12-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty

Pull serial driver fixes from Greg KH:
 "Here are two serial driver fixes for your tree.  One is a revert of a
  patch that causes a build error, the other is a fix to provide the
  correct brace placement which resolves a bug where the driver was not
  working properly"

* tag 'tty-3.12-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty:
  serial: vt8500: add missing braces
  Revert "serial: i.MX: evaluate linux,stdout-path property"
2013-10-17 10:37:42 -07:00
Linus Torvalds 66eb411ea2 Char / misc driver fixes for 3.12-rc6
Here are some small iio and w1 driver fixes for 3.12-rc6.
 
 There is also a hyper-v fix in here, which turned out to be incorrect,
 so it was reverted.  That will probably have to wait unto 3.13-rc1 to
 get accepted as it's still being discussed.
 
 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.19 (GNU/Linux)
 
 iEYEABECAAYFAlJgHiwACgkQMUfUDdst+ykS3gCgiJqKAbzsb+hNiI/AXmCHtcWV
 cK4AoIEXbg+nMYPzSuSPz1nr2vJPr3CP
 =5WpE
 -----END PGP SIGNATURE-----

Merge tag 'char-misc-3.12-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc

Pull char/misc driver fixes from Greg KH:
 "Here are some small iio and w1 driver fixes for 3.12-rc6.

  There is also a hyper-v fix in here, which turned out to be incorrect,
  so it was reverted.  That will probably have to wait unto 3.13-rc1 to
  get accepted as it's still being discussed"

* tag 'char-misc-3.12-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc:
  Revert "Drivers: hv: vmbus: Fix a bug in channel rescind code"
  Drivers: hv: vmbus: Fix a bug in channel rescind code
  iio:buffer: Free active scan mask in iio_disable_all_buffers()
  iio: frequency: adf4350: add missing clk_disable_unprepare() on error in adf4350_probe()
  w1 - call request_module with w1 master mutex unlocked
  w1 - fix fops in w1_bus_notify
2013-10-17 10:36:57 -07:00
Linus Torvalds 630db0e3d2 sound fixes for 3.12-rc6
All reasonably small fixes as rc6: a HD-audio mic fix, a us122l mmap
 regression fix, and kernel memory leak fix in hdsp driver.
 Hopefully this will be the last pull request for 3.12...
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.22 (GNU/Linux)
 
 iQIcBAABAgAGBQJSX6ebAAoJEGwxgFQ9KSmkkiIP/1x53z2Ri08yXApUm4pzSmqo
 4a2N7sfvv/iXZnRpG++RN3UOiqGYdx2Yncn0cdPLrLmw7T/GxYw3Y0C2nHZNiOLa
 f1Dw0KkZ/l7mPkpSSxYLOeNCA4i8buvC11M2vQ/453XrkSBvCCt1L05fvpO/GDeT
 2u8ceDmata+ozKc6K3hwrc0SOKWud0h9dqxpREnY+oJp4/t48/uuswtw6tNqllze
 HsHlOwGOLec5YJDg68S9DuI1jvcwnZ6acH/9NtUEzh7QfekngHgYpJEr3Bkpk+CW
 xzvZw8UrHn1YlIzn1HIYa/rFWDsFM3FyFUaLRsfX8Vccq2H5oaUOcCrKNjTSRrSf
 7DRG/J4aB733aZ4R4emzcRiQPul3mb9ss7Sg1+Ec0nPHQLGwG1tDR4Ph4E8cTPgd
 DL6Xsmot90rPD6KQOaMyqpuWwRg0wzT/AsOEHqC2m1JlMjn0aZHQh+/cxVO5beSv
 bYOvnq/HLt8T8JyetQmkb4Q7jsGLSPjYuPcV8QH4kSfnBYybKu52zPXc00Ph3N7O
 ZyBfXBqTtHuIXYuDZisRJZk/zs+fOqekjCevF94N4zfIDi0exKsTwkRmZ1+e9uiv
 0wnlEsNoy2Ts30imngLtf10RxlpjrCZ2VLp/CsOTcrbH6Mk76niXwMbs/5OVwkLl
 6SEQ6OhqeERc7vKJX1bg
 =AeDk
 -----END PGP SIGNATURE-----

Merge tag 'sound-3.12' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound

Pull sound fixes from Takashi Iwai:
 "All reasonably small fixes as rc6: a HD-audio mic fix, a us122l mmap
  regression fix, and kernel memory leak fix in hdsp driver.  Hopefully
  this will be the last pull request for 3.12..."

* tag 'sound-3.12' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
  ALSA: hdsp - info leak in snd_hdsp_hwdep_ioctl()
  ALSA: us122l: Fix pcm_usb_stream mmapping regression
  ALSA: hda - Fix inverted internal mic not indicated on some machines
2013-10-17 10:17:25 -07:00
Linus Torvalds b2118ea971 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security
Pull apparmor fixes from James Morris:
 "A couple more regressions fixed"

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security:
  apparmor: fix bad lock balance when introspecting policy
  apparmor: fix memleak of the profile hash
2013-10-17 10:16:45 -07:00
Greg Kroah-Hartman e13cef8ded Third set of IIO fixes for the 3.12 cycle.
Two little ones this time:
 
 1) A missing clk_unprepare in adf4350.
 2) A missing free of the active_scan_mask when iio_disable_all_buffers is
 called during an unexpected device removal.  This leak was introduced by
 the fix
 a87c82e454 iio: Stop sampling when the device is removed
 and hence is a regression fix.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.22 (GNU/Linux)
 
 iQIcBAABAgAGBQJSXbrBAAoJEFSFNJnE9BaILWgP/jMEnyNq4xImBkpLgYyJvF8F
 s4Pt8on4/F+JwV21gljJB8g8JiblSAECTbxFaUDCAV6ufJ/0djSwb0DDQ1JfdfGI
 a/2vC4YuhTGPi35s9NIXr9TuGS1cdYQ3o+bijNJiGJXIakI/ngwDWOpDE1MOFVv3
 0YVHKkhOARuObJ5L+5xYeCsGdNuv9eQ7SvhLyy1LJ4123wCu2cRKFBWP/UX9wJlF
 hLaeKXoR/jDiPaal6vIftLPDMsOILymUqjAy6QpQpDAp7zL9YenG8tSKiOWRgxE2
 gMfsbJks2KM7LyWY8i6tyF0ID62QYh2PMYEQVmKdOH7ffROeO1WamXshT2ls4X++
 +NB0Ih4cJFT2ryEGuG7R2isa36IP0KXTE2aPI2LmDHyJrHxxazfRooEOUks3gn+I
 P1RhkJTJ8It39EiV+DgzFowEi5kwolUBv+7y56eqQ1GBWVVyutr5mmN8WKhT7fjE
 3xMdaBCwbRCK6f/Kvl5TY4rIL8lG/aVP8X3bkJQFiduAtCrqphX+djFdCRn5nILZ
 FALZmNZn9tI47kksEy3L+WhiOGf/7h13jULF+EHgYDhJuJ/KT8AlggqQIh/AFXWF
 cDX92gC9mBCtlopYCLYh4ZDHr2L13X05W24irsIZak9TGEw8IXpPOWIqxUrLXMWl
 zyeW1/f8ZO7C0E+sV0gu
 =Whi7
 -----END PGP SIGNATURE-----

Merge tag 'iio-fixes-for-3.12c' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into char-misc-linus

Jonathan writes:

Third set of IIO fixes for the 3.12 cycle.

Two little ones this time:

1) A missing clk_unprepare in adf4350.
2) A missing free of the active_scan_mask when iio_disable_all_buffers is
called during an unexpected device removal.  This leak was introduced by
the fix
a87c82e454 iio: Stop sampling when the device is removed
and hence is a regression fix.
2013-10-17 09:40:52 -07:00
Guenter Roeck 94468783cd usb: usb_phy_gen: refine conditional declaration of usb_nop_xceiv_register
Commit 3fa4d734 (usb: phy: rename nop_usb_xceiv => usb_phy_gen_xceiv)
changed the conditional around the declaration of usb_nop_xceiv_register
from
	#if defined(CONFIG_NOP_USB_XCEIV) ||
		(defined(CONFIG_NOP_USB_XCEIV_MODULE) && defined(MODULE))
to
	#if IS_ENABLED(CONFIG_NOP_USB_XCEIV)

While that looks the same, it is semantically different. The first expression
is true if CONFIG_NOP_USB_XCEIV is built as module and if the including
code is built as module. The second expression is true if code depending on
CONFIG_NOP_USB_XCEIV if built as module or into the kernel.

As a result, the arm:allmodconfig build fails with

arch/arm/mach-omap2/built-in.o: In function `omap3_evm_init':
arch/arm/mach-omap2/board-omap3evm.c:703: undefined reference to
	`usb_nop_xceiv_register'

Fix the problem by reverting to the old conditional.

Cc: Josh Boyer <jwboyer@redhat.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-17 09:34:30 -07:00
Sachin Kamat 80d7d8a768 usb: phy: twl6030-usb: Include linux/of.h header
'of_match_ptr' is defined in linux/of.h. Include it explicitly to
avoid build breakage in the future.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2013-10-17 11:33:20 -05:00
Sebastian Andrzej Siewior 4805414705 usb: musb: cppi41: allow to defer probing if DMA isn't yet available
If everything (musb, cppi41, phy) is built-in then musb will start
without the dma engine printing only

|musb-hdrc musb-hdrc.0.auto: Falied to request rx1.

The reason for this is that the musb device structs are created & probed
before those of the cppi41 device. So the cppi41 device is probed too
late.
As a workaround for this allow the musb_cppi41 part to defer the probe
if everything is fine except for the missing DMA controller. In case of
another error we continue.

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2013-10-17 11:32:08 -05:00
Sebastian Andrzej Siewior 8d1aad7485 usb: musb: core: Call dma_controller_destroy() in error path only once.
In commit f3ce4d5 ("usb: musb: core: call dma_controller_destroy() in the err path")
I erroneously assumed that the dma controller is not removed in the
error patch. This was wrong because it happens later via musb_free().
That means the original commit can be reverted because it is wrong or we
do this, so it is more obvious.

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2013-10-17 11:31:51 -05:00
Sebastian Andrzej Siewior 0d2dd7eaed usb: musb: core: properly free host / device structs in err path
The patch fixes two issues in the error path cleanup:
- in MUSB_PORT_MODE_DUAL_ROLE mode, if musb_gadget_setup() fails we
  never cleanup the host struct earlier allocated.
- if musb_init_debugfs() or sysfs_create_group() fails, then we never
  free the host part initialization, only device part.

Cc: stable@vger.kernel.org # v3.11
Cc: Daniel Mack <zonque@gmail.com>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2013-10-17 11:30:33 -05:00
Greg Kroah-Hartman b762799dd8 Revert "Drivers: hv: vmbus: Fix a bug in channel rescind code"
This reverts commit 90d33f3ec5 as it's not
the correct fix for this issue, and it causes a build warning to be
added to the kernel tree.

Cc: K. Y. Srinivasan <kys@microsoft.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-17 09:30:10 -07:00
Andrzej Pietrasiewicz 5bb7289d7f usb: gadget: f_mass_storage: style corrections, cleanup & simplification
Fix spacing, improve error code returned, remove unused #define,
use strtobool() instead of kstrtou8().

Acked-by: Michal Nazarewicz <mina86@mina86.com>
Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2013-10-17 11:29:07 -05:00
Sebastian Andrzej Siewior 24616eb66a usb: musb: dsps: run the timer only on OTG systems
I introduced this check here because it looked wrong in HOST only
configurions. The timer would remove that session bit and will never
come back and so there would not be another session.
Now that I played with OTG for a while I belive this workaround is
only required for the OTG mode because we have to end the session and
then we have to try to start manually.
Therefore, this patch limits this timer to the OTG only port mode so we
don't need to poll around in device only mode.

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2013-10-17 09:55:10 -05:00
Sebastian Andrzej Siewior 0f901c9801 usb: musb: dsps: redo the otg timer
According to the comments, we rely on the OTG timer because the core
does not expose some important OTG details. So far this is all I
know. After playing with OTG I stumbled over a problem:
musb is recognized as a B-device without a problem. Whenever a cable is
plugged, the VBUS rises, musb recognizes this as a starting session,
sets the MUSB_DEVCTL_SESSION bit by itself and a RESET interrupt occurs,
the session starts. Good.
After a disconnect, the timer is started and re-starts itself because
it remains in B_IDLE with the BDEVICE set. I didn't figure the the
reason or the need for it. Nothing changes here except for OTG state
from B to A device if the BDEVICE bit disappears. This doesn't make much
sense to me because nothing happens after this. _IF_ we receive an
interrupt before the state change then we may act on wrong condition.
Plugging a B-device (and letting MUSB act as host) doesn't work here.
The reason seems to be that the MUSB tries to start a session, it fails
and then it removes the bit. So we never start as a host.

This patch sets the MUSB_DEVCTL_SESSION bit in the IDLE state so musb
can try to establish a session as host. After the bit is set, musb tries
to start a session and if it fails it clears the bit. Therefore it will
try over and over again until a session either as host or as device is
established.

The readout of the MUSB_DEVCTL register after the removal the
MUSB_DEVCTL_SESSION (in A_WAIT_BCON) has been removed because it did not
contain the BDEVICE bit set (in the second read) leading to A_IDLE. After
plugging a host musb assumed that it is also a host and complained about
a missing reset. However a third read of the register has has the BDEVICE
bit set so it seems that it is not stable.
This mostly what da8xx.c is doing except that we set the timer also
after A_WAIT_BCON so the session bit can be triggered.

Whit this change I was able to keep am335x-evm in OTG mode and plug in
either a HOST or a DEVICE and in a random order and the device was
recognized.

Cc: stable@vger.kernel.org # v3.11
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2013-10-17 09:55:08 -05:00
Sebastian Andrzej Siewior 807d0d2b35 usb: musb: dsps: remove declartion for dsps_musb_try_idle()
This patch moves dsps_musb_try_idle() before dsps_musb_enable() so the
declaration (of dsps_musb_try_idle() can be removed.

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2013-10-17 09:55:06 -05:00
Sebastian Andrzej Siewior 8b9fcce2d8 usb: musb: dsps: move try_idle to start hook
The timer is initialized right after musb is probed. There is actually
no need to have this timer running because _nothing_ will happen until
we have the gadget loaded. Also we need this timer only if we run in OTG
mode _and_ we need it also after the gadget has been replaced with
another one.

I've been looking at am35x.c, da8xx.c, omap2430.c, tusb6010.c. da8xx
seem to have the same problem as dsps and doing mostly the same thing.
tusb6010 seem to do something different and do some actual "idle / power
saving" work so I am not too comfortable to remove
musb_platform_try_idle() from musb_gadget_setup().

Therefore this patch does not start the timer if there is no gadget
active (which is at musb_gadget_setup() at time). In order to have the
timer active after the gadget is loaded it will be triggered from
dsps_musb_enable().

Cc: stable@vger.kernel.org # v3.11
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2013-10-17 09:55:05 -05:00
Sebastian Andrzej Siewior ae44df2e21 usb: musb: call musb_start() only once in OTG mode
In commit 001dd84 ("usb: musb: start musb on the udc side, too") it was
ensured that the state engine is started also in OTG mode after a
removal / insertion of the gadget.
Unfortunately this change also introduced a bug: If the device is
configured as OTG and it connected with a remote host _without_ loading
a gadget then we bug() later (because musb->otg->gadget is not
initialized).
Initially I assumed it might be nice to have the host part of musb in
OTG mode working without having a gadget loaded. This bug and fact that
it wasn't working like this before the host/gadget split made me realize
that this was a silly idea.
This patch now introduces back the old behavior where in OTG mode the
host mode is only working after the gadget has been loaded.

Cc: stable@vger.kernel.org # v3.11
Cc: Daniel Mack <zonque@gmail.com>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2013-10-17 09:55:03 -05:00
Rafael J. Wysocki 2421ad48f4 ACPI / PM: Drop two functions that are not used any more
Two functions defined in device_pm.c, acpi_dev_pm_add_dependent()
and acpi_dev_pm_remove_dependent(), have no callers and may be
dropped, so drop them.

Moreover, they are the only functions adding entries to and removing
entries from the power_dependent list in struct acpi_device, so drop
that list too.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2013-10-17 15:44:48 +02:00
Aaron Lu b08fc109ce ATA / ACPI: remove power dependent device handling
Previously, we wanted SCSI devices corrsponding to ATA devices to
be runtime resumed when the power resource for those ATA device was
turned on by some other device, so we added the SCSI device to the
dependent device list of the ATA device's ACPI node.  However, this
code has no effect after commit 41863fc (ACPI / power: Drop automaitc
resume of power resource dependent devices) and the mechanism it was
supposed to implement is regarded as a bad idea now, so drop it.

[rjw: Changelog]
Signed-off-by: Aaron Lu <aaron.lu@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2013-10-17 15:38:53 +02:00
Linus Torvalds 056cdce0d3 Merge branch 'akpm' (fixes from Andrew Morton)
Merge misc fixes from Andrew Morton.

* emailed patches from Andrew Morton <akpm@linux-foundation.org>: (21 commits)
  mm: revert mremap pud_free anti-fix
  mm: fix BUG in __split_huge_page_pmd
  swap: fix set_blocksize race during swapon/swapoff
  procfs: call default get_unmapped_area on MMU-present architectures
  procfs: fix unintended truncation of returned mapped address
  writeback: fix negative bdi max pause
  percpu_refcount: export symbols
  fs: buffer: move allocation failure loop into the allocator
  mm: memcg: handle non-error OOM situations more gracefully
  tools/testing/selftests: fix uninitialized variable
  block/partitions/efi.c: treat size mismatch as a warning, not an error
  mm: hugetlb: initialize PG_reserved for tail pages of gigantic compound pages
  mm/zswap: bugfix: memory leak when re-swapon
  mm: /proc/pid/pagemap: inspect _PAGE_SOFT_DIRTY only on present pages
  mm: migration: do not lose soft dirty bit if page is in migration state
  gcov: MAINTAINERS: Add an entry for gcov
  mm/hugetlb.c: correct missing private flag clearing
  mm/vmscan.c: don't forget to free shrinker->nr_deferred
  ipc/sem.c: synchronize semop and semctl with IPC_RMID
  ipc: update locking scheme comments
  ...
2013-10-16 21:36:03 -07:00
Hugh Dickins 57a8f0cdb8 mm: revert mremap pud_free anti-fix
Revert commit 1ecfd533f4 ("mm/mremap.c: call pud_free() after fail
calling pmd_alloc()").

The original code was correct: pud_alloc(), pmd_alloc(), pte_alloc_map()
ensure that the pud, pmd, pt is already allocated, and seldom do they
need to allocate; on failure, upper levels are freed if appropriate by
the subsequent do_munmap().  Whereas commit 1ecfd533f4 did an
unconditional pud_free() of a most-likely still-in-use pud: saved only
by the near-impossiblity of pmd_alloc() failing.

Signed-off-by: Hugh Dickins <hughd@google.com>
Cc: Chen Gang <gang.chen@asianux.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-10-16 21:35:53 -07:00
Hugh Dickins 750e8165f5 mm: fix BUG in __split_huge_page_pmd
Occasionally we hit the BUG_ON(pmd_trans_huge(*pmd)) at the end of
__split_huge_page_pmd(): seen when doing madvise(,,MADV_DONTNEED).

It's invalid: we don't always have down_write of mmap_sem there: a racing
do_huge_pmd_wp_page() might have copied-on-write to another huge page
before our split_huge_page() got the anon_vma lock.

Forget the BUG_ON, just go back and try again if this happens.

Signed-off-by: Hugh Dickins <hughd@google.com>
Acked-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Cc: Andrea Arcangeli <aarcange@redhat.com>
Cc: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
Cc: David Rientjes <rientjes@google.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-10-16 21:35:53 -07:00