Skip to content

Commit

Permalink
Merge tag 'usb-5.0-rc4' of git://git.kernel.org/pub/scm/linux/kernel/…
Browse files Browse the repository at this point in the history
…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
  • Loading branch information
torvalds committed Jan 25, 2019
2 parents d73aba1 + 4f9b838 commit b48cef3
Show file tree
Hide file tree
Showing 19 changed files with 50 additions and 23 deletions.
3 changes: 3 additions & 0 deletions MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -3978,6 +3978,7 @@ F: drivers/cpufreq/arm_big_little.c
CPU POWER MONITORING SUBSYSTEM
M: Thomas Renninger <[email protected]>
M: Shuah Khan <[email protected]>
M: Shuah Khan <[email protected]>
L: [email protected]
S: Maintained
F: tools/power/cpupower/
Expand Down Expand Up @@ -8258,6 +8259,7 @@ F: include/uapi/linux/sunrpc/

KERNEL SELFTEST FRAMEWORK
M: Shuah Khan <[email protected]>
M: Shuah Khan <[email protected]>
L: [email protected]
T: git git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest.git
Q: https://patchwork.kernel.org/project/linux-kselftest/list/
Expand Down Expand Up @@ -15841,6 +15843,7 @@ F: drivers/usb/common/usb-otg-fsm.c
USB OVER IP DRIVER
M: Valentina Manea <[email protected]>
M: Shuah Khan <[email protected]>
M: Shuah Khan <[email protected]>
L: [email protected]
S: Maintained
F: Documentation/usb/usbip_protocol.txt
Expand Down
4 changes: 2 additions & 2 deletions drivers/phy/qualcomm/phy-ath79-usb.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ static int ath79_usb_phy_power_on(struct phy *phy)

err = reset_control_deassert(priv->reset);
if (err && priv->no_suspend_override)
reset_control_assert(priv->no_suspend_override);
reset_control_deassert(priv->no_suspend_override);

return err;
}
Expand Down Expand Up @@ -69,7 +69,7 @@ static int ath79_usb_phy_probe(struct platform_device *pdev)
if (!priv)
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))
return PTR_ERR(priv->reset);

Expand Down
4 changes: 2 additions & 2 deletions drivers/phy/ti/phy-gmii-sel.c
Original file line number Diff line number Diff line change
Expand Up @@ -204,11 +204,11 @@ static struct phy *phy_gmii_sel_of_xlate(struct device *dev,

if (args->args_count < 1)
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) &&
args->args_count < 2)
return ERR_PTR(-EINVAL);
if (!priv || !priv->if_phys)
return ERR_PTR(-ENODEV);
if (phy_id > priv->soc_data->num_ports)
return ERR_PTR(-EINVAL);
if (phy_id != priv->if_phys[phy_id - 1].id)
Expand Down
3 changes: 2 additions & 1 deletion drivers/usb/chipidea/ci_hdrc_imx.c
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,8 @@ static int ci_hdrc_imx_probe(struct platform_device *pdev)
if (IS_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;
data->usbmisc_data->hsic = 1;
data->pinctrl = devm_pinctrl_get(dev);
Expand Down
17 changes: 10 additions & 7 deletions drivers/usb/core/ledtrig-usbport.c
Original file line number Diff line number Diff line change
Expand Up @@ -119,11 +119,6 @@ static const struct attribute_group ports_group = {
.attrs = ports_attrs,
};

static const struct attribute_group *ports_groups[] = {
&ports_group,
NULL
};

/***************************************
* Adding & removing ports
***************************************/
Expand Down Expand Up @@ -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)
{
struct usbport_trig_data *usbport_data;
int err;

usbport_data = kzalloc(sizeof(*usbport_data), GFP_KERNEL);
if (!usbport_data)
Expand All @@ -315,15 +311,21 @@ static int usbport_trig_activate(struct led_classdev *led_cdev)

/* List of 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);
usbport_trig_update_count(usbport_data);

/* Notifications */
usbport_data->nb.notifier_call = usbport_trig_notify;
led_set_trigger_data(led_cdev, usbport_data);
usb_register_notify(&usbport_data->nb);

return 0;

err_free:
kfree(usbport_data);
return err;
}

static void usbport_trig_deactivate(struct led_classdev *led_cdev)
Expand All @@ -335,6 +337,8 @@ static void usbport_trig_deactivate(struct led_classdev *led_cdev)
usbport_trig_remove_port(usbport_data, port);
}

sysfs_remove_group(&led_cdev->dev->kobj, &ports_group);

usb_unregister_notify(&usbport_data->nb);

kfree(usbport_data);
Expand All @@ -344,7 +348,6 @@ static struct led_trigger usbport_led_trigger = {
.name = "usbport",
.activate = usbport_trig_activate,
.deactivate = usbport_trig_deactivate,
.groups = ports_groups,
};

static int __init usbport_trig_init(void)
Expand Down
2 changes: 1 addition & 1 deletion drivers/usb/dwc2/gadget.c
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ static void dwc2_gadget_wkup_alert_handler(struct dwc2_hsotg *hsotg)

if (gintsts2 & GINTSTS2_WKUP_ALERT_INT) {
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);
}
}
Expand Down
4 changes: 4 additions & 0 deletions drivers/usb/dwc3/gadget.c
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,7 @@ static void dwc3_gadget_del_and_unmap_request(struct dwc3_ep *dep,
req->started = false;
list_del(&req->list);
req->remaining = 0;
req->needs_extra_trb = false;

if (req->request.status == -EINPROGRESS)
req->request.status = status;
Expand Down Expand Up @@ -1984,6 +1985,7 @@ static int __dwc3_gadget_start(struct dwc3 *dwc)

/* begin to receive SETUP packets */
dwc->ep0state = EP0_SETUP_PHASE;
dwc->link_state = DWC3_LINK_STATE_SS_DIS;
dwc3_ep0_out_start(dwc);

dwc3_gadget_enable_irq(dwc);
Expand Down Expand Up @@ -3379,6 +3381,8 @@ int dwc3_gadget_suspend(struct dwc3 *dwc)
dwc3_disconnect_gadget(dwc);
__dwc3_gadget_stop(dwc);

synchronize_irq(dwc->irq_gadget);

return 0;
}

Expand Down
2 changes: 1 addition & 1 deletion drivers/usb/gadget/function/f_sourcesink.c
Original file line number Diff line number Diff line change
Expand Up @@ -838,7 +838,7 @@ static struct usb_function *source_sink_alloc_func(

ss = kzalloc(sizeof(*ss), GFP_KERNEL);
if (!ss)
return NULL;
return ERR_PTR(-ENOMEM);

ss_opts = container_of(fi, struct f_ss_opts, func_inst);

Expand Down
1 change: 1 addition & 0 deletions drivers/usb/host/ehci-mv.c
Original file line number Diff line number Diff line change
Expand Up @@ -302,3 +302,4 @@ MODULE_AUTHOR("Chao Xie <[email protected]>");
MODULE_AUTHOR("Neil Zhang <[email protected]>");
MODULE_ALIAS("mv-ehci");
MODULE_LICENSE("GPL");
MODULE_DEVICE_TABLE(of, ehci_mv_dt_ids);
15 changes: 14 additions & 1 deletion drivers/usb/serial/ftdi_sio.c
Original file line number Diff line number Diff line change
Expand Up @@ -1783,6 +1783,10 @@ static int ftdi_set_bitmode(struct usb_serial_port *port, u8 mode)
int result;
u16 val;

result = usb_autopm_get_interface(serial->interface);
if (result)
return result;

val = (mode << 8) | (priv->gpio_output << 4) | priv->gpio_value;
result = usb_control_msg(serial->dev,
usb_sndctrlpipe(serial->dev, 0),
Expand All @@ -1795,6 +1799,8 @@ static int ftdi_set_bitmode(struct usb_serial_port *port, u8 mode)
val, result);
}

usb_autopm_put_interface(serial->interface);

return result;
}

Expand Down Expand Up @@ -1846,9 +1852,15 @@ static int ftdi_read_cbus_pins(struct usb_serial_port *port)
unsigned char *buf;
int result;

result = usb_autopm_get_interface(serial->interface);
if (result)
return result;

buf = kmalloc(1, GFP_KERNEL);
if (!buf)
if (!buf) {
usb_autopm_put_interface(serial->interface);
return -ENOMEM;
}

result = usb_control_msg(serial->dev,
usb_rcvctrlpipe(serial->dev, 0),
Expand All @@ -1863,6 +1875,7 @@ static int ftdi_read_cbus_pins(struct usb_serial_port *port)
}

kfree(buf);
usb_autopm_put_interface(serial->interface);

return result;
}
Expand Down
1 change: 1 addition & 0 deletions drivers/usb/serial/keyspan_usa26msg.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* SPDX-License-Identifier: BSD-3-Clause */
/*
usa26msg.h
Expand Down
1 change: 1 addition & 0 deletions drivers/usb/serial/keyspan_usa28msg.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* SPDX-License-Identifier: BSD-3-Clause */
/*
usa28msg.h
Expand Down
1 change: 1 addition & 0 deletions drivers/usb/serial/keyspan_usa49msg.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* SPDX-License-Identifier: BSD-3-Clause */
/*
usa49msg.h
Expand Down
1 change: 1 addition & 0 deletions drivers/usb/serial/keyspan_usa67msg.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* SPDX-License-Identifier: BSD-3-Clause */
/*
usa67msg.h
Expand Down
1 change: 1 addition & 0 deletions drivers/usb/serial/keyspan_usa90msg.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* SPDX-License-Identifier: BSD-3-Clause */
/*
usa90msg.h
Expand Down
1 change: 1 addition & 0 deletions drivers/usb/serial/pl2303.c
Original file line number Diff line number Diff line change
Expand Up @@ -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_MOTOROLA) },
{ 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_RSAQ5) },
{ USB_DEVICE(ATEN_VENDOR_ID, ATEN_PRODUCT_ID),
Expand Down
2 changes: 2 additions & 0 deletions drivers/usb/serial/pl2303.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

#define PL2303_VENDOR_ID 0x067b
#define PL2303_PRODUCT_ID 0x2303
#define PL2303_PRODUCT_ID_TB 0x2304
#define PL2303_PRODUCT_ID_RSAQ2 0x04bb
#define PL2303_PRODUCT_ID_DCU11 0x1234
#define PL2303_PRODUCT_ID_PHAROS 0xaaa0
Expand All @@ -20,6 +21,7 @@
#define PL2303_PRODUCT_ID_MOTOROLA 0x0307
#define PL2303_PRODUCT_ID_ZTEK 0xe1f1


#define ATEN_VENDOR_ID 0x0557
#define ATEN_VENDOR_ID2 0x0547
#define ATEN_PRODUCT_ID 0x2008
Expand Down
3 changes: 2 additions & 1 deletion drivers/usb/serial/usb-serial-simple.c
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,8 @@ DEVICE(moto_modem, MOTO_IDS);
/* Motorola Tetra driver */
#define MOTOROLA_TETRA_IDS() \
{ 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);

/* Novatel Wireless GPS driver */
Expand Down
7 changes: 0 additions & 7 deletions drivers/usb/usbip/README

This file was deleted.

0 comments on commit b48cef3

Please sign in to comment.