Skip to contentSkip to conversation

drivers:mfd:omap-usb-host.c: Fix improper mask use.

PATCH In review Michael Welling 4 participants 5 messages Jul 28, 2014 – Jul 29, 2014

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

PATCH 1/1 drivers:mfd:omap-usb-host.c: Fix improper mask use.

single-ulpi-bypass is a flag used for older OMAP3 silicon.

The flag when set, can excite code that improperly uses the OMAP_UHH_HOSTCONFIG_UPLI_BYPASS define to clear the corresponding bit. Instead it clears all of the other bits disabling all of the ports in the process.

---
 drivers/mfd/omap-usb-host.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mfd/omap-usb-host.c +1 -1
index b48d80c..33a9234 100644
@@ -445,7 +445,7 @@ static unsigned omap_usbhs_rev1_hostconfig(struct usbhs_hcd_omap *omap,
 
 		for (i = 0; i < omap->nports; i++) {
 			if (is_ehci_phy_mode(pdata->port_mode[i])) {
-				reg &= OMAP_UHH_HOSTCONFIG_ULPI_BYPASS;
+				reg &= ~OMAP_UHH_HOSTCONFIG_ULPI_BYPASS;
 				break;
 			}
 		}
Signature · 1 line
1.7.10.4
Acked-by on v1 1/1
#1 lore raw

Hi Michael,

Quoted 18 lines · Michael Welling

single-ulpi-bypass is a flag used for older OMAP3 silicon.

The flag when set, can excite code that improperly uses the OMAP_UHH_HOSTCONFIG_UPLI_BYPASS define to clear the corresponding bit. Instead it clears all of the other bits disabling all of the ports in the process.

---
 drivers/mfd/omap-usb-host.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mfd/omap-usb-host.c +0 -0
index b48d80c..33a9234 100644

drivers/mfd/omap-usb-host.c static unsigned omap_usbhs_rev1_hostconfig(struct usbhs_hcd_omap *omap, · line 451

Quoted 8 lines
drivers/mfd/omap-usb-host.c +1 -1
@@ -445,7 +445,7 @@ static unsigned omap_usbhs_rev1_hostconfig(struct usbhs_hcd_omap *omap,
 
 		for (i = 0; i < omap->nports; i++) {
 			if (is_ehci_phy_mode(pdata->port_mode[i])) {
-				reg &= OMAP_UHH_HOSTCONFIG_ULPI_BYPASS;
+				reg &= ~OMAP_UHH_HOSTCONFIG_ULPI_BYPASS;
 				break;
 			}
 		}

Good catch!

It seems the regression was introduced by commit c4df00aed9e2 in v3.9. Could you please cc this patch to [email protected]

cheers,
-roger

#2 lore raw

PATCH 1/1 mfd: omap-usb-host: Fix improper mask use

In reply to Michael Welling

single-ulpi-bypass is a flag used for older OMAP3 silicon.

The flag when set, can excite code that improperly uses the OMAP_UHH_HOSTCONFIG_UPLI_BYPASS define to clear the corresponding bit. Instead it clears all of the other bits disabling all of the ports in the process.

---

--> Applied, thanks. <--

 drivers/mfd/omap-usb-host.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mfd/omap-usb-host.c +1 -1
index b48d80c..33a9234 100644
@@ -445,7 +445,7 @@ static unsigned omap_usbhs_rev1_hostconfig(struct usbhs_hcd_omap *omap,
 
 		for (i = 0; i < omap->nports; i++) {
 			if (is_ehci_phy_mode(pdata->port_mode[i])) {
-				reg &= OMAP_UHH_HOSTCONFIG_ULPI_BYPASS;
+				reg &= ~OMAP_UHH_HOSTCONFIG_ULPI_BYPASS;
 				break;
 			}
 		}
maintainer
#3 lore raw

Re: [PATCH] mfd: omap-usb-host: Fix improper mask use

Quoted 7 lines · Lee Jones

single-ulpi-bypass is a flag used for older OMAP3 silicon.

The flag when set, can excite code that improperly uses the OMAP_UHH_HOSTCONFIG_UPLI_BYPASS define to clear the corresponding bit. Instead it clears all of the other bits disabling all of the ports in the process.

Quoted 7 lines

---

--> Applied, thanks. <--

 drivers/mfd/omap-usb-host.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

<formletter>

This is not the correct way to submit patches for inclusion in the stable kernel tree. Please read Documentation/stable_kernel_rules.txt for how to do this properly.

</formletter>

#4 lore raw

Re: [PATCH] mfd: omap-usb-host: Fix improper mask use

Quoted 16 lines · Greg KH
Quoted 7 lines · Lee Jones

single-ulpi-bypass is a flag used for older OMAP3 silicon.

The flag when set, can excite code that improperly uses the OMAP_UHH_HOSTCONFIG_UPLI_BYPASS define to clear the corresponding bit. Instead it clears all of the other bits disabling all of the ports in the process.

Quoted 7 lines

---

--> Applied, thanks. <--

 drivers/mfd/omap-usb-host.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 7 lines

<formletter>

This is not the correct way to submit patches for inclusion in the stable kernel tree. Please read Documentation/stable_kernel_rules.txt for how to do this properly.

</formletter>

It was worth a try. ;)

Patch queued for MFD -next and 'Cc: [email protected]' tag added.

Signature · 4 lines
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog