Skip to content

Commit

Permalink
usb: isp1760: use the right irq status bit
Browse files Browse the repository at this point in the history
[ Upstream commit 955d0fb ]

Instead of using the fields enum values to check interrupts
trigged, use the correct bit values.

Reported-by: Dietmar Eggemann <dietmar.eggemann@arm.com>
Tested-by: Dietmar Eggemann <dietmar.eggemann@arm.com>
Signed-off-by: Rui Miguel Silva <rui.silva@linaro.org>
Link: https://lore.kernel.org/r/20210827131154.4151862-5-rui.silva@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
rmsilva authored and gregkh committed Sep 18, 2021
1 parent 11228ee commit f46ac8d
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions drivers/usb/isp1760/isp1760-udc.c
Expand Up @@ -1363,15 +1363,15 @@ static irqreturn_t isp1760_udc_irq(int irq, void *dev)

status = isp1760_udc_irq_get_status(udc);

if (status & DC_IEVBUS) {
if (status & ISP176x_DC_IEVBUS) {
dev_dbg(udc->isp->dev, "%s(VBUS)\n", __func__);
/* The VBUS interrupt is only triggered when VBUS appears. */
spin_lock(&udc->lock);
isp1760_udc_connect(udc);
spin_unlock(&udc->lock);
}

if (status & DC_IEBRST) {
if (status & ISP176x_DC_IEBRST) {
dev_dbg(udc->isp->dev, "%s(BRST)\n", __func__);

isp1760_udc_reset(udc);
Expand All @@ -1391,18 +1391,18 @@ static irqreturn_t isp1760_udc_irq(int irq, void *dev)
}
}

if (status & DC_IEP0SETUP) {
if (status & ISP176x_DC_IEP0SETUP) {
dev_dbg(udc->isp->dev, "%s(EP0SETUP)\n", __func__);

isp1760_ep0_setup(udc);
}

if (status & DC_IERESM) {
if (status & ISP176x_DC_IERESM) {
dev_dbg(udc->isp->dev, "%s(RESM)\n", __func__);
isp1760_udc_resume(udc);
}

if (status & DC_IESUSP) {
if (status & ISP176x_DC_IESUSP) {
dev_dbg(udc->isp->dev, "%s(SUSP)\n", __func__);

spin_lock(&udc->lock);
Expand All @@ -1413,7 +1413,7 @@ static irqreturn_t isp1760_udc_irq(int irq, void *dev)
spin_unlock(&udc->lock);
}

if (status & DC_IEHS_STA) {
if (status & ISP176x_DC_IEHS_STA) {
dev_dbg(udc->isp->dev, "%s(HS_STA)\n", __func__);
udc->gadget.speed = USB_SPEED_HIGH;
}
Expand Down

0 comments on commit f46ac8d

Please sign in to comment.