Bluetooth audio - crash on USB bluetooth dongle disconnect -
solved
Maksim Yevmenkin
maksim.yevmenkin at gmail.com
Fri Oct 3 22:42:30 UTC 2008
2008/10/3 Vladimir Grebenschikov <vova at fbsd.ru>:
> В Fri, 03/10/2008 в 14:18 -0700, Maksim Yevmenkin пишет:
>
>> one thing that is different from interrupt and bulk transfers is that
>> ng_ubt(4) always has multiple outstanding incoming isoc transfers.
>> when device is simply pulled out, there is not much driver can do. if
>> i enable debugging i can see my transfer completion routine called
>> with ioerror status or something like that. so, i suspect this is a
>> cleanup issue. i'm not sure who supposed to do the cleanup in this
>> case driver or stack.
>>
>> in any case, can you verify that ubt_reset() is called when device is
>> pulled out? (it should be called as part of hook disconnect).
>
> Right guess, it does not called.
>
>> if not - then please try to call ubt_reset() from ubt_detach() just before
>> closing all the pipes.
>
> Yes, it fixes crash, patch below.
thanks for testing it! i have committed slightly different fix to head
===
Author: emax
Date: Fri Oct 3 22:40:42 2008
New Revision: 183576
URL: http://svn.freebsd.org/changeset/base/183576
Log:
Abort transfers on all pipes before closing them. This fixes the crash
when Bluetooth USB device is pulled out without stopping the stack first.
Submitted by: Vladimir Grebenschikov vova at fbsd dot ru
MFC after: 1 week
Modified:
head/sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c
===
thanks,
max
More information about the freebsd-bluetooth
mailing list