kernel: bump 4.9 to 4.9.197
[openwrt/openwrt.git] / target / linux / layerscape / patches-4.9 / 817-usb-support-layerscape.patch
index 3ec91b4982022541d1c9a97bc3bf6db20f2b55ca..c7ff28b8c0e37b8e20ca6e06838939061113df99 100644 (file)
@@ -44,7 +44,7 @@ Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
 
 --- a/drivers/net/usb/cdc_ether.c
 +++ b/drivers/net/usb/cdc_ether.c
-@@ -533,6 +533,7 @@ static const struct driver_info wwan_inf
+@@ -540,6 +540,7 @@ static const struct driver_info wwan_inf
  #define LINKSYS_VENDOR_ID     0x13b1
  #define NVIDIA_VENDOR_ID      0x0955
  #define HP_VENDOR_ID          0x03f0
@@ -52,7 +52,7 @@ Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
  
  static const struct usb_device_id     products[] = {
  /* BLACKLIST !!
-@@ -742,6 +743,13 @@ static const struct usb_device_id produc
+@@ -749,6 +750,13 @@ static const struct usb_device_id produc
                        USB_CDC_SUBCLASS_ETHERNET, USB_CDC_PROTO_NONE),
        .driver_info = 0,
  },
@@ -76,7 +76,7 @@ Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
  
  #define MCU_TYPE_PLA                  0x0100
  #define MCU_TYPE_USB                  0x0000
-@@ -1817,6 +1818,10 @@ static int rx_bottom(struct r8152 *tp, i
+@@ -1820,6 +1821,10 @@ static int rx_bottom(struct r8152 *tp, i
                        unsigned int pkt_len;
                        struct sk_buff *skb;
  
@@ -87,7 +87,7 @@ Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
                        pkt_len = le32_to_cpu(rx_desc->opts1) & RX_LEN_MASK;
                        if (pkt_len < ETH_ZLEN)
                                break;
-@@ -4509,6 +4514,7 @@ static struct usb_device_id rtl8152_tabl
+@@ -4516,6 +4521,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)},
@@ -156,7 +156,7 @@ Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
        int ret;
 --- a/drivers/usb/core/hub.c
 +++ b/drivers/usb/core/hub.c
-@@ -4423,6 +4423,14 @@ hub_port_init(struct usb_hub *hub, struc
+@@ -4447,6 +4447,14 @@ hub_port_init(struct usb_hub *hub, struc
        else
                speed = usb_speed_string(udev->speed);
  
@@ -636,7 +636,7 @@ Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
  
 --- a/drivers/usb/dwc3/gadget.c
 +++ b/drivers/usb/dwc3/gadget.c
-@@ -2932,6 +2932,7 @@ static irqreturn_t dwc3_interrupt(int ir
+@@ -2928,6 +2928,7 @@ static irqreturn_t dwc3_interrupt(int ir
  int dwc3_gadget_init(struct dwc3 *dwc)
  {
        int ret, irq;
@@ -644,7 +644,7 @@ Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
        struct platform_device *dwc3_pdev = to_platform_device(dwc->dev);
  
        irq = platform_get_irq_byname(dwc3_pdev, "peripheral");
-@@ -3046,6 +3047,12 @@ int dwc3_gadget_init(struct dwc3 *dwc)
+@@ -3042,6 +3043,12 @@ int dwc3_gadget_init(struct dwc3 *dwc)
                goto err5;
        }
  
@@ -1439,7 +1439,7 @@ Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
  
 --- a/drivers/usb/host/xhci-ring.c
 +++ b/drivers/usb/host/xhci-ring.c
-@@ -1852,14 +1852,17 @@ static int finish_td(struct xhci_hcd *xh
+@@ -1859,14 +1859,17 @@ static int finish_td(struct xhci_hcd *xh
        union xhci_trb *event_trb, struct xhci_transfer_event *event,
        struct xhci_virt_ep *ep, int *status, bool skip)
  {
@@ -1457,7 +1457,7 @@ Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
        u32 trb_comp_code;
  
        slot_id = TRB_TO_SLOT_ID(le32_to_cpu(event->flags));
-@@ -1885,13 +1888,29 @@ static int finish_td(struct xhci_hcd *xh
+@@ -1892,13 +1895,29 @@ static int finish_td(struct xhci_hcd *xh
        if (trb_comp_code == COMP_STALL ||
                xhci_requires_manual_halt_cleanup(xhci, ep_ctx,
                                                trb_comp_code)) {
@@ -1494,7 +1494,7 @@ Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
                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
+@@ -1619,14 +1619,38 @@ int xhci_urb_dequeue(struct usb_hcd *hcd
                        ret = -ENOMEM;
                        goto done;
                }
@@ -1542,7 +1542,7 @@ Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
        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 {
+@@ -1626,7 +1626,7 @@ struct xhci_hcd {
  #define XHCI_STATE_REMOVING   (1 << 2)
        /* Statistics */
        int                     error_bitmask;
@@ -1551,7 +1551,7 @@ Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
  #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 {
+@@ -1662,6 +1662,9 @@ struct xhci_hcd {
  #define XHCI_SSIC_PORT_UNUSED (1 << 22)
  #define XHCI_NO_64BIT_SUPPORT (1 << 23)
  #define XHCI_MISSING_CAS      (1 << 24)
@@ -1658,7 +1658,7 @@ Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
                        return IRQ_HANDLED;
                }
        }
-@@ -923,12 +932,32 @@ int usb_otg_start(struct platform_device
+@@ -925,12 +934,32 @@ int usb_otg_start(struct platform_device
        temp &= ~(PORTSC_PHY_TYPE_SEL | PORTSC_PTW);
        switch (pdata->phy_mode) {
        case FSL_USB2_PHY_ULPI:
@@ -1710,7 +1710,7 @@ Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
  #define BCSR5_INT_USB                 (0x02)
 --- a/include/linux/usb.h
 +++ b/include/linux/usb.h
-@@ -362,6 +362,7 @@ struct usb_bus {
+@@ -360,6 +360,7 @@ struct usb_bus {
                                         * for control transfers?
                                         */
        u8 otg_port;                    /* 0, or number of OTG/HNP port */