Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp9963351imu; Wed, 5 Dec 2018 13:25:41 -0800 (PST) X-Google-Smtp-Source: AFSGD/XMQWkpYgcvppojKjUSd8giMLt9QC0DFJB4WZmfHXXOS06/Eq86zWN7yTQYk6h6WoT1IDFp X-Received: by 2002:a17:902:5ac2:: with SMTP id g2mr25787295plm.313.1544045141347; Wed, 05 Dec 2018 13:25:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544045141; cv=none; d=google.com; s=arc-20160816; b=v4qFW8CepeLTuIbiC6FXvXgdiKsPhcOaS+cWRJXvuivmsw1W6Z4u2G8Ci9CAG16267 x5INt9oEdkrva+Gc2LRBlPlyJCAROJgPcp6C5St77izclt+I6tCtkvDeZl3eTXY7SVjL itMfHQ6Eeir3HFeVD3Jfc1O5lm013GC40cy3+OANoeSugZq3SsbNmwaQioUH7jibxQKF Qf/SkLq0MiXG9XtlpWfstoq9HfSJI9KX1iylf/MGRS7DVC2TAarrXuO95gTINIOfS9ym ZD0hRkcp21VBN/Q+ONJliXmEVPcgLlKVZb9hzf9rURXrmP/2G6Y1gWUlEAo5s+MLrs7r 8Giw== 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:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=wn43OcYXYkyPfhaEdm23GByIZBWJc64RXquDSTyxtKA=; b=ncvSlFJXbWqzG4xHp9SROVeKzAbMqfLflFWWFHqsG2Yrs91RDnVWasuGfQ9Mki+VwB LxcjX47V/AFfxwlj2UkyxGSk+JsMCo2xMpr52zFwMcpvqs06u1gtAAhm64yEO9xnxMBa H9TI6Yby+NuxALy4+GmUvEbTbVGd3smTYfUHezgu4aHAu0aiEmCekU36f7K3Auutzxub GgiUSQlXLPB33iMGp6p+J8oB+wfPKOBxgJyr1+D18SXXzNLM76bR5UBQwMjIyEza9pmB +fzvrMXFkbkarR2yJXmVUmyvV3nSUqBOkJb7Afo4h2bnBunWYyznG2TsqYD1cC68cxfU eyPg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=G3+4jDFy; 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 s38si790844pga.38.2018.12.05.13.25.26; Wed, 05 Dec 2018 13:25:41 -0800 (PST) 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=G3+4jDFy; 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 S1728431AbeLEVYo (ORCPT + 99 others); Wed, 5 Dec 2018 16:24:44 -0500 Received: from mail-lf1-f66.google.com ([209.85.167.66]:41366 "EHLO mail-lf1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727309AbeLEVYn (ORCPT ); Wed, 5 Dec 2018 16:24:43 -0500 Received: by mail-lf1-f66.google.com with SMTP id c16so15847457lfj.8; Wed, 05 Dec 2018 13:24:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=wn43OcYXYkyPfhaEdm23GByIZBWJc64RXquDSTyxtKA=; b=G3+4jDFyYEwm/2d5a6DOnAAjdEysMkPQ0Ys0aH9Zf3qaWrGqzQIb5/T67qtC8wE8Iu JZHgdhscPSjSk4JdNd3XJRZflCTTu/Z4hbCRS0gvI+J++stpnbASE9WiDWJnjg3+9hNx rsmpUN+G8uXxW892KverkCA+FQfQbmPj8IT+o5ucwWH5nlE+RooN1c64DCQInI9OKiz3 qQmA9nxPFv8amd1HEQ1KOBgj5Nx79+cDInJ/XptCYGKTMY9Nq00rDbijqCc6qgmsbTuC J9AVDAnd7YVPKISF8QoYXbNzLGkJjEVL6fgLfG5LScPqiOlYQFL1X3Z3ltj8641tlcoy /S6g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=wn43OcYXYkyPfhaEdm23GByIZBWJc64RXquDSTyxtKA=; b=ce9EXhalfY8/zhZ9WOrySQaSXsApiMDPXo3f4Z6NnWPwibp+Ba1V/GH3kDZXKOfdDY Eb/icy6ePI79/d8mOVXEL0+QM05SmnE1DE65tD55c8eEeG/oOJj+0OPHZZcwb2HNAJmo MZSE99D6BMySQqizU1/tT8XUEXprN3tMO6BrT9yExbPzP4ko8E8QdTTxSG3mhFveCwzR 6Lr/OP5bzoQnwcBUbtlpfJI0OyvnIGMEadgQJN8g3enL5+i9UNy8lYZw+KNQPK6KwPCJ 9HaAvUdKg3+LBfzMzqgAPKR5Ap9refCT8v6A7xFTr6tW95Ue5ykGnlHsUdLorYivOT/g Ftkg== X-Gm-Message-State: AA+aEWY4GU5Xm0YVVwgfcyBkDOroaSFDy9NN/y27p9M2Ee44KkBd/KE0 Tq32WJ4wMSnayN+YZrBper4= X-Received: by 2002:a19:a086:: with SMTP id j128mr14503125lfe.93.1544045081297; Wed, 05 Dec 2018 13:24:41 -0800 (PST) Received: from acerlaptop.localnet ([2a02:a315:5445:5300:41e8:260c:942a:b736]) by smtp.gmail.com with ESMTPSA id p23sm3802765lfh.47.2018.12.05.13.24.39 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 05 Dec 2018 13:24:40 -0800 (PST) From: =?utf-8?B?UGF3ZcWC?= Chmiel To: Marcel Holtmann Cc: Johan Hedberg , Bluez mailing list , linux-kernel@vger.kernel.org, Jonathan Bakker Subject: Re: [PATCH] Bluetooth: hci_bcm: Handle specific unknown packets after firmware loading Date: Wed, 05 Dec 2018 22:24:39 +0100 Message-ID: <73529966.IuFOuslu9h@acerlaptop> In-Reply-To: References: <20181205194538.8074-1-pawel.mikolaj.chmiel@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Dnia =C5=9Broda, 5 grudnia 2018 22:02:30 CET Marcel Holtmann pisze: > Hi Pawel, >=20 > > The Broadcom controller on aries S5PV210 boards sends out a couple of > > unknown packets after the firmware is loaded. This will cause > > logging of errors such as: > > Bluetooth: hci0: Frame reassembly failed (-84) > >=20 > > This is probably also the case with other boards, as there are related > > Android userspace patches for custom ROMs such as > > https://review.lineageos.org/#/c/LineageOS/android_system_bt/+/142721/ > > Since this appears to be intended behaviour, treated them as diagnostic > > packets. > >=20 > > Note that this is another variant of commit 01d5e44ace8a=20 > > ("Bluetooth: hci_bcm: Handle empty packet after firmware loading") > >=20 > > Signed-off-by: Jonathan Bakker > > Signed-off-by: Pawe=C5=82 Chmiel > > --- > > drivers/bluetooth/hci_bcm.c | 32 +++++++++++++++++++++++++++----- > > 1 file changed, 27 insertions(+), 5 deletions(-) > >=20 > > diff --git a/drivers/bluetooth/hci_bcm.c b/drivers/bluetooth/hci_bcm.c > > index ddbd8c6a0ceb..ae271836dc26 100644 > > --- a/drivers/bluetooth/hci_bcm.c > > +++ b/drivers/bluetooth/hci_bcm.c > > @@ -51,6 +51,12 @@ > > #define BCM_LM_DIAG_PKT 0x07 > > #define BCM_LM_DIAG_SIZE 63 > >=20 > > +#define BCM_UNKNOWN_PKT 0x31 > > +#define BCM_UNKNOWN_SIZE 0 > > + > > +#define BCM_UNKNOWN2_PKT 0x34 > > +#define BCM_UNKNOWN2_SIZE 0 > > + >=20 > lets use BCM_TYPE49_ and BCM_TYPE52_ >=20 > > #define BCM_AUTOSUSPEND_DELAY 5000 /* default autosleep delay */ > >=20 > > /** > > @@ -561,12 +567,28 @@ static int bcm_setup(struct hci_uart *hu) > > .lsize =3D 0, \ > > .maxlen =3D BCM_NULL_SIZE > >=20 > > +#define BCM_RECV_UNKNOWN \ > > + .type =3D BCM_UNKNOWN_PKT, \ > > + .hlen =3D BCM_UNKNOWN_SIZE, \ > > + .loff =3D 0, \ > > + .lsize =3D 0, \ > > + .maxlen =3D BCM_UNKNOWN_SIZE > > + > > +#define BCM_RECV_UNKNOWN2 \ > > + .type =3D BCM_UNKNOWN2_PKT, \ > > + .hlen =3D BCM_UNKNOWN2_SIZE, \ > > + .loff =3D 0, \ > > + .lsize =3D 0, \ > > + .maxlen =3D BCM_UNKNOWN2_SIZE >=20 > Same here, BCM_RECV_TYPE49 and BCM_RECV_TYPE52. >=20 > > + > > static const struct h4_recv_pkt bcm_recv_pkts[] =3D { > > - { H4_RECV_ACL, .recv =3D hci_recv_frame }, > > - { H4_RECV_SCO, .recv =3D hci_recv_frame }, > > - { H4_RECV_EVENT, .recv =3D hci_recv_frame }, > > - { BCM_RECV_LM_DIAG, .recv =3D hci_recv_diag }, > > - { BCM_RECV_NULL, .recv =3D hci_recv_diag }, > > + { H4_RECV_ACL, .recv =3D hci_recv_frame }, > > + { H4_RECV_SCO, .recv =3D hci_recv_frame }, > > + { H4_RECV_EVENT, .recv =3D hci_recv_frame }, > > + { BCM_RECV_LM_DIAG, .recv =3D hci_recv_diag }, > > + { BCM_RECV_NULL, .recv =3D hci_recv_diag }, > > + { BCM_RECV_UNKNOWN, .recv =3D hci_recv_diag }, > > + { BCM_RECV_UNKNOWN2, .recv =3D hci_recv_diag }, > > }; > >=20 > > static int bcm_recv(struct hci_uart *hu, const void *data, int count) >=20 > Regards >=20 > Marcel >=20 Hi =46ixed in v2 version of patch. Thanks for review.