Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp7586866ybn; Mon, 30 Sep 2019 16:42:59 -0700 (PDT) X-Google-Smtp-Source: APXvYqxfbWty3Ne8leOyunlBVLm5i857TpFUr56vHXJlatxu3cYRCxIZoccXYJ0Kw+vlHQr9u47g X-Received: by 2002:a05:6402:1699:: with SMTP id a25mr22557531edv.91.1569886979700; Mon, 30 Sep 2019 16:42:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569886979; cv=none; d=google.com; s=arc-20160816; b=mUWoKMsKFvb8rz/rfWqfC40XdDcdOkCgIJEmwmjfdfSYOryMV2nZeC055P3in8Z7O4 iVRQi48+JoR/YyaJe9v3dK6Mm/3fvbDEnSHmUfAmyQzLer56Q/D9urQNuMGnvTVvmjkO 1ixH9DaXxszUF7WzJdZYiMzsPLqem8C0kBbsZJKxjfldwEWdHl4DM4q7eAs+zkv99kLx K1YQb3RD6hGYikQfJZ6BsdRxN25AyEQysC00eklPWQp2p0dOsmoDogkIZ9EVqSlTMS71 N8bYEnk9p46qLZUE9coXVPyUQgzpODQji750hvW9tvs2PQYbVOkSC08+ZMgezm8I6y23 m5xQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=npGWR76W+ANkwMKaV1VzAxIvdcc9xQxvuDfGguyNNeU=; b=nOZOq8ObrM5HTaQIUIY9467UxzPq9V8plCjvAZdVnCWbdZuz7iHuBTnp/6iBYM7iJa uOBfACekrMZwki+CvsEax9FC913ne5wPtGbQMxw71Mf998+mPEZD74Ux8FGPI8fPzGBX BwMs2D8fOlQVGQA7UB/Qj5LLTxepnzyzfDYQEHko7hPtgXllATFi4mC1n9B/aVr5TUgM 06QWwVVx7ReRjYPO31jgA3UBeHMUI3Qn6EUVW3Dk+JpzFmvnUwrI0v3dJGpFY3vwPfyz UibbHaIbdKapY7DAQK4nSOwgA7Z6tdnerjjbZOVxs8KmoEWre84EaHs6BnXQ8FKfi5dM vuqw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=beNjvmh0; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a36si8528110edf.123.2019.09.30.16.42.34; Mon, 30 Sep 2019 16:42:59 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=beNjvmh0; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731831AbfI3Xm2 (ORCPT + 99 others); Mon, 30 Sep 2019 19:42:28 -0400 Received: from mail-io1-f66.google.com ([209.85.166.66]:38132 "EHLO mail-io1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726425AbfI3Xm1 (ORCPT ); Mon, 30 Sep 2019 19:42:27 -0400 Received: by mail-io1-f66.google.com with SMTP id u8so43007409iom.5; Mon, 30 Sep 2019 16:42:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=npGWR76W+ANkwMKaV1VzAxIvdcc9xQxvuDfGguyNNeU=; b=beNjvmh0r08vzIhqpr9+2IgXi5VD/ICuDRMVvBX8IfqINKq9Re95ZCqBVTA8Qo68ha ayl5QaDNpTv7GqMYFfLC9wZpqepLVA7gU9f+I1QEpXXY1lKEFZnnoJwMXH0+pIgSSpZB H+s6QLzXMTmloR/DTqlFAIE+3vZEUzT3s8hFT6E1bTJNeKTZISj/KccC3D8HRA1zMH+U +nhuXBx+O1uGCG2ADxNOByiyDU/0O4G4hkhf+quHdy8IaCH6osQYtMzvx57nIjpQt/6l OJvMRMyldSOHlcKuHEiyXQupqsYH0eUnCXwse2M2qRbvuH47jDHU7dkKyT5Kj8m09rvA MLWg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=npGWR76W+ANkwMKaV1VzAxIvdcc9xQxvuDfGguyNNeU=; b=JSdNJkb+mx7knshfdeQXgSPf7jZm2fna8Up3JvatAC/Sjzl+RDQgWLPDIaTZMMaMD5 L1I3TxVSVhzVINbZuISRdWKehY3vVGAszS6HA5LNWaFg/e4HPc72ISXRI3HeOFlcxxwr TBuCaEkIX096dt9UwFBytilJzT7X9KJwJx14kZrYeV9SuAuEwK+G0LnNNWOOATwzbxfo p2G9+PmLesf61P+XsHD6NgFawj5hc6RmlxtIpdquGingDp8AJMoXVLxFvbEET49jjbR9 T/iuLi666rDjw25fOMGtpbZH5tIbeSovGJtbJAv8LfueHHEvxcO5JDtkzF4/7UYnbJeH z/bQ== X-Gm-Message-State: APjAAAXujLKPfBxieWekOsQgSutyZiZaOEvyvbFfOznP/7/D0PGa/ZeT i3/NkZrDvKqjKRhhq7j/7Ps0IFr0jIU/+yVaxgk= X-Received: by 2002:a05:6e02:683:: with SMTP id o3mr21443923ils.58.1569886946381; Mon, 30 Sep 2019 16:42:26 -0700 (PDT) MIME-Version: 1.0 References: <20181221011752.25627-1-sre@kernel.org> <4f47f7f2-3abb-856c-4db5-675caf8057c7@xs4all.nl> <20190319133154.7tbfafy7pguzw2tk@earth.universe> <4C83753E-205B-42CE-AF85-74674B311151@holtmann.org> In-Reply-To: <4C83753E-205B-42CE-AF85-74674B311151@holtmann.org> From: Adam Ford Date: Mon, 30 Sep 2019 18:42:13 -0500 Message-ID: Subject: Re: [PATCH 00/14] Add support for FM radio in hcill and kill TI_ST To: Marcel Holtmann Cc: Sebastian Reichel , Hans Verkuil , Mauro Carvalho Chehab , Tony Lindgren , Rob Herring , Greg Kroah-Hartman , Pavel Machek , "open list:BLUETOOTH DRIVERS" , linux-media@vger.kernel.org, Linux-OMAP , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, May 10, 2019 at 10:38 AM Marcel Holtmann wrot= e: > > Hi Adam, > > >>>>>>> This moves all remaining users of the legacy TI_ST driver to hcil= l (patches > >>>>>>> 1-3). Then patches 4-7 convert wl128x-radio driver to a standard = platform > >>>>>>> device driver with support for multiple instances. Patch 7 will r= esult in > >>>>>>> (userless) TI_ST driver no longer supporting radio at runtime. Pa= tch 8-11 do > >>>>>>> some cleanups in the wl128x-radio driver. Finally patch 12 remove= s the TI_ST > >>>>>>> specific parts from wl128x-radio and adds the required infrastruc= ture to use it > >>>>>>> with the serdev hcill driver instead. The remaining patches 13 an= d 14 remove > >>>>>>> the old TI_ST code. > >>>>>>> > >>>>>>> The new code has been tested on the Motorola Droid 4. For testing= the audio > >>>>>>> should be configured to route Ext to Speaker or Headphone. Then y= ou need to > >>>>>>> plug headphone, since its cable is used as antenna. For testing t= here is a > >>>>>>> 'radio' utility packages in Debian. When you start the utility yo= u need to > >>>>>>> specify a frequency, since initial get_frequency returns an error= : > >>>>>> > >>>>>> What is the status of this series? > >>>>>> > >>>>>> Based on some of the replies (from Adam Ford in particular) it app= ears that > >>>>>> this isn't ready to be merged, so is a v2 planned? > >>>>> > >>>>> Yes, a v2 is planned, but I'm super busy at the moment. I don't > >>>>> expect to send something for this merge window. Neither LogicPD > >>>>> nor IGEP use FM radio, so I can just remove FM support from the > >>>>> TI_ST framework. Converting those platforms to hci_ll can be done > >>>>> in a different patchset. > >>>>> > >>>>> If that was the only issue there would be a v2 already. But Marcel > >>>>> Holtmann suggested to pass the custom packet data through the BT > >>>>> subsystem, which is non-trivial (at least for me) :) > >>>> > >>>> I am running some tests today on the wl1283-st on the Logic PD Torpe= do > >>>> board. Tony had suggested a few options, so I'm going to try those. > >>>> Looking at those today. If/when you have a V2, please CC me on it. = If > >>>> it's been posted, can you send me a link? I would really like to se= e > >>>> the st-kim driver go away so I'd like to resolve the issues with the > >>>> torpedo board. > >>> > >>> I have run a bunch of tests on the 5.1 kernel. I am able to get the > >>> firmware to load now and the hci0 goes up. I was able to establish a > >>> BLE connection to a TI Sensor Tag and read and write data to it with > >>> good success on the wl1283. > >>> > >>> Unfortunately, when I tried to do some more extensive testing over > >>> classic Bluetooth, I got an error that repeats itself at seemingly > >>> random intervals: > >>> Bluetooth: hci0: Frame reassembly failed (-84) > >>> > >>> I can still scan and pair, but these Frame reassembly failed errors > >>> appear to come and go. > >> > >> there are only 3 places in h4_recv_buf that return EILSEQ. Just add an= extra printk to these to figure out which one it is. Maybe it is just extr= a packet types that we need to handle. If it is not the packet type one, pr= int what packet we have that is causing this. > >> > > > > I added some code around > > > > /* Check for invalid packet type */ > > if (!skb) { > > printk("Check for invalid packet type %x\n", (unsigned int) > > (&pkts[i])->type); > > return ERR_PTR(-EILSEQ); > > } > > > > I don't know if I did it right or I am reading the packet type > > correctly, but the frame reassembly errors are being caught here. > > > > [ 408.519165] Check for invalid packet type ff > > [ 408.523559] Bluetooth: hci0: Frame reassembly failed (-84) > > so now we need to figure our on how to handle HCI_VENDOR_PKT. > > #define LL_RECV_VENDOR \ > .type =3D HCI_VENDOR_PKT, \ > .hlen =3D aaa, \ > .loff =3D bbb, \ > .lsize =3D ccc, \ > .maxlen =3D ddd > > static const struct h4_recv_pkt ll_recv_pkts[] =3D { > ... > { LL_RECV_WAKE_ACK, .recv =3D ll_recv_frame }, > { LL_RECV_VENDOR, .recv =3D hci_recv_diag }, > }; > > Can you hexdump the data inside the skb and we can figure out what it use= s for the header and size. > > In hci_bcm.c there are a few examples of fixed size packets and bpa10x.c = contains one where it follows an actual header definition. Also hci_nokia.c= contains a few for their packets. I haven't forgotten this, but I was highly distracted. I wanted to test a bunch of stuff on omap3630 and imx6 boards to prep them for the upcoming 5.4 LTS kernel. As of now I 'think' this is the last item on my to-do list. I'm going to try and throw some debug code into the older st/kim driver as well as debug this. I know some people have stated they have wl1283-st working on a dm3730. dump some logs? I am curious to see if there is anything that can be gained by sharing the info. I'd love to see the older st/kim drivers deprecated. adam > > Regards > > Marcel >