mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-23 17:30:02 +00:00
Two bug fixes for cdns3 and cdnsp
-----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEDaZUZmFxRG/wNThrSFkpgVDWcbsFAmC9dVwACgkQSFkpgVDW cbs+oAf/b4mVmJpYIMTBM5tU086YpsZ80StjH3MVx2Hx/F8bM2ewovOUxOWPAY2o A6ROuLUlU/0TT8U3LL5PEbQDHhuPsf1n3erv6iz63a72uzOouLeHOBYFP+E6aM5z 1mkr2yHXpwFe+aHpstXvOgeR4ano0kzMkx/I3SPH6P8/pXiBSrpvTiBwnxqvZxbb VQuP9VfEF5e8vXuDiMF1V5qjea/BYnvjt2Yj34An3JHte13oTNRdFM/6aQiIEvt2 r6g0nBJizmhIHwtNYq30KfgFsNjiC9+dPtOCOVyv80c+Qu+F71EwEyqZSrOVLunh hfxC/U6H8vy73Zo3gJP3xrXE+xvztw== =OpDk -----END PGP SIGNATURE----- Merge tag 'usb-v5.13-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/peter.chen/usb into usb-linus Peter writes: Two bug fixes for cdns3 and cdnsp * tag 'usb-v5.13-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/peter.chen/usb: usb: cdnsp: Fix deadlock issue in cdnsp_thread_irq_handler usb: cdns3: Enable TDL_CHK only for OUT ep
This commit is contained in:
commit
a39b7ba35d
2 changed files with 7 additions and 8 deletions
|
@ -2007,7 +2007,7 @@ static void cdns3_configure_dmult(struct cdns3_device *priv_dev,
|
||||||
else
|
else
|
||||||
mask = BIT(priv_ep->num);
|
mask = BIT(priv_ep->num);
|
||||||
|
|
||||||
if (priv_ep->type != USB_ENDPOINT_XFER_ISOC) {
|
if (priv_ep->type != USB_ENDPOINT_XFER_ISOC && !priv_ep->dir) {
|
||||||
cdns3_set_register_bit(®s->tdl_from_trb, mask);
|
cdns3_set_register_bit(®s->tdl_from_trb, mask);
|
||||||
cdns3_set_register_bit(®s->tdl_beh, mask);
|
cdns3_set_register_bit(®s->tdl_beh, mask);
|
||||||
cdns3_set_register_bit(®s->tdl_beh2, mask);
|
cdns3_set_register_bit(®s->tdl_beh2, mask);
|
||||||
|
@ -2046,15 +2046,13 @@ int cdns3_ep_config(struct cdns3_endpoint *priv_ep, bool enable)
|
||||||
case USB_ENDPOINT_XFER_INT:
|
case USB_ENDPOINT_XFER_INT:
|
||||||
ep_cfg = EP_CFG_EPTYPE(USB_ENDPOINT_XFER_INT);
|
ep_cfg = EP_CFG_EPTYPE(USB_ENDPOINT_XFER_INT);
|
||||||
|
|
||||||
if ((priv_dev->dev_ver == DEV_VER_V2 && !priv_ep->dir) ||
|
if (priv_dev->dev_ver >= DEV_VER_V2 && !priv_ep->dir)
|
||||||
priv_dev->dev_ver > DEV_VER_V2)
|
|
||||||
ep_cfg |= EP_CFG_TDL_CHK;
|
ep_cfg |= EP_CFG_TDL_CHK;
|
||||||
break;
|
break;
|
||||||
case USB_ENDPOINT_XFER_BULK:
|
case USB_ENDPOINT_XFER_BULK:
|
||||||
ep_cfg = EP_CFG_EPTYPE(USB_ENDPOINT_XFER_BULK);
|
ep_cfg = EP_CFG_EPTYPE(USB_ENDPOINT_XFER_BULK);
|
||||||
|
|
||||||
if ((priv_dev->dev_ver == DEV_VER_V2 && !priv_ep->dir) ||
|
if (priv_dev->dev_ver >= DEV_VER_V2 && !priv_ep->dir)
|
||||||
priv_dev->dev_ver > DEV_VER_V2)
|
|
||||||
ep_cfg |= EP_CFG_TDL_CHK;
|
ep_cfg |= EP_CFG_TDL_CHK;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
|
|
@ -1517,13 +1517,14 @@ irqreturn_t cdnsp_thread_irq_handler(int irq, void *data)
|
||||||
{
|
{
|
||||||
struct cdnsp_device *pdev = (struct cdnsp_device *)data;
|
struct cdnsp_device *pdev = (struct cdnsp_device *)data;
|
||||||
union cdnsp_trb *event_ring_deq;
|
union cdnsp_trb *event_ring_deq;
|
||||||
|
unsigned long flags;
|
||||||
int counter = 0;
|
int counter = 0;
|
||||||
|
|
||||||
spin_lock(&pdev->lock);
|
spin_lock_irqsave(&pdev->lock, flags);
|
||||||
|
|
||||||
if (pdev->cdnsp_state & (CDNSP_STATE_HALTED | CDNSP_STATE_DYING)) {
|
if (pdev->cdnsp_state & (CDNSP_STATE_HALTED | CDNSP_STATE_DYING)) {
|
||||||
cdnsp_died(pdev);
|
cdnsp_died(pdev);
|
||||||
spin_unlock(&pdev->lock);
|
spin_unlock_irqrestore(&pdev->lock, flags);
|
||||||
return IRQ_HANDLED;
|
return IRQ_HANDLED;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1539,7 +1540,7 @@ irqreturn_t cdnsp_thread_irq_handler(int irq, void *data)
|
||||||
|
|
||||||
cdnsp_update_erst_dequeue(pdev, event_ring_deq, 1);
|
cdnsp_update_erst_dequeue(pdev, event_ring_deq, 1);
|
||||||
|
|
||||||
spin_unlock(&pdev->lock);
|
spin_unlock_irqrestore(&pdev->lock, flags);
|
||||||
|
|
||||||
return IRQ_HANDLED;
|
return IRQ_HANDLED;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue