Commit graph

376386 commits

Author SHA1 Message Date
Felipe Balbi 91e3af64c7 usb: musb: host: fix build warning
very minor patch fixing the following build warning on
a debug message:

drivers/usb/musb/musb_host.c: In function ‘musb_host_rx’:
drivers/usb/musb/musb_host.c:1763:4: warning: format ‘%x’ \
	expects argument of type ‘unsigned int’, but argument \
	6 has type ‘dma_addr_t’ [-Wformat]

Signed-off-by: Felipe Balbi <balbi@ti.com>
2013-05-30 03:07:09 +03:00
Venu Byravarasu 2d22b42db0 usb: phy: registering Tegra USB PHY as platform driver
Registered Tegra USB PHY as a separate platform driver.

To synchronize host controller and PHY initialization, used deferred
probe mechanism. As PHY should be initialized before EHCI starts running,
deferred probe of Tegra EHCI driver till PHY probe gets completed.

Got rid of instance number based handling in host driver.

Made use of DT params to get the PHY Pad registers.

Signed-off-by: Venu Byravarasu <vbyravarasu@nvidia.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2013-05-30 02:49:11 +03:00
Venu Byravarasu 6829f92f6e usb: phy: tegra: Add error handling & clean up.
Check return values from all GPIO APIs and handle errors accordingly.

Remove the call to clk_disable_unprepare(); this function does not
prepare or enable the clock, so the error path should not disable or
unprepare it.

Signed-off-by: Venu Byravarasu <vbyravarasu@nvidia.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2013-05-30 02:47:32 +03:00
Venu Byravarasu 12ea18e4f0 usb: phy: tegra: get ULPI reset GPIO info using DT.
As GPIO information is avail through DT, used it to get Tegra ULPI
reset GPIO number. Added a new member to tegra_usb_phy structure to
store this number.

Signed-off-by: Venu Byravarasu <vbyravarasu@nvidia.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2013-05-30 02:47:19 +03:00
Venu Byravarasu 9cd9384c73 usb: phy: tegra: Get PHY mode using DT
Added a new PHY mode to support OTG.
Obtained Tegra USB PHY mode using DT property.

Signed-off-by: Venu Byravarasu <vbyravarasu@nvidia.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2013-05-30 02:46:46 +03:00
Venu Byravarasu 9e69fae1a8 usb: phy: tegra: Return correct error value provided by clk_get_sys
In case if clk_get_sys fails, return correct error value provided by
the API.

Signed-off-by: Venu Byravarasu <vbyravarasu@nvidia.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2013-05-30 02:45:44 +03:00
Felipe Balbi 10b2a93865 ARM: tegra: DT-related fixes needed by the USB tree
The Tegra USB bindings were in bad shape. The patches in this branch
 fix the binding definitions, and make all the necessary additions to
 the DT files. Stale nodes/properties will be removed early in 3.12
 once the USB driver has been updated for the new binding.
 
 These changes are needed in both the USB tree, to allow the driver to
 be updated to handle them, and the Tegra tree, so that various tree-
 wide DT changes (e.g. conversion of IRQ/GPIO/clock constants to defines)
 can be applied on top of them.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iQIcBAABAgAGBQJRlrFjAAoJEMzrak5tbycxB0UP/jsPowM8VfiErJN4co4P0mZb
 EMU8vGOYw2q1oe1ypWDcQTTz08tQmgEB9ULtXxLc+A74Utt/t7cPSbuzFMs9+47G
 LkjTrjA6SZP6Tps6jLmEKX3fc30NNU//KFhW0nZkve9lHe2KPKfQTBNvh57QBTe+
 UtxHP7RG12FXVqg3xbTEyCuJDi5xq711llCFtdA9pMj1VhFooG16GBl2um4hJC/Z
 +TYSSGm1SAcYCZviNb7WKRsyfQH32YtmoqgS0vTLa3wuUe0VmOcZA9S+BrUTeNfb
 +QixhiEsJO4ZikMpVmaEctcvQwBpE08kWMuIcBl56ro1GtxefHeckz1+5dqO4jwA
 mv4x9RCMKcoOeket6EMQrcN3W2/dmoFo8b7pCoRgNb1g2HBeoc8+i9uZWkvrg+E3
 XgsTvfYpr7BiNqQMZPvpxYGyZ0zYf59BqResCG7z0bQlsv25v1QjTPcyFMZHwOT6
 3pric6oPceMGctukMu4EXaRvxh+wrY/HDuZee9avxoBnPXdi6Fz/zdtZyd0+P7SP
 xnqowqcZuv8vr6nkh74vFSoBRv5lWrkI3RfYAZ/wyiTM3Wv8k1mmbHHo7Htk6jEn
 gpPqLAWHuBG2loTyZiA0MTFU22llTd7J4JATYPrQp4ZmqzhL9QLJPFLK4/rDbTiL
 dI5V2+xmJ+D+2Ot8HzoU
 =fg0r
 -----END PGP SIGNATURE-----

Merge tag 'tegra-for-3.11-deps-for-usb' into next

ARM: tegra: DT-related fixes needed by the USB tree

The Tegra USB bindings were in bad shape. The patches in this branch
fix the binding definitions, and make all the necessary additions to
the DT files. Stale nodes/properties will be removed early in 3.12
once the USB driver has been updated for the new binding.

These changes are needed in both the USB tree, to allow the driver to
be updated to handle them, and the Tegra tree, so that various tree-
wide DT changes (e.g. conversion of IRQ/GPIO/clock constants to defines)
can be applied on top of them.

* tag 'tegra-for-3.11-deps-for-usb':
  ARM: tegra: update device trees for USB binding rework
  ARM: tegra: modify ULPI reset GPIO properties
  ARM: tegra: finalize USB EHCI and PHY bindings

Signed-of-by: Felipe Balbi <balbi@ti.com>
2013-05-30 02:34:49 +03:00
Jingoo Han dae8eadf2a usb: gadget: use platform_{get,set}_drvdata()
Use the wrapper functions for getting and setting the driver data using
platform_device instead of using dev_{get,set}_drvdata() with &pdev->dev,
so we can directly pass a struct platform_device.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2013-05-28 20:16:56 +03:00
Dongjin Kim 6d3d61f821 usb: phy: samsung: Add support HSIC on Exynos4X12
This patch adds to enable High Speed Inter Chip on Exynos4X12. Both channels
are controlled by usbphy driver based on the patch series of usbphy driver
submitted by Tomasz Figa.

[1] https://patchwork.kernel.org/patch/2576121
[2] https://patchwork.kernel.org/patch/2576131
[3] https://patchwork.kernel.org/patch/2576141
[4] https://patchwork.kernel.org/patch/2576151
[5] https://patchwork.kernel.org/patch/2576161
[6] https://patchwork.kernel.org/patch/2576171

Signed-off-by: Dongjin Kim <tobetter@gmail.com>
Cc: Tomasz Figa <t.figa@samsung.com>
Cc: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2013-05-28 20:16:37 +03:00
Sachin Kamat 7a22cc9709 usb: phy: phy-nop: Remove redundant use of of_match_ptr
'nop_xceiv_dt_ids' is always compiled in. Hence use of
of_match_ptr is unnecessary.

Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2013-05-28 20:14:39 +03:00
Sachin Kamat e823aa7c6d usb: gadget: pxa27x_udc: Remove redundant platform_set_drvdata()
Commit 0998d06310 (device-core: Ensure drvdata = NULL when no
driver is bound) removes the need to set driver data field to
NULL.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Cc: Eric Miao <eric.y.miao@gmail.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2013-05-28 20:09:32 +03:00
Sachin Kamat 2d2428c027 usb: gadget: mv_u3d_core: Remove redundant platform_set_drvdata()
Commit 0998d06310 (device-core: Ensure drvdata = NULL when no
driver is bound) removes the need to set driver data field to
NULL.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Cc: Yu Xu <yuxu@marvell.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2013-05-28 20:09:20 +03:00
Tomasz Figa 1b635f0ff3 usb: phy: samsung: Add support for USB 2.0 PHY on Exynos 4x12
This patch adds driver data for Exynos 4x12 USB 2.0 PHY.

Signed-off-by: Tomasz Figa <t.figa@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2013-05-28 20:07:31 +03:00
Tomasz Figa 84035f09ad usb: phy: samsung: Pass enable/disable callbacks through driver data
To remove unnecessary if statements, this patch introduces phy_enable
and phy_disable callbacks in driver data structure that implement
SoC-specific PHY initialization and deinitialization.

Signed-off-by: Tomasz Figa <t.figa@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2013-05-28 20:07:15 +03:00
Tomasz Figa 3f339074ed usb: phy: samsung: Pass set_isolation callback through driver data
This patch extends driver data structure with set_isolation callback,
which allows to remove the need for checking for SoC type in a switch
statement.

Signed-off-by: Tomasz Figa <t.figa@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2013-05-28 20:06:49 +03:00
Tomasz Figa 0aa823a2ca usb: phy: samsung: Consolidate reference clock rate handling
This patch cleans up handling of reference clock rate in Samsung USB PHY
drivers. It is mostly a cosmetic change but improves error handling in
case of failing to get reference clock or invalid clock rate.

Signed-off-by: Tomasz Figa <t.figa@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2013-05-28 20:06:39 +03:00
Tomasz Figa 87331b0697 usb: phy: samsung: Use clk_get to get reference clock
There is no need to use devm_clk_get to get a clock that is being put
at the end of the function.

This patch changes the code getting reference clock to use clk_get
instead of useless in this case devm_clk_get.

Signed-off-by: Tomasz Figa <t.figa@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2013-05-28 20:06:30 +03:00
Tomasz Figa 6278703bcc usb: phy: samsung: Select common driver part implicitly
Since phy-samsung-usb library can be used only by phy-samsung-usb2 and
phy-samsung-usb3 drivers, there is no need to give explicit control over
its Kconfig symbol.

This patch makes CONFIG_SAMSUNG_USBPHY symbol hidden and selected
implicitly by CONFIG_SAMSUNG_USB2PHY and CONFIG_SAMSUNG_USB3PHY.

Signed-off-by: Tomasz Figa <t.figa@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2013-05-28 20:06:19 +03:00
Fabio Baltieri f85bff5d1e usb: phy: ab8500-usb: add ab9540 support
Add support for the ab9540 variant of the ab8500 family.

Acked-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Maxime Coquelin <maxime.coquelin@st.com>
Cc: Avinash Kumar <avinash.kumar@stericsson.com>
Cc: Thirupathi Chippakurthy <thirupathi.chippakurthy@stericsson.com>
Signed-off-by: Fabio Baltieri <fabio.baltieri@linaro.org>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2013-05-28 20:03:55 +03:00
Fabio Baltieri 0c380c0ee0 usb: phy: ab8500-usb: add ab8540 support
Add support for the ab8540 variant of the ab8500 family.

Acked-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Maxime Coquelin <maxime.coquelin@st.com>
Cc: Avinash Kumar <avinash.kumar@stericsson.com>
Signed-off-by: Fabio Baltieri <fabio.baltieri@linaro.org>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2013-05-28 20:03:45 +03:00
Fabio Baltieri bd4c9f0278 usb: phy: ab8500-usb: add flag bits to control driver features
Introduce a "flags" field in "struct ab8500_usb" to allow controlling
driver features and quirks depending on ab8500 chip variant and
revision.

Acked-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Maxime Coquelin <maxime.coquelin@st.com>
Signed-off-by: Fabio Baltieri <fabio.baltieri@linaro.org>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2013-05-28 20:03:25 +03:00
Fabio Baltieri 16604a3c27 usb: phy: ab8500-usb: move phy tuning values on separate functions
Move each chip's PHY tuning value set code to a separate function to
improve code readability.

Acked-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Maxime Coquelin <maxime.coquelin@st.com>
Signed-off-by: Fabio Baltieri <fabio.baltieri@linaro.org>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2013-05-28 20:02:09 +03:00
Fabio Baltieri b3affc3991 usb: phy: ab8500-usb: add platform_device_id table
Add an initial platform_device_id table to the ab8500-usb driver to
allow probing additional variants of the ab8500 family chips.

Acked-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Maxime Coquelin <maxime.coquelin@st.com>
Signed-off-by: Fabio Baltieri <fabio.baltieri@linaro.org>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2013-05-28 20:01:56 +03:00
Fabio Baltieri a96afc6b75 usb: phy: ab8500-usb: fix phy tuning value select logic
The driver supports both ab8500 and ab8505, but the actual phy tuning
values logic sets ab8500 values:

if (!is_ab8500_2p0_or_earlier(ab->ab8500))

which is supposed to set values for ab8500, but incorrectly results true
for ab8505 too.

Fix this by adding an additional is_ab8500(ab->ab8500) check.

Acked-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Maxime Coquelin <maxime.coquelin@st.com>
Signed-off-by: Fabio Baltieri <fabio.baltieri@linaro.org>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2013-05-28 20:01:34 +03:00
Sakethram Bommisetti fb21f37a52 usb: phy: ab8500-usb: restart phy during probe
Add an ab8500_usb_restart_phy() function called during probe to ensure
that the AB8500 USB phy is initialized properly even when a cable is
connected at probe time.

Without this fix subsequent host reconnections are not detected
properly.

Acked-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Maxime Coquelin <maxime.coquelin@st.com>
Signed-off-by: Sakethram Bommisetti <sakethram.bommisetti@stericsson.com>
Signed-off-by: Fabio Baltieri <fabio.baltieri@linaro.org>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2013-05-28 20:01:01 +03:00
Mian Yousaf Kaukab d0ed0645a5 usb: phy: ab8500-usb: add transceiver clock control
Add common clock support code for the ab8500-usb phy driver.

Acked-by: Ulf Hansson <ulf.hansson@linaro.org>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Maxime Coquelin <maxime.coquelin@st.com>
Signed-off-by: Mian Yousaf Kaukab <mian.yousaf.kaukab@stericsson.com>
Signed-off-by: Fabio Baltieri <fabio.baltieri@linaro.org>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2013-05-28 20:00:46 +03:00
Fabio Baltieri 3147dad6fa usb: musb: various cosmetic fixes on ux500 files
Various non functional coding style fixes on ux500_dma.c and
phy-ab8500-usb.c drivers.

Acked-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Maxime Coquelin <maxime.coquelin@st.com>
Signed-off-by: Fabio Baltieri <fabio.baltieri@linaro.org>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2013-05-28 20:00:04 +03:00
Mian Yousaf Kaukab aee5500f4f usb: musb: enable ux500 host side dma support
Host side dma support for ux500 is enabled by piggybacking on Inventra
dma support.

Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Mian Yousaf Kaukab <mian.yousaf.kaukab@stericsson.com>
Signed-off-by: Fabio Baltieri <fabio.baltieri@linaro.org>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2013-05-28 19:58:57 +03:00
Laurent Pinchart dbbafe666c usb: gadget: uvc: Remove unneeded endpoint descriptor fields initialization
The streaming endpoint bandwidth parameters are computed are runtime
from module parameters. Remove the corresponding static initializers.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2013-05-28 19:57:45 +03:00
Daniel Mack 8b125df5b2 usb: musb: eliminate musb_to_hcd
With the hcd is now a direct member of struct musb, we can now simply
eliminate the musb_to_hcd() macro. There aren't that many users left
anyway, as some where already fixed up when parts were factored out to
musb_host.c

Signed-off-by: Daniel Mack <zonque@gmail.com>
Acked-by: Peter Korsgaard <jacmet@sunsite.dk>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2013-05-28 19:22:26 +03:00
Daniel Mack 6c5f6a6f53 usb: musb: use musb->port_mode
Initialize the host and gadget subsystems of the musb driver only when
the appropriate mode is selected from platform data, or device-tree
information, respectively.

Signed-off-by: Daniel Mack <zonque@gmail.com>
Acked-by: Peter Korsgaard <jacmet@sunsite.dk>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2013-05-28 19:22:25 +03:00
Daniel Mack 9ad96e694c usb: musb: re-introduce musb->port_mode
Define MUSB_PORT_MODE_{HOST,GADGET,DUAL_ROLE} and store the
platform-specified value in struct musb.

Note that MUSB_PORT_MODE_HOST has to be set to 1 in order to match
existing device tree bindings which are already documented but in fact
unusued. For information on the bindings, please refer to

  Documentation/devicetree/bindings/usb/omap-usb.txt
  Documentation/devicetree/bindings/usb/am33xx-usb.txt

Signed-off-by: Daniel Mack <zonque@gmail.com>
Acked-by: Peter Korsgaard <jacmet@sunsite.dk>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2013-05-28 19:22:24 +03:00
Daniel Mack 2cc65feab2 usb: musb: add musb_host_setup() and musb_host_cleanup()
This patch re-introduces the bits that are necessary to use the musb
controller in host mode.

Signed-off-by: Daniel Mack <zonque@gmail.com>
Acked-by: Peter Korsgaard <jacmet@sunsite.dk>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2013-05-28 19:22:24 +03:00
Daniel Mack b7b741ea38 usb: musb: add Kconfig options for HOST, GAGDET or DUAL_ROLE modes
This makes building the actual object files optional to the selected
mode, which saves users who know which kind of USB mode support they
need some binary size.

Unimplemented functions are stubbed out with static inline functions.

Signed-off-by: Daniel Mack <zonque@gmail.com>
Acked-by: Peter Korsgaard <jacmet@sunsite.dk>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2013-05-28 19:22:23 +03:00
Daniel Mack 74c2e93600 usb: musb: factor out hcd initalization
The musb struct is currently allocated along with the hcd, which makes
it difficult to build a driver that only acts as gadget device.

Fix this by allocating musb directly, and keep the hcd around as
a pointer in the musb struct.

struct hc_driver musb_hc_driver can now also be static to musb_host.c,
and the macro musb_to_hcd() is just a pointer dereferencer for now, and
will be eliminated later.

Signed-off-by: Daniel Mack <zonque@gmail.com>
Acked-by: Peter Korsgaard <jacmet@sunsite.dk>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2013-05-28 19:22:23 +03:00
Daniel Mack 69ae2a70bf usb: musb: move musb_start to musb_virthub.c
This function has its only user in musb_virthub.c, so let's move it
there and make it static.

Signed-off-by: Daniel Mack <zonque@gmail.com>
Acked-by: Peter Korsgaard <jacmet@sunsite.dk>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2013-05-28 19:22:22 +03:00
Daniel Mack fe4cb0912f usb: musb: gadget: remove hcd initialization
This will be done from a more appropriate location and as it doesn't
work anyway, it can safely be removed before the other changes.

Signed-off-by: Daniel Mack <zonque@gmail.com>
Acked-by: Peter Korsgaard <jacmet@sunsite.dk>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2013-05-28 19:22:22 +03:00
Daniel Mack 0b3eba442d usb: musb: factor some host-specific functions
In particular, this introduces musb_host_resume_root_hub()and
musb_host_poke_root_hub() which will be stubbed out later.

Signed-off-by: Daniel Mack <zonque@gmail.com>
Acked-by: Peter Korsgaard <jacmet@sunsite.dk>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2013-05-28 19:22:21 +03:00
Daniel Mack c2a2759d33 usb: musb: move function declarations to musb_{host,gadget}.h
Let the function declarations live in the header files they belong to,
which makes it easier to stub them out later.

Signed-off-by: Daniel Mack <zonque@gmail.com>
Acked-by: Peter Korsgaard <jacmet@sunsite.dk>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2013-05-28 19:22:20 +03:00
Daniel Mack b7e2e75a8c usb: gadget: drop unused USB_GADGET_MUSB_HDRC
The functionality meant to be represented by this symbol will be
re-added later, but for now, USB_GADGET_MUSB_HDRC is in fact unused and
can be dropped.

Signed-off-by: Daniel Mack <zonque@gmail.com>
Acked-by: Peter Korsgaard <jacmet@sunsite.dk>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2013-05-28 19:22:20 +03:00
Felipe Balbi 6d34967117 usb: musb: remove 'ignore_disconnect' flag
This was related to an old bug on early versions
of TUSB6010 which we don't support anymore.

It's known to cause issues on several other
situations with more recent devices so we
better remove this flag now and come up
with a better workaround should one be deemed
necessary.

Signed-off-by: Felipe Balbi <balbi@ti.com>
2013-05-28 19:02:57 +03:00
Felipe Balbi 09fc7d22b0 usb: musb: fix incorrect usage of resource pointer
We can't simply pass the resource pointer from our
device down to our children, otherwise module
reinsertion will not work as the resource will
continue to be marked as busy.

Fix it by building a proper struct resource for
our child musb device.

Tested-by: Dmitry Lifshitz <lifshitz@compulab.co.il>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2013-05-28 19:00:49 +03:00
Linus Torvalds e4aa937ec7 Linux 3.10-rc3 2013-05-26 16:00:47 -07:00
Manfred Spraul ab465df9dd ipc/sem.c: Fix missing wakeups in do_smart_update_queue()
do_smart_update_queue() is called when an operation (semop,
semctl(SETVAL), semctl(SETALL), ...) modified the array.  It must check
which of the sleeping tasks can proceed.

do_smart_update_queue() missed a few wakeups:
 - if a sleeping complex op was completed, then all per-semaphore queues
   must be scanned - not only those that were modified by *sops
 - if a sleeping simple op proceeded, then the global queue must be
   scanned again

And:
 - the test for "|sops == NULL) before scanning the global queue is not
   required: If the global queue is empty, then it doesn't need to be
   scanned - regardless of the reason for calling do_smart_update_queue()

The patch is not optimized, i.e.  even completing a wait-for-zero
operation causes a rescan.  This is done to keep the patch as simple as
possible.

Signed-off-by: Manfred Spraul <manfred@colorfullife.com>
Acked-by: Davidlohr Bueso <davidlohr.bueso@hp.com>
Cc: Rik van Riel <riel@redhat.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-05-26 15:14:51 -07:00
Linus Torvalds 89ff77837a NFS client bugfixes for 3.10
- Stable fix to prevent an rpc_task wakeup race
 - Fix a NFSv4.1 session drain deadlock
 - Fix a NFSv4/v4.1 mount regression when not running rpc.gssd
 - Ensure auth_gss pipe detection works in namespaces
 - Fix SETCLIENTID fallback if rpcsec_gss is not available
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.13 (GNU/Linux)
 
 iQIcBAABAgAGBQJRomGNAAoJEGcL54qWCgDyzUIQALj4hsOtdcmCCAWu0m+Pr+Gz
 /6rpO2xJ5cLWyTYS2J9wmPkU+mb/g/OB/OhANyQQsDbfoW3e27TGaXRB8hUs29vk
 LHTkFcrBTi4ohlw2Gyb6LWDF6cyHkC7cpH7tfIjLDff77V/qK1uqo41MtYpqUvy3
 41tMoFOhvpwsy7HuKqVyYtNlwxnXrdJ5XvK0ycaQYQ9t8om9Hxu/scCgLfl/qwRr
 eVhIesC2/Y1eC46UK7/TWCC7aTLkvi85UQY+fywMkajt/gPzjjh6nuhc45aOT9d7
 pc0sXgIs8fLEjC+CRa0ojrziJZCHZY93U1kzA+CotRqPq76nPeFeG/1VhViKKb4C
 1AU9IA4ntViUqNDQiGrCxE6ZeMewTOKksrCErwSS16Hv9Gqh4SHq84R/bF6MFgBc
 dqQsexUbf/vaWHmuosARgbyc/QcBXDwWwbkq0hXSWbHA8vpc8/Lw1wkp49eyKz0V
 0zwJ9xInakXr5/DIC72IKEF0Dg26L+GTXWLmDZVcdpVBp5A403trxUKckcsNa/Xf
 FXaGMhyv2ZfV4AohW1Z8klkLiMHt4dr+YB7SQAgR/gb81p3odgKgMz51PfmHxFqs
 4nxwRQqWplBTGiLrOFSgaRC50jLqEloUweWC2qf56KYEb9N6M6XDIXhllLIMyWLD
 94cvihpKj+/ecKH5kQWF
 =B8go
 -----END PGP SIGNATURE-----

Merge tag 'nfs-for-3.10-3' of git://git.linux-nfs.org/projects/trondmy/linux-nfs

Pull NFS client bugfixes from Trond Myklebust:

 - Stable fix to prevent an rpc_task wakeup race
 - Fix a NFSv4.1 session drain deadlock
 - Fix a NFSv4/v4.1 mount regression when not running rpc.gssd
 - Ensure auth_gss pipe detection works in namespaces
 - Fix SETCLIENTID fallback if rpcsec_gss is not available

* tag 'nfs-for-3.10-3' of git://git.linux-nfs.org/projects/trondmy/linux-nfs:
  NFS: Fix SETCLIENTID fallback if GSS is not available
  SUNRPC: Prevent an rpc_task wakeup race
  NFSv4.1 Fix a pNFS session draining deadlock
  SUNRPC: Convert auth_gss pipe detection to work in namespaces
  SUNRPC: Faster detection if gssd is actually running
  SUNRPC: Fix a bug in gss_create_upcall
2013-05-26 12:33:05 -07:00
Linus Torvalds 932ff06b2a A sysfs file permissions correction.
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.12 (GNU/Linux)
 
 iQIcBAABAgAGBQJRogxiAAoJEBLB8Bhh3lVKRl4QAJXWdJBRFoVK7xjtUuiAVagd
 kHRBbZ+hJ4Td68PntXJKJjALdrG3tT7xUKDeySbMo8PC19uqSkISH1q95oAEJ5zP
 /h49/gNH51o1IG3v220zM8h6f+KPb3NWAWVguRIXLc8C7P6fq+cCc3putbEaSN7d
 IMQfPZyRUWcLpwagP+I1b9WmlXNC09izu/g60VnIkiAjl1EAv0RQoi4HPpBitiFN
 ntQvq1yUIOHxX40F7lM/5OyuOyFnN+2amClFbDxcvKHihjwuGHFoxBkH93EM5Re4
 AkNkcoGuWW6tzqOTPJr8yohiXRf1iRMOfrJYtxlc6hlKWbV+dFcE4RmddYJzuYNs
 GaqyGECvEk8UwbvzyiQrVTrTGE9sXSIK3JGusSQqvLAk3NJrd7Fq/oIjTgbd3LMG
 TWd4ODv6h7RLQjCNYOj8ygvLrhj8A5hQrbB4Isnxivb2aDM7Agiuei8CZSQU/ryq
 Af4/65NVqjjbkMFNHE2dGowUKq1NZ+tEcsKkrvGAWsV2MneUdRqj/ucp+uVWKLww
 SKkxtg7pNlEh//s/bhMl/qsY0EmJ7eVacmzZEmo42082UTu9ipL9afEE+cVqLDIO
 /TTTpfAIpDUtRAQwIXgWteJKiPoISYqT0n6uYvy187HC84T78iTahfPz9ioyNyR0
 qvG51La1nRlR4LZultbB
 =75KN
 -----END PGP SIGNATURE-----

Merge tag 'edac_fixes_for_3.10' of git://git.kernel.org/pub/scm/linux/kernel/git/bp/bp

Pull amd64 edac fix from Borislav Petkov:
 "A sysfs file permissions correction"

* tag 'edac_fixes_for_3.10' of git://git.kernel.org/pub/scm/linux/kernel/git/bp/bp:
  amd64_edac: Fix bogus sysfs file permissions
2013-05-26 09:52:26 -07:00
Linus Torvalds 95f4838e21 Merge branch 'parisc-for-3.10' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux
Pull parisc fixes from Helge Deller:
 "This time we made the kernel- and interruption stack allocation
  reentrant which fixed some strange kernel crashes (specifically
  protection ID traps).

  Furthemore this patchset fixes the interrupt stack in UP and SMP
  configurations by using native locking instructions.  And finally
  usage of floating point calculations on parisc were disabled in the
  MPILIB."

* 'parisc-for-3.10' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux:
  parisc: fix irq stack on UP and SMP
  parisc/superio: Use module_pci_driver to register driver
  parisc: make interrupt and interruption stack allocation reentrant
  parisc: show number of FPE and unaligned access handler calls in /proc/interrupts
  parisc: add additional parisc git tree to MAINTAINERS file
  parisc: use PAGE_SHIFT instead of hardcoded value 12 in pacache.S
  parisc: add rp5470 entry to machine database
  MPILIB: disable usage of floating point registers on parisc
2013-05-26 09:36:31 -07:00
Linus Torvalds 088d812fe9 xfs: fixes for 3.10-rc3
- Fix for corruption with FSX on 512 byte blocksize filesystems
 - Fix rounding error in xfs_free_file_space
 - Fix use-after-free with extent free intents
 - Add several missing KM_NOFS flags to fix lockdep reports
 - Several fixes for CRC related code
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.10 (GNU/Linux)
 
 iQIcBAABAgAGBQJRn93mAAoJENaLyazVq6ZOPw8P/1ab7Gr4K7ccpuRvC+JiBPx9
 /Eb1l2A68r8rWJq3bEvLM/XgN7F0IESastS+iA8lrNuLWJAHCb+Y37mdbyWymhWO
 J6LFg/Mic+n5uGmg6nXrqLJ8epTd3L+V+cCEHLpa/20zEwa5yd8sSTV0P1pfcMRi
 S36Uof7boe+s4H/s2z4YX8Y+dkaVn1tN7j4PDs5Zd/wiUq0EKA5le4AkbqIJlCDn
 E9mJL1S2t3QwfgQWL+pe8f5jzReGTAxJUQWX2ErajX4vYI7PnR1WTYf7YJB291f0
 XPfkjqvaK0WCdipSkgb58t/Rj2IxoHItdryvBHa/rnL4e95aBQMpNyY8btNX28ou
 NgcIQnqQB+xlJeHpSyb1xNusamGzWw0CEYsXPcDQbXj1uJjd7/GfqTwtVbB4zOlW
 Hua7/6N22vaY1dfQcQFwgi1XcKF9jSVKBVOvy7yHEmdNuT7mFejaG1gVO7NpTIgd
 s7R91pQVlYpLTmZHK6ZqZap5OC6kS/YJr9HxVxS3FQhaJmFwGqvf6UUjSWOK1MnJ
 obTbbygo2Orvh10lgzDNsd+xRJZ9aFn+UfywSeQGTfm91HvTnEQje3xqctv3zmBy
 adrWSXXg/eN07nciNk0zTgHnQZo1v/ZeAFlz0AcSslMMQ7Pq4+Pv4LPtdxMIdrxU
 1IZ32GunGTUXqm6GRW6v
 =hQCM
 -----END PGP SIGNATURE-----

Merge tag 'for-linus-v3.10-rc3' of git://oss.sgi.com/xfs/xfs

Pull xfs fixes from Ben Myers:
 "Here are fixes for corruption on 512 byte filesystems, a rounding
  error, a use-after-free, some flags to fix lockdep reports, and
  several fixes related to CRCs.  We have a somewhat larger post -rc1
  queue than usual due to fixes related to the CRC feature we merged for
  3.10:

   - Fix for corruption with FSX on 512 byte blocksize filesystems
   - Fix rounding error in xfs_free_file_space
   - Fix use-after-free with extent free intents
   - Add several missing KM_NOFS flags to fix lockdep reports
   - Several fixes for CRC related code"

* tag 'for-linus-v3.10-rc3' of git://oss.sgi.com/xfs/xfs:
  xfs: remote attribute lookups require the value length
  xfs: xfs_attr_shortform_allfit() does not handle attr3 format.
  xfs: xfs_da3_node_read_verify() doesn't handle XFS_ATTR3_LEAF_MAGIC
  xfs: fix missing KM_NOFS tags to keep lockdep happy
  xfs: Don't reference the EFI after it is freed
  xfs: fix rounding in xfs_free_file_space
  xfs: fix sub-page blocksize data integrity writes
2013-05-26 09:35:02 -07:00
Linus Torvalds 72de4c63e5 Last minute one-liners: wrong kfree usage fix, module alias fixup and
kconfig adjustments.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.13 (GNU/Linux)
 
 iQIcBAABAgAGBQJRjV16AAoJEGgI9fZJve1bQeIP/j7K21xpCfKjvxgzKQjmVN4Z
 PMi3mUzNXpOCVVN+2Vd+ez9WxQAxiMHPEs+DNAFPoqaFbrBn6KwRox5eOo60j5Cm
 v/IKhUC41/OwErGvr0iop0x9ifOpGon6AHhau8JAv1frRS1DpI7oTDBI3huRT/b2
 AhButIZiOxRzrImfc5v3lA6paX8fgu5KmupYgQAvHmkKSN1R+DR5i6eFKtPtHwRZ
 9cHqZmAwSwySI0HyhjNdPU3yaok3zte6GF/XB58eYDNmP25I0hTVFo3CY30JMfXP
 2e3i2zHOGe0g5fX+Wjk6iVWA9tcobrTtZ/0lzSpe07qUK2zW8fv4S3A4pzVqJ1GT
 02N458NZXPOEJ5Bfr/GO+74gHmHOcga5ea1EJh2Y1yr/ut2VQgB6W57xLvD+CWdn
 bVNAc73vN/5Bu5Swuw7Q5B53HV9CzZs+vs6aocraYuuBD3TvSCfyowOiODayKKdC
 gLmrZ9aoyGjNmRxh15WVpZWm/VwYVcBXv1BlqECsY/Sn42w9u5uLPdrrNleAhMlL
 /OqaGp817dpEeY85jLXDOEPhqafjiOO49mY9qN3iN0o3DKAEKF/cA5sxGMDkAija
 Oa63tzRQEiz4XfHwur5Oa3hGasB7OAdWF4p/dzLEYFkY0HUKW35Y+g03dd2f60au
 v2cMQxcUQ3FLJDfirgQP
 =+dqw
 -----END PGP SIGNATURE-----

Merge tag 'for-v3.10-fixes' of git://git.infradead.org/battery-2.6

Pull bettery fixes from Anton Vorontsov:
 "Last minute one-liners: wrong kfree usage fix, module alias fixup and
  kconfig adjustments"

* tag 'for-v3.10-fixes' of git://git.infradead.org/battery-2.6:
  pm2301_charger: Fix module alias prefix
  wm831x_backup: Fix wrong kfree call for devdata->backup.name
  bq27x00: Fix I2C dependency in KConfig
  lp8788-charger: Fix kconfig dependency
2013-05-25 20:32:49 -07:00
Linus Torvalds 1aad08dc57 Power management and ACPI fixes for 3.10-rc3
- Additional CPU ID for the intel_pstate driver from Dirk Brandewie.
 
 - More cpufreq fixes related to ARM big.LITTLE support and locking from
   Viresh Kumar.
 
 - VIA C7 cpufreq build fix from Rafał Bilski.
 
 - ACPI power management fix making it possible to use device power
   states regardless of the CONFIG_PM setting from Rafael J. Wysocki.
 
 - New ACPI video blacklist item from Bastian Triller.
 
 /
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.19 (GNU/Linux)
 
 iQIcBAABAgAGBQJRoRZjAAoJEKhOf7ml8uNsv9wQAKAMs9J8k6XqgNPisFKetw+K
 hzCOsKFOpI0BQKFikgtWjhGre1SyNIRUvLXO7BHFHXYQW6cLvn1jAyJhvl+i4nvT
 eOa+vdGd6grWncbhIxeidoyk9hTZ6bdMWlTBvKUz5KpHzvp4YGC2jlvwFwqsJkpg
 nQ8Hcbrbhm4vz5h7EmrlYcELBNTi5LQtmnqlxtbn02GX75BFTpkCm5aLZWZNEUrE
 Hix8BhN41+hSy+K34ztHFlP5g/s/lIa9dOX1tewqSigkDB/qYYIt2lpdD2icOIOW
 qHAtvpZq8/fZOcoZ9KdFqKUjjbuKVavldb+YzGeTLQufOAwb4hgMRvAccdNFMHIW
 9tVkp2TcK6K7pAYlXtgEf25ka7ulLWDBd4C662gZfpi+oPKx2BI/6m7J4VoTULeb
 30hDMyZXrXWWvStwO05Pyno3W5lG+cn9jytc3hKkaFerb53NHcZHfb0Rih5NhDZD
 Ep09IuPE8fOT9KndY2kw/WwoZyJurYCbrgE+G1QyA+hsNPkNhPlGTxdL8vCqxM4K
 ZOaQQejpd1bXBSk8Koz8LRyQ38KJByvM64B0EDSP6BQUT+rlbkcvog1bJV+UdpbJ
 4TlhrAFlobhRFQBqlIbRqMXFPH31YSm7wVK1eK/gEqNZI935Kd17YSFf8yyi2yli
 vBlmPkiPEIJHysps+tvd
 =Srt8
 -----END PGP SIGNATURE-----

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

Pull power management and ACPI fixes from Rafael Wysocki:

 - Additional CPU ID for the intel_pstate driver from Dirk Brandewie.

 - More cpufreq fixes related to ARM big.LITTLE support and locking from
   Viresh Kumar.

 - VIA C7 cpufreq build fix from Rafał Bilski.

 - ACPI power management fix making it possible to use device power
   states regardless of the CONFIG_PM setting from Rafael J Wysocki.

 - New ACPI video blacklist item from Bastian Triller.

* tag 'pm+acpi-3.10-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
  ACPI / video: Add "Asus UL30A" to ACPI video detect blacklist
  cpufreq: arm_big_little_dt: Instantiate as platform_driver
  cpufreq: arm_big_little_dt: Register driver only if DT has valid data
  cpufreq / e_powersaver: Fix linker error when ACPI processor is a module
  cpufreq / intel_pstate: Add additional supported CPU ID
  cpufreq: Drop rwsem lock around CPUFREQ_GOV_POLICY_EXIT
  ACPI / PM: Allow device power states to be used for CONFIG_PM unset
2013-05-25 20:32:00 -07:00