mirror of
https://github.com/torvalds/linux.git
synced 2024-11-23 20:51:44 +00:00
usb: fixes for v4.17-rc3
Not much this time around: A list_del corruption on dwc3_ep_dequeue(), sparse warning fix also on dwc3, build issues with f_phonet. Apart from these three, some other minor fixes. Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com> -----BEGIN PGP SIGNATURE----- iQJRBAABCgA7FiEElLzh7wn96CXwjh2IzL64meEamQYFAlriz3odHGZlbGlwZS5i YWxiaUBsaW51eC5pbnRlbC5jb20ACgkQzL64meEamQZp2w//e+9DHceBeKFyNiMD LqCuvmygbAxnzCeLqyHQLLczRTCTjgOwt7Bh16PY0IwX3eUzBg5+r6TGLf1OUov/ W3kIPNQ8yN7tImItWc+Df5y5cUB2Pd5lhAxnNn6uUn8tQl7XBZ+XR9td53LMj7qd KYSC2GtnegSvnudMLIUCzz6ZLuciPrcvxi56Vn+EwwDodKh48+rb5JXIG2gTfLTd bQT9Lovjq7ieW45b10AOzSAYRAs/+QFCUfNctecr5jB8KNlGyDbGpXU7zlkOSOQv E5QbtL/AgM68sEw9AnZgbRYf4ewCP29NDP/WVymMtH8viWNg7z95gaqBDc90ZmZw K2NXASxjk9NkJRax6wN3ooz61y8I71bU6tc6PAi/P39C2fD9JcV1445rfQdHkWL8 1TpkEDTFHvyN8fYIz5uXnYU/bFx+oh4g7vzHnMZ+iv9rOWHera/Vh2VY7ThkKoC7 ASg0HQarBYQo3R4ARXcZ+Wag2uk/tbJXcGHlzJoc80Wo4dePgmiMGRuzZKA/be1R M9niGkUCLUYW/NdeFbKCNySkD6knU6jhw8LeasxE1Uuv0YMsbXAAzaaba8CeuUrM i7qHfB8airN8+Nk/88NQYecg9XXHiickhAWbA8ujqq3noG2xFzEZwL3RyhYI2Yfe ZJ3AzAoS/KECTujEleoWR4dRIxQ= =8ivE -----END PGP SIGNATURE----- Merge tag 'fixes-for-v4.17-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-linus Felipe writes: usb: fixes for v4.17-rc3 Not much this time around: A list_del corruption on dwc3_ep_dequeue(), sparse warning fix also on dwc3, build issues with f_phonet. Apart from these three, some other minor fixes. Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
This commit is contained in:
commit
328da89950
@ -985,6 +985,7 @@ struct dwc2_hsotg {
|
||||
|
||||
/* DWC OTG HW Release versions */
|
||||
#define DWC2_CORE_REV_2_71a 0x4f54271a
|
||||
#define DWC2_CORE_REV_2_72a 0x4f54272a
|
||||
#define DWC2_CORE_REV_2_80a 0x4f54280a
|
||||
#define DWC2_CORE_REV_2_90a 0x4f54290a
|
||||
#define DWC2_CORE_REV_2_91a 0x4f54291a
|
||||
@ -992,6 +993,7 @@ struct dwc2_hsotg {
|
||||
#define DWC2_CORE_REV_2_94a 0x4f54294a
|
||||
#define DWC2_CORE_REV_3_00a 0x4f54300a
|
||||
#define DWC2_CORE_REV_3_10a 0x4f54310a
|
||||
#define DWC2_CORE_REV_4_00a 0x4f54400a
|
||||
#define DWC2_FS_IOT_REV_1_00a 0x5531100a
|
||||
#define DWC2_HS_IOT_REV_1_00a 0x5532100a
|
||||
|
||||
|
@ -3928,6 +3928,27 @@ static int dwc2_hsotg_ep_enable(struct usb_ep *ep,
|
||||
if (index && !hs_ep->isochronous)
|
||||
epctrl |= DXEPCTL_SETD0PID;
|
||||
|
||||
/* WA for Full speed ISOC IN in DDMA mode.
|
||||
* By Clear NAK status of EP, core will send ZLP
|
||||
* to IN token and assert NAK interrupt relying
|
||||
* on TxFIFO status only
|
||||
*/
|
||||
|
||||
if (hsotg->gadget.speed == USB_SPEED_FULL &&
|
||||
hs_ep->isochronous && dir_in) {
|
||||
/* The WA applies only to core versions from 2.72a
|
||||
* to 4.00a (including both). Also for FS_IOT_1.00a
|
||||
* and HS_IOT_1.00a.
|
||||
*/
|
||||
u32 gsnpsid = dwc2_readl(hsotg->regs + GSNPSID);
|
||||
|
||||
if ((gsnpsid >= DWC2_CORE_REV_2_72a &&
|
||||
gsnpsid <= DWC2_CORE_REV_4_00a) ||
|
||||
gsnpsid == DWC2_FS_IOT_REV_1_00a ||
|
||||
gsnpsid == DWC2_HS_IOT_REV_1_00a)
|
||||
epctrl |= DXEPCTL_CNAK;
|
||||
}
|
||||
|
||||
dev_dbg(hsotg->dev, "%s: write DxEPCTL=0x%08x\n",
|
||||
__func__, epctrl);
|
||||
|
||||
|
@ -358,9 +358,14 @@ static void dwc2_gusbcfg_init(struct dwc2_hsotg *hsotg)
|
||||
|
||||
static int dwc2_vbus_supply_init(struct dwc2_hsotg *hsotg)
|
||||
{
|
||||
int ret;
|
||||
|
||||
hsotg->vbus_supply = devm_regulator_get_optional(hsotg->dev, "vbus");
|
||||
if (IS_ERR(hsotg->vbus_supply))
|
||||
return 0;
|
||||
if (IS_ERR(hsotg->vbus_supply)) {
|
||||
ret = PTR_ERR(hsotg->vbus_supply);
|
||||
hsotg->vbus_supply = NULL;
|
||||
return ret == -ENODEV ? 0 : ret;
|
||||
}
|
||||
|
||||
return regulator_enable(hsotg->vbus_supply);
|
||||
}
|
||||
@ -4342,9 +4347,7 @@ static int _dwc2_hcd_start(struct usb_hcd *hcd)
|
||||
|
||||
spin_unlock_irqrestore(&hsotg->lock, flags);
|
||||
|
||||
dwc2_vbus_supply_init(hsotg);
|
||||
|
||||
return 0;
|
||||
return dwc2_vbus_supply_init(hsotg);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -141,8 +141,10 @@ static int dwc2_pci_probe(struct pci_dev *pci,
|
||||
goto err;
|
||||
|
||||
glue = devm_kzalloc(dev, sizeof(*glue), GFP_KERNEL);
|
||||
if (!glue)
|
||||
if (!glue) {
|
||||
ret = -ENOMEM;
|
||||
goto err;
|
||||
}
|
||||
|
||||
ret = platform_device_add(dwc2);
|
||||
if (ret) {
|
||||
|
@ -166,7 +166,7 @@ static void dwc3_ep_inc_deq(struct dwc3_ep *dep)
|
||||
dwc3_ep_inc_trb(&dep->trb_dequeue);
|
||||
}
|
||||
|
||||
void dwc3_gadget_del_and_unmap_request(struct dwc3_ep *dep,
|
||||
static void dwc3_gadget_del_and_unmap_request(struct dwc3_ep *dep,
|
||||
struct dwc3_request *req, int status)
|
||||
{
|
||||
struct dwc3 *dwc = dep->dwc;
|
||||
@ -1424,7 +1424,7 @@ static int dwc3_gadget_ep_dequeue(struct usb_ep *ep,
|
||||
dwc->lock);
|
||||
|
||||
if (!r->trb)
|
||||
goto out1;
|
||||
goto out0;
|
||||
|
||||
if (r->num_pending_sgs) {
|
||||
struct dwc3_trb *trb;
|
||||
|
@ -221,7 +221,7 @@ static void pn_tx_complete(struct usb_ep *ep, struct usb_request *req)
|
||||
netif_wake_queue(dev);
|
||||
}
|
||||
|
||||
static int pn_net_xmit(struct sk_buff *skb, struct net_device *dev)
|
||||
static netdev_tx_t pn_net_xmit(struct sk_buff *skb, struct net_device *dev)
|
||||
{
|
||||
struct phonet_port *port = netdev_priv(dev);
|
||||
struct f_phonet *fp;
|
||||
|
@ -52,7 +52,7 @@
|
||||
#define USB_GADGET_DELAYED_STATUS 0x7fff /* Impossibly large value */
|
||||
|
||||
/* big enough to hold our biggest descriptor */
|
||||
#define USB_COMP_EP0_BUFSIZ 1024
|
||||
#define USB_COMP_EP0_BUFSIZ 4096
|
||||
|
||||
/* OS feature descriptor length <= 4kB */
|
||||
#define USB_COMP_EP0_OS_DESC_BUFSIZ 4096
|
||||
|
Loading…
Reference in New Issue
Block a user