Hi David, On Mon, Aug 24, 2015 at 1:40 PM, David Herrmann <dh.herrmann@xxxxxxxxx> wrote: > Hi > > On Mon, Aug 24, 2015 at 10:12 AM, Luiz Augusto von Dentz > <luiz.dentz@xxxxxxxxx> wrote: >> Hi David, >> >> On Fri, Aug 21, 2015 at 12:03 PM, David Herrmann <dh.herrmann@xxxxxxxxx> wrote: >>> Hey >>> >>> On Thu, Aug 20, 2015 at 10:52 AM, Luiz Augusto von Dentz >>> <luiz.dentz@xxxxxxxxx> wrote: >>>> @David: Since apparently you was the author of the patch the remove >>>> setting EUNATCH to sk_err can you tell if that was intentional or you >>>> did not know that it could affect the timeout implementation? Btw, it >>>> would nice if you could comment regarding moving the timeout policy to >>>> the HID driver. >>> >>> This sounds like an oversight. From a quick look, >>> hidp_session_terminate() should set these errors properly. I can try >>> to craft a patch on Monday. >> >> I wonder if it isn't better to just call kernel_sock_shutdown directly >> since either way we want to disconnect and the userspace is not really >> doing anything special with EUNATCH either, it just see there is an >> error and close its reference which happens to be the last one causing >> it disconnect. > > I'm not very comfortable with -net internals, so not sure what > behavior you want. Calling kernel_sock_shutdown() sounds fine, but > that cannot be done from hidp_session_terminate(). Instead, you must > call it from hidp_session_thread() somewhere near hidp_del_timer(), > before hidp_session_put(). Then lets keep it simple and just set EUNATCH as it was before. -- Luiz Augusto von Dentz -- 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