mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-25 16:40:52 +07:00
USB fixes for 3.11-rc3
Here are a number of USB fixes for 3.11-rc3. Lots of little things, nothing major. A number of new device ids, build fixes for DMA, and a bunch of other minor things. All of these have been in the linux-next tree. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (GNU/Linux) iEYEABECAAYFAlHyp6cACgkQMUfUDdst+ynfQACfb+akG9GYjNpdjkiun0dh2DG2 hDYAoKuhkL1L63vDcIjfFOdZpVKetjPi =71aA -----END PGP SIGNATURE----- Merge tag 'usb-3.11-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb Pull USB fixes from Greg KH: "Here are a number of USB fixes for 3.11-rc3. Lots of little things, nothing major. A number of new device ids, build fixes for DMA, and a bunch of other minor things. All of these have been in the linux-next tree" * tag 'usb-3.11-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (40 commits) usb: Clear both buffers when clearing a control transfer TT buffer. usb/gadget: free opts struct on error recovery USB: mos7840: fix memory leak in open usb: serial: option.c: remove ONDA MT825UP product ID fromdriver usb: serial: option: add Olivetti Olicard 200 usb: serial: option: blacklist ONDA MT689DC QMI interface xhci: fix null pointer dereference on ring_doorbell_for_active_rings usb: host: xhci: Enable XHCI_SPURIOUS_SUCCESS for all controllers with xhci 1.0 usb: fix build warning in pci-quirks.h when CONFIG_PCI is not enabled usb: xhci: Mark two functions __maybe_unused xhci: Avoid NULL pointer deref when host dies. usb: serial: option: Add ONYX 3G device support USB: ti_usb_3410_5052: fix dynamic-id matching usb: option: add TP-LINK MA260 USB: option: add D-Link DWM-152/C1 and DWM-156/C1 USB: EHCI: Fix resume signalling on remote wakeup USB: cp210x: add MMB and PI ZigBee USB Device Support usb: cp210x support SEL C662 Vendor/Device USB: option: append Petatel NP10T device to GSM modems list USB: misc: Add Manhattan Hi-Speed USB DVI Converter to sisusbvga ...
This commit is contained in:
commit
db8cbfadcf
@ -668,6 +668,15 @@ static void hub_irq(struct urb *urb)
|
||||
static inline int
|
||||
hub_clear_tt_buffer (struct usb_device *hdev, u16 devinfo, u16 tt)
|
||||
{
|
||||
/* Need to clear both directions for control ep */
|
||||
if (((devinfo >> 11) & USB_ENDPOINT_XFERTYPE_MASK) ==
|
||||
USB_ENDPOINT_XFER_CONTROL) {
|
||||
int status = usb_control_msg(hdev, usb_sndctrlpipe(hdev, 0),
|
||||
HUB_CLEAR_TT_BUFFER, USB_RT_PORT,
|
||||
devinfo ^ 0x8000, tt, NULL, 0, 1000);
|
||||
if (status)
|
||||
return status;
|
||||
}
|
||||
return usb_control_msg(hdev, usb_sndctrlpipe(hdev, 0),
|
||||
HUB_CLEAR_TT_BUFFER, USB_RT_PORT, devinfo,
|
||||
tt, NULL, 0, 1000);
|
||||
@ -2848,6 +2857,15 @@ static int usb_disable_function_remotewakeup(struct usb_device *udev)
|
||||
USB_CTRL_SET_TIMEOUT);
|
||||
}
|
||||
|
||||
/* Count of wakeup-enabled devices at or below udev */
|
||||
static unsigned wakeup_enabled_descendants(struct usb_device *udev)
|
||||
{
|
||||
struct usb_hub *hub = usb_hub_to_struct_hub(udev);
|
||||
|
||||
return udev->do_remote_wakeup +
|
||||
(hub ? hub->wakeup_enabled_descendants : 0);
|
||||
}
|
||||
|
||||
/*
|
||||
* usb_port_suspend - suspend a usb device's upstream port
|
||||
* @udev: device that's no longer in active use, not a root hub
|
||||
@ -2888,8 +2906,8 @@ static int usb_disable_function_remotewakeup(struct usb_device *udev)
|
||||
* Linux (2.6) currently has NO mechanisms to initiate that: no khubd
|
||||
* timer, no SRP, no requests through sysfs.
|
||||
*
|
||||
* If Runtime PM isn't enabled or used, non-SuperSpeed devices really get
|
||||
* suspended only when their bus goes into global suspend (i.e., the root
|
||||
* If Runtime PM isn't enabled or used, non-SuperSpeed devices may not get
|
||||
* suspended until their bus goes into global suspend (i.e., the root
|
||||
* hub is suspended). Nevertheless, we change @udev->state to
|
||||
* USB_STATE_SUSPENDED as this is the device's "logical" state. The actual
|
||||
* upstream port setting is stored in @udev->port_is_suspended.
|
||||
@ -2960,15 +2978,21 @@ int usb_port_suspend(struct usb_device *udev, pm_message_t msg)
|
||||
/* see 7.1.7.6 */
|
||||
if (hub_is_superspeed(hub->hdev))
|
||||
status = hub_set_port_link_state(hub, port1, USB_SS_PORT_LS_U3);
|
||||
else if (PMSG_IS_AUTO(msg))
|
||||
status = set_port_feature(hub->hdev, port1,
|
||||
USB_PORT_FEAT_SUSPEND);
|
||||
|
||||
/*
|
||||
* For system suspend, we do not need to enable the suspend feature
|
||||
* on individual USB-2 ports. The devices will automatically go
|
||||
* into suspend a few ms after the root hub stops sending packets.
|
||||
* The USB 2.0 spec calls this "global suspend".
|
||||
*
|
||||
* However, many USB hubs have a bug: They don't relay wakeup requests
|
||||
* from a downstream port if the port's suspend feature isn't on.
|
||||
* Therefore we will turn on the suspend feature if udev or any of its
|
||||
* descendants is enabled for remote wakeup.
|
||||
*/
|
||||
else if (PMSG_IS_AUTO(msg) || wakeup_enabled_descendants(udev) > 0)
|
||||
status = set_port_feature(hub->hdev, port1,
|
||||
USB_PORT_FEAT_SUSPEND);
|
||||
else {
|
||||
really_suspend = false;
|
||||
status = 0;
|
||||
@ -3003,15 +3027,16 @@ int usb_port_suspend(struct usb_device *udev, pm_message_t msg)
|
||||
if (!PMSG_IS_AUTO(msg))
|
||||
status = 0;
|
||||
} else {
|
||||
/* device has up to 10 msec to fully suspend */
|
||||
dev_dbg(&udev->dev, "usb %ssuspend, wakeup %d\n",
|
||||
(PMSG_IS_AUTO(msg) ? "auto-" : ""),
|
||||
udev->do_remote_wakeup);
|
||||
usb_set_device_state(udev, USB_STATE_SUSPENDED);
|
||||
if (really_suspend) {
|
||||
udev->port_is_suspended = 1;
|
||||
|
||||
/* device has up to 10 msec to fully suspend */
|
||||
msleep(10);
|
||||
}
|
||||
usb_set_device_state(udev, USB_STATE_SUSPENDED);
|
||||
}
|
||||
|
||||
/*
|
||||
@ -3293,7 +3318,11 @@ static int hub_suspend(struct usb_interface *intf, pm_message_t msg)
|
||||
unsigned port1;
|
||||
int status;
|
||||
|
||||
/* Warn if children aren't already suspended */
|
||||
/*
|
||||
* Warn if children aren't already suspended.
|
||||
* Also, add up the number of wakeup-enabled descendants.
|
||||
*/
|
||||
hub->wakeup_enabled_descendants = 0;
|
||||
for (port1 = 1; port1 <= hdev->maxchild; port1++) {
|
||||
struct usb_device *udev;
|
||||
|
||||
@ -3303,6 +3332,9 @@ static int hub_suspend(struct usb_interface *intf, pm_message_t msg)
|
||||
if (PMSG_IS_AUTO(msg))
|
||||
return -EBUSY;
|
||||
}
|
||||
if (udev)
|
||||
hub->wakeup_enabled_descendants +=
|
||||
wakeup_enabled_descendants(udev);
|
||||
}
|
||||
|
||||
if (hdev->do_remote_wakeup && hub->quirk_check_port_auto_suspend) {
|
||||
|
@ -59,6 +59,9 @@ struct usb_hub {
|
||||
struct usb_tt tt; /* Transaction Translator */
|
||||
|
||||
unsigned mA_per_port; /* current for each child */
|
||||
#ifdef CONFIG_PM
|
||||
unsigned wakeup_enabled_descendants;
|
||||
#endif
|
||||
|
||||
unsigned limited_power:1;
|
||||
unsigned quiescing:1;
|
||||
|
@ -1,6 +1,6 @@
|
||||
config USB_DWC3
|
||||
tristate "DesignWare USB3 DRD Core Support"
|
||||
depends on (USB || USB_GADGET) && GENERIC_HARDIRQS
|
||||
depends on (USB || USB_GADGET) && GENERIC_HARDIRQS && HAS_DMA
|
||||
select USB_XHCI_PLATFORM if USB_SUPPORT && USB_XHCI_HCD
|
||||
help
|
||||
Say Y or M here if your system has a Dual Role SuperSpeed
|
||||
|
@ -450,7 +450,7 @@ static int dwc3_probe(struct platform_device *pdev)
|
||||
}
|
||||
|
||||
if (IS_ERR(dwc->usb3_phy)) {
|
||||
ret = PTR_ERR(dwc->usb2_phy);
|
||||
ret = PTR_ERR(dwc->usb3_phy);
|
||||
|
||||
/*
|
||||
* if -ENXIO is returned, it means PHY layer wasn't
|
||||
|
@ -759,8 +759,8 @@ struct dwc3 {
|
||||
|
||||
struct dwc3_event_type {
|
||||
u32 is_devspec:1;
|
||||
u32 type:6;
|
||||
u32 reserved8_31:25;
|
||||
u32 type:7;
|
||||
u32 reserved8_31:24;
|
||||
} __packed;
|
||||
|
||||
#define DWC3_DEPEVT_XFERCOMPLETE 0x01
|
||||
|
@ -1584,6 +1584,7 @@ static int dwc3_gadget_start(struct usb_gadget *g,
|
||||
__dwc3_gadget_ep_disable(dwc->eps[0]);
|
||||
|
||||
err0:
|
||||
dwc->gadget_driver = NULL;
|
||||
spin_unlock_irqrestore(&dwc->lock, flags);
|
||||
|
||||
return ret;
|
||||
|
@ -193,6 +193,7 @@ config USB_FUSB300
|
||||
Faraday usb device controller FUSB300 driver
|
||||
|
||||
config USB_FOTG210_UDC
|
||||
depends on HAS_DMA
|
||||
tristate "Faraday FOTG210 USB Peripheral Controller"
|
||||
help
|
||||
Faraday USB2.0 OTG controller which can be configured as
|
||||
@ -328,13 +329,14 @@ config USB_S3C_HSUDC
|
||||
|
||||
config USB_MV_UDC
|
||||
tristate "Marvell USB2.0 Device Controller"
|
||||
depends on GENERIC_HARDIRQS
|
||||
depends on GENERIC_HARDIRQS && HAS_DMA
|
||||
help
|
||||
Marvell Socs (including PXA and MMP series) include a high speed
|
||||
USB2.0 OTG controller, which can be configured as high speed or
|
||||
full speed USB peripheral.
|
||||
|
||||
config USB_MV_U3D
|
||||
depends on HAS_DMA
|
||||
tristate "MARVELL PXA2128 USB 3.0 controller"
|
||||
help
|
||||
MARVELL PXA2128 Processor series include a super speed USB3.0 device
|
||||
@ -639,6 +641,7 @@ config USB_CONFIGFS_RNDIS
|
||||
depends on USB_CONFIGFS
|
||||
depends on NET
|
||||
select USB_U_ETHER
|
||||
select USB_U_RNDIS
|
||||
select USB_F_RNDIS
|
||||
help
|
||||
Microsoft Windows XP bundles the "Remote NDIS" (RNDIS) protocol,
|
||||
|
@ -870,8 +870,8 @@ static void clk_on(struct at91_udc *udc)
|
||||
if (udc->clocked)
|
||||
return;
|
||||
udc->clocked = 1;
|
||||
clk_enable(udc->iclk);
|
||||
clk_enable(udc->fclk);
|
||||
clk_prepare_enable(udc->iclk);
|
||||
clk_prepare_enable(udc->fclk);
|
||||
}
|
||||
|
||||
static void clk_off(struct at91_udc *udc)
|
||||
@ -880,8 +880,8 @@ static void clk_off(struct at91_udc *udc)
|
||||
return;
|
||||
udc->clocked = 0;
|
||||
udc->gadget.speed = USB_SPEED_UNKNOWN;
|
||||
clk_disable(udc->fclk);
|
||||
clk_disable(udc->iclk);
|
||||
clk_disable_unprepare(udc->fclk);
|
||||
clk_disable_unprepare(udc->iclk);
|
||||
}
|
||||
|
||||
/*
|
||||
@ -1725,7 +1725,7 @@ static int at91udc_probe(struct platform_device *pdev)
|
||||
/* init software state */
|
||||
udc = &controller;
|
||||
udc->gadget.dev.parent = dev;
|
||||
if (pdev->dev.of_node)
|
||||
if (IS_ENABLED(CONFIG_OF) && pdev->dev.of_node)
|
||||
at91udc_of_init(udc, pdev->dev.of_node);
|
||||
else
|
||||
memcpy(&udc->board, dev->platform_data,
|
||||
@ -1782,12 +1782,14 @@ static int at91udc_probe(struct platform_device *pdev)
|
||||
}
|
||||
|
||||
/* don't do anything until we have both gadget driver and VBUS */
|
||||
clk_enable(udc->iclk);
|
||||
retval = clk_prepare_enable(udc->iclk);
|
||||
if (retval)
|
||||
goto fail1;
|
||||
at91_udp_write(udc, AT91_UDP_TXVC, AT91_UDP_TXVC_TXVDIS);
|
||||
at91_udp_write(udc, AT91_UDP_IDR, 0xffffffff);
|
||||
/* Clear all pending interrupts - UDP may be used by bootloader. */
|
||||
at91_udp_write(udc, AT91_UDP_ICR, 0xffffffff);
|
||||
clk_disable(udc->iclk);
|
||||
clk_disable_unprepare(udc->iclk);
|
||||
|
||||
/* request UDC and maybe VBUS irqs */
|
||||
udc->udp_irq = platform_get_irq(pdev, 0);
|
||||
|
@ -959,8 +959,11 @@ static struct usb_function_instance *ecm_alloc_inst(void)
|
||||
mutex_init(&opts->lock);
|
||||
opts->func_inst.free_func_inst = ecm_free_inst;
|
||||
opts->net = gether_setup_default();
|
||||
if (IS_ERR(opts->net))
|
||||
return ERR_PTR(PTR_ERR(opts->net));
|
||||
if (IS_ERR(opts->net)) {
|
||||
struct net_device *net = opts->net;
|
||||
kfree(opts);
|
||||
return ERR_CAST(net);
|
||||
}
|
||||
|
||||
config_group_init_type_name(&opts->func_inst.group, "", &ecm_func_type);
|
||||
|
||||
|
@ -593,8 +593,11 @@ static struct usb_function_instance *eem_alloc_inst(void)
|
||||
mutex_init(&opts->lock);
|
||||
opts->func_inst.free_func_inst = eem_free_inst;
|
||||
opts->net = gether_setup_default();
|
||||
if (IS_ERR(opts->net))
|
||||
return ERR_CAST(opts->net);
|
||||
if (IS_ERR(opts->net)) {
|
||||
struct net_device *net = opts->net;
|
||||
kfree(opts);
|
||||
return ERR_CAST(net);
|
||||
}
|
||||
|
||||
config_group_init_type_name(&opts->func_inst.group, "", &eem_func_type);
|
||||
|
||||
|
@ -1350,8 +1350,11 @@ static struct usb_function_instance *ncm_alloc_inst(void)
|
||||
mutex_init(&opts->lock);
|
||||
opts->func_inst.free_func_inst = ncm_free_inst;
|
||||
opts->net = gether_setup_default();
|
||||
if (IS_ERR(opts->net))
|
||||
return ERR_PTR(PTR_ERR(opts->net));
|
||||
if (IS_ERR(opts->net)) {
|
||||
struct net_device *net = opts->net;
|
||||
kfree(opts);
|
||||
return ERR_CAST(net);
|
||||
}
|
||||
|
||||
config_group_init_type_name(&opts->func_inst.group, "", &ncm_func_type);
|
||||
|
||||
|
@ -656,8 +656,11 @@ static struct usb_function_instance *phonet_alloc_inst(void)
|
||||
|
||||
opts->func_inst.free_func_inst = phonet_free_inst;
|
||||
opts->net = gphonet_setup_default();
|
||||
if (IS_ERR(opts->net))
|
||||
return ERR_PTR(PTR_ERR(opts->net));
|
||||
if (IS_ERR(opts->net)) {
|
||||
struct net_device *net = opts->net;
|
||||
kfree(opts);
|
||||
return ERR_CAST(net);
|
||||
}
|
||||
|
||||
config_group_init_type_name(&opts->func_inst.group, "",
|
||||
&phonet_func_type);
|
||||
|
@ -963,8 +963,11 @@ static struct usb_function_instance *rndis_alloc_inst(void)
|
||||
mutex_init(&opts->lock);
|
||||
opts->func_inst.free_func_inst = rndis_free_inst;
|
||||
opts->net = gether_setup_default();
|
||||
if (IS_ERR(opts->net))
|
||||
return ERR_CAST(opts->net);
|
||||
if (IS_ERR(opts->net)) {
|
||||
struct net_device *net = opts->net;
|
||||
kfree(opts);
|
||||
return ERR_CAST(net);
|
||||
}
|
||||
|
||||
config_group_init_type_name(&opts->func_inst.group, "",
|
||||
&rndis_func_type);
|
||||
|
@ -505,8 +505,11 @@ static struct usb_function_instance *geth_alloc_inst(void)
|
||||
mutex_init(&opts->lock);
|
||||
opts->func_inst.free_func_inst = geth_free_inst;
|
||||
opts->net = gether_setup_default();
|
||||
if (IS_ERR(opts->net))
|
||||
return ERR_CAST(opts->net);
|
||||
if (IS_ERR(opts->net)) {
|
||||
struct net_device *net = opts->net;
|
||||
kfree(opts);
|
||||
return ERR_CAST(net);
|
||||
}
|
||||
|
||||
config_group_init_type_name(&opts->func_inst.group, "",
|
||||
&gether_func_type);
|
||||
|
@ -1074,7 +1074,7 @@ static struct usb_gadget_ops fotg210_gadget_ops = {
|
||||
.udc_stop = fotg210_udc_stop,
|
||||
};
|
||||
|
||||
static int __exit fotg210_udc_remove(struct platform_device *pdev)
|
||||
static int fotg210_udc_remove(struct platform_device *pdev)
|
||||
{
|
||||
struct fotg210_udc *fotg210 = dev_get_drvdata(&pdev->dev);
|
||||
|
||||
@ -1088,7 +1088,7 @@ static int __exit fotg210_udc_remove(struct platform_device *pdev)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int __init fotg210_udc_probe(struct platform_device *pdev)
|
||||
static int fotg210_udc_probe(struct platform_device *pdev)
|
||||
{
|
||||
struct resource *res, *ires;
|
||||
struct fotg210_udc *fotg210 = NULL;
|
||||
|
@ -1776,7 +1776,7 @@ static int mv_u3d_remove(struct platform_device *dev)
|
||||
kfree(u3d->eps);
|
||||
|
||||
if (u3d->irq)
|
||||
free_irq(u3d->irq, &dev->dev);
|
||||
free_irq(u3d->irq, u3d);
|
||||
|
||||
if (u3d->cap_regs)
|
||||
iounmap(u3d->cap_regs);
|
||||
@ -1974,7 +1974,7 @@ static int mv_u3d_probe(struct platform_device *dev)
|
||||
return 0;
|
||||
|
||||
err_unregister:
|
||||
free_irq(u3d->irq, &dev->dev);
|
||||
free_irq(u3d->irq, u3d);
|
||||
err_request_irq:
|
||||
err_get_irq:
|
||||
kfree(u3d->status_req);
|
||||
|
@ -50,6 +50,8 @@ static DEFINE_MUTEX(udc_lock);
|
||||
|
||||
/* ------------------------------------------------------------------------- */
|
||||
|
||||
#ifdef CONFIG_HAS_DMA
|
||||
|
||||
int usb_gadget_map_request(struct usb_gadget *gadget,
|
||||
struct usb_request *req, int is_in)
|
||||
{
|
||||
@ -99,6 +101,8 @@ void usb_gadget_unmap_request(struct usb_gadget *gadget,
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(usb_gadget_unmap_request);
|
||||
|
||||
#endif /* CONFIG_HAS_DMA */
|
||||
|
||||
/* ------------------------------------------------------------------------- */
|
||||
|
||||
void usb_gadget_set_state(struct usb_gadget *gadget,
|
||||
@ -194,9 +198,11 @@ int usb_add_gadget_udc_release(struct device *parent, struct usb_gadget *gadget,
|
||||
dev_set_name(&gadget->dev, "gadget");
|
||||
gadget->dev.parent = parent;
|
||||
|
||||
#ifdef CONFIG_HAS_DMA
|
||||
dma_set_coherent_mask(&gadget->dev, parent->coherent_dma_mask);
|
||||
gadget->dev.dma_parms = parent->dma_parms;
|
||||
gadget->dev.dma_mask = parent->dma_mask;
|
||||
#endif
|
||||
|
||||
if (release)
|
||||
gadget->dev.release = release;
|
||||
|
@ -874,6 +874,7 @@ static int ehci_hub_control (
|
||||
ehci->reset_done[wIndex] = jiffies
|
||||
+ msecs_to_jiffies(20);
|
||||
usb_hcd_start_port_resume(&hcd->self, wIndex);
|
||||
set_bit(wIndex, &ehci->resuming_ports);
|
||||
/* check the port again */
|
||||
mod_timer(&ehci_to_hcd(ehci)->rh_timer,
|
||||
ehci->reset_done[wIndex]);
|
||||
|
@ -13,6 +13,7 @@ void usb_enable_xhci_ports(struct pci_dev *xhci_pdev);
|
||||
void usb_disable_xhci_ports(struct pci_dev *xhci_pdev);
|
||||
void sb800_prefetch(struct device *dev, int on);
|
||||
#else
|
||||
struct pci_dev;
|
||||
static inline void usb_amd_quirk_pll_disable(void) {}
|
||||
static inline void usb_amd_quirk_pll_enable(void) {}
|
||||
static inline void usb_amd_dev_put(void) {}
|
||||
|
@ -93,7 +93,6 @@ static void xhci_pci_quirks(struct device *dev, struct xhci_hcd *xhci)
|
||||
}
|
||||
if (pdev->vendor == PCI_VENDOR_ID_INTEL &&
|
||||
pdev->device == PCI_DEVICE_ID_INTEL_PANTHERPOINT_XHCI) {
|
||||
xhci->quirks |= XHCI_SPURIOUS_SUCCESS;
|
||||
xhci->quirks |= XHCI_EP_LIMIT_QUIRK;
|
||||
xhci->limit_active_eps = 64;
|
||||
xhci->quirks |= XHCI_SW_BW_CHECKING;
|
||||
|
@ -434,7 +434,7 @@ static void ring_doorbell_for_active_rings(struct xhci_hcd *xhci,
|
||||
|
||||
/* A ring has pending URBs if its TD list is not empty */
|
||||
if (!(ep->ep_state & EP_HAS_STREAMS)) {
|
||||
if (!(list_empty(&ep->ring->td_list)))
|
||||
if (ep->ring && !(list_empty(&ep->ring->td_list)))
|
||||
xhci_ring_ep_doorbell(xhci, slot_id, ep_index, 0);
|
||||
return;
|
||||
}
|
||||
|
@ -329,7 +329,7 @@ static void xhci_cleanup_msix(struct xhci_hcd *xhci)
|
||||
return;
|
||||
}
|
||||
|
||||
static void xhci_msix_sync_irqs(struct xhci_hcd *xhci)
|
||||
static void __maybe_unused xhci_msix_sync_irqs(struct xhci_hcd *xhci)
|
||||
{
|
||||
int i;
|
||||
|
||||
@ -1181,9 +1181,6 @@ static int xhci_check_args(struct usb_hcd *hcd, struct usb_device *udev,
|
||||
}
|
||||
|
||||
xhci = hcd_to_xhci(hcd);
|
||||
if (xhci->xhc_state & XHCI_STATE_HALTED)
|
||||
return -ENODEV;
|
||||
|
||||
if (check_virt_dev) {
|
||||
if (!udev->slot_id || !xhci->devs[udev->slot_id]) {
|
||||
printk(KERN_DEBUG "xHCI %s called with unaddressed "
|
||||
@ -1199,6 +1196,9 @@ static int xhci_check_args(struct usb_hcd *hcd, struct usb_device *udev,
|
||||
}
|
||||
}
|
||||
|
||||
if (xhci->xhc_state & XHCI_STATE_HALTED)
|
||||
return -ENODEV;
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
@ -3898,7 +3898,7 @@ int xhci_find_raw_port_number(struct usb_hcd *hcd, int port1)
|
||||
* Issue an Evaluate Context command to change the Maximum Exit Latency in the
|
||||
* slot context. If that succeeds, store the new MEL in the xhci_virt_device.
|
||||
*/
|
||||
static int xhci_change_max_exit_latency(struct xhci_hcd *xhci,
|
||||
static int __maybe_unused xhci_change_max_exit_latency(struct xhci_hcd *xhci,
|
||||
struct usb_device *udev, u16 max_exit_latency)
|
||||
{
|
||||
struct xhci_virt_device *virt_dev;
|
||||
@ -4892,6 +4892,13 @@ int xhci_gen_setup(struct usb_hcd *hcd, xhci_get_quirks_t get_quirks)
|
||||
|
||||
get_quirks(dev, xhci);
|
||||
|
||||
/* In xhci controllers which follow xhci 1.0 spec gives a spurious
|
||||
* success event after a short transfer. This quirk will ignore such
|
||||
* spurious event.
|
||||
*/
|
||||
if (xhci->hci_version > 0x96)
|
||||
xhci->quirks |= XHCI_SPURIOUS_SUCCESS;
|
||||
|
||||
/* Make sure the HC is halted. */
|
||||
retval = xhci_halt(xhci);
|
||||
if (retval)
|
||||
|
@ -3247,6 +3247,7 @@ static const struct usb_device_id sisusb_table[] = {
|
||||
{ USB_DEVICE(0x0711, 0x0903) },
|
||||
{ USB_DEVICE(0x0711, 0x0918) },
|
||||
{ USB_DEVICE(0x0711, 0x0920) },
|
||||
{ USB_DEVICE(0x0711, 0x0950) },
|
||||
{ USB_DEVICE(0x182d, 0x021c) },
|
||||
{ USB_DEVICE(0x182d, 0x0269) },
|
||||
{ }
|
||||
|
@ -71,9 +71,9 @@ static struct usb_dpll_params omap_usb3_dpll_params[NUM_SYS_CLKS] = {
|
||||
{1250, 5, 4, 20, 0}, /* 12 MHz */
|
||||
{3125, 20, 4, 20, 0}, /* 16.8 MHz */
|
||||
{1172, 8, 4, 20, 65537}, /* 19.2 MHz */
|
||||
{1000, 7, 4, 10, 0}, /* 20 MHz */
|
||||
{1250, 12, 4, 20, 0}, /* 26 MHz */
|
||||
{3125, 47, 4, 20, 92843}, /* 38.4 MHz */
|
||||
{1000, 7, 4, 10, 0}, /* 20 MHz */
|
||||
|
||||
};
|
||||
|
||||
|
@ -388,7 +388,7 @@ static int samsung_usb2phy_probe(struct platform_device *pdev)
|
||||
clk = devm_clk_get(dev, "otg");
|
||||
|
||||
if (IS_ERR(clk)) {
|
||||
dev_err(dev, "Failed to get otg clock\n");
|
||||
dev_err(dev, "Failed to get usbhost/otg clock\n");
|
||||
return PTR_ERR(clk);
|
||||
}
|
||||
|
||||
|
@ -855,10 +855,6 @@ static int usbhsg_gadget_stop(struct usb_gadget *gadget,
|
||||
struct usbhsg_gpriv *gpriv = usbhsg_gadget_to_gpriv(gadget);
|
||||
struct usbhs_priv *priv = usbhsg_gpriv_to_priv(gpriv);
|
||||
|
||||
if (!driver ||
|
||||
!driver->unbind)
|
||||
return -EINVAL;
|
||||
|
||||
usbhsg_try_stop(priv, USBHSG_STATUS_REGISTERD);
|
||||
gpriv->driver = NULL;
|
||||
|
||||
|
@ -53,6 +53,7 @@ static const struct usb_device_id id_table[] = {
|
||||
{ USB_DEVICE(0x0489, 0xE000) }, /* Pirelli Broadband S.p.A, DP-L10 SIP/GSM Mobile */
|
||||
{ USB_DEVICE(0x0489, 0xE003) }, /* Pirelli Broadband S.p.A, DP-L10 SIP/GSM Mobile */
|
||||
{ USB_DEVICE(0x0745, 0x1000) }, /* CipherLab USB CCD Barcode Scanner 1000 */
|
||||
{ USB_DEVICE(0x0846, 0x1100) }, /* NetGear Managed Switch M4100 series, M5300 series, M7100 series */
|
||||
{ USB_DEVICE(0x08e6, 0x5501) }, /* Gemalto Prox-PU/CU contactless smartcard reader */
|
||||
{ USB_DEVICE(0x08FD, 0x000A) }, /* Digianswer A/S , ZigBee/802.15.4 MAC Device */
|
||||
{ USB_DEVICE(0x0BED, 0x1100) }, /* MEI (TM) Cashflow-SC Bill/Voucher Acceptor */
|
||||
@ -118,6 +119,8 @@ static const struct usb_device_id id_table[] = {
|
||||
{ USB_DEVICE(0x10C4, 0x85F8) }, /* Virtenio Preon32 */
|
||||
{ USB_DEVICE(0x10C4, 0x8664) }, /* AC-Services CAN-IF */
|
||||
{ USB_DEVICE(0x10C4, 0x8665) }, /* AC-Services OBD-IF */
|
||||
{ USB_DEVICE(0x10C4, 0x88A4) }, /* MMB Networks ZigBee USB Device */
|
||||
{ USB_DEVICE(0x10C4, 0x88A5) }, /* Planet Innovation Ingeni ZigBee USB Device */
|
||||
{ USB_DEVICE(0x10C4, 0xEA60) }, /* Silicon Labs factory default */
|
||||
{ USB_DEVICE(0x10C4, 0xEA61) }, /* Silicon Labs factory default */
|
||||
{ USB_DEVICE(0x10C4, 0xEA70) }, /* Silicon Labs factory default */
|
||||
@ -148,6 +151,7 @@ static const struct usb_device_id id_table[] = {
|
||||
{ USB_DEVICE(0x17F4, 0xAAAA) }, /* Wavesense Jazz blood glucose meter */
|
||||
{ USB_DEVICE(0x1843, 0x0200) }, /* Vaisala USB Instrument Cable */
|
||||
{ USB_DEVICE(0x18EF, 0xE00F) }, /* ELV USB-I2C-Interface */
|
||||
{ USB_DEVICE(0x1ADB, 0x0001) }, /* Schweitzer Engineering C662 Cable */
|
||||
{ USB_DEVICE(0x1BE3, 0x07A6) }, /* WAGO 750-923 USB Service Cable */
|
||||
{ USB_DEVICE(0x1E29, 0x0102) }, /* Festo CPX-USB */
|
||||
{ USB_DEVICE(0x1E29, 0x0501) }, /* Festo CMSP */
|
||||
|
@ -905,20 +905,20 @@ static int mos7840_open(struct tty_struct *tty, struct usb_serial_port *port)
|
||||
status = mos7840_get_reg_sync(port, mos7840_port->SpRegOffset, &Data);
|
||||
if (status < 0) {
|
||||
dev_dbg(&port->dev, "Reading Spreg failed\n");
|
||||
return -1;
|
||||
goto err;
|
||||
}
|
||||
Data |= 0x80;
|
||||
status = mos7840_set_reg_sync(port, mos7840_port->SpRegOffset, Data);
|
||||
if (status < 0) {
|
||||
dev_dbg(&port->dev, "writing Spreg failed\n");
|
||||
return -1;
|
||||
goto err;
|
||||
}
|
||||
|
||||
Data &= ~0x80;
|
||||
status = mos7840_set_reg_sync(port, mos7840_port->SpRegOffset, Data);
|
||||
if (status < 0) {
|
||||
dev_dbg(&port->dev, "writing Spreg failed\n");
|
||||
return -1;
|
||||
goto err;
|
||||
}
|
||||
/* End of block to be checked */
|
||||
|
||||
@ -927,7 +927,7 @@ static int mos7840_open(struct tty_struct *tty, struct usb_serial_port *port)
|
||||
&Data);
|
||||
if (status < 0) {
|
||||
dev_dbg(&port->dev, "Reading Controlreg failed\n");
|
||||
return -1;
|
||||
goto err;
|
||||
}
|
||||
Data |= 0x08; /* Driver done bit */
|
||||
Data |= 0x20; /* rx_disable */
|
||||
@ -935,7 +935,7 @@ static int mos7840_open(struct tty_struct *tty, struct usb_serial_port *port)
|
||||
mos7840_port->ControlRegOffset, Data);
|
||||
if (status < 0) {
|
||||
dev_dbg(&port->dev, "writing Controlreg failed\n");
|
||||
return -1;
|
||||
goto err;
|
||||
}
|
||||
/* do register settings here */
|
||||
/* Set all regs to the device default values. */
|
||||
@ -946,21 +946,21 @@ static int mos7840_open(struct tty_struct *tty, struct usb_serial_port *port)
|
||||
status = mos7840_set_uart_reg(port, INTERRUPT_ENABLE_REGISTER, Data);
|
||||
if (status < 0) {
|
||||
dev_dbg(&port->dev, "disabling interrupts failed\n");
|
||||
return -1;
|
||||
goto err;
|
||||
}
|
||||
/* Set FIFO_CONTROL_REGISTER to the default value */
|
||||
Data = 0x00;
|
||||
status = mos7840_set_uart_reg(port, FIFO_CONTROL_REGISTER, Data);
|
||||
if (status < 0) {
|
||||
dev_dbg(&port->dev, "Writing FIFO_CONTROL_REGISTER failed\n");
|
||||
return -1;
|
||||
goto err;
|
||||
}
|
||||
|
||||
Data = 0xcf;
|
||||
status = mos7840_set_uart_reg(port, FIFO_CONTROL_REGISTER, Data);
|
||||
if (status < 0) {
|
||||
dev_dbg(&port->dev, "Writing FIFO_CONTROL_REGISTER failed\n");
|
||||
return -1;
|
||||
goto err;
|
||||
}
|
||||
|
||||
Data = 0x03;
|
||||
@ -1103,6 +1103,15 @@ static int mos7840_open(struct tty_struct *tty, struct usb_serial_port *port)
|
||||
/* mos7840_change_port_settings(mos7840_port,old_termios); */
|
||||
|
||||
return 0;
|
||||
err:
|
||||
for (j = 0; j < NUM_URBS; ++j) {
|
||||
urb = mos7840_port->write_urb_pool[j];
|
||||
if (!urb)
|
||||
continue;
|
||||
kfree(urb->transfer_buffer);
|
||||
usb_free_urb(urb);
|
||||
}
|
||||
return status;
|
||||
}
|
||||
|
||||
/*****************************************************************************
|
||||
|
@ -341,17 +341,12 @@ static void option_instat_callback(struct urb *urb);
|
||||
#define OLIVETTI_VENDOR_ID 0x0b3c
|
||||
#define OLIVETTI_PRODUCT_OLICARD100 0xc000
|
||||
#define OLIVETTI_PRODUCT_OLICARD145 0xc003
|
||||
#define OLIVETTI_PRODUCT_OLICARD200 0xc005
|
||||
|
||||
/* Celot products */
|
||||
#define CELOT_VENDOR_ID 0x211f
|
||||
#define CELOT_PRODUCT_CT680M 0x6801
|
||||
|
||||
/* ONDA Communication vendor id */
|
||||
#define ONDA_VENDOR_ID 0x1ee8
|
||||
|
||||
/* ONDA MT825UP HSDPA 14.2 modem */
|
||||
#define ONDA_MT825UP 0x000b
|
||||
|
||||
/* Samsung products */
|
||||
#define SAMSUNG_VENDOR_ID 0x04e8
|
||||
#define SAMSUNG_PRODUCT_GT_B3730 0x6889
|
||||
@ -444,7 +439,8 @@ static void option_instat_callback(struct urb *urb);
|
||||
|
||||
/* Hyundai Petatel Inc. products */
|
||||
#define PETATEL_VENDOR_ID 0x1ff4
|
||||
#define PETATEL_PRODUCT_NP10T 0x600e
|
||||
#define PETATEL_PRODUCT_NP10T_600A 0x600a
|
||||
#define PETATEL_PRODUCT_NP10T_600E 0x600e
|
||||
|
||||
/* TP-LINK Incorporated products */
|
||||
#define TPLINK_VENDOR_ID 0x2357
|
||||
@ -782,6 +778,7 @@ static const struct usb_device_id option_ids[] = {
|
||||
{ USB_DEVICE(KYOCERA_VENDOR_ID, KYOCERA_PRODUCT_KPC650) },
|
||||
{ USB_DEVICE(KYOCERA_VENDOR_ID, KYOCERA_PRODUCT_KPC680) },
|
||||
{ USB_DEVICE(QUALCOMM_VENDOR_ID, 0x6613)}, /* Onda H600/ZTE MF330 */
|
||||
{ USB_DEVICE(QUALCOMM_VENDOR_ID, 0x0023)}, /* ONYX 3G device */
|
||||
{ USB_DEVICE(QUALCOMM_VENDOR_ID, 0x9000)}, /* SIMCom SIM5218 */
|
||||
{ USB_DEVICE(CMOTECH_VENDOR_ID, CMOTECH_PRODUCT_6280) }, /* BP3-USB & BP3-EXT HSDPA */
|
||||
{ USB_DEVICE(CMOTECH_VENDOR_ID, CMOTECH_PRODUCT_6008) },
|
||||
@ -817,7 +814,8 @@ static const struct usb_device_id option_ids[] = {
|
||||
{ USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0017, 0xff, 0xff, 0xff),
|
||||
.driver_info = (kernel_ulong_t)&net_intf3_blacklist },
|
||||
{ USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0018, 0xff, 0xff, 0xff) },
|
||||
{ USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0019, 0xff, 0xff, 0xff) },
|
||||
{ USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0019, 0xff, 0xff, 0xff),
|
||||
.driver_info = (kernel_ulong_t)&net_intf3_blacklist },
|
||||
{ USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0020, 0xff, 0xff, 0xff) },
|
||||
{ USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0021, 0xff, 0xff, 0xff),
|
||||
.driver_info = (kernel_ulong_t)&net_intf4_blacklist },
|
||||
@ -1256,8 +1254,8 @@ static const struct usb_device_id option_ids[] = {
|
||||
|
||||
{ USB_DEVICE(OLIVETTI_VENDOR_ID, OLIVETTI_PRODUCT_OLICARD100) },
|
||||
{ USB_DEVICE(OLIVETTI_VENDOR_ID, OLIVETTI_PRODUCT_OLICARD145) },
|
||||
{ USB_DEVICE(OLIVETTI_VENDOR_ID, OLIVETTI_PRODUCT_OLICARD200) },
|
||||
{ USB_DEVICE(CELOT_VENDOR_ID, CELOT_PRODUCT_CT680M) }, /* CT-650 CDMA 450 1xEVDO modem */
|
||||
{ USB_DEVICE(ONDA_VENDOR_ID, ONDA_MT825UP) }, /* ONDA MT825UP modem */
|
||||
{ USB_DEVICE_AND_INTERFACE_INFO(SAMSUNG_VENDOR_ID, SAMSUNG_PRODUCT_GT_B3730, USB_CLASS_CDC_DATA, 0x00, 0x00) }, /* Samsung GT-B3730 LTE USB modem.*/
|
||||
{ USB_DEVICE(YUGA_VENDOR_ID, YUGA_PRODUCT_CEM600) },
|
||||
{ USB_DEVICE(YUGA_VENDOR_ID, YUGA_PRODUCT_CEM610) },
|
||||
@ -1329,9 +1327,12 @@ static const struct usb_device_id option_ids[] = {
|
||||
{ USB_DEVICE_AND_INTERFACE_INFO(MEDIATEK_VENDOR_ID, MEDIATEK_PRODUCT_DC_4COM2, 0xff, 0x02, 0x01) },
|
||||
{ USB_DEVICE_AND_INTERFACE_INFO(MEDIATEK_VENDOR_ID, MEDIATEK_PRODUCT_DC_4COM2, 0xff, 0x00, 0x00) },
|
||||
{ USB_DEVICE(CELLIENT_VENDOR_ID, CELLIENT_PRODUCT_MEN200) },
|
||||
{ USB_DEVICE(PETATEL_VENDOR_ID, PETATEL_PRODUCT_NP10T) },
|
||||
{ USB_DEVICE(PETATEL_VENDOR_ID, PETATEL_PRODUCT_NP10T_600A) },
|
||||
{ USB_DEVICE(PETATEL_VENDOR_ID, PETATEL_PRODUCT_NP10T_600E) },
|
||||
{ USB_DEVICE(TPLINK_VENDOR_ID, TPLINK_PRODUCT_MA180),
|
||||
.driver_info = (kernel_ulong_t)&net_intf4_blacklist },
|
||||
{ USB_DEVICE(TPLINK_VENDOR_ID, 0x9000), /* TP-Link MA260 */
|
||||
.driver_info = (kernel_ulong_t)&net_intf4_blacklist },
|
||||
{ USB_DEVICE(CHANGHONG_VENDOR_ID, CHANGHONG_PRODUCT_CH690) },
|
||||
{ USB_DEVICE_AND_INTERFACE_INFO(0x2001, 0x7d01, 0xff, 0x02, 0x01) }, /* D-Link DWM-156 (variant) */
|
||||
{ USB_DEVICE_AND_INTERFACE_INFO(0x2001, 0x7d01, 0xff, 0x00, 0x00) }, /* D-Link DWM-156 (variant) */
|
||||
@ -1339,6 +1340,8 @@ static const struct usb_device_id option_ids[] = {
|
||||
{ USB_DEVICE_AND_INTERFACE_INFO(0x2001, 0x7d02, 0xff, 0x00, 0x00) },
|
||||
{ USB_DEVICE_AND_INTERFACE_INFO(0x2001, 0x7d03, 0xff, 0x02, 0x01) },
|
||||
{ USB_DEVICE_AND_INTERFACE_INFO(0x2001, 0x7d03, 0xff, 0x00, 0x00) },
|
||||
{ USB_DEVICE_AND_INTERFACE_INFO(0x07d1, 0x3e01, 0xff, 0xff, 0xff) }, /* D-Link DWM-152/C1 */
|
||||
{ USB_DEVICE_AND_INTERFACE_INFO(0x07d1, 0x3e02, 0xff, 0xff, 0xff) }, /* D-Link DWM-156/C1 */
|
||||
{ } /* Terminating entry */
|
||||
};
|
||||
MODULE_DEVICE_TABLE(usb, option_ids);
|
||||
|
@ -371,7 +371,7 @@ static int ti_startup(struct usb_serial *serial)
|
||||
usb_set_serial_data(serial, tdev);
|
||||
|
||||
/* determine device type */
|
||||
if (usb_match_id(serial->interface, ti_id_table_3410))
|
||||
if (serial->type == &ti_1port_device)
|
||||
tdev->td_is_3410 = 1;
|
||||
dev_dbg(&dev->dev, "%s - device type is %s\n", __func__,
|
||||
tdev->td_is_3410 ? "3410" : "5052");
|
||||
|
@ -665,6 +665,13 @@ UNUSUAL_DEV( 0x054c, 0x016a, 0x0000, 0x9999,
|
||||
USB_SC_DEVICE, USB_PR_DEVICE, NULL,
|
||||
US_FL_FIX_INQUIRY ),
|
||||
|
||||
/* Submitted by Ren Bigcren <bigcren.ren@sonymobile.com> */
|
||||
UNUSUAL_DEV( 0x054c, 0x02a5, 0x0100, 0x0100,
|
||||
"Sony Corp.",
|
||||
"MicroVault Flash Drive",
|
||||
USB_SC_DEVICE, USB_PR_DEVICE, NULL,
|
||||
US_FL_NO_READ_CAPACITY_16 ),
|
||||
|
||||
/* floppy reports multiple luns */
|
||||
UNUSUAL_DEV( 0x055d, 0x2020, 0x0000, 0x0210,
|
||||
"SAMSUNG",
|
||||
|
@ -367,17 +367,6 @@ struct usb_bus {
|
||||
|
||||
/* ----------------------------------------------------------------------- */
|
||||
|
||||
/* This is arbitrary.
|
||||
* From USB 2.0 spec Table 11-13, offset 7, a hub can
|
||||
* have up to 255 ports. The most yet reported is 10.
|
||||
*
|
||||
* Current Wireless USB host hardware (Intel i1480 for example) allows
|
||||
* up to 22 devices to connect. Upcoming hardware might raise that
|
||||
* limit. Because the arrays need to add a bit for hub status data, we
|
||||
* do 31, so plus one evens out to four bytes.
|
||||
*/
|
||||
#define USB_MAXCHILDREN (31)
|
||||
|
||||
struct usb_tt;
|
||||
|
||||
enum usb_device_removable {
|
||||
|
@ -11,6 +11,17 @@
|
||||
|
||||
#include <linux/types.h> /* __u8 etc */
|
||||
|
||||
/* This is arbitrary.
|
||||
* From USB 2.0 spec Table 11-13, offset 7, a hub can
|
||||
* have up to 255 ports. The most yet reported is 10.
|
||||
*
|
||||
* Current Wireless USB host hardware (Intel i1480 for example) allows
|
||||
* up to 22 devices to connect. Upcoming hardware might raise that
|
||||
* limit. Because the arrays need to add a bit for hub status data, we
|
||||
* use 31, so plus one evens out to four bytes.
|
||||
*/
|
||||
#define USB_MAXCHILDREN 31
|
||||
|
||||
/*
|
||||
* Hub request types
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user