Hi Johan, > The test for BTUSB_DOWNLOADING must be after adding to the wait queue > and setting the TASK_INTERRUPTIBLE state. Otherwise the flag may get > cleared after we test for it and we end up getting a timeout since > schedule_timeout() waits for the full duration. This patch uses a > wait_on_bit_timeout() + wake_up_bit(). To perform the task both > race-free as well as in a much simpler way. > > Since there's no global wait_on_bit_timeout() helper yet (even though > all the building blocks for it are in place) this patch creates a > temporary local btusb copy of it until the global one has made it to > upstream trees. > > Signed-off-by: Johan Hedberg <johan.hedberg@xxxxxxxxx> > --- > drivers/bluetooth/btusb.c | 67 ++++++++++++++++++++++++----------------------- > 1 file changed, 34 insertions(+), 33 deletions(-) patch has been applied to bluetooth-next tree. Regards Marcel -- To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html