Skip to content

Commit befdfff

Browse files
committed
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
2 parents 348ce85 + 1826640 commit befdfff

13 files changed

Lines changed: 42 additions & 37 deletions

File tree

drivers/phy/phy-da8xx-usb.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,8 @@ static int da8xx_usb_phy_probe(struct platform_device *pdev)
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)
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

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -249,21 +249,10 @@ static int rockchip_pcie_phy_init(struct phy *phy)
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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@ static int sun4i_usb_phy_init(struct phy *_phy)
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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -932,8 +932,6 @@ static int wait_serial_change(struct acm *acm, unsigned long arg)
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,
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

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -769,15 +769,14 @@ static int dwc3_core_init(struct dwc3 *dwc)
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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
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

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -588,14 +588,6 @@ static netdev_tx_t eth_start_xmit(struct sk_buff *skb,
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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -995,6 +995,14 @@ static void quirk_usb_handoff_xhci(struct pci_dev *pdev)
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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -479,7 +479,8 @@ static int da8xx_probe(struct platform_device *pdev)
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

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2114,11 +2114,6 @@ musb_init_controller(struct device *dev, int nIrq, void __iomem *ctrl)
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)

0 commit comments

Comments
 (0)