Skip to contentSkip to conversation

usb: host: ehci-tegra: fix PHY error handling

RESEND/PATCH Felipe Balbi 3 participants 10 messages Mar 21, 2013 – Apr 2, 2013 8 messages not in the archive

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PHY layer no longer returns NULL, we must
switch from IS_ERR_OR_NULL() to IS_ERR().

---

Hi Stephen,

I'm waiting for your topic branch before I can merge this into my 'next' branch.

cheers

 drivers/usb/host/ehci-tegra.c | 12 +++---------
 1 file changed, 3 insertions(+), 9 deletions(-)
drivers/usb/host/ehci-tegra.c +3 -9
index fafbc81..1d2488c 100644
@@ -768,14 +768,12 @@ static int tegra_ehci_probe(struct platform_device *pdev)
 		goto fail;
 	}
 
-#if IS_ENABLED(CONFIG_USB_PHY)
 	if (pdata->operating_mode == TEGRA_USB_OTG) {
 		tegra->transceiver =
 			devm_usb_get_phy(&pdev->dev, USB_PHY_TYPE_USB2);
-		if (!IS_ERR_OR_NULL(tegra->transceiver))
+		if (!IS_ERR(tegra->transceiver))
 			otg_set_host(tegra->transceiver->otg, &hcd->self);
 	}
-#endif
 
 	err = usb_add_hcd(hcd, irq, IRQF_SHARED);
 	if (err) {
@@ -794,10 +792,8 @@ static int tegra_ehci_probe(struct platform_device *pdev)
 	return err;
 
 fail:
-#if IS_ENABLED(CONFIG_USB_PHY)
-	if (!IS_ERR_OR_NULL(tegra->transceiver))
+	if (!IS_ERR(tegra->transceiver))
 		otg_set_host(tegra->transceiver->otg, NULL);
-#endif
 	usb_phy_shutdown(hcd->phy);
 fail_io:
 	clk_disable_unprepare(tegra->clk);
@@ -815,10 +811,8 @@ static int tegra_ehci_remove(struct platform_device *pdev)
 	pm_runtime_disable(&pdev->dev);
 	pm_runtime_put_noidle(&pdev->dev);
 
-#if IS_ENABLED(CONFIG_USB_PHY)
-	if (!IS_ERR_OR_NULL(tegra->transceiver))
+	if (!IS_ERR(tegra->transceiver))
 		otg_set_host(tegra->transceiver->otg, NULL);
-#endif
 
 	usb_phy_shutdown(hcd->phy);
 	usb_remove_hcd(hcd);
Signature · 1 line
1.8.2

A message that is not in the archive (sent off-list or not yet received): 1363868603-14525-1-git-send-email-balbi-l0cyMroinI0@public.gmane.org

#2 lore raw
Quoted 2 lines · Felipe Balbi

PHY layer no longer returns NULL, we must
switch from IS_ERR_OR_NULL() to IS_ERR().

The patches that I'll put into my topic branch are not yet complete; Venu first posted them a couple days back and there are a number of issues that will require a repost.

I would suggest that you apply your patch to your tree, and when Venu reposts his patches, he'll need to make sure he's rebased on top of this patch.

Venu, just so you're clear: The device tree changes in your series (the first 2 or 3 patches) will be applied to a branch based directly to v3.9-rc1, which will then get merged into both Felipe's USB tree and the Tegra tree. The USB driver changes in your series will then be applied to Felipe's USB branch, so please make sure they apply there. Thanks. --
To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

A message that is not in the archive (sent off-list or not yet received): [email protected]

#4 lore raw
Quoted 9 lines · Stephen Warren
Quoted 2 lines · Felipe Balbi

PHY layer no longer returns NULL, we must
switch from IS_ERR_OR_NULL() to IS_ERR().

The patches that I'll put into my topic branch are not yet complete; Venu first posted them a couple days back and there are a number of issues that will require a repost.

I would suggest that you apply your patch to your tree, and when Venu

alright, in that case, can I get yours or Venu's Acked-by ?

Signature · 1 line
balbi

A message that is not in the archive (sent off-list or not yet received): 20130321173100.GB16186-S8G//mZuvNWo5Im9Ml3/[email protected]

#6 lore raw
Quoted 5 lines · Felipe Balbi
Quoted 4 lines · Stephen Warren
Quoted 2 lines · Felipe Balbi

PHY layer no longer returns NULL, we must switch from IS_ERR_OR_NULL() to IS_ERR().

Quoted 8 lines
Quoted 6 lines

The patches that I'll put into my topic branch are not yet complete; Venu first posted them a couple days back and there are a number of issues that will require a repost.

I would suggest that you apply your patch to your tree, and when Venu

alright, in that case, can I get yours or Venu's Acked-by ?

Sure,

Although I didn't really think through any interactions with Venu's patch set, I imagine the rebase will be trivial, since the patch is pretty simple, so it shouldn't cause any issues.

A message that is not in the archive (sent off-list or not yet received): [email protected]

#8 lore raw
Quoted 13 lines · Stephen Warren
Quoted 12 lines · Felipe Balbi
Quoted 10 lines · Stephen Warren
Quoted 2 lines · Felipe Balbi

PHY layer no longer returns NULL, we must switch from IS_ERR_OR_NULL() to IS_ERR().

The patches that I'll put into my topic branch are not yet complete; Venu first posted them a couple days back and there are a number of issues that will require a repost.

I would suggest that you apply your patch to your tree, and when Venu

Quoted 8 lines
Quoted 1 line

alright, in that case, can I get yours or Venu's Acked-by ?

Sure,

Although I didn't really think through any interactions with Venu's patch set, I imagine the rebase will be trivial, since the patch is pretty simple, so it shouldn't cause any issues.

yeah, I think so too.

Signature · 1 line
balbi
#9 lore raw
In reply to a message not in the archive

Hi again,

Quoted 7 lines · Stephen Warren
Quoted 2 lines · Felipe Balbi

PHY layer no longer returns NULL, we must
switch from IS_ERR_OR_NULL() to IS_ERR().

The patches that I'll put into my topic branch are not yet complete; Venu first posted them a couple days back and there are a number of issues that will require a repost.

is your topic branch ready now ? I'm about to close my tree for v3.10, we already have -rc5 tagged and I want to leave my pull request cooking in next for a while.

Signature · 1 line
balbi

A message that is not in the archive (sent off-list or not yet received): 20130402083604.GJ30286-S8G//mZuvNWo5Im9Ml3/[email protected]

#11 lore raw
Quoted 7 lines · Felipe Balbi

Hi again,

Quoted 4 lines · Stephen Warren
Quoted 2 lines · Felipe Balbi

PHY layer no longer returns NULL, we must switch from IS_ERR_OR_NULL() to IS_ERR().

Quoted 7 lines
Quoted 3 lines

The patches that I'll put into my topic branch are not yet complete; Venu first posted them a couple days back and there are a number of issues that will require a repost.

is your topic branch ready now ? I'm about to close my tree for v3.10, we already have -rc5 tagged and I want to leave my pull request cooking in next for a while.

Unfortunately not.

Venu's patch series had a bunch of runtime bugs, and I also found out that the DT binding /still/ wasn't fully thought out. As such, this series won't be applied for 3.10.

I still have a vague (and probably naive) hope that the updated bindings and DT file modifications can be applied on the Tegra side in the next few days so that for 3.11 there won't be any inter-tree dependencies. However, we'll just have to wait and see whether Venu has found the bugs yet.
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

A message that is not in the archive (sent off-list or not yet received): [email protected]

#13 lore raw

Hi,

Quoted 22 lines · Stephen Warren
Quoted 7 lines · Felipe Balbi

Hi again,

Quoted 4 lines · Stephen Warren
Quoted 2 lines · Felipe Balbi

PHY layer no longer returns NULL, we must switch from IS_ERR_OR_NULL() to IS_ERR().

Quoted 7 lines
Quoted 3 lines

The patches that I'll put into my topic branch are not yet complete; Venu first posted them a couple days back and there are a number of issues that will require a repost.

is your topic branch ready now ? I'm about to close my tree for v3.10, we already have -rc5 tagged and I want to leave my pull request cooking in next for a while.

Unfortunately not.

Venu's patch series had a bunch of runtime bugs, and I also found out that the DT binding /still/ wasn't fully thought out. As such, this series won't be applied for 3.10.

Quoted 5 lines

I still have a vague (and probably naive) hope that the updated bindings and DT file modifications can be applied on the Tegra side in the next few days so that for 3.11 there won't be any inter-tree dependencies. However, we'll just have to wait and see whether Venu has found the bugs yet.

alright, so I'll go ahead and close my 'next' branch for v3.10, tomorrow. Leave it in linux-next for a few days and send my pull request to Greg by Friday.

Let me just check if there are any other important features to go in v3.10 which won't cause big regressions.

Signature · 1 line
balbi

A message that is not in the archive (sent off-list or not yet received): 20130402154410.GL22014-S8G//mZuvNWo5Im9Ml3/[email protected]

#15 lore raw

Hello.

Quoted 23 lines · Felipe Balbi
Quoted 18 lines
Quoted 4 lines

Hi again,

Quoted 1 line · Stephen Warren

On 03/21/2013 06:23 AM, Felipe Balbi wrote:

Quoted 8 lines
Quoted 5 lines
Quoted 2 lines

PHY layer no longer returns NULL, we must switch from IS_ERR_OR_NULL() to IS_ERR().

The patches that I'll put into my topic branch are not yet complete; Venu first posted them a couple days back and there are a number of issues that will require a repost.

is your topic branch ready now ? I'm about to close my tree for v3.10, we already have -rc5 tagged and I want to leave my pull request cooking in next for a while.

Unfortunately not.

Venu's patch series had a bunch of runtime bugs, and I also found out that the DT binding /still/ wasn't fully thought out. As such, this series won't be applied for 3.10.

Quoted 5 lines

I still have a vague (and probably naive) hope that the updated bindings and DT file modifications can be applied on the Tegra side in the next few days so that for 3.11 there won't be any inter-tree dependencies. However, we'll just have to wait and see whether Venu has found the bugs yet.

Quoted 6 lines

alright, so I'll go ahead and close my 'next' branch for v3.10, tomorrow. Leave it in linux-next for a few days and send my pull request to Greg by Friday.

Let me just check if there are any other important features to go in v3.10 which won't cause big regressions.

I was going to post some cleanup/features for
drivers/usb/phy/rcar-phy.c today
or tomorrow. So am I already late for 3.10?

WBR, Sergei

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

A message that is not in the archive (sent off-list or not yet received): 515B17ED.7010709-M4DtvfQ/[email protected]

#17 lore raw

Hi,

Quoted 24 lines · Sergei Shtylyov
Quoted 24 lines
Quoted 15 lines
Quoted 9 lines
Quoted 6 lines · Felipe Balbi
Quoted 2 lines

PHY layer no longer returns NULL, we must switch from IS_ERR_OR_NULL() to IS_ERR().

The patches that I'll put into my topic branch are not yet complete; Venu first posted them a couple days back and there are a number of issues that will require a repost.

is your topic branch ready now ? I'm about to close my tree for v3.10, we already have -rc5 tagged and I want to leave my pull request cooking in next for a while.

Unfortunately not.

Venu's patch series had a bunch of runtime bugs, and I also found out that the DT binding /still/ wasn't fully thought out. As such, this series won't be applied for 3.10.

Quoted 5 lines

I still have a vague (and probably naive) hope that the updated bindings and DT file modifications can be applied on the Tegra side in the next few days so that for 3.11 there won't be any inter-tree dependencies. However, we'll just have to wait and see whether Venu has found the bugs yet.

alright, so I'll go ahead and close my 'next' branch for v3.10, tomorrow. Leave it in linux-next for a few days and send my pull request to Greg by Friday.

Quoted 6 lines
Quoted 2 lines

Let me just check if there are any other important features to go in v3.10 which won't cause big regressions.

I was going to post some cleanup/features for
drivers/usb/phy/rcar-phy.c today
or tomorrow. So am I already late for 3.10?

if it comes today (before midnight in UTC +2, so in less than 3 hours), I can still apply.

Signature · 1 line
balbi