usb-uhci.c failing "-"
PATCH 1/1 usb-uhci.c failing "-"
Hi
Looks like a bug?
Thanks
Guennadi
---------------------------------
Guennadi Liakhovetski, Ph.D.
DSA Daten- und Systemtechnik GmbH
Pascalstr. 28
D-52076 Aachen
Germany
Signed-off-by Guennadi Liakhovetski <[email protected]>
drivers/usb/host/usb-uhci.c +1 -1
@@ -2505,7 +2505,7 @@ ((urb_priv_t *)urb->hcpriv)->flags=0 ; } -if ((urb->status != -ECONNABORTED ) && (urb->status !=ECONNRESET ) && +if ((urb->status != -ECONNABORTED ) && (urb->status != -ECONNRESET ) && (urb->status != -ENOENT )) { urb->status = -EINPROGRESS ;
Quoted 3 lines · Guennadi Liakhovetski
Hi
Looks like a bug?
Looks like you're right.
Marcelo, I've merged it into -upstream.
Quoted 2 lines
Thanks
Guennadi
Thanks,
Willy
Quoted 27 lines
---------------------------------
Guennadi Liakhovetski, Ph.D.
DSA Daten- und Systemtechnik GmbH
Pascalstr. 28
D-52076 Aachen
GermanySigned-off-by Guennadi Liakhovetski <[email protected]>
drivers/usb/host/usb-uhci.c +0
-1@@ -2505,7 +2505,7 @@ ((urb_priv_t *)urb->hcpriv)->flags=0 ; } - if ((urb->status != -ECONNABORTED) && (urb->status !=ECONNRESET) &&
drivers/usb/host/usb-uhci.c +1
-2+if ((urb->status != -ECONNABORTED ) && (urb->status != -ECONNRESET) && (urb->status != -ENOENT)) { urb->status = -EINPROGRESS ; -To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
drivers/usb/host/usb-uhci.c line 2509
Quoted 11 lines · Guennadi Liakhovetski
Looks like a bug?
drivers/usb/host/usb-uhci.c +1
-1@@ -2505,7 +2505,7 @@ ((urb_priv_t *)urb->hcpriv)->flags=0 ; } -if ((urb->status != -ECONNABORTED ) && (urb->status !=ECONNRESET ) && +if ((urb->status != -ECONNABORTED ) && (urb->status != -ECONNRESET ) && (urb->status != -ENOENT )) {
This is not what the author intended, obviously. But I am not quite sure what happens because of it. Seems like we unlink some things which are about to return anyway... and then return -104 instead of -84. This may be relatively harmless. At worst, the driver resubmits and gets its -84 that way.
I vote to apply this and see what happens. We are early in 2.4.33 cycle, so it should be safe.
-- Pete
Quoted 10 lines · Pete Zaitcev
Quoted 8 lines · Guennadi Liakhovetski
Looks like a bug?
drivers/usb/host/usb-uhci.c +0
-0@@ -2505,7 +2505,7 @@ ((urb_priv_t *)urb->hcpriv)->flags=0 ; }
Quoted 6 lines
drivers/usb/host/usb-uhci.c line 2509
Quoted 3 lines
drivers/usb/host/usb-uhci.c +1
-1-if ((urb->status != -ECONNABORTED ) && (urb->status !=ECONNRESET ) && +if ((urb->status != -ECONNABORTED ) && (urb->status != -ECONNRESET ) && (urb->status != -ENOENT )) {This is not what the author intended, obviously. But I am not quite sure what happens because of it. Seems like we unlink some things which are
This is my concirn too. The current behaviour is in fact just
Quoted 3 lines
drivers/usb/host/usb-uhci.c line 2509
Quoted 3 lines
drivers/usb/host/usb-uhci.c +1
-1-if ((urb->status != -ECONNABORTED ) && (urb->status !=ECONNRESET ) && +if ((urb->status != -ECONNABORTED ) && (urb->status != -ENOENT )) {
and nobody complains...:-) So, maybe this would be the right fix? At least safe in that it cannot break anything:-) But I don't understand that code very well. E.g., I don't understand why about 15 lines above the code in question
if (urb->complete) {
//dbg("process_interrupt: calling completion, status %i",status);
urb->status = status;i.e., if (!urb->completion) urb->status is not set, so, depending on whether the urb has ->completion either the old or the new status will be tested. Is this really correct? And a couple lines above that "goto recycle;" is superfluous...
Thanks
Guennadi
Quoted 7 lines
about to return anyway... and then return -104 instead of -84. This may be relatively harmless. At worst, the driver resubmits and gets its -84 that way.
I vote to apply this and see what happens. We are early in 2.4.33 cycle, so it should be safe.
Quoted 7 lines
-- Pete
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
---
Guennadi Liakhovetski
Quoted 4 lines · Guennadi Liakhovetski
i.e., if (!urb->completion)
urb->statusis not set, so, depending on whether the urb has ->completion either the old or the new status will be tested. Is this really correct? And a couple lines above that "goto recycle;" is superfluous...
I would not recommend to get too excercised over uhci-hcd in 2.4.32. I do not with to touch it, because it mostly works, and the risk of regressions is too great.
-- Pete