mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-13 00:00:00 -04:00
reverting enum-conversion, Handle CPU state and all USB patches
6e3e74dd04kbuild: Move -Wenum-enum-conversion to W=2b046ab1642kbuild: Move -Wenum-{compare-conditional,enum-conversion} into W=1 reverting Handle CPU state95e4f62df2hrtimers: Handle CPU state correctly on hotplug reverting all USB patches7a6d6b68dbHID: usbhid: Eliminate recurrent out-of-bounds bug in usbhid_parse()b2ce37d86dusb: Flush altsetting 0 endpoints before reinitializating them after reset.095cc0b588usb: renesas_usbhs: Reorder clock handling and power management in probe768668e159usb: usbtmc: Fix timeout value in get_stb90da5d9876usb: storage: Ignore UAS driver for SanDisk 3.2 Gen2 storage device5db9d2c508usb: quirks: Add NO_LPM quirk for SanDisk Extreme 55AE4f72a8dc6fusb: usbtmc: Fix erroneous generic_read ioctl return85934459bcusb: usbtmc: Fix erroneous wait_srq ioctl return8d9a5eaeedusb: usbtmc: Fix erroneous get_stb ioctl error returns388842c35dUSB: usbtmc: use interruptible sleep in usbtmc_read9dda1e2a66usb: typec: ucsi: displayport: Fix NULL pointer access64d5ed26bfusb: typec: tcpm: delay SNK_TRY_WAIT_DEBOUNCE to SRC_TRYWAIT transition30a7a79360usb: uhci-platform: Make the clock really optionald086cca921usb: chipidea: ci_hdrc_imx: implement usb_phy_init() error handlingb8feb22ee5usb: chipidea: ci_hdrc_imx: use dev_err_probe()33f2c60835usb: chipidea: imx: refine the error handling for hsic8604f11114usb: chipidea: imx: change hsic power regulator as optionala777ccfb9busb: gadget: aspeed: Add NULL pointer check in ast_vhub_init_dev()f34551a487usb: host: max3421-hcd: Add missing spi_device_id table79af6c0fa8USB: VLI disk crashes if LPM is used919025be9ausb: quirks: Add delay init quirk for SanDisk 3.2Gen1 Flash Driveab0ffd23f3usb: quirks: add DELAY_INIT quirk for Silicon Motion Flash Drive015c39f38eusb: dwc3: gadget: check that event count does not exceed event buffer length7109b8db9cUSB: OHCI: Add quirk for LS7A OHCI controller (rev 0x02)eebfb64c62usb: cdns3: Fix deadlock when using NCM gadgetec0f123f4dUSB: serial: simple: add OWON HDS200 series oscilloscope supportd75e4f33e7USB: serial: option: add Sierra Wireless EM9291244455a70cUSB: serial: ftdi_sio: add support for Abacus Electrics Optical Probe5d53a1329cUSB: storage: quirk for ADATA Portable HDD CH94bd4c12b86cusb: dwc3: support continuous runtime PM with dual role2175d3c126USB: serial: option: match on interface class for Telit FN990Bf26a86f829USB: serial: option: fix Telit Cinterion FE990A name57f6ae8b88USB: serial: option: add Telit Cinterion FE990B compositionsabb9f684f8USB: serial: ftdi_sio: add support for Altera USB Blaster 3eb00272aa5Revert "usb: xhci: Add timeout argument in address_device USB HCD callback"4364e0f8cfRevert "usb: xhci: Fix NULL pointer dereference on certain command aborts"e722515dabxhci: pci: Fix indentation in the PCI device ID definitions19b3918840usb: gadget: Check bmAttributes only if configuration is valid9af1d5c4d5usb: gadget: Fix setting self-powered state on suspend7367e87b6eusb: gadget: Set self-powered based on MaxPower and bmAttributes094b49dec3usb: typec: tcpci_rt1711h: Unmask alert interrupts to fix functionalityb654e4c757usb: typec: ucsi: increase timeout for PPM reset operationsdcd592ab9dusb: atm: cxacru: fix a flaw in existing endpoint checks4cd847a7b6usb: renesas_usbhs: Flush the notify_hotplug_worka5c8be5903usb: quirks: Add DELAY_INIT and NO_LPM for Prolific Mass Storage Card Reader97f8c81570usb: renesas_usbhs: Use devm_usb_get_phy()d1968edadausb: renesas_usbhs: Call clk_put()727dee0857USB: gadget: f_midi: f_midi_complete to call queue_work89019ab7a6usb/gadget: f_midi: Replace tasklet with workec42b4a0ebusb/gadget: f_midi: convert tasklets to use new tasklet_setup() API19aad69c2busb: dwc3: Fix timeout issue during controller enter/exit from halt state935e842f98usb: dwc3: Increase DWC3 controller halt timeout039cc7d94dUSB: serial: option: drop MeiG Smart defines6621ddcddaUSB: serial: option: fix Telit Cinterion FN990A nameb95bd1248bUSB: serial: option: add Telit Cinterion FN990B compositions2b03876842USB: serial: option: add MeiG Smart SLM8287cfb70e97fusb: cdc-acm: Fix handling of oversized fragmentsa4e1ae5c05usb: cdc-acm: Check control transfer buffer size before access42b3050171USB: cdc-acm: Fill in Renesas R-Car D3 USB Download mode quirk49f077106fUSB: hub: Ignore non-compliant devices with too many configs or interfaces3a983390d1usb: gadget: f_midi: fix MIDI Streaming descriptor lengthsa0a18484ceUSB: Add USB_QUIRK_NO_LPM quirk for sony xperia xz1 smartphonea120aad69eUSB: quirks: add USB_QUIRK_NO_LPM quirk for Teclast dist2b8a7cfefdUSB: pci-quirks: Fix HCCPARAMS register error for LS7A EHCI1c231617acusb: dwc2: gadget: remove of_node reference upon udc_stop3d921d29d4usb: gadget: udc: renesas_usb3: Fix compiler warning27a15815afusb: roles: set switch registered flag early oncc4e1d76a1usb: gadget: f_tcm: Don't prepare BOT write request twice54e7215ed1usb: gadget: f_tcm: ep_autoconfig with fullspeed endpoint6e10b792fbusb: gadget: f_tcm: Decrement command ref count on cleanup5e051636b4usb: gadget: f_tcm: Translate error to sensefd8bfaeba4usb: xhci: Fix NULL pointer dereference on certain command aborts7032df572eusb: xhci: Add timeout argument in address_device USB HCD callback7cb72dc08eusb: gadget: f_tcm: Don't free command immediately3b269db6feusb: typec: tcpm: set SRC_SEND_CAPABILITIES timeout to PD_T_SENDER_RESPONSE4b7032d01ePartial revert of xhci: use pm_ptr() instead #ifdef for CONFIG_PM conditionals1f91ebde6exhci: use pm_ptr() instead of #ifdef for CONFIG_PM conditionals76e7577bb8Revert "usb: gadget: u_serial: Disable ep before setting port to null to fix the crash caused by port being null"fa4c747246USB: serial: quatech2: fix null-ptr-deref in qt2_process_read_urb()bfe60030fcusb: gadget: f_fs: Remove WARN_ON in functionfs_bindb24a6afa56usb: fix reference leak in usb_new_device()7369c8ffc2USB: core: Disable LPM only for non-suspended ports01af472c23USB: usblp: return error when setting unsupported protocolf5f33fb57ausb: gadget: u_serial: Disable ep before setting port to null to fix the crash caused by port being nullfaa0eeaf36USB: serial: cp210x: add Phoenix Contact UPS Devicea5754f7331usb-storage: Add max sectors quirk for Nokia 208dffc4f7d2eUSB: serial: option: add Neoway N723-EA supportf8d57de3c8USB: serial: option: add MeiG Smart SRM815 Change-Id: Ie41f23710250fa57ccaee49aeeb96b0c3535b680 Signed-off-by: kamasali Satyanarayan <quic_kamasali@quicinc.com>
This commit is contained in:
parent
387dbb9a99
commit
2c3bda25f8
47 changed files with 200 additions and 513 deletions
|
|
@ -197,8 +197,7 @@ static void mousevsc_on_receive_device_info(struct mousevsc_dev *input_device,
|
|||
if (!input_device->hid_desc)
|
||||
goto cleanup;
|
||||
|
||||
input_device->report_desc_size = le16_to_cpu(
|
||||
desc->rpt_desc.wDescriptorLength);
|
||||
input_device->report_desc_size = desc->desc[0].wDescriptorLength;
|
||||
if (input_device->report_desc_size == 0) {
|
||||
input_device->dev_info_status = -EINVAL;
|
||||
goto cleanup;
|
||||
|
|
@ -214,7 +213,7 @@ static void mousevsc_on_receive_device_info(struct mousevsc_dev *input_device,
|
|||
|
||||
memcpy(input_device->report_desc,
|
||||
((unsigned char *)desc) + desc->bLength,
|
||||
le16_to_cpu(desc->rpt_desc.wDescriptorLength));
|
||||
desc->desc[0].wDescriptorLength);
|
||||
|
||||
/* Send the ack */
|
||||
memset(&ack, 0, sizeof(struct mousevsc_prt_msg));
|
||||
|
|
|
|||
|
|
@ -984,11 +984,12 @@ static int usbhid_parse(struct hid_device *hid)
|
|||
struct usb_host_interface *interface = intf->cur_altsetting;
|
||||
struct usb_device *dev = interface_to_usbdev (intf);
|
||||
struct hid_descriptor *hdesc;
|
||||
struct hid_class_descriptor *hcdesc;
|
||||
u32 quirks = 0;
|
||||
unsigned int rsize = 0;
|
||||
char *rdesc;
|
||||
int ret;
|
||||
int ret, n;
|
||||
int num_descriptors;
|
||||
size_t offset = offsetof(struct hid_descriptor, desc);
|
||||
|
||||
quirks = hid_lookup_quirk(hid);
|
||||
|
||||
|
|
@ -1010,19 +1011,20 @@ static int usbhid_parse(struct hid_device *hid)
|
|||
return -ENODEV;
|
||||
}
|
||||
|
||||
if (!hdesc->bNumDescriptors ||
|
||||
hdesc->bLength != sizeof(*hdesc) +
|
||||
(hdesc->bNumDescriptors - 1) * sizeof(*hcdesc)) {
|
||||
dbg_hid("hid descriptor invalid, bLen=%hhu bNum=%hhu\n",
|
||||
hdesc->bLength, hdesc->bNumDescriptors);
|
||||
if (hdesc->bLength < sizeof(struct hid_descriptor)) {
|
||||
dbg_hid("hid descriptor is too short\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
hid->version = le16_to_cpu(hdesc->bcdHID);
|
||||
hid->country = hdesc->bCountryCode;
|
||||
|
||||
if (hdesc->rpt_desc.bDescriptorType == HID_DT_REPORT)
|
||||
rsize = le16_to_cpu(hdesc->rpt_desc.wDescriptorLength);
|
||||
num_descriptors = min_t(int, hdesc->bNumDescriptors,
|
||||
(hdesc->bLength - offset) / sizeof(struct hid_class_descriptor));
|
||||
|
||||
for (n = 0; n < num_descriptors; n++)
|
||||
if (hdesc->desc[n].bDescriptorType == HID_DT_REPORT)
|
||||
rsize = le16_to_cpu(hdesc->desc[n].wDescriptorLength);
|
||||
|
||||
if (!rsize || rsize > HID_MAX_DESCRIPTOR_SIZE) {
|
||||
dbg_hid("weird size of report descriptor (%u)\n", rsize);
|
||||
|
|
@ -1050,11 +1052,6 @@ static int usbhid_parse(struct hid_device *hid)
|
|||
goto err;
|
||||
}
|
||||
|
||||
if (hdesc->bNumDescriptors > 1)
|
||||
hid_warn(intf,
|
||||
"%u unsupported optional hid class descriptors\n",
|
||||
(int)(hdesc->bNumDescriptors - 1));
|
||||
|
||||
hid->quirks |= quirks;
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -1135,10 +1135,7 @@ static int cxacru_bind(struct usbatm_data *usbatm_instance,
|
|||
struct cxacru_data *instance;
|
||||
struct usb_device *usb_dev = interface_to_usbdev(intf);
|
||||
struct usb_host_endpoint *cmd_ep = usb_dev->ep_in[CXACRU_EP_CMD];
|
||||
static const u8 ep_addrs[] = {
|
||||
CXACRU_EP_CMD + USB_DIR_IN,
|
||||
CXACRU_EP_CMD + USB_DIR_OUT,
|
||||
0};
|
||||
struct usb_endpoint_descriptor *in, *out;
|
||||
int ret;
|
||||
|
||||
/* instance init */
|
||||
|
|
@ -1186,11 +1183,13 @@ static int cxacru_bind(struct usbatm_data *usbatm_instance,
|
|||
}
|
||||
|
||||
if (usb_endpoint_xfer_int(&cmd_ep->desc))
|
||||
ret = usb_check_int_endpoints(intf, ep_addrs);
|
||||
ret = usb_find_common_endpoints(intf->cur_altsetting,
|
||||
NULL, NULL, &in, &out);
|
||||
else
|
||||
ret = usb_check_bulk_endpoints(intf, ep_addrs);
|
||||
ret = usb_find_common_endpoints(intf->cur_altsetting,
|
||||
&in, &out, NULL, NULL);
|
||||
|
||||
if (!ret) {
|
||||
if (ret) {
|
||||
usb_err(usbatm_instance, "cxacru_bind: interface has incorrect endpoints\n");
|
||||
ret = -ENODEV;
|
||||
goto fail;
|
||||
|
|
|
|||
|
|
@ -1920,7 +1920,6 @@ static int cdns3_gadget_ep_disable(struct usb_ep *ep)
|
|||
"%s is already disabled\n", priv_ep->name))
|
||||
return 0;
|
||||
|
||||
local_bh_disable();
|
||||
spin_lock_irqsave(&priv_dev->lock, flags);
|
||||
|
||||
trace_cdns3_gadget_ep_disable(priv_ep);
|
||||
|
|
@ -1977,7 +1976,6 @@ static int cdns3_gadget_ep_disable(struct usb_ep *ep)
|
|||
priv_ep->flags &= ~EP_ENABLED;
|
||||
|
||||
spin_unlock_irqrestore(&priv_dev->lock, flags);
|
||||
local_bh_enable();
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -340,11 +340,11 @@ static int ci_hdrc_imx_probe(struct platform_device *pdev)
|
|||
pdata.flags |= CI_HDRC_IMX_IS_HSIC;
|
||||
data->usbmisc_data->hsic = 1;
|
||||
data->pinctrl = devm_pinctrl_get(dev);
|
||||
if (PTR_ERR(data->pinctrl) == -ENODEV)
|
||||
data->pinctrl = NULL;
|
||||
else if (IS_ERR(data->pinctrl))
|
||||
return dev_err_probe(dev, PTR_ERR(data->pinctrl),
|
||||
"pinctrl get failed\n");
|
||||
if (IS_ERR(data->pinctrl)) {
|
||||
dev_err(dev, "pinctrl get failed, err=%ld\n",
|
||||
PTR_ERR(data->pinctrl));
|
||||
return PTR_ERR(data->pinctrl);
|
||||
}
|
||||
|
||||
pinctrl_hsic_idle = pinctrl_lookup_state(data->pinctrl, "idle");
|
||||
if (IS_ERR(pinctrl_hsic_idle)) {
|
||||
|
|
@ -369,14 +369,17 @@ static int ci_hdrc_imx_probe(struct platform_device *pdev)
|
|||
return PTR_ERR(data->pinctrl_hsic_active);
|
||||
}
|
||||
|
||||
data->hsic_pad_regulator =
|
||||
devm_regulator_get_optional(dev, "hsic");
|
||||
if (PTR_ERR(data->hsic_pad_regulator) == -ENODEV) {
|
||||
data->hsic_pad_regulator = devm_regulator_get(dev, "hsic");
|
||||
if (PTR_ERR(data->hsic_pad_regulator) == -EPROBE_DEFER) {
|
||||
return -EPROBE_DEFER;
|
||||
} else if (PTR_ERR(data->hsic_pad_regulator) == -ENODEV) {
|
||||
/* no pad regualator is needed */
|
||||
data->hsic_pad_regulator = NULL;
|
||||
} else if (IS_ERR(data->hsic_pad_regulator))
|
||||
return dev_err_probe(dev, PTR_ERR(data->hsic_pad_regulator),
|
||||
"Get HSIC pad regulator error\n");
|
||||
} else if (IS_ERR(data->hsic_pad_regulator)) {
|
||||
dev_err(dev, "Get HSIC pad regulator error: %ld\n",
|
||||
PTR_ERR(data->hsic_pad_regulator));
|
||||
return PTR_ERR(data->hsic_pad_regulator);
|
||||
}
|
||||
|
||||
if (data->hsic_pad_regulator) {
|
||||
ret = regulator_enable(data->hsic_pad_regulator);
|
||||
|
|
@ -417,11 +420,7 @@ static int ci_hdrc_imx_probe(struct platform_device *pdev)
|
|||
of_usb_get_phy_mode(np) == USBPHY_INTERFACE_MODE_ULPI) {
|
||||
pdata.flags |= CI_HDRC_OVERRIDE_PHY_CONTROL;
|
||||
data->override_phy_control = true;
|
||||
ret = usb_phy_init(pdata.usb_phy);
|
||||
if (ret) {
|
||||
dev_err(dev, "Failed to init phy\n");
|
||||
goto err_clk;
|
||||
}
|
||||
usb_phy_init(pdata.usb_phy);
|
||||
}
|
||||
|
||||
if (pdata.flags & CI_HDRC_SUPPORTS_RUNTIME_PM)
|
||||
|
|
@ -430,7 +429,7 @@ static int ci_hdrc_imx_probe(struct platform_device *pdev)
|
|||
ret = imx_usbmisc_init(data->usbmisc_data);
|
||||
if (ret) {
|
||||
dev_err(dev, "usbmisc init failed, ret=%d\n", ret);
|
||||
goto phy_shutdown;
|
||||
goto err_clk;
|
||||
}
|
||||
|
||||
data->ci_pdev = ci_hdrc_add_device(dev,
|
||||
|
|
@ -438,8 +437,10 @@ static int ci_hdrc_imx_probe(struct platform_device *pdev)
|
|||
&pdata);
|
||||
if (IS_ERR(data->ci_pdev)) {
|
||||
ret = PTR_ERR(data->ci_pdev);
|
||||
dev_err_probe(dev, ret, "ci_hdrc_add_device failed\n");
|
||||
goto phy_shutdown;
|
||||
if (ret != -EPROBE_DEFER)
|
||||
dev_err(dev, "ci_hdrc_add_device failed, err=%d\n",
|
||||
ret);
|
||||
goto err_clk;
|
||||
}
|
||||
|
||||
ret = imx_usbmisc_init_post(data->usbmisc_data);
|
||||
|
|
@ -459,9 +460,6 @@ static int ci_hdrc_imx_probe(struct platform_device *pdev)
|
|||
|
||||
disable_device:
|
||||
ci_hdrc_remove_device(data->ci_pdev);
|
||||
phy_shutdown:
|
||||
if (data->override_phy_control)
|
||||
usb_phy_shutdown(data->phy);
|
||||
err_clk:
|
||||
imx_disable_unprepare_clks(dev);
|
||||
disable_hsic_regulator:
|
||||
|
|
|
|||
|
|
@ -359,7 +359,7 @@ static void acm_process_notification(struct acm *acm, unsigned char *buf)
|
|||
static void acm_ctrl_irq(struct urb *urb)
|
||||
{
|
||||
struct acm *acm = urb->context;
|
||||
struct usb_cdc_notification *dr;
|
||||
struct usb_cdc_notification *dr = urb->transfer_buffer;
|
||||
unsigned int current_size = urb->actual_length;
|
||||
unsigned int expected_size, copy_size, alloc_size;
|
||||
int retval;
|
||||
|
|
@ -386,25 +386,14 @@ static void acm_ctrl_irq(struct urb *urb)
|
|||
|
||||
usb_mark_last_busy(acm->dev);
|
||||
|
||||
if (acm->nb_index == 0) {
|
||||
/*
|
||||
* The first chunk of a message must contain at least the
|
||||
* notification header with the length field, otherwise we
|
||||
* can't get an expected_size.
|
||||
*/
|
||||
if (current_size < sizeof(struct usb_cdc_notification)) {
|
||||
dev_dbg(&acm->control->dev, "urb too short\n");
|
||||
goto exit;
|
||||
}
|
||||
dr = urb->transfer_buffer;
|
||||
} else {
|
||||
if (acm->nb_index)
|
||||
dr = (struct usb_cdc_notification *)acm->notification_buffer;
|
||||
}
|
||||
|
||||
/* size = notification-header + (optional) data */
|
||||
expected_size = sizeof(struct usb_cdc_notification) +
|
||||
le16_to_cpu(dr->wLength);
|
||||
|
||||
if (acm->nb_index != 0 || current_size < expected_size) {
|
||||
if (current_size < expected_size) {
|
||||
/* notification is transmitted fragmented, reassemble */
|
||||
if (acm->nb_size < expected_size) {
|
||||
u8 *new_buffer;
|
||||
|
|
@ -1744,16 +1733,13 @@ static const struct usb_device_id acm_ids[] = {
|
|||
{ USB_DEVICE(0x0870, 0x0001), /* Metricom GS Modem */
|
||||
.driver_info = NO_UNION_NORMAL, /* has no union descriptor */
|
||||
},
|
||||
{ USB_DEVICE(0x045b, 0x023c), /* Renesas R-Car H3 USB Download mode */
|
||||
{ USB_DEVICE(0x045b, 0x023c), /* Renesas USB Download mode */
|
||||
.driver_info = DISABLE_ECHO, /* Don't echo banner */
|
||||
},
|
||||
{ USB_DEVICE(0x045b, 0x0247), /* Renesas R-Car D3 USB Download mode */
|
||||
{ USB_DEVICE(0x045b, 0x0248), /* Renesas USB Download mode */
|
||||
.driver_info = DISABLE_ECHO, /* Don't echo banner */
|
||||
},
|
||||
{ USB_DEVICE(0x045b, 0x0248), /* Renesas R-Car M3-N USB Download mode */
|
||||
.driver_info = DISABLE_ECHO, /* Don't echo banner */
|
||||
},
|
||||
{ USB_DEVICE(0x045b, 0x024D), /* Renesas R-Car E3 USB Download mode */
|
||||
{ USB_DEVICE(0x045b, 0x024D), /* Renesas USB Download mode */
|
||||
.driver_info = DISABLE_ECHO, /* Don't echo banner */
|
||||
},
|
||||
{ USB_DEVICE(0x0e8d, 0x0003), /* FIREFLY, MediaTek Inc; andrey.arapov@gmail.com */
|
||||
|
|
|
|||
|
|
@ -1337,12 +1337,11 @@ static int usblp_set_protocol(struct usblp *usblp, int protocol)
|
|||
if (protocol < USBLP_FIRST_PROTOCOL || protocol > USBLP_LAST_PROTOCOL)
|
||||
return -EINVAL;
|
||||
|
||||
alts = usblp->protocol[protocol].alt_setting;
|
||||
if (alts < 0)
|
||||
return -EINVAL;
|
||||
|
||||
/* Don't unnecessarily set the interface if there's a single alt. */
|
||||
if (usblp->intf->num_altsetting > 1) {
|
||||
alts = usblp->protocol[protocol].alt_setting;
|
||||
if (alts < 0)
|
||||
return -EINVAL;
|
||||
r = usb_set_interface(usblp->dev, usblp->ifnum, alts);
|
||||
if (r < 0) {
|
||||
printk(KERN_ERR "usblp: can't set desired altsetting %d on interface %d\n",
|
||||
|
|
|
|||
|
|
@ -485,8 +485,6 @@ static int usbtmc488_ioctl_read_stb(struct usbtmc_file_data *file_data,
|
|||
u8 tag;
|
||||
__u8 stb;
|
||||
int rv;
|
||||
long wait_rv;
|
||||
unsigned long expire;
|
||||
|
||||
dev_dbg(dev, "Enter ioctl_read_stb iin_ep_present: %d\n",
|
||||
data->iin_ep_present);
|
||||
|
|
@ -529,18 +527,16 @@ static int usbtmc488_ioctl_read_stb(struct usbtmc_file_data *file_data,
|
|||
}
|
||||
|
||||
if (data->iin_ep_present) {
|
||||
expire = msecs_to_jiffies(file_data->timeout);
|
||||
wait_rv = wait_event_interruptible_timeout(
|
||||
rv = wait_event_interruptible_timeout(
|
||||
data->waitq,
|
||||
atomic_read(&data->iin_data_valid) != 0,
|
||||
expire);
|
||||
if (wait_rv < 0) {
|
||||
dev_dbg(dev, "wait interrupted %ld\n", wait_rv);
|
||||
rv = wait_rv;
|
||||
file_data->timeout);
|
||||
if (rv < 0) {
|
||||
dev_dbg(dev, "wait interrupted %d\n", rv);
|
||||
goto exit;
|
||||
}
|
||||
|
||||
if (wait_rv == 0) {
|
||||
if (rv == 0) {
|
||||
dev_dbg(dev, "wait timed out\n");
|
||||
rv = -ETIMEDOUT;
|
||||
goto exit;
|
||||
|
|
@ -560,8 +556,6 @@ static int usbtmc488_ioctl_read_stb(struct usbtmc_file_data *file_data,
|
|||
rv = put_user(stb, (__u8 __user *)arg);
|
||||
dev_dbg(dev, "stb:0x%02x received %d\n", (unsigned int)stb, rv);
|
||||
|
||||
rv = 0;
|
||||
|
||||
exit:
|
||||
/* bump interrupt bTag */
|
||||
data->iin_bTag += 1;
|
||||
|
|
@ -578,9 +572,9 @@ static int usbtmc488_ioctl_wait_srq(struct usbtmc_file_data *file_data,
|
|||
{
|
||||
struct usbtmc_device_data *data = file_data->data;
|
||||
struct device *dev = &data->intf->dev;
|
||||
int rv;
|
||||
u32 timeout;
|
||||
unsigned long expire;
|
||||
long wait_rv;
|
||||
|
||||
if (!data->iin_ep_present) {
|
||||
dev_dbg(dev, "no interrupt endpoint present\n");
|
||||
|
|
@ -594,24 +588,25 @@ static int usbtmc488_ioctl_wait_srq(struct usbtmc_file_data *file_data,
|
|||
|
||||
mutex_unlock(&data->io_mutex);
|
||||
|
||||
wait_rv = wait_event_interruptible_timeout(
|
||||
data->waitq,
|
||||
atomic_read(&file_data->srq_asserted) != 0 ||
|
||||
atomic_read(&file_data->closing),
|
||||
expire);
|
||||
rv = wait_event_interruptible_timeout(
|
||||
data->waitq,
|
||||
atomic_read(&file_data->srq_asserted) != 0 ||
|
||||
atomic_read(&file_data->closing),
|
||||
expire);
|
||||
|
||||
mutex_lock(&data->io_mutex);
|
||||
|
||||
/* Note! disconnect or close could be called in the meantime */
|
||||
if (atomic_read(&file_data->closing) || data->zombie)
|
||||
return -ENODEV;
|
||||
rv = -ENODEV;
|
||||
|
||||
if (wait_rv < 0) {
|
||||
dev_dbg(dev, "%s - wait interrupted %ld\n", __func__, wait_rv);
|
||||
return wait_rv;
|
||||
if (rv < 0) {
|
||||
/* dev can be invalid now! */
|
||||
pr_debug("%s - wait interrupted %d\n", __func__, rv);
|
||||
return rv;
|
||||
}
|
||||
|
||||
if (wait_rv == 0) {
|
||||
if (rv == 0) {
|
||||
dev_dbg(dev, "%s - wait timed out\n", __func__);
|
||||
return -ETIMEDOUT;
|
||||
}
|
||||
|
|
@ -805,7 +800,6 @@ static ssize_t usbtmc_generic_read(struct usbtmc_file_data *file_data,
|
|||
unsigned long expire;
|
||||
int bufcount = 1;
|
||||
int again = 0;
|
||||
long wait_rv;
|
||||
|
||||
/* mutex already locked */
|
||||
|
||||
|
|
@ -918,24 +912,19 @@ static ssize_t usbtmc_generic_read(struct usbtmc_file_data *file_data,
|
|||
if (!(flags & USBTMC_FLAG_ASYNC)) {
|
||||
dev_dbg(dev, "%s: before wait time %lu\n",
|
||||
__func__, expire);
|
||||
wait_rv = wait_event_interruptible_timeout(
|
||||
retval = wait_event_interruptible_timeout(
|
||||
file_data->wait_bulk_in,
|
||||
usbtmc_do_transfer(file_data),
|
||||
expire);
|
||||
|
||||
dev_dbg(dev, "%s: wait returned %ld\n",
|
||||
__func__, wait_rv);
|
||||
dev_dbg(dev, "%s: wait returned %d\n",
|
||||
__func__, retval);
|
||||
|
||||
if (wait_rv < 0) {
|
||||
retval = wait_rv;
|
||||
if (retval <= 0) {
|
||||
if (retval == 0)
|
||||
retval = -ETIMEDOUT;
|
||||
goto error;
|
||||
}
|
||||
|
||||
if (wait_rv == 0) {
|
||||
retval = -ETIMEDOUT;
|
||||
goto error;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
urb = usb_get_from_anchor(&file_data->in_anchor);
|
||||
|
|
@ -1361,10 +1350,7 @@ static ssize_t usbtmc_read(struct file *filp, char __user *buf,
|
|||
if (!buffer)
|
||||
return -ENOMEM;
|
||||
|
||||
retval = mutex_lock_interruptible(&data->io_mutex);
|
||||
if (retval < 0)
|
||||
goto exit_nolock;
|
||||
|
||||
mutex_lock(&data->io_mutex);
|
||||
if (data->zombie) {
|
||||
retval = -ENODEV;
|
||||
goto exit;
|
||||
|
|
@ -1487,7 +1473,6 @@ static ssize_t usbtmc_read(struct file *filp, char __user *buf,
|
|||
|
||||
exit:
|
||||
mutex_unlock(&data->io_mutex);
|
||||
exit_nolock:
|
||||
kfree(buffer);
|
||||
return retval;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1793,17 +1793,6 @@ static int hub_probe(struct usb_interface *intf, const struct usb_device_id *id)
|
|||
desc = intf->cur_altsetting;
|
||||
hdev = interface_to_usbdev(intf);
|
||||
|
||||
/*
|
||||
* The USB 2.0 spec prohibits hubs from having more than one
|
||||
* configuration or interface, and we rely on this prohibition.
|
||||
* Refuse to accept a device that violates it.
|
||||
*/
|
||||
if (hdev->descriptor.bNumConfigurations > 1 ||
|
||||
hdev->actconfig->desc.bNumInterfaces > 1) {
|
||||
dev_err(&intf->dev, "Invalid hub with more than one config or interface\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
/*
|
||||
* Set default autosuspend delay as 0 to speedup bus suspend,
|
||||
* based on the below considerations:
|
||||
|
|
@ -2604,13 +2593,13 @@ int usb_new_device(struct usb_device *udev)
|
|||
err = sysfs_create_link(&udev->dev.kobj,
|
||||
&port_dev->dev.kobj, "port");
|
||||
if (err)
|
||||
goto out_del_dev;
|
||||
goto fail;
|
||||
|
||||
err = sysfs_create_link(&port_dev->dev.kobj,
|
||||
&udev->dev.kobj, "device");
|
||||
if (err) {
|
||||
sysfs_remove_link(&udev->dev.kobj, "port");
|
||||
goto out_del_dev;
|
||||
goto fail;
|
||||
}
|
||||
|
||||
if (!test_and_set_bit(port1, hub->child_usage_bits))
|
||||
|
|
@ -2622,8 +2611,6 @@ int usb_new_device(struct usb_device *udev)
|
|||
pm_runtime_put_sync_autosuspend(&udev->dev);
|
||||
return err;
|
||||
|
||||
out_del_dev:
|
||||
device_del(&udev->dev);
|
||||
fail:
|
||||
usb_set_device_state(udev, USB_STATE_NOTATTACHED);
|
||||
pm_runtime_disable(&udev->dev);
|
||||
|
|
@ -5831,7 +5818,6 @@ static int usb_reset_and_verify_device(struct usb_device *udev)
|
|||
struct usb_hub *parent_hub;
|
||||
struct usb_hcd *hcd = bus_to_hcd(udev->bus);
|
||||
struct usb_device_descriptor descriptor = udev->descriptor;
|
||||
struct usb_interface *intf;
|
||||
struct usb_host_bos *bos;
|
||||
int i, j, ret = 0;
|
||||
int port1 = udev->portnum;
|
||||
|
|
@ -5893,18 +5879,6 @@ static int usb_reset_and_verify_device(struct usb_device *udev)
|
|||
if (!udev->actconfig)
|
||||
goto done;
|
||||
|
||||
/*
|
||||
* Some devices can't handle setting default altsetting 0 with a
|
||||
* Set-Interface request. Disable host-side endpoints of those
|
||||
* interfaces here. Enable and reset them back after host has set
|
||||
* its internal endpoint structures during usb_hcd_alloc_bandwith()
|
||||
*/
|
||||
for (i = 0; i < udev->actconfig->desc.bNumInterfaces; i++) {
|
||||
intf = udev->actconfig->interface[i];
|
||||
if (intf->cur_altsetting->desc.bAlternateSetting == 0)
|
||||
usb_disable_interface(udev, intf, true);
|
||||
}
|
||||
|
||||
mutex_lock(hcd->bandwidth_mutex);
|
||||
ret = usb_hcd_alloc_bandwidth(udev, udev->actconfig, NULL, NULL);
|
||||
if (ret < 0) {
|
||||
|
|
@ -5936,11 +5910,12 @@ static int usb_reset_and_verify_device(struct usb_device *udev)
|
|||
*/
|
||||
for (i = 0; i < udev->actconfig->desc.bNumInterfaces; i++) {
|
||||
struct usb_host_config *config = udev->actconfig;
|
||||
struct usb_interface *intf = config->interface[i];
|
||||
struct usb_interface_descriptor *desc;
|
||||
|
||||
intf = config->interface[i];
|
||||
desc = &intf->cur_altsetting->desc;
|
||||
if (desc->bAlternateSetting == 0) {
|
||||
usb_disable_interface(udev, intf, true);
|
||||
usb_enable_interface(udev, intf, true);
|
||||
ret = 0;
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -294,11 +294,10 @@ static int usb_port_runtime_suspend(struct device *dev)
|
|||
static void usb_port_shutdown(struct device *dev)
|
||||
{
|
||||
struct usb_port *port_dev = to_usb_port(dev);
|
||||
struct usb_device *udev = port_dev->child;
|
||||
|
||||
if (udev && !udev->port_is_suspended) {
|
||||
usb_disable_usb2_hardware_lpm(udev);
|
||||
usb_unlocked_disable_lpm(udev);
|
||||
if (port_dev->child) {
|
||||
usb_disable_usb2_hardware_lpm(port_dev->child);
|
||||
usb_unlocked_disable_lpm(port_dev->child);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -338,10 +338,6 @@ static const struct usb_device_id usb_quirk_list[] = {
|
|||
{ USB_DEVICE(0x0638, 0x0a13), .driver_info =
|
||||
USB_QUIRK_STRING_FETCH_255 },
|
||||
|
||||
/* Prolific Single-LUN Mass Storage Card Reader */
|
||||
{ USB_DEVICE(0x067b, 0x2731), .driver_info = USB_QUIRK_DELAY_INIT |
|
||||
USB_QUIRK_NO_LPM },
|
||||
|
||||
/* Saitek Cyborg Gold Joystick */
|
||||
{ USB_DEVICE(0x06a3, 0x0006), .driver_info =
|
||||
USB_QUIRK_CONFIG_INTF_STRINGS },
|
||||
|
|
@ -366,12 +362,6 @@ static const struct usb_device_id usb_quirk_list[] = {
|
|||
{ USB_DEVICE(0x0781, 0x5583), .driver_info = USB_QUIRK_NO_LPM },
|
||||
{ USB_DEVICE(0x0781, 0x5591), .driver_info = USB_QUIRK_NO_LPM },
|
||||
|
||||
/* SanDisk Corp. SanDisk 3.2Gen1 */
|
||||
{ USB_DEVICE(0x0781, 0x55a3), .driver_info = USB_QUIRK_DELAY_INIT },
|
||||
|
||||
/* SanDisk Extreme 55AE */
|
||||
{ USB_DEVICE(0x0781, 0x55ae), .driver_info = USB_QUIRK_NO_LPM },
|
||||
|
||||
/* Realforce 87U Keyboard */
|
||||
{ USB_DEVICE(0x0853, 0x011b), .driver_info = USB_QUIRK_NO_LPM },
|
||||
|
||||
|
|
@ -386,9 +376,6 @@ static const struct usb_device_id usb_quirk_list[] = {
|
|||
{ USB_DEVICE(0x0904, 0x6103), .driver_info =
|
||||
USB_QUIRK_LINEAR_FRAME_INTR_BINTERVAL },
|
||||
|
||||
/* Silicon Motion Flash Drive */
|
||||
{ USB_DEVICE(0x090c, 0x1000), .driver_info = USB_QUIRK_DELAY_INIT },
|
||||
|
||||
/* Sound Devices USBPre2 */
|
||||
{ USB_DEVICE(0x0926, 0x0202), .driver_info =
|
||||
USB_QUIRK_ENDPOINT_BLACKLIST },
|
||||
|
|
@ -443,9 +430,6 @@ static const struct usb_device_id usb_quirk_list[] = {
|
|||
{ USB_DEVICE(0x0c45, 0x7056), .driver_info =
|
||||
USB_QUIRK_IGNORE_REMOTE_WAKEUP },
|
||||
|
||||
/* Sony Xperia XZ1 Compact (lilac) smartphone in fastboot mode */
|
||||
{ USB_DEVICE(0x0fce, 0x0dde), .driver_info = USB_QUIRK_NO_LPM },
|
||||
|
||||
/* Action Semiconductor flash disk */
|
||||
{ USB_DEVICE(0x10d6, 0x2200), .driver_info =
|
||||
USB_QUIRK_STRING_FETCH_255 },
|
||||
|
|
@ -536,16 +520,10 @@ static const struct usb_device_id usb_quirk_list[] = {
|
|||
/* Blackmagic Design UltraStudio SDI */
|
||||
{ USB_DEVICE(0x1edb, 0xbd4f), .driver_info = USB_QUIRK_NO_LPM },
|
||||
|
||||
/* Teclast disk */
|
||||
{ USB_DEVICE(0x1f75, 0x0917), .driver_info = USB_QUIRK_NO_LPM },
|
||||
|
||||
/* Hauppauge HVR-950q */
|
||||
{ USB_DEVICE(0x2040, 0x7200), .driver_info =
|
||||
USB_QUIRK_CONFIG_INTF_STRINGS },
|
||||
|
||||
/* VLI disk */
|
||||
{ USB_DEVICE(0x2109, 0x0711), .driver_info = USB_QUIRK_NO_LPM },
|
||||
|
||||
/* Raydium Touchscreen */
|
||||
{ USB_DEVICE(0x2386, 0x3114), .driver_info = USB_QUIRK_NO_LPM },
|
||||
|
||||
|
|
|
|||
|
|
@ -4548,7 +4548,6 @@ static int dwc2_hsotg_udc_stop(struct usb_gadget *gadget)
|
|||
spin_lock_irqsave(&hsotg->lock, flags);
|
||||
|
||||
hsotg->driver = NULL;
|
||||
hsotg->gadget.dev.of_node = NULL;
|
||||
hsotg->gadget.speed = USB_SPEED_UNKNOWN;
|
||||
hsotg->enabled = 0;
|
||||
|
||||
|
|
|
|||
|
|
@ -122,19 +122,17 @@ static void __dwc3_set_mode(struct work_struct *work)
|
|||
if (dwc->dr_mode != USB_DR_MODE_OTG)
|
||||
return;
|
||||
|
||||
pm_runtime_get_sync(dwc->dev);
|
||||
|
||||
if (dwc->current_dr_role == DWC3_GCTL_PRTCAP_OTG)
|
||||
dwc3_otg_update(dwc, 0);
|
||||
|
||||
if (!dwc->desired_dr_role)
|
||||
goto out;
|
||||
return;
|
||||
|
||||
if (dwc->desired_dr_role == dwc->current_dr_role)
|
||||
goto out;
|
||||
return;
|
||||
|
||||
if (dwc->desired_dr_role == DWC3_GCTL_PRTCAP_OTG && dwc->edev)
|
||||
goto out;
|
||||
return;
|
||||
|
||||
switch (dwc->current_dr_role) {
|
||||
case DWC3_GCTL_PRTCAP_HOST:
|
||||
|
|
@ -198,9 +196,6 @@ static void __dwc3_set_mode(struct work_struct *work)
|
|||
break;
|
||||
}
|
||||
|
||||
out:
|
||||
pm_runtime_mark_last_busy(dwc->dev);
|
||||
pm_runtime_put_autosuspend(dwc->dev);
|
||||
}
|
||||
|
||||
void dwc3_set_mode(struct dwc3 *dwc, u32 mode)
|
||||
|
|
|
|||
|
|
@ -1966,39 +1966,11 @@ static void dwc3_stop_active_transfers(struct dwc3 *dwc)
|
|||
static int dwc3_gadget_run_stop(struct dwc3 *dwc, int is_on, int suspend)
|
||||
{
|
||||
u32 reg;
|
||||
u32 timeout = 2000;
|
||||
u32 saved_config = 0;
|
||||
u32 timeout = 500;
|
||||
|
||||
if (pm_runtime_suspended(dwc->dev))
|
||||
return 0;
|
||||
|
||||
/*
|
||||
* When operating in USB 2.0 speeds (HS/FS), ensure that
|
||||
* GUSB2PHYCFG.ENBLSLPM and GUSB2PHYCFG.SUSPHY are cleared before starting
|
||||
* or stopping the controller. This resolves timeout issues that occur
|
||||
* during frequent role switches between host and device modes.
|
||||
*
|
||||
* Save and clear these settings, then restore them after completing the
|
||||
* controller start or stop sequence.
|
||||
*
|
||||
* This solution was discovered through experimentation as it is not
|
||||
* mentioned in the dwc3 programming guide. It has been tested on an
|
||||
* Exynos platforms.
|
||||
*/
|
||||
reg = dwc3_readl(dwc->regs, DWC3_GUSB2PHYCFG(0));
|
||||
if (reg & DWC3_GUSB2PHYCFG_SUSPHY) {
|
||||
saved_config |= DWC3_GUSB2PHYCFG_SUSPHY;
|
||||
reg &= ~DWC3_GUSB2PHYCFG_SUSPHY;
|
||||
}
|
||||
|
||||
if (reg & DWC3_GUSB2PHYCFG_ENBLSLPM) {
|
||||
saved_config |= DWC3_GUSB2PHYCFG_ENBLSLPM;
|
||||
reg &= ~DWC3_GUSB2PHYCFG_ENBLSLPM;
|
||||
}
|
||||
|
||||
if (saved_config)
|
||||
dwc3_writel(dwc->regs, DWC3_GUSB2PHYCFG(0), reg);
|
||||
|
||||
reg = dwc3_readl(dwc->regs, DWC3_DCTL);
|
||||
if (is_on) {
|
||||
if (dwc->revision <= DWC3_REVISION_187A) {
|
||||
|
|
@ -2026,17 +1998,10 @@ static int dwc3_gadget_run_stop(struct dwc3 *dwc, int is_on, int suspend)
|
|||
dwc3_writel(dwc->regs, DWC3_DCTL, reg);
|
||||
|
||||
do {
|
||||
usleep_range(1000, 2000);
|
||||
reg = dwc3_readl(dwc->regs, DWC3_DSTS);
|
||||
reg &= DWC3_DSTS_DEVCTRLHLT;
|
||||
} while (--timeout && !(!is_on ^ !reg));
|
||||
|
||||
if (saved_config) {
|
||||
reg = dwc3_readl(dwc->regs, DWC3_GUSB2PHYCFG(0));
|
||||
reg |= saved_config;
|
||||
dwc3_writel(dwc->regs, DWC3_GUSB2PHYCFG(0), reg);
|
||||
}
|
||||
|
||||
if (!timeout)
|
||||
return -ETIMEDOUT;
|
||||
|
||||
|
|
@ -3652,12 +3617,6 @@ static irqreturn_t dwc3_check_event_buf(struct dwc3_event_buffer *evt)
|
|||
if (!count)
|
||||
return IRQ_NONE;
|
||||
|
||||
if (count > evt->length) {
|
||||
dev_err_ratelimited(dwc->dev, "invalid count(%u) > evt->length(%u)\n",
|
||||
count, evt->length);
|
||||
return IRQ_NONE;
|
||||
}
|
||||
|
||||
evt->count = count;
|
||||
evt->flags |= DWC3_EVENT_PENDING;
|
||||
|
||||
|
|
|
|||
|
|
@ -915,11 +915,10 @@ static int set_config(struct usb_composite_dev *cdev,
|
|||
else
|
||||
power = min(power, 900U);
|
||||
done:
|
||||
if (power > USB_SELF_POWER_VBUS_MAX_DRAW ||
|
||||
(c && !(c->bmAttributes & USB_CONFIG_ATT_SELFPOWER)))
|
||||
usb_gadget_clear_selfpowered(gadget);
|
||||
else
|
||||
if (power <= USB_SELF_POWER_VBUS_MAX_DRAW)
|
||||
usb_gadget_set_selfpowered(gadget);
|
||||
else
|
||||
usb_gadget_clear_selfpowered(gadget);
|
||||
|
||||
usb_gadget_vbus_draw(gadget, power);
|
||||
if (result >= 0 && cdev->delayed_status)
|
||||
|
|
@ -2366,10 +2365,7 @@ void composite_suspend(struct usb_gadget *gadget)
|
|||
|
||||
cdev->suspended = 1;
|
||||
|
||||
if (cdev->config &&
|
||||
cdev->config->bmAttributes & USB_CONFIG_ATT_SELFPOWER)
|
||||
usb_gadget_set_selfpowered(gadget);
|
||||
|
||||
usb_gadget_set_selfpowered(gadget);
|
||||
usb_gadget_vbus_draw(gadget, 2);
|
||||
}
|
||||
|
||||
|
|
@ -2398,11 +2394,8 @@ void composite_resume(struct usb_gadget *gadget)
|
|||
else
|
||||
maxpower = min(maxpower, 900U);
|
||||
|
||||
if (maxpower > USB_SELF_POWER_VBUS_MAX_DRAW ||
|
||||
!(cdev->config->bmAttributes & USB_CONFIG_ATT_SELFPOWER))
|
||||
if (maxpower > USB_SELF_POWER_VBUS_MAX_DRAW)
|
||||
usb_gadget_clear_selfpowered(gadget);
|
||||
else
|
||||
usb_gadget_set_selfpowered(gadget);
|
||||
|
||||
usb_gadget_vbus_draw(gadget, maxpower);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1875,7 +1875,7 @@ static int functionfs_bind(struct ffs_data *ffs, struct usb_composite_dev *cdev)
|
|||
|
||||
ENTER();
|
||||
|
||||
if ((ffs->state != FFS_ACTIVE
|
||||
if (WARN_ON(ffs->state != FFS_ACTIVE
|
||||
|| test_and_set_bit(FFS_FL_BOUND, &ffs->flags)))
|
||||
return -EBADFD;
|
||||
|
||||
|
|
|
|||
|
|
@ -114,8 +114,8 @@ static struct hid_descriptor hidg_desc = {
|
|||
.bcdHID = cpu_to_le16(0x0101),
|
||||
.bCountryCode = 0x00,
|
||||
.bNumDescriptors = 0x1,
|
||||
/*.rpt_desc.bDescriptorType = DYNAMIC */
|
||||
/*.rpt_desc.wDescriptorLength = DYNAMIC */
|
||||
/*.desc[0].bDescriptorType = DYNAMIC */
|
||||
/*.desc[0].wDescriptorLenght = DYNAMIC */
|
||||
};
|
||||
|
||||
/* Super-Speed Support */
|
||||
|
|
@ -730,8 +730,8 @@ static int hidg_setup(struct usb_function *f,
|
|||
struct hid_descriptor hidg_desc_copy = hidg_desc;
|
||||
|
||||
VDBG(cdev, "USB_REQ_GET_DESCRIPTOR: HID\n");
|
||||
hidg_desc_copy.rpt_desc.bDescriptorType = HID_DT_REPORT;
|
||||
hidg_desc_copy.rpt_desc.wDescriptorLength =
|
||||
hidg_desc_copy.desc[0].bDescriptorType = HID_DT_REPORT;
|
||||
hidg_desc_copy.desc[0].wDescriptorLength =
|
||||
cpu_to_le16(hidg->report_desc_length);
|
||||
|
||||
length = min_t(unsigned short, length,
|
||||
|
|
@ -972,8 +972,8 @@ static int hidg_bind(struct usb_configuration *c, struct usb_function *f)
|
|||
* We can use hidg_desc struct here but we should not relay
|
||||
* that its content won't change after returning from this function.
|
||||
*/
|
||||
hidg_desc.rpt_desc.bDescriptorType = HID_DT_REPORT;
|
||||
hidg_desc.rpt_desc.wDescriptorLength =
|
||||
hidg_desc.desc[0].bDescriptorType = HID_DT_REPORT;
|
||||
hidg_desc.desc[0].wDescriptorLength =
|
||||
cpu_to_le16(hidg->report_desc_length);
|
||||
|
||||
hidg_hs_in_ep_desc.bEndpointAddress =
|
||||
|
|
|
|||
|
|
@ -87,7 +87,7 @@ struct f_midi {
|
|||
struct snd_rawmidi_substream *out_substream[MAX_PORTS];
|
||||
|
||||
unsigned long out_triggered;
|
||||
struct work_struct work;
|
||||
struct tasklet_struct tasklet;
|
||||
unsigned int in_ports;
|
||||
unsigned int out_ports;
|
||||
int index;
|
||||
|
|
@ -282,7 +282,7 @@ f_midi_complete(struct usb_ep *ep, struct usb_request *req)
|
|||
/* Our transmit completed. See if there's more to go.
|
||||
* f_midi_transmit eats req, don't queue it again. */
|
||||
req->length = 0;
|
||||
queue_work(system_highpri_wq, &midi->work);
|
||||
f_midi_transmit(midi);
|
||||
return;
|
||||
}
|
||||
break;
|
||||
|
|
@ -698,11 +698,9 @@ drop_out:
|
|||
f_midi_drop_out_substreams(midi);
|
||||
}
|
||||
|
||||
static void f_midi_in_work(struct work_struct *work)
|
||||
static void f_midi_in_tasklet(unsigned long data)
|
||||
{
|
||||
struct f_midi *midi;
|
||||
|
||||
midi = container_of(work, struct f_midi, work);
|
||||
struct f_midi *midi = (struct f_midi *) data;
|
||||
f_midi_transmit(midi);
|
||||
}
|
||||
|
||||
|
|
@ -739,7 +737,7 @@ static void f_midi_in_trigger(struct snd_rawmidi_substream *substream, int up)
|
|||
VDBG(midi, "%s() %d\n", __func__, up);
|
||||
midi->in_ports_array[substream->number].active = up;
|
||||
if (up)
|
||||
queue_work(system_highpri_wq, &midi->work);
|
||||
tasklet_hi_schedule(&midi->tasklet);
|
||||
}
|
||||
|
||||
static int f_midi_out_open(struct snd_rawmidi_substream *substream)
|
||||
|
|
@ -877,7 +875,7 @@ static int f_midi_bind(struct usb_configuration *c, struct usb_function *f)
|
|||
int status, n, jack = 1, i = 0, endpoint_descriptor_index = 0;
|
||||
|
||||
midi->gadget = cdev->gadget;
|
||||
INIT_WORK(&midi->work, f_midi_in_work);
|
||||
tasklet_init(&midi->tasklet, f_midi_in_tasklet, (unsigned long) midi);
|
||||
status = f_midi_register_card(midi);
|
||||
if (status < 0)
|
||||
goto fail_register;
|
||||
|
|
@ -999,11 +997,11 @@ static int f_midi_bind(struct usb_configuration *c, struct usb_function *f)
|
|||
}
|
||||
|
||||
/* configure the endpoint descriptors ... */
|
||||
ms_out_desc.bLength = USB_DT_MS_ENDPOINT_SIZE(midi->out_ports);
|
||||
ms_out_desc.bNumEmbMIDIJack = midi->out_ports;
|
||||
ms_out_desc.bLength = USB_DT_MS_ENDPOINT_SIZE(midi->in_ports);
|
||||
ms_out_desc.bNumEmbMIDIJack = midi->in_ports;
|
||||
|
||||
ms_in_desc.bLength = USB_DT_MS_ENDPOINT_SIZE(midi->in_ports);
|
||||
ms_in_desc.bNumEmbMIDIJack = midi->in_ports;
|
||||
ms_in_desc.bLength = USB_DT_MS_ENDPOINT_SIZE(midi->out_ports);
|
||||
ms_in_desc.bNumEmbMIDIJack = midi->out_ports;
|
||||
|
||||
/* ... and add them to the list */
|
||||
endpoint_descriptor_index = i;
|
||||
|
|
|
|||
|
|
@ -245,6 +245,7 @@ static int bot_send_write_request(struct usbg_cmd *cmd)
|
|||
{
|
||||
struct f_uas *fu = cmd->fu;
|
||||
struct se_cmd *se_cmd = &cmd->se_cmd;
|
||||
struct usb_gadget *gadget = fuas_to_gadget(fu);
|
||||
int ret;
|
||||
|
||||
init_completion(&cmd->write_complete);
|
||||
|
|
@ -255,6 +256,22 @@ static int bot_send_write_request(struct usbg_cmd *cmd)
|
|||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (!gadget->sg_supported) {
|
||||
cmd->data_buf = kmalloc(se_cmd->data_length, GFP_KERNEL);
|
||||
if (!cmd->data_buf)
|
||||
return -ENOMEM;
|
||||
|
||||
fu->bot_req_out->buf = cmd->data_buf;
|
||||
} else {
|
||||
fu->bot_req_out->buf = NULL;
|
||||
fu->bot_req_out->num_sgs = se_cmd->t_data_nents;
|
||||
fu->bot_req_out->sg = se_cmd->t_data_sg;
|
||||
}
|
||||
|
||||
fu->bot_req_out->complete = usbg_data_write_cmpl;
|
||||
fu->bot_req_out->length = se_cmd->data_length;
|
||||
fu->bot_req_out->context = cmd;
|
||||
|
||||
ret = usbg_prepare_w_request(cmd, fu->bot_req_out);
|
||||
if (ret)
|
||||
goto cleanup;
|
||||
|
|
@ -954,7 +971,6 @@ static void usbg_data_write_cmpl(struct usb_ep *ep, struct usb_request *req)
|
|||
return;
|
||||
|
||||
cleanup:
|
||||
target_put_sess_cmd(se_cmd);
|
||||
transport_generic_free_cmd(&cmd->se_cmd, 0);
|
||||
}
|
||||
|
||||
|
|
@ -1047,7 +1063,8 @@ static void usbg_cmd_work(struct work_struct *work)
|
|||
|
||||
out:
|
||||
transport_send_check_condition_and_sense(se_cmd,
|
||||
TCM_UNSUPPORTED_SCSI_OPCODE, 0);
|
||||
TCM_UNSUPPORTED_SCSI_OPCODE, 1);
|
||||
transport_generic_free_cmd(&cmd->se_cmd, 0);
|
||||
}
|
||||
|
||||
static struct usbg_cmd *usbg_get_cmd(struct f_uas *fu,
|
||||
|
|
@ -1176,7 +1193,8 @@ static void bot_cmd_work(struct work_struct *work)
|
|||
|
||||
out:
|
||||
transport_send_check_condition_and_sense(se_cmd,
|
||||
TCM_UNSUPPORTED_SCSI_OPCODE, 0);
|
||||
TCM_UNSUPPORTED_SCSI_OPCODE, 1);
|
||||
transport_generic_free_cmd(&cmd->se_cmd, 0);
|
||||
}
|
||||
|
||||
static int bot_submit_command(struct f_uas *fu,
|
||||
|
|
@ -1999,39 +2017,43 @@ static int tcm_bind(struct usb_configuration *c, struct usb_function *f)
|
|||
bot_intf_desc.bInterfaceNumber = iface;
|
||||
uasp_intf_desc.bInterfaceNumber = iface;
|
||||
fu->iface = iface;
|
||||
ep = usb_ep_autoconfig(gadget, &uasp_fs_bi_desc);
|
||||
ep = usb_ep_autoconfig_ss(gadget, &uasp_ss_bi_desc,
|
||||
&uasp_bi_ep_comp_desc);
|
||||
if (!ep)
|
||||
goto ep_fail;
|
||||
|
||||
fu->ep_in = ep;
|
||||
|
||||
ep = usb_ep_autoconfig(gadget, &uasp_fs_bo_desc);
|
||||
ep = usb_ep_autoconfig_ss(gadget, &uasp_ss_bo_desc,
|
||||
&uasp_bo_ep_comp_desc);
|
||||
if (!ep)
|
||||
goto ep_fail;
|
||||
fu->ep_out = ep;
|
||||
|
||||
ep = usb_ep_autoconfig(gadget, &uasp_fs_status_desc);
|
||||
ep = usb_ep_autoconfig_ss(gadget, &uasp_ss_status_desc,
|
||||
&uasp_status_in_ep_comp_desc);
|
||||
if (!ep)
|
||||
goto ep_fail;
|
||||
fu->ep_status = ep;
|
||||
|
||||
ep = usb_ep_autoconfig(gadget, &uasp_fs_cmd_desc);
|
||||
ep = usb_ep_autoconfig_ss(gadget, &uasp_ss_cmd_desc,
|
||||
&uasp_cmd_comp_desc);
|
||||
if (!ep)
|
||||
goto ep_fail;
|
||||
fu->ep_cmd = ep;
|
||||
|
||||
/* Assume endpoint addresses are the same for both speeds */
|
||||
uasp_bi_desc.bEndpointAddress = uasp_fs_bi_desc.bEndpointAddress;
|
||||
uasp_bo_desc.bEndpointAddress = uasp_fs_bo_desc.bEndpointAddress;
|
||||
uasp_bi_desc.bEndpointAddress = uasp_ss_bi_desc.bEndpointAddress;
|
||||
uasp_bo_desc.bEndpointAddress = uasp_ss_bo_desc.bEndpointAddress;
|
||||
uasp_status_desc.bEndpointAddress =
|
||||
uasp_fs_status_desc.bEndpointAddress;
|
||||
uasp_cmd_desc.bEndpointAddress = uasp_fs_cmd_desc.bEndpointAddress;
|
||||
uasp_ss_status_desc.bEndpointAddress;
|
||||
uasp_cmd_desc.bEndpointAddress = uasp_ss_cmd_desc.bEndpointAddress;
|
||||
|
||||
uasp_ss_bi_desc.bEndpointAddress = uasp_fs_bi_desc.bEndpointAddress;
|
||||
uasp_ss_bo_desc.bEndpointAddress = uasp_fs_bo_desc.bEndpointAddress;
|
||||
uasp_ss_status_desc.bEndpointAddress =
|
||||
uasp_fs_status_desc.bEndpointAddress;
|
||||
uasp_ss_cmd_desc.bEndpointAddress = uasp_fs_cmd_desc.bEndpointAddress;
|
||||
uasp_fs_bi_desc.bEndpointAddress = uasp_ss_bi_desc.bEndpointAddress;
|
||||
uasp_fs_bo_desc.bEndpointAddress = uasp_ss_bo_desc.bEndpointAddress;
|
||||
uasp_fs_status_desc.bEndpointAddress =
|
||||
uasp_ss_status_desc.bEndpointAddress;
|
||||
uasp_fs_cmd_desc.bEndpointAddress = uasp_ss_cmd_desc.bEndpointAddress;
|
||||
|
||||
ret = usb_assign_descriptors(f, uasp_fs_function_desc,
|
||||
uasp_hs_function_desc, uasp_ss_function_desc,
|
||||
|
|
|
|||
|
|
@ -542,9 +542,6 @@ int ast_vhub_init_dev(struct ast_vhub *vhub, unsigned int idx)
|
|||
d->vhub = vhub;
|
||||
d->index = idx;
|
||||
d->name = devm_kasprintf(parent, GFP_KERNEL, "port%d", idx+1);
|
||||
if (!d->name)
|
||||
return -ENOMEM;
|
||||
|
||||
d->regs = vhub->regs + 0x100 + 0x10 * idx;
|
||||
|
||||
ast_vhub_init_ep0(vhub, &d->ep0, d);
|
||||
|
|
|
|||
|
|
@ -306,7 +306,7 @@ struct renesas_usb3_request {
|
|||
struct list_head queue;
|
||||
};
|
||||
|
||||
#define USB3_EP_NAME_SIZE 16
|
||||
#define USB3_EP_NAME_SIZE 8
|
||||
struct renesas_usb3_ep {
|
||||
struct usb_ep ep;
|
||||
struct renesas_usb3 *usb3;
|
||||
|
|
|
|||
|
|
@ -1956,12 +1956,6 @@ max3421_remove(struct spi_device *spi)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static const struct spi_device_id max3421_spi_ids[] = {
|
||||
{ "max3421" },
|
||||
{ },
|
||||
};
|
||||
MODULE_DEVICE_TABLE(spi, max3421_spi_ids);
|
||||
|
||||
static const struct of_device_id max3421_of_match_table[] = {
|
||||
{ .compatible = "maxim,max3421", },
|
||||
{},
|
||||
|
|
@ -1971,7 +1965,6 @@ MODULE_DEVICE_TABLE(of, max3421_of_match_table);
|
|||
static struct spi_driver max3421_driver = {
|
||||
.probe = max3421_probe,
|
||||
.remove = max3421_remove,
|
||||
.id_table = max3421_spi_ids,
|
||||
.driver = {
|
||||
.name = "max3421-hcd",
|
||||
.of_match_table = of_match_ptr(max3421_of_match_table),
|
||||
|
|
|
|||
|
|
@ -165,25 +165,6 @@ static int ohci_quirk_amd700(struct usb_hcd *hcd)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int ohci_quirk_loongson(struct usb_hcd *hcd)
|
||||
{
|
||||
struct pci_dev *pdev = to_pci_dev(hcd->self.controller);
|
||||
|
||||
/*
|
||||
* Loongson's LS7A OHCI controller (rev 0x02) has a
|
||||
* flaw. MMIO register with offset 0x60/64 is treated
|
||||
* as legacy PS2-compatible keyboard/mouse interface.
|
||||
* Since OHCI only use 4KB BAR resource, LS7A OHCI's
|
||||
* 32KB BAR is wrapped around (the 2nd 4KB BAR space
|
||||
* is the same as the 1st 4KB internally). So add 4KB
|
||||
* offset (0x1000) to the OHCI registers as a quirk.
|
||||
*/
|
||||
if (pdev->revision == 0x2)
|
||||
hcd->regs += SZ_4K; /* SZ_4K = 0x1000 */
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int ohci_quirk_qemu(struct usb_hcd *hcd)
|
||||
{
|
||||
struct ohci_hcd *ohci = hcd_to_ohci(hcd);
|
||||
|
|
@ -243,10 +224,6 @@ static const struct pci_device_id ohci_pci_quirks[] = {
|
|||
PCI_DEVICE(PCI_VENDOR_ID_ATI, 0x4399),
|
||||
.driver_data = (unsigned long)ohci_quirk_amd700,
|
||||
},
|
||||
{
|
||||
PCI_DEVICE(PCI_VENDOR_ID_LOONGSON, 0x7a24),
|
||||
.driver_data = (unsigned long)ohci_quirk_loongson,
|
||||
},
|
||||
{
|
||||
.vendor = PCI_VENDOR_ID_APPLE,
|
||||
.device = 0x003f,
|
||||
|
|
|
|||
|
|
@ -945,15 +945,6 @@ static void quirk_usb_disable_ehci(struct pci_dev *pdev)
|
|||
* booting from USB disk or using a usb keyboard
|
||||
*/
|
||||
hcc_params = readl(base + EHCI_HCC_PARAMS);
|
||||
|
||||
/* LS7A EHCI controller doesn't have extended capabilities, the
|
||||
* EECP (EHCI Extended Capabilities Pointer) field of HCCPARAMS
|
||||
* register should be 0x0 but it reads as 0xa0. So clear it to
|
||||
* avoid error messages on boot.
|
||||
*/
|
||||
if (pdev->vendor == PCI_VENDOR_ID_LOONGSON && pdev->device == 0x7a14)
|
||||
hcc_params &= ~(0xffL << 8);
|
||||
|
||||
offset = (hcc_params >> 8) & 0xff;
|
||||
while (offset && --count) {
|
||||
pci_read_config_dword(pdev, offset, &cap);
|
||||
|
|
|
|||
|
|
@ -122,7 +122,7 @@ static int uhci_hcd_platform_probe(struct platform_device *pdev)
|
|||
}
|
||||
|
||||
/* Get and enable clock if any specified */
|
||||
uhci->clk = devm_clk_get_optional(&pdev->dev, NULL);
|
||||
uhci->clk = devm_clk_get(&pdev->dev, NULL);
|
||||
if (IS_ERR(uhci->clk)) {
|
||||
ret = PTR_ERR(uhci->clk);
|
||||
goto err_rmr;
|
||||
|
|
|
|||
|
|
@ -26,8 +26,8 @@
|
|||
#define SPARSE_CNTL_ENABLE 0xC12C
|
||||
|
||||
/* Device for a quirk */
|
||||
#define PCI_VENDOR_ID_FRESCO_LOGIC 0x1b73
|
||||
#define PCI_DEVICE_ID_FRESCO_LOGIC_PDK 0x1000
|
||||
#define PCI_VENDOR_ID_FRESCO_LOGIC 0x1b73
|
||||
#define PCI_DEVICE_ID_FRESCO_LOGIC_PDK 0x1000
|
||||
#define PCI_DEVICE_ID_FRESCO_LOGIC_FL1009 0x1009
|
||||
#define PCI_DEVICE_ID_FRESCO_LOGIC_FL1100 0x1100
|
||||
#define PCI_DEVICE_ID_FRESCO_LOGIC_FL1400 0x1400
|
||||
|
|
@ -36,8 +36,8 @@
|
|||
#define PCI_DEVICE_ID_EJ168 0x7023
|
||||
#define PCI_DEVICE_ID_EJ188 0x7052
|
||||
|
||||
#define PCI_DEVICE_ID_INTEL_LYNXPOINT_XHCI 0x8c31
|
||||
#define PCI_DEVICE_ID_INTEL_LYNXPOINT_LP_XHCI 0x9c31
|
||||
#define PCI_DEVICE_ID_INTEL_LYNXPOINT_XHCI 0x8c31
|
||||
#define PCI_DEVICE_ID_INTEL_LYNXPOINT_LP_XHCI 0x9c31
|
||||
#define PCI_DEVICE_ID_INTEL_WILDCATPOINT_LP_XHCI 0x9cb1
|
||||
#define PCI_DEVICE_ID_INTEL_CHERRYVIEW_XHCI 0x22b5
|
||||
#define PCI_DEVICE_ID_INTEL_SUNRISEPOINT_H_XHCI 0xa12f
|
||||
|
|
|
|||
|
|
@ -313,10 +313,8 @@ static int usbhsc_clk_get(struct device *dev, struct usbhs_priv *priv)
|
|||
priv->clks[1] = of_clk_get(dev_of_node(dev), 1);
|
||||
if (PTR_ERR(priv->clks[1]) == -ENOENT)
|
||||
priv->clks[1] = NULL;
|
||||
else if (IS_ERR(priv->clks[1])) {
|
||||
clk_put(priv->clks[0]);
|
||||
else if (IS_ERR(priv->clks[1]))
|
||||
return PTR_ERR(priv->clks[1]);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -680,29 +678,10 @@ static int usbhs_probe(struct platform_device *pdev)
|
|||
INIT_DELAYED_WORK(&priv->notify_hotplug_work, usbhsc_notify_hotplug);
|
||||
spin_lock_init(usbhs_priv_to_lock(priv));
|
||||
|
||||
/*
|
||||
* Acquire clocks and enable power management (PM) early in the
|
||||
* probe process, as the driver accesses registers during
|
||||
* initialization. Ensure the device is active before proceeding.
|
||||
*/
|
||||
pm_runtime_enable(dev);
|
||||
|
||||
ret = usbhsc_clk_get(dev, priv);
|
||||
if (ret)
|
||||
goto probe_pm_disable;
|
||||
|
||||
ret = pm_runtime_resume_and_get(dev);
|
||||
if (ret)
|
||||
goto probe_clk_put;
|
||||
|
||||
ret = usbhsc_clk_prepare_enable(priv);
|
||||
if (ret)
|
||||
goto probe_pm_put;
|
||||
|
||||
/* call pipe and module init */
|
||||
ret = usbhs_pipe_probe(priv);
|
||||
if (ret < 0)
|
||||
goto probe_clk_dis_unprepare;
|
||||
return ret;
|
||||
|
||||
ret = usbhs_fifo_probe(priv);
|
||||
if (ret < 0)
|
||||
|
|
@ -719,6 +698,10 @@ static int usbhs_probe(struct platform_device *pdev)
|
|||
if (ret)
|
||||
goto probe_fail_rst;
|
||||
|
||||
ret = usbhsc_clk_get(dev, priv);
|
||||
if (ret)
|
||||
goto probe_fail_clks;
|
||||
|
||||
/*
|
||||
* deviece reset here because
|
||||
* USB device might be used in boot loader.
|
||||
|
|
@ -734,7 +717,7 @@ static int usbhs_probe(struct platform_device *pdev)
|
|||
dev_warn(dev, "USB function not selected (GPIO %d)\n",
|
||||
priv->dparam.enable_gpio);
|
||||
ret = -ENOTSUPP;
|
||||
goto probe_assert_rest;
|
||||
goto probe_end_mod_exit;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -748,19 +731,14 @@ static int usbhs_probe(struct platform_device *pdev)
|
|||
ret = usbhs_platform_call(priv, hardware_init, pdev);
|
||||
if (ret < 0) {
|
||||
dev_err(dev, "platform init failed.\n");
|
||||
goto probe_assert_rest;
|
||||
goto probe_end_mod_exit;
|
||||
}
|
||||
|
||||
/* reset phy for connection */
|
||||
usbhs_platform_call(priv, phy_reset, pdev);
|
||||
|
||||
/*
|
||||
* Disable the clocks that were enabled earlier in the probe path,
|
||||
* and let the driver handle the clocks beyond this point.
|
||||
*/
|
||||
usbhsc_clk_disable_unprepare(priv);
|
||||
pm_runtime_put(dev);
|
||||
|
||||
/* power control */
|
||||
pm_runtime_enable(dev);
|
||||
if (!usbhs_get_dparam(priv, runtime_pwctrl)) {
|
||||
usbhsc_power_ctrl(priv, 1);
|
||||
usbhs_mod_autonomy_mode(priv);
|
||||
|
|
@ -777,7 +755,9 @@ static int usbhs_probe(struct platform_device *pdev)
|
|||
|
||||
return ret;
|
||||
|
||||
probe_assert_rest:
|
||||
probe_end_mod_exit:
|
||||
usbhsc_clk_put(priv);
|
||||
probe_fail_clks:
|
||||
reset_control_assert(priv->rsts);
|
||||
probe_fail_rst:
|
||||
usbhs_mod_remove(priv);
|
||||
|
|
@ -785,14 +765,6 @@ probe_end_fifo_exit:
|
|||
usbhs_fifo_remove(priv);
|
||||
probe_end_pipe_exit:
|
||||
usbhs_pipe_remove(priv);
|
||||
probe_clk_dis_unprepare:
|
||||
usbhsc_clk_disable_unprepare(priv);
|
||||
probe_pm_put:
|
||||
pm_runtime_put(dev);
|
||||
probe_clk_put:
|
||||
usbhsc_clk_put(priv);
|
||||
probe_pm_disable:
|
||||
pm_runtime_disable(dev);
|
||||
|
||||
dev_info(dev, "probe failed (%d)\n", ret);
|
||||
|
||||
|
|
@ -805,8 +777,6 @@ static int usbhs_remove(struct platform_device *pdev)
|
|||
|
||||
dev_dbg(&pdev->dev, "usb remove\n");
|
||||
|
||||
flush_delayed_work(&priv->notify_hotplug_work);
|
||||
|
||||
/* power off */
|
||||
if (!usbhs_get_dparam(priv, runtime_pwctrl))
|
||||
usbhsc_power_ctrl(priv, 0);
|
||||
|
|
|
|||
|
|
@ -1094,7 +1094,7 @@ int usbhs_mod_gadget_probe(struct usbhs_priv *priv)
|
|||
goto usbhs_mod_gadget_probe_err_gpriv;
|
||||
}
|
||||
|
||||
gpriv->transceiver = devm_usb_get_phy(dev, USB_PHY_TYPE_UNDEFINED);
|
||||
gpriv->transceiver = usb_get_phy(USB_PHY_TYPE_UNDEFINED);
|
||||
dev_info(dev, "%stransceiver found\n",
|
||||
!IS_ERR(gpriv->transceiver) ? "" : "no ");
|
||||
|
||||
|
|
|
|||
|
|
@ -317,15 +317,14 @@ usb_role_switch_register(struct device *parent,
|
|||
sw->dev.type = &usb_role_dev_type;
|
||||
dev_set_name(&sw->dev, "%s-role-switch", dev_name(parent));
|
||||
|
||||
sw->registered = true;
|
||||
|
||||
ret = device_register(&sw->dev);
|
||||
if (ret) {
|
||||
sw->registered = false;
|
||||
put_device(&sw->dev);
|
||||
return ERR_PTR(ret);
|
||||
}
|
||||
|
||||
sw->registered = true;
|
||||
|
||||
/* TODO: Symlinks for the host port and the device controller. */
|
||||
|
||||
return sw;
|
||||
|
|
|
|||
|
|
@ -224,7 +224,6 @@ static const struct usb_device_id id_table[] = {
|
|||
{ USB_DEVICE(0x19CF, 0x3000) }, /* Parrot NMEA GPS Flight Recorder */
|
||||
{ USB_DEVICE(0x1ADB, 0x0001) }, /* Schweitzer Engineering C662 Cable */
|
||||
{ USB_DEVICE(0x1B1C, 0x1C00) }, /* Corsair USB Dongle */
|
||||
{ USB_DEVICE(0x1B93, 0x1013) }, /* Phoenix Contact UPS Device */
|
||||
{ USB_DEVICE(0x1BA4, 0x0002) }, /* Silicon Labs 358x factory default */
|
||||
{ USB_DEVICE(0x1BE3, 0x07A6) }, /* WAGO 750-923 USB Service Cable */
|
||||
{ USB_DEVICE(0x1D6F, 0x0010) }, /* Seluxit ApS RF Dongle */
|
||||
|
|
|
|||
|
|
@ -1057,22 +1057,6 @@ static const struct usb_device_id id_table_combined[] = {
|
|||
.driver_info = (kernel_ulong_t)&ftdi_jtag_quirk },
|
||||
/* GMC devices */
|
||||
{ USB_DEVICE(GMC_VID, GMC_Z216C_PID) },
|
||||
/* Altera USB Blaster 3 */
|
||||
{ USB_DEVICE_INTERFACE_NUMBER(ALTERA_VID, ALTERA_UB3_6022_PID, 1) },
|
||||
{ USB_DEVICE_INTERFACE_NUMBER(ALTERA_VID, ALTERA_UB3_6025_PID, 2) },
|
||||
{ USB_DEVICE_INTERFACE_NUMBER(ALTERA_VID, ALTERA_UB3_6026_PID, 2) },
|
||||
{ USB_DEVICE_INTERFACE_NUMBER(ALTERA_VID, ALTERA_UB3_6026_PID, 3) },
|
||||
{ USB_DEVICE_INTERFACE_NUMBER(ALTERA_VID, ALTERA_UB3_6029_PID, 2) },
|
||||
{ USB_DEVICE_INTERFACE_NUMBER(ALTERA_VID, ALTERA_UB3_602A_PID, 2) },
|
||||
{ USB_DEVICE_INTERFACE_NUMBER(ALTERA_VID, ALTERA_UB3_602A_PID, 3) },
|
||||
{ USB_DEVICE_INTERFACE_NUMBER(ALTERA_VID, ALTERA_UB3_602C_PID, 1) },
|
||||
{ USB_DEVICE_INTERFACE_NUMBER(ALTERA_VID, ALTERA_UB3_602D_PID, 1) },
|
||||
{ USB_DEVICE_INTERFACE_NUMBER(ALTERA_VID, ALTERA_UB3_602D_PID, 2) },
|
||||
{ USB_DEVICE_INTERFACE_NUMBER(ALTERA_VID, ALTERA_UB3_602E_PID, 1) },
|
||||
{ USB_DEVICE_INTERFACE_NUMBER(ALTERA_VID, ALTERA_UB3_602E_PID, 2) },
|
||||
{ USB_DEVICE_INTERFACE_NUMBER(ALTERA_VID, ALTERA_UB3_602E_PID, 3) },
|
||||
/* Abacus Electrics */
|
||||
{ USB_DEVICE(FTDI_VID, ABACUS_OPTICAL_PROBE_PID) },
|
||||
{ } /* Terminating entry */
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -435,11 +435,6 @@
|
|||
#define LINX_FUTURE_1_PID 0xF44B /* Linx future device */
|
||||
#define LINX_FUTURE_2_PID 0xF44C /* Linx future device */
|
||||
|
||||
/*
|
||||
* Abacus Electrics
|
||||
*/
|
||||
#define ABACUS_OPTICAL_PROBE_PID 0xf458 /* ABACUS ELECTRICS Optical Probe */
|
||||
|
||||
/*
|
||||
* Oceanic product ids
|
||||
*/
|
||||
|
|
@ -1610,16 +1605,3 @@
|
|||
*/
|
||||
#define GMC_VID 0x1cd7
|
||||
#define GMC_Z216C_PID 0x0217 /* GMC Z216C Adapter IR-USB */
|
||||
|
||||
/*
|
||||
* Altera USB Blaster 3 (http://www.altera.com).
|
||||
*/
|
||||
#define ALTERA_VID 0x09fb
|
||||
#define ALTERA_UB3_6022_PID 0x6022
|
||||
#define ALTERA_UB3_6025_PID 0x6025
|
||||
#define ALTERA_UB3_6026_PID 0x6026
|
||||
#define ALTERA_UB3_6029_PID 0x6029
|
||||
#define ALTERA_UB3_602A_PID 0x602a
|
||||
#define ALTERA_UB3_602C_PID 0x602c
|
||||
#define ALTERA_UB3_602D_PID 0x602d
|
||||
#define ALTERA_UB3_602E_PID 0x602e
|
||||
|
|
|
|||
|
|
@ -611,7 +611,6 @@ static void option_instat_callback(struct urb *urb);
|
|||
/* Sierra Wireless products */
|
||||
#define SIERRA_VENDOR_ID 0x1199
|
||||
#define SIERRA_PRODUCT_EM9191 0x90d3
|
||||
#define SIERRA_PRODUCT_EM9291 0x90e3
|
||||
|
||||
/* UNISOC (Spreadtrum) products */
|
||||
#define UNISOC_VENDOR_ID 0x1782
|
||||
|
|
@ -620,6 +619,15 @@ static void option_instat_callback(struct urb *urb);
|
|||
/* Luat Air72*U series based on UNISOC UIS8910 uses UNISOC's vendor ID */
|
||||
#define LUAT_PRODUCT_AIR720U 0x4e00
|
||||
|
||||
/* MeiG Smart Technology products */
|
||||
#define MEIGSMART_VENDOR_ID 0x2dee
|
||||
/* MeiG Smart SRM825L based on Qualcomm 315 */
|
||||
#define MEIGSMART_PRODUCT_SRM825L 0x4d22
|
||||
/* MeiG Smart SLM320 based on UNISOC UIS8910 */
|
||||
#define MEIGSMART_PRODUCT_SLM320 0x4d41
|
||||
/* MeiG Smart SLM770A based on ASR1803 */
|
||||
#define MEIGSMART_PRODUCT_SLM770A 0x4d57
|
||||
|
||||
/* Device flags */
|
||||
|
||||
/* Highest interface number which can be used with NCTRL() and RSVD() */
|
||||
|
|
@ -1359,23 +1367,23 @@ static const struct usb_device_id option_ids[] = {
|
|||
.driver_info = NCTRL(2) | RSVD(3) },
|
||||
{ USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x1063, 0xff), /* Telit LN920 (ECM) */
|
||||
.driver_info = NCTRL(0) | RSVD(1) },
|
||||
{ USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x1070, 0xff), /* Telit FN990A (rmnet) */
|
||||
{ USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x1070, 0xff), /* Telit FN990 (rmnet) */
|
||||
.driver_info = NCTRL(0) | RSVD(1) | RSVD(2) },
|
||||
{ USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x1071, 0xff), /* Telit FN990A (MBIM) */
|
||||
{ USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x1071, 0xff), /* Telit FN990 (MBIM) */
|
||||
.driver_info = NCTRL(0) | RSVD(1) },
|
||||
{ USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x1072, 0xff), /* Telit FN990A (RNDIS) */
|
||||
{ USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x1072, 0xff), /* Telit FN990 (RNDIS) */
|
||||
.driver_info = NCTRL(2) | RSVD(3) },
|
||||
{ USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x1073, 0xff), /* Telit FN990A (ECM) */
|
||||
{ USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x1073, 0xff), /* Telit FN990 (ECM) */
|
||||
.driver_info = NCTRL(0) | RSVD(1) },
|
||||
{ USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x1075, 0xff), /* Telit FN990A (PCIe) */
|
||||
{ USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x1075, 0xff), /* Telit FN990 (PCIe) */
|
||||
.driver_info = RSVD(0) },
|
||||
{ USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x1080, 0xff), /* Telit FE990A (rmnet) */
|
||||
{ USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x1080, 0xff), /* Telit FE990 (rmnet) */
|
||||
.driver_info = NCTRL(0) | RSVD(1) | RSVD(2) },
|
||||
{ USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x1081, 0xff), /* Telit FE990A (MBIM) */
|
||||
{ USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x1081, 0xff), /* Telit FE990 (MBIM) */
|
||||
.driver_info = NCTRL(0) | RSVD(1) },
|
||||
{ USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x1082, 0xff), /* Telit FE990A (RNDIS) */
|
||||
{ USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x1082, 0xff), /* Telit FE990 (RNDIS) */
|
||||
.driver_info = NCTRL(2) | RSVD(3) },
|
||||
{ USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x1083, 0xff), /* Telit FE990A (ECM) */
|
||||
{ USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x1083, 0xff), /* Telit FE990 (ECM) */
|
||||
.driver_info = NCTRL(0) | RSVD(1) },
|
||||
{ USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x10a0, 0xff), /* Telit FN20C04 (rmnet) */
|
||||
.driver_info = RSVD(0) | NCTRL(3) },
|
||||
|
|
@ -1389,44 +1397,12 @@ static const struct usb_device_id option_ids[] = {
|
|||
.driver_info = RSVD(0) | NCTRL(2) | RSVD(3) | RSVD(4) },
|
||||
{ USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x10aa, 0xff), /* Telit FN920C04 (MBIM) */
|
||||
.driver_info = NCTRL(3) | RSVD(4) | RSVD(5) },
|
||||
{ USB_DEVICE_AND_INTERFACE_INFO(TELIT_VENDOR_ID, 0x10b0, 0xff, 0xff, 0x30), /* Telit FE990B (rmnet) */
|
||||
.driver_info = NCTRL(5) },
|
||||
{ USB_DEVICE_AND_INTERFACE_INFO(TELIT_VENDOR_ID, 0x10b0, 0xff, 0xff, 0x40) },
|
||||
{ USB_DEVICE_AND_INTERFACE_INFO(TELIT_VENDOR_ID, 0x10b0, 0xff, 0xff, 0x60) },
|
||||
{ USB_DEVICE_AND_INTERFACE_INFO(TELIT_VENDOR_ID, 0x10b1, 0xff, 0xff, 0x30), /* Telit FE990B (MBIM) */
|
||||
.driver_info = NCTRL(6) },
|
||||
{ USB_DEVICE_AND_INTERFACE_INFO(TELIT_VENDOR_ID, 0x10b1, 0xff, 0xff, 0x40) },
|
||||
{ USB_DEVICE_AND_INTERFACE_INFO(TELIT_VENDOR_ID, 0x10b1, 0xff, 0xff, 0x60) },
|
||||
{ USB_DEVICE_AND_INTERFACE_INFO(TELIT_VENDOR_ID, 0x10b2, 0xff, 0xff, 0x30), /* Telit FE990B (RNDIS) */
|
||||
.driver_info = NCTRL(6) },
|
||||
{ USB_DEVICE_AND_INTERFACE_INFO(TELIT_VENDOR_ID, 0x10b2, 0xff, 0xff, 0x40) },
|
||||
{ USB_DEVICE_AND_INTERFACE_INFO(TELIT_VENDOR_ID, 0x10b2, 0xff, 0xff, 0x60) },
|
||||
{ USB_DEVICE_AND_INTERFACE_INFO(TELIT_VENDOR_ID, 0x10b3, 0xff, 0xff, 0x30), /* Telit FE990B (ECM) */
|
||||
.driver_info = NCTRL(6) },
|
||||
{ USB_DEVICE_AND_INTERFACE_INFO(TELIT_VENDOR_ID, 0x10b3, 0xff, 0xff, 0x40) },
|
||||
{ USB_DEVICE_AND_INTERFACE_INFO(TELIT_VENDOR_ID, 0x10b3, 0xff, 0xff, 0x60) },
|
||||
{ USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x10c0, 0xff), /* Telit FE910C04 (rmnet) */
|
||||
.driver_info = RSVD(0) | NCTRL(3) },
|
||||
{ USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x10c4, 0xff), /* Telit FE910C04 (rmnet) */
|
||||
.driver_info = RSVD(0) | NCTRL(3) },
|
||||
{ USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x10c8, 0xff), /* Telit FE910C04 (rmnet) */
|
||||
.driver_info = RSVD(0) | NCTRL(2) | RSVD(3) | RSVD(4) },
|
||||
{ USB_DEVICE_AND_INTERFACE_INFO(TELIT_VENDOR_ID, 0x10d0, 0xff, 0xff, 0x30), /* Telit FN990B (rmnet) */
|
||||
.driver_info = NCTRL(5) },
|
||||
{ USB_DEVICE_AND_INTERFACE_INFO(TELIT_VENDOR_ID, 0x10d0, 0xff, 0xff, 0x40) },
|
||||
{ USB_DEVICE_AND_INTERFACE_INFO(TELIT_VENDOR_ID, 0x10d0, 0xff, 0xff, 0x60) },
|
||||
{ USB_DEVICE_AND_INTERFACE_INFO(TELIT_VENDOR_ID, 0x10d1, 0xff, 0xff, 0x30), /* Telit FN990B (MBIM) */
|
||||
.driver_info = NCTRL(6) },
|
||||
{ USB_DEVICE_AND_INTERFACE_INFO(TELIT_VENDOR_ID, 0x10d1, 0xff, 0xff, 0x40) },
|
||||
{ USB_DEVICE_AND_INTERFACE_INFO(TELIT_VENDOR_ID, 0x10d1, 0xff, 0xff, 0x60) },
|
||||
{ USB_DEVICE_AND_INTERFACE_INFO(TELIT_VENDOR_ID, 0x10d2, 0xff, 0xff, 0x30), /* Telit FN990B (RNDIS) */
|
||||
.driver_info = NCTRL(6) },
|
||||
{ USB_DEVICE_AND_INTERFACE_INFO(TELIT_VENDOR_ID, 0x10d2, 0xff, 0xff, 0x40) },
|
||||
{ USB_DEVICE_AND_INTERFACE_INFO(TELIT_VENDOR_ID, 0x10d2, 0xff, 0xff, 0x60) },
|
||||
{ USB_DEVICE_AND_INTERFACE_INFO(TELIT_VENDOR_ID, 0x10d3, 0xff, 0xff, 0x30), /* Telit FN990B (ECM) */
|
||||
.driver_info = NCTRL(6) },
|
||||
{ USB_DEVICE_AND_INTERFACE_INFO(TELIT_VENDOR_ID, 0x10d3, 0xff, 0xff, 0x40) },
|
||||
{ USB_DEVICE_AND_INTERFACE_INFO(TELIT_VENDOR_ID, 0x10d3, 0xff, 0xff, 0x60) },
|
||||
{ USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_ME910),
|
||||
.driver_info = NCTRL(0) | RSVD(1) | RSVD(3) },
|
||||
{ USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_ME910_DUAL_MODEM),
|
||||
|
|
@ -2371,14 +2347,6 @@ static const struct usb_device_id option_ids[] = {
|
|||
{ USB_DEVICE_INTERFACE_CLASS(0x2cb7, 0x0a05, 0xff) }, /* Fibocom FM650-CN (NCM mode) */
|
||||
{ USB_DEVICE_INTERFACE_CLASS(0x2cb7, 0x0a06, 0xff) }, /* Fibocom FM650-CN (RNDIS mode) */
|
||||
{ USB_DEVICE_INTERFACE_CLASS(0x2cb7, 0x0a07, 0xff) }, /* Fibocom FM650-CN (MBIM mode) */
|
||||
{ USB_DEVICE_AND_INTERFACE_INFO(0x2dee, 0x4d41, 0xff, 0, 0) }, /* MeiG Smart SLM320 */
|
||||
{ USB_DEVICE_AND_INTERFACE_INFO(0x2dee, 0x4d57, 0xff, 0, 0) }, /* MeiG Smart SLM770A */
|
||||
{ USB_DEVICE_AND_INTERFACE_INFO(0x2dee, 0x4d22, 0xff, 0, 0) }, /* MeiG Smart SRM815 */
|
||||
{ USB_DEVICE_AND_INTERFACE_INFO(0x2dee, 0x4d22, 0xff, 0x10, 0x02) }, /* MeiG Smart SLM828 */
|
||||
{ USB_DEVICE_AND_INTERFACE_INFO(0x2dee, 0x4d22, 0xff, 0x10, 0x03) }, /* MeiG Smart SLM828 */
|
||||
{ USB_DEVICE_AND_INTERFACE_INFO(0x2dee, 0x4d22, 0xff, 0xff, 0x30) }, /* MeiG Smart SRM815 and SRM825L */
|
||||
{ USB_DEVICE_AND_INTERFACE_INFO(0x2dee, 0x4d22, 0xff, 0xff, 0x40) }, /* MeiG Smart SRM825L */
|
||||
{ USB_DEVICE_AND_INTERFACE_INFO(0x2dee, 0x4d22, 0xff, 0xff, 0x60) }, /* MeiG Smart SRM825L */
|
||||
{ USB_DEVICE_INTERFACE_CLASS(0x2df3, 0x9d03, 0xff) }, /* LongSung M5710 */
|
||||
{ USB_DEVICE_INTERFACE_CLASS(0x305a, 0x1404, 0xff) }, /* GosunCn GM500 RNDIS */
|
||||
{ USB_DEVICE_INTERFACE_CLASS(0x305a, 0x1405, 0xff) }, /* GosunCn GM500 MBIM */
|
||||
|
|
@ -2433,15 +2401,17 @@ static const struct usb_device_id option_ids[] = {
|
|||
{ USB_DEVICE_AND_INTERFACE_INFO(SIERRA_VENDOR_ID, SIERRA_PRODUCT_EM9191, 0xff, 0xff, 0x30) },
|
||||
{ USB_DEVICE_AND_INTERFACE_INFO(SIERRA_VENDOR_ID, SIERRA_PRODUCT_EM9191, 0xff, 0xff, 0x40) },
|
||||
{ USB_DEVICE_AND_INTERFACE_INFO(SIERRA_VENDOR_ID, SIERRA_PRODUCT_EM9191, 0xff, 0, 0) },
|
||||
{ USB_DEVICE_AND_INTERFACE_INFO(SIERRA_VENDOR_ID, SIERRA_PRODUCT_EM9291, 0xff, 0xff, 0x30) },
|
||||
{ USB_DEVICE_AND_INTERFACE_INFO(SIERRA_VENDOR_ID, SIERRA_PRODUCT_EM9291, 0xff, 0xff, 0x40) },
|
||||
{ USB_DEVICE_AND_INTERFACE_INFO(UNISOC_VENDOR_ID, TOZED_PRODUCT_LT70C, 0xff, 0, 0) },
|
||||
{ USB_DEVICE_AND_INTERFACE_INFO(UNISOC_VENDOR_ID, LUAT_PRODUCT_AIR720U, 0xff, 0, 0) },
|
||||
{ USB_DEVICE_AND_INTERFACE_INFO(MEIGSMART_VENDOR_ID, MEIGSMART_PRODUCT_SLM320, 0xff, 0, 0) },
|
||||
{ USB_DEVICE_AND_INTERFACE_INFO(MEIGSMART_VENDOR_ID, MEIGSMART_PRODUCT_SLM770A, 0xff, 0, 0) },
|
||||
{ USB_DEVICE_AND_INTERFACE_INFO(MEIGSMART_VENDOR_ID, MEIGSMART_PRODUCT_SRM825L, 0xff, 0xff, 0x30) },
|
||||
{ USB_DEVICE_AND_INTERFACE_INFO(MEIGSMART_VENDOR_ID, MEIGSMART_PRODUCT_SRM825L, 0xff, 0xff, 0x40) },
|
||||
{ USB_DEVICE_AND_INTERFACE_INFO(MEIGSMART_VENDOR_ID, MEIGSMART_PRODUCT_SRM825L, 0xff, 0xff, 0x60) },
|
||||
{ USB_DEVICE_INTERFACE_CLASS(0x1bbb, 0x0530, 0xff), /* TCL IK512 MBIM */
|
||||
.driver_info = NCTRL(1) },
|
||||
{ USB_DEVICE_INTERFACE_CLASS(0x1bbb, 0x0640, 0xff), /* TCL IK512 ECM */
|
||||
.driver_info = NCTRL(3) },
|
||||
{ USB_DEVICE_INTERFACE_CLASS(0x2949, 0x8700, 0xff) }, /* Neoway N723-EA */
|
||||
{ } /* Terminating entry */
|
||||
};
|
||||
MODULE_DEVICE_TABLE(usb, option_ids);
|
||||
|
|
|
|||
|
|
@ -555,7 +555,7 @@ static void qt2_process_read_urb(struct urb *urb)
|
|||
|
||||
newport = *(ch + 3);
|
||||
|
||||
if (newport >= serial->num_ports) {
|
||||
if (newport > serial->num_ports) {
|
||||
dev_err(&port->dev,
|
||||
"%s - port change to invalid port: %i\n",
|
||||
__func__, newport);
|
||||
|
|
|
|||
|
|
@ -101,11 +101,6 @@ DEVICE(nokia, NOKIA_IDS);
|
|||
{ USB_DEVICE(0x09d7, 0x0100) } /* NovAtel FlexPack GPS */
|
||||
DEVICE_N(novatel_gps, NOVATEL_IDS, 3);
|
||||
|
||||
/* OWON electronic test and measurement equipment driver */
|
||||
#define OWON_IDS() \
|
||||
{ USB_DEVICE(0x5345, 0x1234) } /* HDS200 oscilloscopes and others */
|
||||
DEVICE(owon, OWON_IDS);
|
||||
|
||||
/* Siemens USB/MPI adapter */
|
||||
#define SIEMENS_IDS() \
|
||||
{ USB_DEVICE(0x908, 0x0004) }
|
||||
|
|
@ -140,7 +135,6 @@ static struct usb_serial_driver * const serial_drivers[] = {
|
|||
&motorola_tetra_device,
|
||||
&nokia_device,
|
||||
&novatel_gps_device,
|
||||
&owon_device,
|
||||
&siemens_mpi_device,
|
||||
&suunto_device,
|
||||
&vivopay_device,
|
||||
|
|
@ -160,7 +154,6 @@ static const struct usb_device_id id_table[] = {
|
|||
MOTOROLA_TETRA_IDS(),
|
||||
NOKIA_IDS(),
|
||||
NOVATEL_IDS(),
|
||||
OWON_IDS(),
|
||||
SIEMENS_IDS(),
|
||||
SUUNTO_IDS(),
|
||||
VIVOPAY_IDS(),
|
||||
|
|
|
|||
|
|
@ -255,13 +255,6 @@ UNUSUAL_DEV( 0x0421, 0x06aa, 0x1110, 0x1110,
|
|||
USB_SC_DEVICE, USB_PR_DEVICE, NULL,
|
||||
US_FL_MAX_SECTORS_64 ),
|
||||
|
||||
/* Added by Lubomir Rintel <lkundrak@v3.sk>, a very fine chap */
|
||||
UNUSUAL_DEV( 0x0421, 0x06c2, 0x0000, 0x0406,
|
||||
"Nokia",
|
||||
"Nokia 208",
|
||||
USB_SC_DEVICE, USB_PR_DEVICE, NULL,
|
||||
US_FL_MAX_SECTORS_64 ),
|
||||
|
||||
#ifdef NO_SDDR09
|
||||
UNUSUAL_DEV( 0x0436, 0x0005, 0x0100, 0x0100,
|
||||
"Microtech",
|
||||
|
|
|
|||
|
|
@ -52,13 +52,6 @@ UNUSUAL_DEV(0x059f, 0x1061, 0x0000, 0x9999,
|
|||
USB_SC_DEVICE, USB_PR_DEVICE, NULL,
|
||||
US_FL_NO_REPORT_OPCODES | US_FL_NO_SAME),
|
||||
|
||||
/* Reported-by: Zhihong Zhou <zhouzhihong@greatwall.com.cn> */
|
||||
UNUSUAL_DEV(0x0781, 0x55e8, 0x0000, 0x9999,
|
||||
"SanDisk",
|
||||
"",
|
||||
USB_SC_DEVICE, USB_PR_DEVICE, NULL,
|
||||
US_FL_IGNORE_UAS),
|
||||
|
||||
/* Reported-by: Hongling Zeng <zenghongling@kylinos.cn> */
|
||||
UNUSUAL_DEV(0x090c, 0x2000, 0x0000, 0x9999,
|
||||
"Hiksemi",
|
||||
|
|
@ -90,13 +83,6 @@ UNUSUAL_DEV(0x0bc2, 0x331a, 0x0000, 0x9999,
|
|||
USB_SC_DEVICE, USB_PR_DEVICE, NULL,
|
||||
US_FL_NO_REPORT_LUNS),
|
||||
|
||||
/* Reported-by: Oliver Neukum <oneukum@suse.com> */
|
||||
UNUSUAL_DEV(0x125f, 0xa94a, 0x0160, 0x0160,
|
||||
"ADATA",
|
||||
"Portable HDD CH94",
|
||||
USB_SC_DEVICE, USB_PR_DEVICE, NULL,
|
||||
US_FL_NO_ATA_1X),
|
||||
|
||||
/* Reported-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> */
|
||||
UNUSUAL_DEV(0x13fd, 0x3940, 0x0000, 0x9999,
|
||||
"Initio Corporation",
|
||||
|
|
|
|||
|
|
@ -217,11 +217,6 @@ static int rt1711h_probe(struct i2c_client *client,
|
|||
{
|
||||
int ret;
|
||||
struct rt1711h_chip *chip;
|
||||
const u16 alert_mask = TCPC_ALERT_TX_SUCCESS | TCPC_ALERT_TX_DISCARDED |
|
||||
TCPC_ALERT_TX_FAILED | TCPC_ALERT_RX_HARD_RST |
|
||||
TCPC_ALERT_RX_STATUS | TCPC_ALERT_POWER_STATUS |
|
||||
TCPC_ALERT_CC_STATUS | TCPC_ALERT_RX_BUF_OVF |
|
||||
TCPC_ALERT_FAULT;
|
||||
|
||||
ret = rt1711h_check_revision(client);
|
||||
if (ret < 0) {
|
||||
|
|
@ -263,12 +258,6 @@ static int rt1711h_probe(struct i2c_client *client,
|
|||
dev_name(chip->dev), chip);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
/* Enable alert interrupts */
|
||||
ret = rt1711h_write16(chip, TCPC_ALERT_MASK, alert_mask);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
enable_irq_wake(client->irq);
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -3009,7 +3009,7 @@ static void run_state_machine(struct tcpm_port *port)
|
|||
port->caps_count = 0;
|
||||
port->pd_capable = true;
|
||||
tcpm_set_state_cond(port, SRC_SEND_CAPABILITIES_TIMEOUT,
|
||||
PD_T_SENDER_RESPONSE);
|
||||
PD_T_SEND_SOURCE_CAP);
|
||||
}
|
||||
break;
|
||||
case SRC_SEND_CAPABILITIES_TIMEOUT:
|
||||
|
|
@ -3761,7 +3761,7 @@ static void _tcpm_cc_change(struct tcpm_port *port, enum typec_cc_status cc1,
|
|||
case SNK_TRY_WAIT_DEBOUNCE:
|
||||
if (!tcpm_port_is_sink(port)) {
|
||||
port->max_wait = 0;
|
||||
tcpm_set_state(port, SRC_TRYWAIT, PD_T_PD_DEBOUNCE);
|
||||
tcpm_set_state(port, SRC_TRYWAIT, 0);
|
||||
}
|
||||
break;
|
||||
case SRC_TRY_WAIT:
|
||||
|
|
|
|||
|
|
@ -272,8 +272,6 @@ void ucsi_displayport_remove_partner(struct typec_altmode *alt)
|
|||
if (!dp)
|
||||
return;
|
||||
|
||||
cancel_work_sync(&dp->work);
|
||||
|
||||
dp->data.conf = 0;
|
||||
dp->data.status = 0;
|
||||
dp->initialized = false;
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@
|
|||
* difficult to estimate the time it takes for the system to process the command
|
||||
* before it is actually passed to the PPM.
|
||||
*/
|
||||
#define UCSI_TIMEOUT_MS 10000
|
||||
#define UCSI_TIMEOUT_MS 5000
|
||||
|
||||
/*
|
||||
* UCSI_SWAP_TIMEOUT_MS - Timeout for role swap requests
|
||||
|
|
|
|||
|
|
@ -671,9 +671,8 @@ struct hid_descriptor {
|
|||
__le16 bcdHID;
|
||||
__u8 bCountryCode;
|
||||
__u8 bNumDescriptors;
|
||||
struct hid_class_descriptor rpt_desc;
|
||||
|
||||
struct hid_class_descriptor opt_descs[];
|
||||
struct hid_class_descriptor desc[1];
|
||||
} __attribute__ ((packed));
|
||||
|
||||
#define HID_DEVICE(b, g, ven, prod) \
|
||||
|
|
|
|||
|
|
@ -528,7 +528,6 @@ extern void __init hrtimers_init(void);
|
|||
extern void sysrq_timer_list_show(void);
|
||||
|
||||
int hrtimers_prepare_cpu(unsigned int cpu);
|
||||
int hrtimers_cpu_starting(unsigned int cpu);
|
||||
#ifdef CONFIG_HOTPLUG_CPU
|
||||
int hrtimers_dead_cpu(unsigned int cpu);
|
||||
#else
|
||||
|
|
|
|||
|
|
@ -713,12 +713,13 @@ struct usb_device {
|
|||
|
||||
unsigned long active_duration;
|
||||
|
||||
#ifdef CONFIG_PM
|
||||
unsigned long connect_time;
|
||||
|
||||
unsigned do_remote_wakeup:1;
|
||||
unsigned reset_resume:1;
|
||||
unsigned port_is_suspended:1;
|
||||
|
||||
#endif
|
||||
struct wusb_dev *wusb_dev;
|
||||
int slot_id;
|
||||
enum usb_device_removable removable;
|
||||
|
|
|
|||
|
|
@ -498,7 +498,9 @@ extern void usb_hcd_pci_shutdown(struct pci_dev *dev);
|
|||
|
||||
extern int usb_hcd_amd_remote_wakeup_quirk(struct pci_dev *dev);
|
||||
|
||||
#ifdef CONFIG_PM
|
||||
extern const struct dev_pm_ops usb_hcd_pci_pm_ops;
|
||||
#endif
|
||||
#endif /* CONFIG_USB_PCI */
|
||||
|
||||
/* pci-ish (pdev null is ok) buffer alloc/mapping support */
|
||||
|
|
|
|||
|
|
@ -2066,15 +2066,6 @@ int hrtimers_prepare_cpu(unsigned int cpu)
|
|||
}
|
||||
|
||||
cpu_base->cpu = cpu;
|
||||
hrtimer_cpu_base_init_expiry_lock(cpu_base);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int hrtimers_cpu_starting(unsigned int cpu)
|
||||
{
|
||||
struct hrtimer_cpu_base *cpu_base = this_cpu_ptr(&hrtimer_bases);
|
||||
|
||||
/* Clear out any left over state from a CPU down operation */
|
||||
cpu_base->active_bases = 0;
|
||||
cpu_base->hres_active = 0;
|
||||
cpu_base->hang_detected = 0;
|
||||
|
|
@ -2082,6 +2073,7 @@ int hrtimers_cpu_starting(unsigned int cpu)
|
|||
cpu_base->softirq_next_timer = NULL;
|
||||
cpu_base->expires_next = KTIME_MAX;
|
||||
cpu_base->softirq_expires_next = KTIME_MAX;
|
||||
hrtimer_cpu_base_init_expiry_lock(cpu_base);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -2167,7 +2159,6 @@ int hrtimers_dead_cpu(unsigned int scpu)
|
|||
void __init hrtimers_init(void)
|
||||
{
|
||||
hrtimers_prepare_cpu(smp_processor_id());
|
||||
hrtimers_cpu_starting(smp_processor_id());
|
||||
open_softirq(HRTIMER_SOFTIRQ, hrtimer_run_softirq);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -36,10 +36,6 @@ KBUILD_CFLAGS += $(call cc-option, -Wstringop-truncation)
|
|||
KBUILD_CFLAGS += -Wno-missing-field-initializers
|
||||
KBUILD_CFLAGS += -Wno-sign-compare
|
||||
|
||||
ifdef CONFIG_CC_IS_CLANG
|
||||
KBUILD_CFLAGS += -Wno-enum-enum-conversion
|
||||
endif
|
||||
|
||||
KBUILD_CPPFLAGS += -DKBUILD_EXTRA_WARN1
|
||||
|
||||
else
|
||||
|
|
@ -55,7 +51,6 @@ KBUILD_CFLAGS += -Wno-format-zero-length
|
|||
KBUILD_CFLAGS += $(call cc-disable-warning, pointer-to-enum-cast)
|
||||
KBUILD_CFLAGS += $(call cc-disable-warning, unaligned-access)
|
||||
KBUILD_CFLAGS += $(call cc-disable-warning, cast-function-type-strict)
|
||||
KBUILD_CFLAGS += -Wno-enum-compare-conditional
|
||||
endif
|
||||
|
||||
endif
|
||||
|
|
|
|||
Loading…
Reference in a new issue