History

Merge tag 'usb-4.9-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb

Pull USB / PHY fixes from Greg KH: "Here are a number of small USB and PHY driver fixes for 4.9-rc5 Nothing major, just small fixes for reported issues, all of these have been in linux-next for a while with no reported issues" * tag 'usb-4.9-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: USB: cdc-acm: fix TIOCMIWAIT cdc-acm: fix uninitialized variable drivers/usb: Skip auto handoff for TI and RENESAS usb controllers usb: musb: remove duplicated actions usb: musb: da8xx: Don't print phy error on -EPROBE_DEFER phy: sun4i: check PMU presence when poking unknown bit of pmu phy-rockchip-pcie: remove deassert of phy_rst from exit callback phy: da8xx-usb: rename the ohci device to ohci-da8xx phy: Add reset callback for not generic phy uwb: fix device reference leaks usb: gadget: u_ether: remove interrupt throttling usb: dwc3: st: add missing <linux/pinctrl/consumer.h> include usb: dwc3: Fix error handling for core init

Linus Torvalds committed 10 years ago

Commit befdfff2 parents 348ce85 182664013 files · +42 −37Browse files

Unified · Split

13 files
  1. drivers/phy/phy-da8xx-usb.c +3 −2
  2. drivers/phy/phy-rockchip-pcie.c +1 −12
  3. drivers/phy/phy-sun4i-usb.c +1 −1
  4. drivers/usb/class/cdc-acm.c +2 −2
  5. drivers/usb/dwc3/core.c +2 −3
  6. drivers/usb/dwc3/dwc3-st.c +1 −0
  7. drivers/usb/gadget/function/u_ether.c +0 −8
  8. drivers/usb/host/pci-quirks.c +8 −0
  9. drivers/usb/musb/da8xx.c +2 −1
  10. drivers/usb/musb/musb_core.c +0 −5
  11. drivers/uwb/lc-rc.c +13 −3
  12. drivers/uwb/pal.c +2 −0
  13. include/linux/phy/phy.h +7 −0
drivers/phy/phy-da8xx-usb.c+3−2
@@ -198,7 +198,8 @@ static int da8xx_usb_phy_probe(struct platform_device *pdev) · 197 unmodified lines
198198 } else {
199199 int ret;
200200
201− ret = phy_create_lookup(d_phy->usb11_phy, "usb-phy", "ohci.0");
201+ ret = phy_create_lookup(d_phy->usb11_phy, "usb-phy",
202+ "ohci-da8xx");
202203 if (ret)
203204 dev_warn(dev, "Failed to create usb11 phy lookup\n");
204205 ret = phy_create_lookup(d_phy->usb20_phy, "usb-phy",
@@ -216,7 +217,7 @@ static int da8xx_usb_phy_remove(struct platform_device *pdev) · 11 unmodified lines
216217
217218 if (!pdev->dev.of_node) {
218219 phy_remove_lookup(d_phy->usb20_phy, "usb-phy", "musb-da8xx");
219− phy_remove_lookup(d_phy->usb11_phy, "usb-phy", "ohci.0");
220+ phy_remove_lookup(d_phy->usb11_phy, "usb-phy", "ohci-da8xx");
220221 }
221222
222223 return 0;
drivers/phy/phy-rockchip-pcie.c+1−12
@@ -249,21 +249,10 @@ err_refclk: · 248 unmodified lines
249249 static int rockchip_pcie_phy_exit(struct phy *phy)
250250 {
251251 struct rockchip_pcie_phy *rk_phy = phy_get_drvdata(phy);
252− int err = 0;
253252
254253 clk_disable_unprepare(rk_phy->clk_pciephy_ref);
255254
256− err = reset_control_deassert(rk_phy->phy_rst);
257− if (err) {
258− dev_err(&phy->dev, "deassert phy_rst err %d\n", err);
259− goto err_reset;
260− }
261−
262− return err;
263−
264−err_reset:
265− clk_prepare_enable(rk_phy->clk_pciephy_ref);
266− return err;
255+ return 0;
267256 }
268257
269258 static const struct phy_ops ops = {
drivers/phy/phy-sun4i-usb.c+1−1
@@ -264,7 +264,7 @@ static int sun4i_usb_phy_init(struct phy *_phy) · 263 unmodified lines
264264 return ret;
265265 }
266266
267− if (data->cfg->enable_pmu_unk1) {
267+ if (phy->pmu && data->cfg->enable_pmu_unk1) {
268268 val = readl(phy->pmu + REG_PMU_UNK1);
269269 writel(val & ~2, phy->pmu + REG_PMU_UNK1);
270270 }
drivers/usb/class/cdc-acm.c+2−2
@@ -932,8 +932,6 @@ static int wait_serial_change(struct acm *acm, unsigned long arg) · 931 unmodified lines
932932 DECLARE_WAITQUEUE(wait, current);
933933 struct async_icount old, new;
934934
935− if (arg & (TIOCM_DSR | TIOCM_RI | TIOCM_CD))
936− return -EINVAL;
937935 do {
938936 spin_lock_irq(&acm->read_lock);
939937 old = acm->oldcount;
@@ -1161,6 +1159,8 @@ static int acm_probe(struct usb_interface *intf, · 221 unmodified lines
11611159 if (quirks == IGNORE_DEVICE)
11621160 return -ENODEV;
11631161
1162+ memset(&h, 0x00, sizeof(struct usb_cdc_parsed_header));
1163+
11641164 num_rx_buf = (quirks == SINGLE_RX_URB) ? 1 : ACM_NR;
11651165
11661166 /* handle quirks deadly to normal probing*/
drivers/usb/dwc3/core.c+2−3
@@ -769,15 +769,14 @@ static int dwc3_core_init(struct dwc3 *dwc) · 768 unmodified lines
769769 return 0;
770770
771771 err4:
772− phy_power_off(dwc->usb2_generic_phy);
772+ phy_power_off(dwc->usb3_generic_phy);
773773
774774 err3:
775− phy_power_off(dwc->usb3_generic_phy);
775+ phy_power_off(dwc->usb2_generic_phy);
776776
777777 err2:
778778 usb_phy_set_suspend(dwc->usb2_phy, 1);
779779 usb_phy_set_suspend(dwc->usb3_phy, 1);
780− dwc3_core_exit(dwc);
781780
782781 err1:
783782 usb_phy_shutdown(dwc->usb2_phy);
drivers/usb/dwc3/dwc3-st.c+1−0
@@ -31,6 +31,7 @@ · 30 unmodified lines
3131 #include <linux/slab.h>
3232 #include <linux/regmap.h>
3333 #include <linux/reset.h>
34+#include <linux/pinctrl/consumer.h>
3435 #include <linux/usb/of.h>
3536
3637 #include "core.h"
drivers/usb/gadget/function/u_ether.c+0−8
@@ -588,14 +588,6 @@ static netdev_tx_t eth_start_xmit(struct sk_buff *skb, · 587 unmodified lines
588588
589589 req->length = length;
590590
591− /* throttle high/super speed IRQ rate back slightly */
592− if (gadget_is_dualspeed(dev->gadget))
593− req->no_interrupt = (((dev->gadget->speed == USB_SPEED_HIGH ||
594− dev->gadget->speed == USB_SPEED_SUPER)) &&
595− !list_empty(&dev->tx_reqs))
596− ? ((atomic_read(&dev->tx_qlen) % dev->qmult) != 0)
597− : 0;
598−
599591 retval = usb_ep_queue(in, req, GFP_ATOMIC);
600592 switch (retval) {
601593 default:
drivers/usb/host/pci-quirks.c+8−0
@@ -995,6 +995,14 @@ static void quirk_usb_handoff_xhci(struct pci_dev *pdev) · 994 unmodified lines
995995 }
996996 val = readl(base + ext_cap_offset);
997997
998+ /* Auto handoff never worked for these devices. Force it and continue */
999+ if ((pdev->vendor == PCI_VENDOR_ID_TI && pdev->device == 0x8241) ||
1000+ (pdev->vendor == PCI_VENDOR_ID_RENESAS
1001+ && pdev->device == 0x0014)) {
1002+ val = (val | XHCI_HC_OS_OWNED) & ~XHCI_HC_BIOS_OWNED;
1003+ writel(val, base + ext_cap_offset);
1004+ }
1005+
9981006 /* If the BIOS owns the HC, signal that the OS wants it, and wait */
9991007 if (val & XHCI_HC_BIOS_OWNED) {
10001008 writel(val | XHCI_HC_OS_OWNED, base + ext_cap_offset);
drivers/usb/musb/da8xx.c+2−1
@@ -479,7 +479,8 @@ static int da8xx_probe(struct platform_device *pdev) · 478 unmodified lines
479479
480480 glue->phy = devm_phy_get(&pdev->dev, "usb-phy");
481481 if (IS_ERR(glue->phy)) {
482− dev_err(&pdev->dev, "failed to get phy\n");
482+ if (PTR_ERR(glue->phy) != -EPROBE_DEFER)
483+ dev_err(&pdev->dev, "failed to get phy\n");
483484 return PTR_ERR(glue->phy);
484485 }
485486
drivers/usb/musb/musb_core.c+0−5
@@ -2114,11 +2114,6 @@ musb_init_controller(struct device *dev, int nIrq, void __iomem *ctrl) · 2113 unmodified lines
21142114 musb->io.ep_offset = musb_flat_ep_offset;
21152115 musb->io.ep_select = musb_flat_ep_select;
21162116 }
2117− /* And override them with platform specific ops if specified. */
2118− if (musb->ops->ep_offset)
2119− musb->io.ep_offset = musb->ops->ep_offset;
2120− if (musb->ops->ep_select)
2121− musb->io.ep_select = musb->ops->ep_select;
21222117
21232118 /* At least tusb6010 has its own offsets */
21242119 if (musb->ops->ep_offset)
drivers/uwb/lc-rc.c+13−3
@@ -56,8 +56,11 @@ static struct uwb_rc *uwb_rc_find_by_index(int index) · 55 unmodified lines
5656 struct uwb_rc *rc = NULL;
5757
5858 dev = class_find_device(&uwb_rc_class, NULL, &index, uwb_rc_index_match);
59− if (dev)
59+ if (dev) {
6060 rc = dev_get_drvdata(dev);
61+ put_device(dev);
62+ }
63+
6164 return rc;
6265 }
6366
@@ -467,7 +470,9 @@ struct uwb_rc *__uwb_rc_try_get(struct uwb_rc *target_rc) · 403 unmodified lines
467470 if (dev) {
468471 rc = dev_get_drvdata(dev);
469472 __uwb_rc_get(rc);
473+ put_device(dev);
470474 }
475+
471476 return rc;
472477 }
473478 EXPORT_SYMBOL_GPL(__uwb_rc_try_get);
@@ -520,8 +525,11 @@ struct uwb_rc *uwb_rc_get_by_grandpa(const struct device *grandpa_dev) · 46 unmodified lines
520525
521526 dev = class_find_device(&uwb_rc_class, NULL, grandpa_dev,
522527 find_rc_grandpa);
523− if (dev)
528+ if (dev) {
524529 rc = dev_get_drvdata(dev);
530+ put_device(dev);
531+ }
532+
525533 return rc;
526534 }
527535 EXPORT_SYMBOL_GPL(uwb_rc_get_by_grandpa);
@@ -553,8 +561,10 @@ struct uwb_rc *uwb_rc_get_by_dev(const struct uwb_dev_addr *addr) · 25 unmodified lines
553561 struct uwb_rc *rc = NULL;
554562
555563 dev = class_find_device(&uwb_rc_class, NULL, addr, find_rc_dev);
556− if (dev)
564+ if (dev) {
557565 rc = dev_get_drvdata(dev);
566+ put_device(dev);
567+ }
558568
559569 return rc;
560570 }
drivers/uwb/pal.c+2−0
@@ -97,6 +97,8 @@ static bool uwb_rc_class_device_exists(struct uwb_rc *target_rc) · 96 unmodified lines
9797
9898 dev = class_find_device(&uwb_rc_class, NULL, target_rc, find_rc);
9999
100+ put_device(dev);
101+
100102 return (dev != NULL);
101103 }
102104
include/linux/phy/phy.h+7−0
@@ -253,6 +253,13 @@ static inline int phy_set_mode(struct phy *phy, enum phy_mode mode) · 252 unmodified lines
253253 return -ENOSYS;
254254 }
255255
256+static inline int phy_reset(struct phy *phy)
257+{
258+ if (!phy)
259+ return 0;
260+ return -ENOSYS;
261+}
262+
256263 static inline int phy_get_bus_width(struct phy *phy)
257264 {
258265 return -ENOSYS;