Return-Path: Content-Type: text/plain; charset=windows-1252 Mime-Version: 1.0 (Mac OS X Mail 7.1 \(1827\)) Subject: Re: [PATCH v2] Bluetooth: Add hci_h4p driver From: Marcel Holtmann In-Reply-To: <20131231221202.GB25336@amd.pavel.ucw.cz> Date: Tue, 31 Dec 2013 15:23:36 -0800 Cc: =?windows-1252?Q?Pali_Roh=E1r?= , =?utf-8?B?0JjQstCw0LnQu9C+INCU0LjQvNC40YLRgNC+0LI=?= , "Gustavo F. Padovan" , Johan Hedberg , linux-kernel , "linux-bluetooth@vger.kernel.org development" , Ville Tervo , Sebastian Reichel Message-Id: References: <1379703710-5757-1-git-send-email-pali.rohar@gmail.com> <1727897.LBX8128hIo@izba> <20131231221202.GB25336@amd.pavel.ucw.cz> To: Pavel Machek Sender: linux-bluetooth-owner@vger.kernel.org List-ID: Hi Pavel, >>> +static struct task_struct *h4p_thread; >> >> Can?t this be done using a work queue. You are looking at a 3.14 >> kernel the earliest. We have way better primitives these days. > > I tried to convert it to work queue, but was not too > succesfull. Workqueue is not really good match for what this is trying > to do... Nokia code relies on sleeping, than timing those sleeps for > signaling. I'm still trying to wrap my head around it. > > Ok, I guess I could convert it to one big workqueue task, and leave > the logic alone. Was that what you wanted? the Bluetooth subsystem moved away from tasklets and uses workqueues for everything. So this should be just fine for this driver as well. I do not know about what timings are required, but they should only matter during initial device setup. The HCI traffic is actually driven by the Bluetooth core. Regards Marcel