Commit b48cef32 authored by Linus Torvalds's avatar Linus Torvalds

Merge tag 'usb-5.0-rc4' 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 5.0-rc4.

  Nothing major at all, just the usual selection of USB gadget bugfixes,
  some new USB serial driver ids, some SPDX fixes, and some PHY driver
  fixes for reported issues.

  All of these have been in linux-next for a while with no reported
  issues"

* tag 'usb-5.0-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb:
  USB: serial: keyspan_usa: add proper SPDX lines for .h files
  USB: EHCI: ehci-mv: add MODULE_DEVICE_TABLE
  USB: leds: fix regression in usbport led trigger
  usb: chipidea: fix static checker warning for NULL pointer
  MAINTAINERS: email address update in MAINTAINERS entries
  USB: usbip: delete README file
  USB: serial: pl2303: add new PID to support PL2303TB
  usb: dwc2: gadget: Fix Remote Wakeup interrupt bit clearing
  phy: ath79-usb: Fix the main reset name to match the DT binding
  phy: ath79-usb: Fix the power on error path
  phy: fix build breakage: add PHY_MODE_SATA
  phy: ti: ensure priv is not null before dereferencing it
  USB: serial: ftdi_sio: fix GPIO not working in autosuspend
  usb: gadget: Potential NULL dereference on allocation error
  usb: dwc3: gadget: Fix the uninitialized link_state when udc starts
  usb: dwc3: gadget: Clear req->needs_extra_trb flag on cleanup
  usb: dwc3: gadget: synchronize_irq dwc irq in suspend
  USB: serial: simple: add Motorola Tetra TPG2200 device id
parents d73aba11 4f9b8389
...@@ -3978,6 +3978,7 @@ F: drivers/cpufreq/arm_big_little.c ...@@ -3978,6 +3978,7 @@ F: drivers/cpufreq/arm_big_little.c
CPU POWER MONITORING SUBSYSTEM CPU POWER MONITORING SUBSYSTEM
M: Thomas Renninger <trenn@suse.com> M: Thomas Renninger <trenn@suse.com>
M: Shuah Khan <shuah@kernel.org> M: Shuah Khan <shuah@kernel.org>
M: Shuah Khan <skhan@linuxfoundation.org>
L: linux-pm@vger.kernel.org L: linux-pm@vger.kernel.org
S: Maintained S: Maintained
F: tools/power/cpupower/ F: tools/power/cpupower/
...@@ -8258,6 +8259,7 @@ F: include/uapi/linux/sunrpc/ ...@@ -8258,6 +8259,7 @@ F: include/uapi/linux/sunrpc/
KERNEL SELFTEST FRAMEWORK KERNEL SELFTEST FRAMEWORK
M: Shuah Khan <shuah@kernel.org> M: Shuah Khan <shuah@kernel.org>
M: Shuah Khan <skhan@linuxfoundation.org>
L: linux-kselftest@vger.kernel.org L: linux-kselftest@vger.kernel.org
T: git git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest.git T: git git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest.git
Q: https://patchwork.kernel.org/project/linux-kselftest/list/ Q: https://patchwork.kernel.org/project/linux-kselftest/list/
...@@ -15841,6 +15843,7 @@ F: drivers/usb/common/usb-otg-fsm.c ...@@ -15841,6 +15843,7 @@ F: drivers/usb/common/usb-otg-fsm.c
USB OVER IP DRIVER USB OVER IP DRIVER
M: Valentina Manea <valentina.manea.m@gmail.com> M: Valentina Manea <valentina.manea.m@gmail.com>
M: Shuah Khan <shuah@kernel.org> M: Shuah Khan <shuah@kernel.org>
M: Shuah Khan <skhan@linuxfoundation.org>
L: linux-usb@vger.kernel.org L: linux-usb@vger.kernel.org
S: Maintained S: Maintained
F: Documentation/usb/usbip_protocol.txt F: Documentation/usb/usbip_protocol.txt
......
...@@ -31,7 +31,7 @@ static int ath79_usb_phy_power_on(struct phy *phy) ...@@ -31,7 +31,7 @@ static int ath79_usb_phy_power_on(struct phy *phy)
err = reset_control_deassert(priv->reset); err = reset_control_deassert(priv->reset);
if (err && priv->no_suspend_override) if (err && priv->no_suspend_override)
reset_control_assert(priv->no_suspend_override); reset_control_deassert(priv->no_suspend_override);
return err; return err;
} }
...@@ -69,7 +69,7 @@ static int ath79_usb_phy_probe(struct platform_device *pdev) ...@@ -69,7 +69,7 @@ static int ath79_usb_phy_probe(struct platform_device *pdev)
if (!priv) if (!priv)
return -ENOMEM; return -ENOMEM;
priv->reset = devm_reset_control_get(&pdev->dev, "usb-phy"); priv->reset = devm_reset_control_get(&pdev->dev, "phy");
if (IS_ERR(priv->reset)) if (IS_ERR(priv->reset))
return PTR_ERR(priv->reset); return PTR_ERR(priv->reset);
......
...@@ -204,11 +204,11 @@ static struct phy *phy_gmii_sel_of_xlate(struct device *dev, ...@@ -204,11 +204,11 @@ static struct phy *phy_gmii_sel_of_xlate(struct device *dev,
if (args->args_count < 1) if (args->args_count < 1)
return ERR_PTR(-EINVAL); return ERR_PTR(-EINVAL);
if (!priv || !priv->if_phys)
return ERR_PTR(-ENODEV);
if (priv->soc_data->features & BIT(PHY_GMII_SEL_RMII_IO_CLK_EN) && if (priv->soc_data->features & BIT(PHY_GMII_SEL_RMII_IO_CLK_EN) &&
args->args_count < 2) args->args_count < 2)
return ERR_PTR(-EINVAL); return ERR_PTR(-EINVAL);
if (!priv || !priv->if_phys)
return ERR_PTR(-ENODEV);
if (phy_id > priv->soc_data->num_ports) if (phy_id > priv->soc_data->num_ports)
return ERR_PTR(-EINVAL); return ERR_PTR(-EINVAL);
if (phy_id != priv->if_phys[phy_id - 1].id) if (phy_id != priv->if_phys[phy_id - 1].id)
......
...@@ -316,7 +316,8 @@ static int ci_hdrc_imx_probe(struct platform_device *pdev) ...@@ -316,7 +316,8 @@ static int ci_hdrc_imx_probe(struct platform_device *pdev)
if (IS_ERR(data->usbmisc_data)) if (IS_ERR(data->usbmisc_data))
return PTR_ERR(data->usbmisc_data); return PTR_ERR(data->usbmisc_data);
if (of_usb_get_phy_mode(dev->of_node) == USBPHY_INTERFACE_MODE_HSIC) { if ((of_usb_get_phy_mode(dev->of_node) == USBPHY_INTERFACE_MODE_HSIC)
&& data->usbmisc_data) {
pdata.flags |= CI_HDRC_IMX_IS_HSIC; pdata.flags |= CI_HDRC_IMX_IS_HSIC;
data->usbmisc_data->hsic = 1; data->usbmisc_data->hsic = 1;
data->pinctrl = devm_pinctrl_get(dev); data->pinctrl = devm_pinctrl_get(dev);
......
...@@ -119,11 +119,6 @@ static const struct attribute_group ports_group = { ...@@ -119,11 +119,6 @@ static const struct attribute_group ports_group = {
.attrs = ports_attrs, .attrs = ports_attrs,
}; };
static const struct attribute_group *ports_groups[] = {
&ports_group,
NULL
};
/*************************************** /***************************************
* Adding & removing ports * Adding & removing ports
***************************************/ ***************************************/
...@@ -307,6 +302,7 @@ static int usbport_trig_notify(struct notifier_block *nb, unsigned long action, ...@@ -307,6 +302,7 @@ static int usbport_trig_notify(struct notifier_block *nb, unsigned long action,
static int usbport_trig_activate(struct led_classdev *led_cdev) static int usbport_trig_activate(struct led_classdev *led_cdev)
{ {
struct usbport_trig_data *usbport_data; struct usbport_trig_data *usbport_data;
int err;
usbport_data = kzalloc(sizeof(*usbport_data), GFP_KERNEL); usbport_data = kzalloc(sizeof(*usbport_data), GFP_KERNEL);
if (!usbport_data) if (!usbport_data)
...@@ -315,6 +311,9 @@ static int usbport_trig_activate(struct led_classdev *led_cdev) ...@@ -315,6 +311,9 @@ static int usbport_trig_activate(struct led_classdev *led_cdev)
/* List of ports */ /* List of ports */
INIT_LIST_HEAD(&usbport_data->ports); INIT_LIST_HEAD(&usbport_data->ports);
err = sysfs_create_group(&led_cdev->dev->kobj, &ports_group);
if (err)
goto err_free;
usb_for_each_dev(usbport_data, usbport_trig_add_usb_dev_ports); usb_for_each_dev(usbport_data, usbport_trig_add_usb_dev_ports);
usbport_trig_update_count(usbport_data); usbport_trig_update_count(usbport_data);
...@@ -322,8 +321,11 @@ static int usbport_trig_activate(struct led_classdev *led_cdev) ...@@ -322,8 +321,11 @@ static int usbport_trig_activate(struct led_classdev *led_cdev)
usbport_data->nb.notifier_call = usbport_trig_notify; usbport_data->nb.notifier_call = usbport_trig_notify;
led_set_trigger_data(led_cdev, usbport_data); led_set_trigger_data(led_cdev, usbport_data);
usb_register_notify(&usbport_data->nb); usb_register_notify(&usbport_data->nb);
return 0; return 0;
err_free:
kfree(usbport_data);
return err;
} }
static void usbport_trig_deactivate(struct led_classdev *led_cdev) static void usbport_trig_deactivate(struct led_classdev *led_cdev)
...@@ -335,6 +337,8 @@ static void usbport_trig_deactivate(struct led_classdev *led_cdev) ...@@ -335,6 +337,8 @@ static void usbport_trig_deactivate(struct led_classdev *led_cdev)
usbport_trig_remove_port(usbport_data, port); usbport_trig_remove_port(usbport_data, port);
} }
sysfs_remove_group(&led_cdev->dev->kobj, &ports_group);
usb_unregister_notify(&usbport_data->nb); usb_unregister_notify(&usbport_data->nb);
kfree(usbport_data); kfree(usbport_data);
...@@ -344,7 +348,6 @@ static struct led_trigger usbport_led_trigger = { ...@@ -344,7 +348,6 @@ static struct led_trigger usbport_led_trigger = {
.name = "usbport", .name = "usbport",
.activate = usbport_trig_activate, .activate = usbport_trig_activate,
.deactivate = usbport_trig_deactivate, .deactivate = usbport_trig_deactivate,
.groups = ports_groups,
}; };
static int __init usbport_trig_init(void) static int __init usbport_trig_init(void)
......
...@@ -261,7 +261,7 @@ static void dwc2_gadget_wkup_alert_handler(struct dwc2_hsotg *hsotg) ...@@ -261,7 +261,7 @@ static void dwc2_gadget_wkup_alert_handler(struct dwc2_hsotg *hsotg)
if (gintsts2 & GINTSTS2_WKUP_ALERT_INT) { if (gintsts2 & GINTSTS2_WKUP_ALERT_INT) {
dev_dbg(hsotg->dev, "%s: Wkup_Alert_Int\n", __func__); dev_dbg(hsotg->dev, "%s: Wkup_Alert_Int\n", __func__);
dwc2_clear_bit(hsotg, GINTSTS2, GINTSTS2_WKUP_ALERT_INT); dwc2_set_bit(hsotg, GINTSTS2, GINTSTS2_WKUP_ALERT_INT);
dwc2_set_bit(hsotg, DCTL, DCTL_RMTWKUPSIG); dwc2_set_bit(hsotg, DCTL, DCTL_RMTWKUPSIG);
} }
} }
......
...@@ -177,6 +177,7 @@ static void dwc3_gadget_del_and_unmap_request(struct dwc3_ep *dep, ...@@ -177,6 +177,7 @@ static void dwc3_gadget_del_and_unmap_request(struct dwc3_ep *dep,
req->started = false; req->started = false;
list_del(&req->list); list_del(&req->list);
req->remaining = 0; req->remaining = 0;
req->needs_extra_trb = false;
if (req->request.status == -EINPROGRESS) if (req->request.status == -EINPROGRESS)
req->request.status = status; req->request.status = status;
...@@ -1984,6 +1985,7 @@ static int __dwc3_gadget_start(struct dwc3 *dwc) ...@@ -1984,6 +1985,7 @@ static int __dwc3_gadget_start(struct dwc3 *dwc)
/* begin to receive SETUP packets */ /* begin to receive SETUP packets */
dwc->ep0state = EP0_SETUP_PHASE; dwc->ep0state = EP0_SETUP_PHASE;
dwc->link_state = DWC3_LINK_STATE_SS_DIS;
dwc3_ep0_out_start(dwc); dwc3_ep0_out_start(dwc);
dwc3_gadget_enable_irq(dwc); dwc3_gadget_enable_irq(dwc);
...@@ -3379,6 +3381,8 @@ int dwc3_gadget_suspend(struct dwc3 *dwc) ...@@ -3379,6 +3381,8 @@ int dwc3_gadget_suspend(struct dwc3 *dwc)
dwc3_disconnect_gadget(dwc); dwc3_disconnect_gadget(dwc);
__dwc3_gadget_stop(dwc); __dwc3_gadget_stop(dwc);
synchronize_irq(dwc->irq_gadget);
return 0; return 0;
} }
......
...@@ -838,7 +838,7 @@ static struct usb_function *source_sink_alloc_func( ...@@ -838,7 +838,7 @@ static struct usb_function *source_sink_alloc_func(
ss = kzalloc(sizeof(*ss), GFP_KERNEL); ss = kzalloc(sizeof(*ss), GFP_KERNEL);
if (!ss) if (!ss)
return NULL; return ERR_PTR(-ENOMEM);
ss_opts = container_of(fi, struct f_ss_opts, func_inst); ss_opts = container_of(fi, struct f_ss_opts, func_inst);
......
...@@ -302,3 +302,4 @@ MODULE_AUTHOR("Chao Xie <chao.xie@marvell.com>"); ...@@ -302,3 +302,4 @@ MODULE_AUTHOR("Chao Xie <chao.xie@marvell.com>");
MODULE_AUTHOR("Neil Zhang <zhangwm@marvell.com>"); MODULE_AUTHOR("Neil Zhang <zhangwm@marvell.com>");
MODULE_ALIAS("mv-ehci"); MODULE_ALIAS("mv-ehci");
MODULE_LICENSE("GPL"); MODULE_LICENSE("GPL");
MODULE_DEVICE_TABLE(of, ehci_mv_dt_ids);
...@@ -1783,6 +1783,10 @@ static int ftdi_set_bitmode(struct usb_serial_port *port, u8 mode) ...@@ -1783,6 +1783,10 @@ static int ftdi_set_bitmode(struct usb_serial_port *port, u8 mode)
int result; int result;
u16 val; u16 val;
result = usb_autopm_get_interface(serial->interface);
if (result)
return result;
val = (mode << 8) | (priv->gpio_output << 4) | priv->gpio_value; val = (mode << 8) | (priv->gpio_output << 4) | priv->gpio_value;
result = usb_control_msg(serial->dev, result = usb_control_msg(serial->dev,
usb_sndctrlpipe(serial->dev, 0), usb_sndctrlpipe(serial->dev, 0),
...@@ -1795,6 +1799,8 @@ static int ftdi_set_bitmode(struct usb_serial_port *port, u8 mode) ...@@ -1795,6 +1799,8 @@ static int ftdi_set_bitmode(struct usb_serial_port *port, u8 mode)
val, result); val, result);
} }
usb_autopm_put_interface(serial->interface);
return result; return result;
} }
...@@ -1846,9 +1852,15 @@ static int ftdi_read_cbus_pins(struct usb_serial_port *port) ...@@ -1846,9 +1852,15 @@ static int ftdi_read_cbus_pins(struct usb_serial_port *port)
unsigned char *buf; unsigned char *buf;
int result; int result;
result = usb_autopm_get_interface(serial->interface);
if (result)
return result;
buf = kmalloc(1, GFP_KERNEL); buf = kmalloc(1, GFP_KERNEL);
if (!buf) if (!buf) {
usb_autopm_put_interface(serial->interface);
return -ENOMEM; return -ENOMEM;
}
result = usb_control_msg(serial->dev, result = usb_control_msg(serial->dev,
usb_rcvctrlpipe(serial->dev, 0), usb_rcvctrlpipe(serial->dev, 0),
...@@ -1863,6 +1875,7 @@ static int ftdi_read_cbus_pins(struct usb_serial_port *port) ...@@ -1863,6 +1875,7 @@ static int ftdi_read_cbus_pins(struct usb_serial_port *port)
} }
kfree(buf); kfree(buf);
usb_autopm_put_interface(serial->interface);
return result; return result;
} }
......
/* SPDX-License-Identifier: BSD-3-Clause */
/* /*
usa26msg.h usa26msg.h
......
/* SPDX-License-Identifier: BSD-3-Clause */
/* /*
usa28msg.h usa28msg.h
......
/* SPDX-License-Identifier: BSD-3-Clause */
/* /*
usa49msg.h usa49msg.h
......
/* SPDX-License-Identifier: BSD-3-Clause */
/* /*
usa67msg.h usa67msg.h
......
/* SPDX-License-Identifier: BSD-3-Clause */
/* /*
usa90msg.h usa90msg.h
......
...@@ -46,6 +46,7 @@ static const struct usb_device_id id_table[] = { ...@@ -46,6 +46,7 @@ static const struct usb_device_id id_table[] = {
{ USB_DEVICE(PL2303_VENDOR_ID, PL2303_PRODUCT_ID_HCR331) }, { USB_DEVICE(PL2303_VENDOR_ID, PL2303_PRODUCT_ID_HCR331) },
{ USB_DEVICE(PL2303_VENDOR_ID, PL2303_PRODUCT_ID_MOTOROLA) }, { USB_DEVICE(PL2303_VENDOR_ID, PL2303_PRODUCT_ID_MOTOROLA) },
{ USB_DEVICE(PL2303_VENDOR_ID, PL2303_PRODUCT_ID_ZTEK) }, { USB_DEVICE(PL2303_VENDOR_ID, PL2303_PRODUCT_ID_ZTEK) },
{ USB_DEVICE(PL2303_VENDOR_ID, PL2303_PRODUCT_ID_TB) },
{ USB_DEVICE(IODATA_VENDOR_ID, IODATA_PRODUCT_ID) }, { USB_DEVICE(IODATA_VENDOR_ID, IODATA_PRODUCT_ID) },
{ USB_DEVICE(IODATA_VENDOR_ID, IODATA_PRODUCT_ID_RSAQ5) }, { USB_DEVICE(IODATA_VENDOR_ID, IODATA_PRODUCT_ID_RSAQ5) },
{ USB_DEVICE(ATEN_VENDOR_ID, ATEN_PRODUCT_ID), { USB_DEVICE(ATEN_VENDOR_ID, ATEN_PRODUCT_ID),
......
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
#define PL2303_VENDOR_ID 0x067b #define PL2303_VENDOR_ID 0x067b
#define PL2303_PRODUCT_ID 0x2303 #define PL2303_PRODUCT_ID 0x2303
#define PL2303_PRODUCT_ID_TB 0x2304
#define PL2303_PRODUCT_ID_RSAQ2 0x04bb #define PL2303_PRODUCT_ID_RSAQ2 0x04bb
#define PL2303_PRODUCT_ID_DCU11 0x1234 #define PL2303_PRODUCT_ID_DCU11 0x1234
#define PL2303_PRODUCT_ID_PHAROS 0xaaa0 #define PL2303_PRODUCT_ID_PHAROS 0xaaa0
...@@ -20,6 +21,7 @@ ...@@ -20,6 +21,7 @@
#define PL2303_PRODUCT_ID_MOTOROLA 0x0307 #define PL2303_PRODUCT_ID_MOTOROLA 0x0307
#define PL2303_PRODUCT_ID_ZTEK 0xe1f1 #define PL2303_PRODUCT_ID_ZTEK 0xe1f1
#define ATEN_VENDOR_ID 0x0557 #define ATEN_VENDOR_ID 0x0557
#define ATEN_VENDOR_ID2 0x0547 #define ATEN_VENDOR_ID2 0x0547
#define ATEN_PRODUCT_ID 0x2008 #define ATEN_PRODUCT_ID 0x2008
......
...@@ -85,7 +85,8 @@ DEVICE(moto_modem, MOTO_IDS); ...@@ -85,7 +85,8 @@ DEVICE(moto_modem, MOTO_IDS);
/* Motorola Tetra driver */ /* Motorola Tetra driver */
#define MOTOROLA_TETRA_IDS() \ #define MOTOROLA_TETRA_IDS() \
{ USB_DEVICE(0x0cad, 0x9011) }, /* Motorola Solutions TETRA PEI */ \ { USB_DEVICE(0x0cad, 0x9011) }, /* Motorola Solutions TETRA PEI */ \
{ USB_DEVICE(0x0cad, 0x9012) } /* MTP6550 */ { USB_DEVICE(0x0cad, 0x9012) }, /* MTP6550 */ \
{ USB_DEVICE(0x0cad, 0x9016) } /* TPG2200 */
DEVICE(motorola_tetra, MOTOROLA_TETRA_IDS); DEVICE(motorola_tetra, MOTOROLA_TETRA_IDS);
/* Novatel Wireless GPS driver */ /* Novatel Wireless GPS driver */
......
TODO:
- more discussion about the protocol
- testing
- review of the userspace interface
- document the protocol
Please send patches for this code to Greg Kroah-Hartman <greg@kroah.com>
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment