USB: chipidea: fix & vs | bug
Subsystems (3)
PATCH 1/1 USB: chipidea: fix & vs | bug
There is a '&' vs '|' typo in the original code so the condition is never true and we don't queue the work.
---
drivers/usb/chipidea/udc.c +1 -1
@@ -1680,7 +1680,7 @@ static irqreturn_t udc_irq(struct ci13xxx *ci) intr =hw_read (ci,OP_OTGSC , ~0 );hw_write (ci,OP_OTGSC , ~0 , intr); -if (intr & (OTGSC_AVVIE &OTGSC_AVVIS )) +if (intr & (OTGSC_AVVIE |OTGSC_AVVIS ))queue_work (ci->wq, &ci->vbus_work);spin_unlock (&ci->lock);
Quoted 11 lines · Dan Carpenter
There is a '&' vs '|' typo in the original code so the condition is never true and we don't queue the work.
Signed-off-by Dan Carpenter <[email protected]>---
drivers/usb/chipidea/udc.c +0
-0
drivers/usb/chipidea/udc.c static irqreturn_t udc_irq(struct ci13xxx *ci) · line 1683
Quoted 5 lines
drivers/usb/chipidea/udc.c +1
-1@@ -1680,7 +1680,7 @@ static irqreturn_t udc_irq(struct ci13xxx *ci) intr =hw_read (ci,OP_OTGSC , ~0 );hw_write (ci,OP_OTGSC , ~0 , intr); -if (intr & (OTGSC_AVVIE &OTGSC_AVVIS )) +if (intr & (OTGSC_AVVIE |OTGSC_AVVIS ))
It's not what I meant. Should be
if ((intr & OTGSC_AVVIE) && (intr & OTGSC_AVVIS))
I'm still testing it.
Thanks
Richard
Quoted 4 lines
drivers/usb/chipidea/udc.c +0
-0queue_work (ci->wq, &ci->vbus_work);spin_unlock (&ci->lock);
Quoted 15 lines · Richard Zhao
Quoted 14 lines · Dan Carpenter
There is a '&' vs '|' typo in the original code so the condition is never true and we don't queue the work.
Signed-off-by Dan Carpenter <[email protected]>---
drivers/usb/chipidea/udc.c +0
-0@@ -1680,7 +1680,7 @@ static irqreturn_t udc_irq(struct ci13xxx *ci) intr =hw_read (ci,OP_OTGSC , ~0 );hw_write (ci,OP_OTGSC , ~0 , intr);
Quoted 5 lines
drivers/usb/chipidea/udc.c static irqreturn_t udc_irq(struct ci13xxx *ci) · line 1683
Quoted 2 lines
drivers/usb/chipidea/udc.c +1
-1-if (intr & (OTGSC_AVVIE &OTGSC_AVVIS )) +if (intr & (OTGSC_AVVIE |OTGSC_AVVIS ))It's not what I meant. Should be
if ((intr &OTGSC_AVVIE) && (intr &OTGSC_AVVIS))
I'm still testing it.
How did the testing go?
regards,
dan carpenter
Quoted 16 lines · Dan Carpenter
Quoted 15 lines · Richard Zhao
Quoted 14 lines · Dan Carpenter
There is a '&' vs '|' typo in the original code so the condition is never true and we don't queue the work.
Signed-off-by Dan Carpenter <[email protected]>---
drivers/usb/chipidea/udc.c +0
-0@@ -1680,7 +1680,7 @@ static irqreturn_t udc_irq(struct ci13xxx *ci) intr =hw_read (ci,OP_OTGSC , ~0 );hw_write (ci,OP_OTGSC , ~0 , intr);
Quoted 8 lines
Quoted 5 lines
drivers/usb/chipidea/udc.c static irqreturn_t udc_irq(struct ci13xxx *ci) · line 1683
Quoted 2 lines
drivers/usb/chipidea/udc.c +1
-1-if (intr & (OTGSC_AVVIE &OTGSC_AVVIS )) +if (intr & (OTGSC_AVVIE |OTGSC_AVVIS ))It's not what I meant. Should be
if ((intr &OTGSC_AVVIE) && (intr &OTGSC_AVVIS))
I'm still testing it.How did the testing go?
Richard's email is bouncing. Probably I should just send this myself.
regards,
dan carpenter
Quoted 23 lines · Dan Carpenter
Quoted 22 lines · Dan Carpenter
Quoted 20 lines · Richard Zhao
Quoted 11 lines · Dan Carpenter
There is a '&' vs '|' typo in the original code so the condition is never true and we don't queue the work.
Signed-off-by Dan Carpenter <[email protected]>---
drivers/usb/chipidea/udc.c +0
-0drivers/usb/chipidea/udc.c static irqreturn_t udc_irq(struct ci13xxx *ci) · line 1683
Quoted 5 lines
drivers/usb/chipidea/udc.c +1
-1@@ -1680,7 +1680,7 @@ static irqreturn_t udc_irq(struct ci13xxx *ci) intr =hw_read (ci,OP_OTGSC , ~0 );hw_write (ci,OP_OTGSC , ~0 , intr); -if (intr & (OTGSC_AVVIE &OTGSC_AVVIS )) +if (intr & (OTGSC_AVVIE |OTGSC_AVVIS ))It's not what I meant. Should be
if ((intr &OTGSC_AVVIE) && (intr &OTGSC_AVVIS))
I'm still testing it.
Quoted 5 lines
Quoted 2 lines
How did the testing go?
Richard's email is bouncing. Probably I should just send this myself.
We're reverting this commit for 3.10 as part of Peter's vbus detection patchset. If it seems more urgent, I guess we can revert it earlier as a bugfix. Otherwise, I'd just leave it till 3.10.
Regards,
--
Alex
Quoted 28 lines · Alexander Shishkin
Quoted 26 lines · Dan Carpenter
Quoted 24 lines · Dan Carpenter
Quoted 15 lines · Richard Zhao
Quoted 14 lines · Dan Carpenter
There is a '&' vs '|' typo in the original code so the condition is never true and we don't queue the work.
Signed-off-by Dan Carpenter <[email protected]>---
drivers/usb/chipidea/udc.c +0
-0@@ -1680,7 +1680,7 @@ static irqreturn_t udc_irq(struct ci13xxx *ci) intr =hw_read (ci,OP_OTGSC , ~0 );hw_write (ci,OP_OTGSC , ~0 , intr);Quoted 5 lines
drivers/usb/chipidea/udc.c static irqreturn_t udc_irq(struct ci13xxx *ci) · line 1683
Quoted 2 lines
drivers/usb/chipidea/udc.c +1
-1-if (intr & (OTGSC_AVVIE &OTGSC_AVVIS )) +if (intr & (OTGSC_AVVIE |OTGSC_AVVIS ))It's not what I meant. Should be
if ((intr &OTGSC_AVVIE) && (intr &OTGSC_AVVIS))
I'm still testing it.How did the testing go?
Quoted 6 lines
Quoted 2 lines
Richard's email is bouncing. Probably I should just send this myself.
We're reverting this commit for 3.10 as part of Peter's vbus detection patchset. If it seems more urgent, I guess we can revert it earlier as a bugfix. Otherwise, I'd just leave it till 3.10.
No rush. It's just a static checker thing.
regards,
dan carpenter
Quoted 29 lines · Dan Carpenter
Quoted 28 lines · Alexander Shishkin
Quoted 26 lines · Dan Carpenter
Quoted 24 lines · Dan Carpenter
Quoted 15 lines · Richard Zhao
Quoted 14 lines · Dan Carpenter
There is a '&' vs '|' typo in the original code so the condition is never true and we don't queue the work.
Signed-off-by Dan Carpenter <[email protected]>---
drivers/usb/chipidea/udc.c +0
-0@@ -1680,7 +1680,7 @@ static irqreturn_t udc_irq(struct ci13xxx *ci) intr =hw_read (ci,OP_OTGSC , ~0 );hw_write (ci,OP_OTGSC , ~0 , intr);Quoted 5 lines
drivers/usb/chipidea/udc.c static irqreturn_t udc_irq(struct ci13xxx *ci) · line 1683
Quoted 2 lines
drivers/usb/chipidea/udc.c +1
-1-if (intr & (OTGSC_AVVIE &OTGSC_AVVIS )) +if (intr & (OTGSC_AVVIE |OTGSC_AVVIS ))It's not what I meant. Should be
if ((intr &OTGSC_AVVIE) && (intr &OTGSC_AVVIS))
I'm still testing it.How did the testing go?
Quoted 8 lines
Quoted 6 lines
Quoted 2 lines
Richard's email is bouncing. Probably I should just send this myself.
We're reverting this commit for 3.10 as part of Peter's vbus detection patchset. If it seems more urgent, I guess we can revert it earlier as a bugfix. Otherwise, I'd just leave it till 3.10.
No rush. It's just a static checker thing.
Ok, thanks.
Regards,
--
Alex