소스 검색

Merge tag 'fixes-for-v3.13-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-linus

Felipe writes:

usb: fixes for v3.13-rc4

DWC3 learned that it can't resume a PHY which wasn't
initialized and it also learned to not leave PHY powered
up in case of an error.

twl6030-usb PHY driver got a fix for a signedness bug in
twl6030_readb().

Tegra PHY driver got a bug fix where it could return success
even though there was an error.

Signed-of-by: Felipe Balbi <balbi@ti.com>
Greg Kroah-Hartman 11 년 전
부모
커밋
757de81e8b
3개의 변경된 파일8개의 추가작업 그리고 5개의 파일을 삭제
  1. 5 3
      drivers/usb/dwc3/core.c
  2. 1 1
      drivers/usb/phy/phy-tegra-usb.c
  3. 2 1
      drivers/usb/phy/phy-twl6030-usb.c

+ 5 - 3
drivers/usb/dwc3/core.c

@@ -455,9 +455,6 @@ static int dwc3_probe(struct platform_device *pdev)
 	if (IS_ERR(regs))
 	if (IS_ERR(regs))
 		return PTR_ERR(regs);
 		return PTR_ERR(regs);
 
 
-	usb_phy_set_suspend(dwc->usb2_phy, 0);
-	usb_phy_set_suspend(dwc->usb3_phy, 0);
-
 	spin_lock_init(&dwc->lock);
 	spin_lock_init(&dwc->lock);
 	platform_set_drvdata(pdev, dwc);
 	platform_set_drvdata(pdev, dwc);
 
 
@@ -488,6 +485,9 @@ static int dwc3_probe(struct platform_device *pdev)
 		goto err0;
 		goto err0;
 	}
 	}
 
 
+	usb_phy_set_suspend(dwc->usb2_phy, 0);
+	usb_phy_set_suspend(dwc->usb3_phy, 0);
+
 	ret = dwc3_event_buffers_setup(dwc);
 	ret = dwc3_event_buffers_setup(dwc);
 	if (ret) {
 	if (ret) {
 		dev_err(dwc->dev, "failed to setup event buffers\n");
 		dev_err(dwc->dev, "failed to setup event buffers\n");
@@ -569,6 +569,8 @@ err2:
 	dwc3_event_buffers_cleanup(dwc);
 	dwc3_event_buffers_cleanup(dwc);
 
 
 err1:
 err1:
+	usb_phy_set_suspend(dwc->usb2_phy, 1);
+	usb_phy_set_suspend(dwc->usb3_phy, 1);
 	dwc3_core_exit(dwc);
 	dwc3_core_exit(dwc);
 
 
 err0:
 err0:

+ 1 - 1
drivers/usb/phy/phy-tegra-usb.c

@@ -876,7 +876,7 @@ static int utmi_phy_probe(struct tegra_usb_phy *tegra_phy,
 
 
 	tegra_phy->pad_regs = devm_ioremap(&pdev->dev, res->start,
 	tegra_phy->pad_regs = devm_ioremap(&pdev->dev, res->start,
 		resource_size(res));
 		resource_size(res));
-	if (!tegra_phy->regs) {
+	if (!tegra_phy->pad_regs) {
 		dev_err(&pdev->dev, "Failed to remap UTMI Pad regs\n");
 		dev_err(&pdev->dev, "Failed to remap UTMI Pad regs\n");
 		return -ENOMEM;
 		return -ENOMEM;
 	}
 	}

+ 2 - 1
drivers/usb/phy/phy-twl6030-usb.c

@@ -127,7 +127,8 @@ static inline int twl6030_writeb(struct twl6030_usb *twl, u8 module,
 
 
 static inline u8 twl6030_readb(struct twl6030_usb *twl, u8 module, u8 address)
 static inline u8 twl6030_readb(struct twl6030_usb *twl, u8 module, u8 address)
 {
 {
-	u8 data, ret = 0;
+	u8 data;
+	int ret;
 
 
 	ret = twl_i2c_read_u8(module, &data, address);
 	ret = twl_i2c_read_u8(module, &data, address);
 	if (ret >= 0)
 	if (ret >= 0)