Commit a39b7ba3 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman

Merge tag 'usb-v5.13-rc6' of...

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
parents 1ca01c08 a9aecef1
...@@ -2007,7 +2007,7 @@ static void cdns3_configure_dmult(struct cdns3_device *priv_dev, ...@@ -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(&regs->tdl_from_trb, mask); cdns3_set_register_bit(&regs->tdl_from_trb, mask);
cdns3_set_register_bit(&regs->tdl_beh, mask); cdns3_set_register_bit(&regs->tdl_beh, mask);
cdns3_set_register_bit(&regs->tdl_beh2, mask); cdns3_set_register_bit(&regs->tdl_beh2, mask);
...@@ -2046,15 +2046,13 @@ int cdns3_ep_config(struct cdns3_endpoint *priv_ep, bool enable) ...@@ -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) ...@@ -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) ...@@ -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;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment