--- a/drivers/net/usb/cdc_ether.c
+++ b/drivers/net/usb/cdc_ether.c
-@@ -532,6 +532,7 @@ static const struct driver_info wwan_inf
- #define LENOVO_VENDOR_ID 0x17ef
+@@ -533,6 +533,7 @@ static const struct driver_info wwan_inf
+ #define LINKSYS_VENDOR_ID 0x13b1
#define NVIDIA_VENDOR_ID 0x0955
#define HP_VENDOR_ID 0x03f0
+#define TPLINK_VENDOR_ID 0x2357
static const struct usb_device_id products[] = {
/* BLACKLIST !!
-@@ -732,6 +733,13 @@ static const struct usb_device_id produc
+@@ -742,6 +743,13 @@ static const struct usb_device_id produc
USB_CDC_SUBCLASS_ETHERNET, USB_CDC_PROTO_NONE),
.driver_info = 0,
},
*
--- a/drivers/net/usb/r8152.c
+++ b/drivers/net/usb/r8152.c
-@@ -520,6 +520,7 @@ enum rtl8152_flags {
- #define VENDOR_ID_SAMSUNG 0x04e8
+@@ -521,6 +521,7 @@ enum rtl8152_flags {
#define VENDOR_ID_LENOVO 0x17ef
+ #define VENDOR_ID_LINKSYS 0x13b1
#define VENDOR_ID_NVIDIA 0x0955
+#define VENDOR_ID_TPLINK 0x2357
#define MCU_TYPE_PLA 0x0100
#define MCU_TYPE_USB 0x0000
-@@ -1816,6 +1817,10 @@ static int rx_bottom(struct r8152 *tp, i
+@@ -1817,6 +1818,10 @@ static int rx_bottom(struct r8152 *tp, i
unsigned int pkt_len;
struct sk_buff *skb;
pkt_len = le32_to_cpu(rx_desc->opts1) & RX_LEN_MASK;
if (pkt_len < ETH_ZLEN)
break;
-@@ -4507,6 +4512,7 @@ static struct usb_device_id rtl8152_tabl
- {REALTEK_USB_DEVICE(VENDOR_ID_LENOVO, 0x7205)},
+@@ -4510,6 +4515,7 @@ static struct usb_device_id rtl8152_tabl
{REALTEK_USB_DEVICE(VENDOR_ID_LENOVO, 0x304f)},
+ {REALTEK_USB_DEVICE(VENDOR_ID_LINKSYS, 0x0041)},
{REALTEK_USB_DEVICE(VENDOR_ID_NVIDIA, 0x09ff)},
+ {REALTEK_USB_DEVICE(VENDOR_ID_TPLINK, 0x0601)},
{}
int ret;
--- a/drivers/usb/core/hub.c
+++ b/drivers/usb/core/hub.c
-@@ -4415,6 +4415,14 @@ hub_port_init(struct usb_hub *hub, struc
+@@ -4427,6 +4427,14 @@ hub_port_init(struct usb_hub *hub, struc
else
speed = usb_speed_string(udev->speed);
if (IS_ENABLED(CONFIG_USB_DWC3_HOST))
mode = USB_DR_MODE_HOST;
else if (IS_ENABLED(CONFIG_USB_DWC3_GADGET))
-@@ -213,8 +232,9 @@ static void dwc3_frame_length_adjustment
+@@ -227,8 +246,9 @@ static void dwc3_frame_length_adjustment
reg = dwc3_readl(dwc->regs, DWC3_GFLADJ);
dft = reg & DWC3_GFLADJ_30MHZ_MASK;
reg &= ~DWC3_GFLADJ_30MHZ_MASK;
reg |= DWC3_GFLADJ_30MHZ_SDBND_SEL | dwc->fladj;
dwc3_writel(dwc->regs, DWC3_GFLADJ, reg);
-@@ -579,6 +599,99 @@ static int dwc3_phy_setup(struct dwc3 *d
+@@ -599,6 +619,99 @@ static int dwc3_phy_setup(struct dwc3 *d
return 0;
}
static void dwc3_core_exit(struct dwc3 *dwc)
{
dwc3_event_buffers_cleanup(dwc);
-@@ -721,6 +834,8 @@ static int dwc3_core_init(struct dwc3 *d
+@@ -741,6 +854,8 @@ static int dwc3_core_init(struct dwc3 *d
if (ret)
goto err1;
/* Adjust Frame Length */
dwc3_frame_length_adjustment(dwc);
-@@ -919,11 +1034,117 @@ static void dwc3_core_exit_mode(struct d
+@@ -939,11 +1054,117 @@ static void dwc3_core_exit_mode(struct d
}
}
struct resource *res;
struct dwc3 *dwc;
u8 lpm_nyet_threshold;
-@@ -955,6 +1176,11 @@ static int dwc3_probe(struct platform_de
+@@ -975,6 +1196,11 @@ static int dwc3_probe(struct platform_de
dwc->xhci_resources[0].flags = res->flags;
dwc->xhci_resources[0].name = res->name;
res->start += DWC3_GLOBALS_REGS_START;
/*
-@@ -997,6 +1223,12 @@ static int dwc3_probe(struct platform_de
+@@ -1017,6 +1243,12 @@ static int dwc3_probe(struct platform_de
dwc->usb3_lpm_capable = device_property_read_bool(dev,
"snps,usb3_lpm_capable");
dwc->disable_scramble_quirk = device_property_read_bool(dev,
"snps,disable_scramble_quirk");
dwc->u2exit_lfps_quirk = device_property_read_bool(dev,
-@@ -1041,6 +1273,8 @@ static int dwc3_probe(struct platform_de
+@@ -1061,6 +1293,8 @@ static int dwc3_probe(struct platform_de
dwc->hird_threshold = hird_threshold
| (dwc->is_utmi_l1_suspend << 4);
platform_set_drvdata(pdev, dwc);
dwc3_cache_hwparams(dwc);
-@@ -1064,6 +1298,11 @@ static int dwc3_probe(struct platform_de
+@@ -1084,6 +1318,11 @@ static int dwc3_probe(struct platform_de
if (ret < 0)
goto err1;
/* Global Debug Queue/FIFO Space Available Register */
#define DWC3_GDBGFIFOSPACE_NUM(n) ((n) & 0x1f)
#define DWC3_GDBGFIFOSPACE_TYPE(n) (((n) << 5) & 0x1e0)
-@@ -180,7 +207,6 @@
+@@ -182,7 +209,6 @@
#define DWC3_GCTL_CLK_PIPE (1)
#define DWC3_GCTL_CLK_PIPEHALF (2)
#define DWC3_GCTL_CLK_MASK (3)
#define DWC3_GCTL_PRTCAP(n) (((n) & (3 << 12)) >> 12)
#define DWC3_GCTL_PRTCAPDIR(n) ((n) << 12)
#define DWC3_GCTL_PRTCAP_HOST 1
-@@ -289,6 +315,10 @@
+@@ -294,6 +320,10 @@
/* Global Frame Length Adjustment Register */
#define DWC3_GFLADJ_30MHZ_SDBND_SEL (1 << 7)
#define DWC3_GFLADJ_30MHZ_MASK 0x3f
/* Global User Control Register 2 */
#define DWC3_GUCTL2_RST_ACTBITLATER (1 << 14)
-@@ -753,6 +783,7 @@ struct dwc3_scratchpad_array {
+@@ -758,6 +788,7 @@ struct dwc3_scratchpad_array {
* @regs: base address for our registers
* @regs_size: address space size
* @fladj: frame length adjustment
* @irq_gadget: peripheral controller's IRQ number
* @nr_scratch: number of scratch buffers
* @u1u2: only used on revisions <1.83a for workaround
-@@ -829,6 +860,7 @@ struct dwc3_scratchpad_array {
+@@ -834,6 +865,7 @@ struct dwc3_scratchpad_array {
* 1 - -3.5dB de-emphasis
* 2 - No de-emphasis
* 3 - Reserved
*/
struct dwc3 {
struct usb_ctrlrequest *ctrl_req;
-@@ -847,6 +879,7 @@ struct dwc3 {
+@@ -852,6 +884,7 @@ struct dwc3 {
spinlock_t lock;
struct device *dev;
struct platform_device *xhci;
struct resource xhci_resources[DWC3_XHCI_RESOURCES_NUM];
-@@ -872,6 +905,12 @@ struct dwc3 {
+@@ -877,6 +910,12 @@ struct dwc3 {
enum usb_phy_interface hsphy_mode;
u32 fladj;
u32 irq_gadget;
u32 nr_scratch;
u32 u1u2;
-@@ -948,9 +987,12 @@ struct dwc3 {
+@@ -953,9 +992,12 @@ struct dwc3 {
unsigned ep0_bounced:1;
unsigned ep0_expect_in:1;
unsigned has_hibernation:1;
unsigned pending_events:1;
unsigned pullups_connected:1;
unsigned setup_packet_pending:1;
-@@ -971,9 +1013,16 @@ struct dwc3 {
+@@ -976,9 +1018,16 @@ struct dwc3 {
unsigned dis_rxdet_inp3_quirk:1;
unsigned dis_u2_freeclk_exists_quirk:1;
unsigned dis_del_phy_power_chg_quirk:1;
curr_ep = get_ep_by_pipe(udc, i);
/* If the ep is configured */
-- if (curr_ep->name == NULL) {
+- if (!curr_ep->ep.name) {
+ if (strncmp(curr_ep->name, "ep", 2)) {
WARNING("Invalid EP?");
continue;
while (ep_ring->dequeue != td->last_trb)
--- a/drivers/usb/host/xhci.c
+++ b/drivers/usb/host/xhci.c
-@@ -1570,14 +1570,38 @@ int xhci_urb_dequeue(struct usb_hcd *hcd
+@@ -1604,14 +1604,38 @@ int xhci_urb_dequeue(struct usb_hcd *hcd
ret = -ENOMEM;
goto done;
}
spin_unlock_irqrestore(&xhci->lock, flags);
--- a/drivers/usb/host/xhci.h
+++ b/drivers/usb/host/xhci.h
-@@ -1621,7 +1621,7 @@ struct xhci_hcd {
+@@ -1625,7 +1625,7 @@ struct xhci_hcd {
#define XHCI_STATE_REMOVING (1 << 2)
/* Statistics */
int error_bitmask;
#define XHCI_LINK_TRB_QUIRK (1 << 0)
#define XHCI_RESET_EP_QUIRK (1 << 1)
#define XHCI_NEC_HOST (1 << 2)
-@@ -1657,6 +1657,9 @@ struct xhci_hcd {
+@@ -1661,6 +1661,9 @@ struct xhci_hcd {
#define XHCI_SSIC_PORT_UNUSED (1 << 22)
#define XHCI_NO_64BIT_SUPPORT (1 << 23)
#define XHCI_MISSING_CAS (1 << 24)