USB / PHY fixes for 4.9-rc5
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. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> -----BEGIN PGP SIGNATURE----- iFYEABECABYFAlgoPRQPHGdyZWdAa3JvYWguY29tAAoJEDFH1A3bLfsp+dQAn282 ftF8+1ZsZ4uyGdKNO101cSayAKCYezCi0MB+/aPIdgzBt0Z7EnA/wg== =aW8R -----END PGP SIGNATURE----- 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
This commit is contained in:
commit
befdfffdbd
|
@ -198,7 +198,8 @@ static int da8xx_usb_phy_probe(struct platform_device *pdev)
|
|||
} else {
|
||||
int ret;
|
||||
|
||||
ret = phy_create_lookup(d_phy->usb11_phy, "usb-phy", "ohci.0");
|
||||
ret = phy_create_lookup(d_phy->usb11_phy, "usb-phy",
|
||||
"ohci-da8xx");
|
||||
if (ret)
|
||||
dev_warn(dev, "Failed to create usb11 phy lookup\n");
|
||||
ret = phy_create_lookup(d_phy->usb20_phy, "usb-phy",
|
||||
|
@ -216,7 +217,7 @@ static int da8xx_usb_phy_remove(struct platform_device *pdev)
|
|||
|
||||
if (!pdev->dev.of_node) {
|
||||
phy_remove_lookup(d_phy->usb20_phy, "usb-phy", "musb-da8xx");
|
||||
phy_remove_lookup(d_phy->usb11_phy, "usb-phy", "ohci.0");
|
||||
phy_remove_lookup(d_phy->usb11_phy, "usb-phy", "ohci-da8xx");
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
|
|
@ -249,21 +249,10 @@ static int rockchip_pcie_phy_init(struct phy *phy)
|
|||
static int rockchip_pcie_phy_exit(struct phy *phy)
|
||||
{
|
||||
struct rockchip_pcie_phy *rk_phy = phy_get_drvdata(phy);
|
||||
int err = 0;
|
||||
|
||||
clk_disable_unprepare(rk_phy->clk_pciephy_ref);
|
||||
|
||||
err = reset_control_deassert(rk_phy->phy_rst);
|
||||
if (err) {
|
||||
dev_err(&phy->dev, "deassert phy_rst err %d\n", err);
|
||||
goto err_reset;
|
||||
}
|
||||
|
||||
return err;
|
||||
|
||||
err_reset:
|
||||
clk_prepare_enable(rk_phy->clk_pciephy_ref);
|
||||
return err;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const struct phy_ops ops = {
|
||||
|
|
|
@ -264,7 +264,7 @@ static int sun4i_usb_phy_init(struct phy *_phy)
|
|||
return ret;
|
||||
}
|
||||
|
||||
if (data->cfg->enable_pmu_unk1) {
|
||||
if (phy->pmu && data->cfg->enable_pmu_unk1) {
|
||||
val = readl(phy->pmu + REG_PMU_UNK1);
|
||||
writel(val & ~2, phy->pmu + REG_PMU_UNK1);
|
||||
}
|
||||
|
|
|
@ -932,8 +932,6 @@ static int wait_serial_change(struct acm *acm, unsigned long arg)
|
|||
DECLARE_WAITQUEUE(wait, current);
|
||||
struct async_icount old, new;
|
||||
|
||||
if (arg & (TIOCM_DSR | TIOCM_RI | TIOCM_CD))
|
||||
return -EINVAL;
|
||||
do {
|
||||
spin_lock_irq(&acm->read_lock);
|
||||
old = acm->oldcount;
|
||||
|
@ -1161,6 +1159,8 @@ static int acm_probe(struct usb_interface *intf,
|
|||
if (quirks == IGNORE_DEVICE)
|
||||
return -ENODEV;
|
||||
|
||||
memset(&h, 0x00, sizeof(struct usb_cdc_parsed_header));
|
||||
|
||||
num_rx_buf = (quirks == SINGLE_RX_URB) ? 1 : ACM_NR;
|
||||
|
||||
/* handle quirks deadly to normal probing*/
|
||||
|
|
|
@ -769,15 +769,14 @@ static int dwc3_core_init(struct dwc3 *dwc)
|
|||
return 0;
|
||||
|
||||
err4:
|
||||
phy_power_off(dwc->usb2_generic_phy);
|
||||
phy_power_off(dwc->usb3_generic_phy);
|
||||
|
||||
err3:
|
||||
phy_power_off(dwc->usb3_generic_phy);
|
||||
phy_power_off(dwc->usb2_generic_phy);
|
||||
|
||||
err2:
|
||||
usb_phy_set_suspend(dwc->usb2_phy, 1);
|
||||
usb_phy_set_suspend(dwc->usb3_phy, 1);
|
||||
dwc3_core_exit(dwc);
|
||||
|
||||
err1:
|
||||
usb_phy_shutdown(dwc->usb2_phy);
|
||||
|
|
|
@ -31,6 +31,7 @@
|
|||
#include <linux/slab.h>
|
||||
#include <linux/regmap.h>
|
||||
#include <linux/reset.h>
|
||||
#include <linux/pinctrl/consumer.h>
|
||||
#include <linux/usb/of.h>
|
||||
|
||||
#include "core.h"
|
||||
|
|
|
@ -588,14 +588,6 @@ static netdev_tx_t eth_start_xmit(struct sk_buff *skb,
|
|||
|
||||
req->length = length;
|
||||
|
||||
/* throttle high/super speed IRQ rate back slightly */
|
||||
if (gadget_is_dualspeed(dev->gadget))
|
||||
req->no_interrupt = (((dev->gadget->speed == USB_SPEED_HIGH ||
|
||||
dev->gadget->speed == USB_SPEED_SUPER)) &&
|
||||
!list_empty(&dev->tx_reqs))
|
||||
? ((atomic_read(&dev->tx_qlen) % dev->qmult) != 0)
|
||||
: 0;
|
||||
|
||||
retval = usb_ep_queue(in, req, GFP_ATOMIC);
|
||||
switch (retval) {
|
||||
default:
|
||||
|
|
|
@ -995,6 +995,14 @@ static void quirk_usb_handoff_xhci(struct pci_dev *pdev)
|
|||
}
|
||||
val = readl(base + ext_cap_offset);
|
||||
|
||||
/* Auto handoff never worked for these devices. Force it and continue */
|
||||
if ((pdev->vendor == PCI_VENDOR_ID_TI && pdev->device == 0x8241) ||
|
||||
(pdev->vendor == PCI_VENDOR_ID_RENESAS
|
||||
&& pdev->device == 0x0014)) {
|
||||
val = (val | XHCI_HC_OS_OWNED) & ~XHCI_HC_BIOS_OWNED;
|
||||
writel(val, base + ext_cap_offset);
|
||||
}
|
||||
|
||||
/* If the BIOS owns the HC, signal that the OS wants it, and wait */
|
||||
if (val & XHCI_HC_BIOS_OWNED) {
|
||||
writel(val | XHCI_HC_OS_OWNED, base + ext_cap_offset);
|
||||
|
|
|
@ -479,6 +479,7 @@ static int da8xx_probe(struct platform_device *pdev)
|
|||
|
||||
glue->phy = devm_phy_get(&pdev->dev, "usb-phy");
|
||||
if (IS_ERR(glue->phy)) {
|
||||
if (PTR_ERR(glue->phy) != -EPROBE_DEFER)
|
||||
dev_err(&pdev->dev, "failed to get phy\n");
|
||||
return PTR_ERR(glue->phy);
|
||||
}
|
||||
|
|
|
@ -2114,11 +2114,6 @@ musb_init_controller(struct device *dev, int nIrq, void __iomem *ctrl)
|
|||
musb->io.ep_offset = musb_flat_ep_offset;
|
||||
musb->io.ep_select = musb_flat_ep_select;
|
||||
}
|
||||
/* And override them with platform specific ops if specified. */
|
||||
if (musb->ops->ep_offset)
|
||||
musb->io.ep_offset = musb->ops->ep_offset;
|
||||
if (musb->ops->ep_select)
|
||||
musb->io.ep_select = musb->ops->ep_select;
|
||||
|
||||
/* At least tusb6010 has its own offsets */
|
||||
if (musb->ops->ep_offset)
|
||||
|
|
|
@ -56,8 +56,11 @@ static struct uwb_rc *uwb_rc_find_by_index(int index)
|
|||
struct uwb_rc *rc = NULL;
|
||||
|
||||
dev = class_find_device(&uwb_rc_class, NULL, &index, uwb_rc_index_match);
|
||||
if (dev)
|
||||
if (dev) {
|
||||
rc = dev_get_drvdata(dev);
|
||||
put_device(dev);
|
||||
}
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
@ -467,7 +470,9 @@ struct uwb_rc *__uwb_rc_try_get(struct uwb_rc *target_rc)
|
|||
if (dev) {
|
||||
rc = dev_get_drvdata(dev);
|
||||
__uwb_rc_get(rc);
|
||||
put_device(dev);
|
||||
}
|
||||
|
||||
return rc;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(__uwb_rc_try_get);
|
||||
|
@ -520,8 +525,11 @@ struct uwb_rc *uwb_rc_get_by_grandpa(const struct device *grandpa_dev)
|
|||
|
||||
dev = class_find_device(&uwb_rc_class, NULL, grandpa_dev,
|
||||
find_rc_grandpa);
|
||||
if (dev)
|
||||
if (dev) {
|
||||
rc = dev_get_drvdata(dev);
|
||||
put_device(dev);
|
||||
}
|
||||
|
||||
return rc;
|
||||
}
|
||||
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)
|
|||
struct uwb_rc *rc = NULL;
|
||||
|
||||
dev = class_find_device(&uwb_rc_class, NULL, addr, find_rc_dev);
|
||||
if (dev)
|
||||
if (dev) {
|
||||
rc = dev_get_drvdata(dev);
|
||||
put_device(dev);
|
||||
}
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
|
|
@ -97,6 +97,8 @@ static bool uwb_rc_class_device_exists(struct uwb_rc *target_rc)
|
|||
|
||||
dev = class_find_device(&uwb_rc_class, NULL, target_rc, find_rc);
|
||||
|
||||
put_device(dev);
|
||||
|
||||
return (dev != NULL);
|
||||
}
|
||||
|
||||
|
|
|
@ -253,6 +253,13 @@ static inline int phy_set_mode(struct phy *phy, enum phy_mode mode)
|
|||
return -ENOSYS;
|
||||
}
|
||||
|
||||
static inline int phy_reset(struct phy *phy)
|
||||
{
|
||||
if (!phy)
|
||||
return 0;
|
||||
return -ENOSYS;
|
||||
}
|
||||
|
||||
static inline int phy_get_bus_width(struct phy *phy)
|
||||
{
|
||||
return -ENOSYS;
|
||||
|
|
Loading…
Reference in New Issue