phy: fixes for 3.15 -rc2
Hi Greg,
Here's the PULL requeust for PHY subsystem for this -rc cycle. It consissts of a bunch of critical fixes in PHY.
Let me know if I have to change anything.
Thanks
Kishon
The following changes since commit c9eaa447e77efe77b7fa4c953bd62de8297fd6c5:
Linux 3.15-rc1 (2014-04-13 14:18:35 -0700)
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/kishon/linux-phy.git tags/for-3.15-rc2
for you to fetch changes up to 354ea2fda82eab209d1544cde3b5fed5e6a86c4a:
phy: core: make NULL a valid phy reference if !CONFIG_GENERIC_PHY (2014-04-16 18:10:47 +0530)
----------------------------------------------------------------
fixes for 3.15 -rc cycle
Bunch of critical fixes in PHY subsystem
----------------------------------------------------------------
Arnd Bergmann (1):
phy: exynos: fix building as a module
Grygorii Strashko (1):
phy: core: make NULL a valid phy reference if !CONFIG_GENERIC_PHY
Jean Delvare (1):
phy: restore OMAP_CONTROL_PHY dependencies
Sergei Shtylyov (1):
phy: fix kernel oops in phy_lookup()
drivers/phy/Kconfig | 1 + drivers/phy/Makefile | 9 +++++---- drivers/phy/phy-core.c | 3 +++ include/linux/phy/phy.h | 16 ++++++++++++++++ 4 files changed, 25 insertions(+), 4 deletions(-)
Signature · 1 line
1.7.9.5
PATCH 1/4 phy: exynos: fix building as a module
From: Arnd Bergmann <[email protected]>
The top-level phy-samsung-usb2 driver may be configured as a loadable module, which currently causes link errors because of the dependency on the exynos{5250,4x12,4210}_usb2_phy_config symbol. Solving this could be achieved by exporting these symbols, but as the SoC-specific parts of the driver are not currently built as modules, it seems better to just link everything into one module and avoid the need for the export.
--- drivers/phy/Makefile | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-)
drivers/phy/Makefile +5 -4
@@ -13,8 +13,9 @@ obj-$(CONFIG_TI_PIPE3) += phy-ti-pipe3.o obj-$(CONFIG_TWL4030_USB) += phy-twl4030-usb.o obj-$(CONFIG_PHY_EXYNOS5250_SATA) += phy-exynos5250-sata.o obj-$(CONFIG_PHY_SUN4I_USB) += phy-sun4i-usb.o -obj-$(CONFIG_PHY_SAMSUNG_USB2) += phy-samsung-usb2.o -obj-$(CONFIG_PHY_EXYNOS4210_USB2) += phy-exynos4210-usb2.o -obj-$(CONFIG_PHY_EXYNOS4X12_USB2) += phy-exynos4x12-usb2.o -obj-$(CONFIG_PHY_EXYNOS5250_USB2) += phy-exynos5250-usb2.o +obj-$(CONFIG_PHY_SAMSUNG_USB2) += phy-exynos-usb2.o +phy-exynos-usb2-y += phy-samsung-usb2.o +phy-exynos-usb2-$(CONFIG_PHY_EXYNOS4210_USB2) += phy-exynos4210-usb2.o +phy-exynos-usb2-$(CONFIG_PHY_EXYNOS4X12_USB2) += phy-exynos4x12-usb2.o +phy-exynos-usb2-$(CONFIG_PHY_EXYNOS5250_USB2) += phy-exynos5250-usb2.o obj-$(CONFIG_PHY_XGENE) += phy-xgene.o
Signature · 1 line
1.7.9.5
PATCH 2/4 phy: restore OMAP_CONTROL_PHY dependencies
In reply to Kishon Vijay Abraham IFrom: Jean Delvare <[email protected]>
When OMAP_CONTROL_USB was renamed to OMAP_CONTROL_PHY (commit 14da699b), its dependencies were lost in the process. Nothing in the commit message indicates that this removal was intentional, so I think it was by accident and the dependencies should be restored.
--- drivers/phy/Kconfig | 1 + 1 file changed, 1 insertion(+)
drivers/phy/Kconfig +1 -0
@@ -33,6 +33,7 @@ config PHY_MVEBU_SATA config OMAP_CONTROL_PHY tristate "OMAP CONTROL PHY Driver" + depends on ARCH_OMAP2PLUS || COMPILE_TEST help Enable this to add support for the PHY part present in the control module. This driver has API to power on the USB2 PHY and to write to
Signature · 1 line
1.7.9.5
PATCH 3/4 phy: fix kernel oops in phy_lookup()
In reply to Kishon Vijay Abraham IFrom: Sergei Shtylyov <[email protected]>
The kernel oopses in phy_lookup() due to 'phy->init_data' being NULL if we register PHYs from a device tree probing driver and then call phy_get() on a device that has no representation in the device tree (e.g. a PCI device). Checking the pointer before dereferening it and skipping an interation if it's NULL prevents this kernel oops.
--- drivers/phy/phy-core.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/phy/phy-core.c +3 -0
@@ -64,6 +64,9 @@ static struct phy *phy_lookup(struct device *device, const char *port)class_dev_iter_init (&iter, phy_class,NULL ,NULL );while ((dev =class_dev_iter_next (&iter))) { phy =to_phy (dev); + +if (!phy->init_data) +continue ; count = phy->init_data->num_consumers; consumers = phy->init_data->consumers;while (count--) {
Signature · 1 line
1.7.9.5
PATCH 4/4 phy: core: make NULL a valid phy reference if !CONFIG_GENERIC_PHY
In reply to Kishon Vijay Abraham IFrom: Grygorii Strashko <[email protected]>
This fixes a regression on Keystone 2 platforms caused by patch 57303488cd37da58263e842de134dc65f7c626d5
"usb: dwc3: adapt dwc3 core to use Generic PHY Framework" which adds optional support of generic phy in DWC3 core.
On Keystone 2 platforms the USB is not working now because CONFIG_GENERIC_PHY isn't set and, as result, Generic PHY APIs stubs return -ENOSYS always. The log shows:
dwc3 2690000.dwc3: failed to initialize core
dwc3: probe of 2690000.dwc3 failed with error -38
Hence, fix it by making NULL a valid phy reference in Generic PHY APIs stubs in the same way as it was done by the patch 04c2facad8fee66c981a51852806d8923336f362 "drivers: phy: Make NULL a valid phy reference".
--- include/linux/phy/phy.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+)
include/linux/phy/phy.h +16 -0
@@ -174,21 +174,29 @@ void devm_of_phy_provider_unregister(struct device *dev,#else static inline int phy_pm_runtime_get (struct phy *phy) { +if (!phy) +return 0 ;return -ENOSYS ; }static inline int phy_pm_runtime_get_sync (struct phy *phy) { +if (!phy) +return 0 ;return -ENOSYS ; }static inline int phy_pm_runtime_put (struct phy *phy) { +if (!phy) +return 0 ;return -ENOSYS ; }static inline int phy_pm_runtime_put_sync (struct phy *phy) { +if (!phy) +return 0 ;return -ENOSYS ; }
@@ -204,21 +212,29 @@ static inline void phy_pm_runtime_forbid(struct phy *phy)static inline int phy_init (struct phy *phy) { +if (!phy) +return 0 ;return -ENOSYS ; }static inline int phy_exit (struct phy *phy) { +if (!phy) +return 0 ;return -ENOSYS ; }static inline int phy_power_on (struct phy *phy) { +if (!phy) +return 0 ;return -ENOSYS ; }static inline int phy_power_off (struct phy *phy) { +if (!phy) +return 0 ;return -ENOSYS ; }
Signature · 1 line
1.7.9.5
Hi Greg,
Quoted 10 lines · Kishon Vijay Abraham I
Hi Greg,
Here's the PULL requeust for PHY subsystem for this -rc cycle. It consissts of a bunch of critical fixes in PHY.
Let me know if I have to change anything.
Thanks
Kishon
Quoted 7 lines
The following changes since commit
c9eaa447e77efe77b7fa4c953bd62de8297fd6c5:Linux 3.15-rc1 (2014-04-13 14:18:35 -0700)
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/kishon/linux-phy.gittags/for-3.15-rc2
Can you pick this up for -rc3?
Thanks
Kishon
Quoted 6 lines · Kishon Vijay Abraham I
Hi Greg,
Here's the PULL requeust for PHY subsystem for this -rc cycle. It consissts of a bunch of critical fixes in PHY.
Let me know if I have to change anything.
Now all applied.
Quoted 7 lines
The following changes since commit
c9eaa447e77efe77b7fa4c953bd62de8297fd6c5:Linux 3.15-rc1 (2014-04-13 14:18:35 -0700)
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/kishon/linux-phy.gittags/for-3.15-rc2
Ah crap, I took them as patches, not as a git pull request, very sorry about that, my fault.
greg k-h
Hi,
Quoted 9 lines · Greg KH
Quoted 6 lines · Kishon Vijay Abraham I
Hi Greg,
Here's the PULL requeust for PHY subsystem for this -rc cycle. It consissts of a bunch of critical fixes in PHY.
Let me know if I have to change anything.
Now all applied.
Thanks :-)
Quoted 11 lines
Quoted 8 lines
The following changes since commit
c9eaa447e77efe77b7fa4c953bd62de8297fd6c5:Linux 3.15-rc1 (2014-04-13 14:18:35 -0700)
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/kishon/linux-phy.gittags/for-3.15-rc2Ah crap, I took them as patches, not as a git pull request, very sorry about that, my fault.
no problem.
-Kishon
Quoted 3 lines
greg k-h