* [1/2,USB] /[misc]: Add waiting in transfer abortion
@ 2018-02-17 21:01 kirill.kirillovich.kapranov
0 siblings, 0 replies; 3+ messages in thread
From: kirill.kirillovich.kapranov @ 2018-02-17 21:01 UTC (permalink / raw)
To: linux-usb, johan; +Cc: tom, gregkh, Kirill Kapranov
From: Kirill Kapranov <kirill.kirillovich.kapranov@gmail.com>
Add waiting for an URB transmit finish that let the last URB to be sent
(to be not discarded) during 'release' procedure. W/o this waiting,the
last frame will be nearly always lost.
A test case: an attempt of sending a single frame:
echo -en "\001mk255" >/dev/adutux0
Signed-off-by: Kirill Kapranov <kirill.kirillovich.kapranov@gmail.com>
---
drivers/usb/misc/adutux.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/usb/misc/adutux.c b/drivers/usb/misc/adutux.c
index 4b87127..9669377 100644
--- a/drivers/usb/misc/adutux.c
+++ b/drivers/usb/misc/adutux.c
@@ -132,6 +132,8 @@ static void adu_abort_transfers(struct adu_device *dev)
spin_lock_irqsave(&dev->buflock, flags);
if (!dev->out_urb_finished) {
spin_unlock_irqrestore(&dev->buflock, flags);
+ wait_event_timeout(dev->write_wait, dev->out_urb_finished,
+ COMMAND_TIMEOUT);
usb_kill_urb(dev->interrupt_out_urb);
} else
spin_unlock_irqrestore(&dev->buflock, flags);
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [1/2,USB] /[misc]: Add waiting in transfer abortion
@ 2018-02-26 12:06 Oliver Neukum
0 siblings, 0 replies; 3+ messages in thread
From: Oliver Neukum @ 2018-02-26 12:06 UTC (permalink / raw)
To: kirill.kirillovich.kapranov, johan, linux-usb; +Cc: gregkh, tom
Am Samstag, den 17.02.2018, 23:01 +0200 schrieb
kirill.kirillovich.kapranov@gmail.com:
> From: Kirill Kapranov <kirill.kirillovich.kapranov@gmail.com>
>
> Add waiting for an URB transmit finish that let the last URB to be sent
> (to be not discarded) during 'release' procedure. W/o this waiting,the
> last frame will be nearly always lost.
Hi,
is this the only driver with this issue?
Regards
Oliver
---
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 3+ messages in thread
* [1/2,USB] /[misc]: Add waiting in transfer abortion
@ 2018-02-26 17:40 kirill.kirillovich.kapranov
0 siblings, 0 replies; 3+ messages in thread
From: kirill.kirillovich.kapranov @ 2018-02-26 17:40 UTC (permalink / raw)
To: linux-usb
Hi Oliver,
Unfortunately I have only ADU-208 USB/relay interface (adutux driver)
for testing.
At a glance, the following drivers have the pause in the same way on
'release' procedure, so they must work fine:
legousbtower
ldusb
sisusbvga
Driver iowarrior doesn't have a pause before freeing buffer on
release, so it seems to be prone to the discussed issue.
---
Regards,
Kirill
On Mon, Feb 26, 2018 at 2:06 PM, Oliver Neukum <oneukum@suse.com> wrote:
> Am Samstag, den 17.02.2018, 23:01 +0200 schrieb
> kirill.kirillovich.kapranov@gmail.com:
>> From: Kirill Kapranov <kirill.kirillovich.kapranov@gmail.com>
>>
>> Add waiting for an URB transmit finish that let the last URB to be sent
>> (to be not discarded) during 'release' procedure. W/o this waiting,the
>> last frame will be nearly always lost.
>
> Hi,
>
> is this the only driver with this issue?
>
> Regards
> Oliver
>
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-02-26 17:40 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-02-26 12:06 [1/2,USB] /[misc]: Add waiting in transfer abortion Oliver Neukum
-- strict thread matches above, loose matches on Subject: below --
2018-02-26 17:40 kirill.kirillovich.kapranov
2018-02-17 21:01 kirill.kirillovich.kapranov
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.