* [GIT PULL 0/4] phy: fixes for 3.15 -rc2
@ 2014-04-19 3:21 Kishon Vijay Abraham I
2014-04-19 3:21 ` [PATCH 1/4] phy: exynos: fix building as a module Kishon Vijay Abraham I
` (5 more replies)
0 siblings, 6 replies; 8+ messages in thread
From: Kishon Vijay Abraham I @ 2014-04-19 3:21 UTC (permalink / raw)
To: gregkh; +Cc: kishon, linux-kernel
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(-)
--
1.7.9.5
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 1/4] phy: exynos: fix building as a module
2014-04-19 3:21 [GIT PULL 0/4] phy: fixes for 3.15 -rc2 Kishon Vijay Abraham I
@ 2014-04-19 3:21 ` Kishon Vijay Abraham I
2014-04-19 3:21 ` [PATCH 2/4] phy: restore OMAP_CONTROL_PHY dependencies Kishon Vijay Abraham I
` (4 subsequent siblings)
5 siblings, 0 replies; 8+ messages in thread
From: Kishon Vijay Abraham I @ 2014-04-19 3:21 UTC (permalink / raw)
To: gregkh; +Cc: kishon, linux-kernel
From: Arnd Bergmann <arnd@arndb.de>
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.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
---
drivers/phy/Makefile | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/drivers/phy/Makefile b/drivers/phy/Makefile
index 2faf78e..7728518 100644
--- a/drivers/phy/Makefile
+++ b/drivers/phy/Makefile
@@ -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
--
1.7.9.5
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 2/4] phy: restore OMAP_CONTROL_PHY dependencies
2014-04-19 3:21 [GIT PULL 0/4] phy: fixes for 3.15 -rc2 Kishon Vijay Abraham I
2014-04-19 3:21 ` [PATCH 1/4] phy: exynos: fix building as a module Kishon Vijay Abraham I
@ 2014-04-19 3:21 ` Kishon Vijay Abraham I
2014-04-19 3:21 ` [PATCH 3/4] phy: fix kernel oops in phy_lookup() Kishon Vijay Abraham I
` (3 subsequent siblings)
5 siblings, 0 replies; 8+ messages in thread
From: Kishon Vijay Abraham I @ 2014-04-19 3:21 UTC (permalink / raw)
To: gregkh; +Cc: kishon, linux-kernel
From: Jean Delvare <jdelvare@suse.de>
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.
Signed-off-by: Jean Delvare <jdelvare@suse.de>
Acked-by: Roger Quadros <rogerq@ti.com>
Cc: Felipe Balbi <balbi@ti.com>
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
---
drivers/phy/Kconfig | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/phy/Kconfig b/drivers/phy/Kconfig
index 3bb05f1..4906c27 100644
--- a/drivers/phy/Kconfig
+++ b/drivers/phy/Kconfig
@@ -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
--
1.7.9.5
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 3/4] phy: fix kernel oops in phy_lookup()
2014-04-19 3:21 [GIT PULL 0/4] phy: fixes for 3.15 -rc2 Kishon Vijay Abraham I
2014-04-19 3:21 ` [PATCH 1/4] phy: exynos: fix building as a module Kishon Vijay Abraham I
2014-04-19 3:21 ` [PATCH 2/4] phy: restore OMAP_CONTROL_PHY dependencies Kishon Vijay Abraham I
@ 2014-04-19 3:21 ` Kishon Vijay Abraham I
2014-04-19 3:21 ` [PATCH 4/4] phy: core: make NULL a valid phy reference if !CONFIG_GENERIC_PHY Kishon Vijay Abraham I
` (2 subsequent siblings)
5 siblings, 0 replies; 8+ messages in thread
From: Kishon Vijay Abraham I @ 2014-04-19 3:21 UTC (permalink / raw)
To: gregkh; +Cc: kishon, linux-kernel
From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
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.
Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
---
drivers/phy/phy-core.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/phy/phy-core.c b/drivers/phy/phy-core.c
index 623b71c..c64a2f3 100644
--- a/drivers/phy/phy-core.c
+++ b/drivers/phy/phy-core.c
@@ -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--) {
--
1.7.9.5
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 4/4] phy: core: make NULL a valid phy reference if !CONFIG_GENERIC_PHY
2014-04-19 3:21 [GIT PULL 0/4] phy: fixes for 3.15 -rc2 Kishon Vijay Abraham I
` (2 preceding siblings ...)
2014-04-19 3:21 ` [PATCH 3/4] phy: fix kernel oops in phy_lookup() Kishon Vijay Abraham I
@ 2014-04-19 3:21 ` Kishon Vijay Abraham I
2014-04-24 12:36 ` [GIT PULL 0/4] phy: fixes for 3.15 -rc2 Kishon Vijay Abraham I
2014-04-24 19:54 ` Greg KH
5 siblings, 0 replies; 8+ messages in thread
From: Kishon Vijay Abraham I @ 2014-04-19 3:21 UTC (permalink / raw)
To: gregkh; +Cc: kishon, linux-kernel
From: Grygorii Strashko <grygorii.strashko@ti.com>
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".
Acked-by: Felipe Balbi <balbi@ti.com>
Acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
---
include/linux/phy/phy.h | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/include/linux/phy/phy.h b/include/linux/phy/phy.h
index e2f5ca9..2760744 100644
--- a/include/linux/phy/phy.h
+++ b/include/linux/phy/phy.h
@@ -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;
}
--
1.7.9.5
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [GIT PULL 0/4] phy: fixes for 3.15 -rc2
2014-04-19 3:21 [GIT PULL 0/4] phy: fixes for 3.15 -rc2 Kishon Vijay Abraham I
` (3 preceding siblings ...)
2014-04-19 3:21 ` [PATCH 4/4] phy: core: make NULL a valid phy reference if !CONFIG_GENERIC_PHY Kishon Vijay Abraham I
@ 2014-04-24 12:36 ` Kishon Vijay Abraham I
2014-04-24 19:54 ` Greg KH
5 siblings, 0 replies; 8+ messages in thread
From: Kishon Vijay Abraham I @ 2014-04-24 12:36 UTC (permalink / raw)
To: gregkh; +Cc: linux-kernel
Hi Greg,
On Saturday 19 April 2014 08:51 AM, Kishon Vijay Abraham I wrote:
> 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
Can you pick this up for -rc3?
Thanks
Kishon
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [GIT PULL 0/4] phy: fixes for 3.15 -rc2
2014-04-19 3:21 [GIT PULL 0/4] phy: fixes for 3.15 -rc2 Kishon Vijay Abraham I
` (4 preceding siblings ...)
2014-04-24 12:36 ` [GIT PULL 0/4] phy: fixes for 3.15 -rc2 Kishon Vijay Abraham I
@ 2014-04-24 19:54 ` Greg KH
2014-04-28 6:33 ` Kishon Vijay Abraham I
5 siblings, 1 reply; 8+ messages in thread
From: Greg KH @ 2014-04-24 19:54 UTC (permalink / raw)
To: Kishon Vijay Abraham I; +Cc: linux-kernel
On Sat, Apr 19, 2014 at 08:51:40AM +0530, Kishon Vijay Abraham I wrote:
> 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.
> 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
Ah crap, I took them as patches, not as a git pull request, very sorry
about that, my fault.
greg k-h
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [GIT PULL 0/4] phy: fixes for 3.15 -rc2
2014-04-24 19:54 ` Greg KH
@ 2014-04-28 6:33 ` Kishon Vijay Abraham I
0 siblings, 0 replies; 8+ messages in thread
From: Kishon Vijay Abraham I @ 2014-04-28 6:33 UTC (permalink / raw)
To: Greg KH; +Cc: linux-kernel
Hi,
On Friday 25 April 2014 01:24 AM, Greg KH wrote:
> On Sat, Apr 19, 2014 at 08:51:40AM +0530, Kishon Vijay Abraham I wrote:
>> 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 :-)
>
>> 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
>
> Ah crap, I took them as patches, not as a git pull request, very sorry
> about that, my fault.
no problem.
-Kishon
>
> greg k-h
>
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2014-04-28 6:33 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-19 3:21 [GIT PULL 0/4] phy: fixes for 3.15 -rc2 Kishon Vijay Abraham I
2014-04-19 3:21 ` [PATCH 1/4] phy: exynos: fix building as a module Kishon Vijay Abraham I
2014-04-19 3:21 ` [PATCH 2/4] phy: restore OMAP_CONTROL_PHY dependencies Kishon Vijay Abraham I
2014-04-19 3:21 ` [PATCH 3/4] phy: fix kernel oops in phy_lookup() Kishon Vijay Abraham I
2014-04-19 3:21 ` [PATCH 4/4] phy: core: make NULL a valid phy reference if !CONFIG_GENERIC_PHY Kishon Vijay Abraham I
2014-04-24 12:36 ` [GIT PULL 0/4] phy: fixes for 3.15 -rc2 Kishon Vijay Abraham I
2014-04-24 19:54 ` Greg KH
2014-04-28 6:33 ` Kishon Vijay Abraham I
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox