Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp1647346ybt; Thu, 2 Jul 2020 10:15:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzgNQ/UPkGBsbo2clqIzg3qNxcYVmauU+3GWiuQD284d8I3HuEK0EOecbRZbOEATvOOOtgd X-Received: by 2002:aa7:ce84:: with SMTP id y4mr34783972edv.113.1593710158979; Thu, 02 Jul 2020 10:15:58 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1593710158; cv=pass; d=google.com; s=arc-20160816; b=Bx5+mUiit9Dg0mzR2XcwawMlcaOLVpn3qbLyk3JoQKnQJRJws6+s+e60FPQQhLtVHM Mq2655VUjasyakJfHtkCQcq81WMYo/SLc6VX7Qm4IQ0QbwT1a/4GIt+Xf+X391O4e9hn v12ryfedwqbM99GeIHGCdTP0cGBYIWdDFetl6SBkxbamd0WetKQJLyFzx4gGZcezUWuN 9ixXZ8UT76vVLdPRncsCzR9BcH/MLaSHoIihwuqXtLcUk8syAhU6gsnD3Nkej4q0zRl3 5fWY61dLDpnDfkCJ5RU8SfeHaki2013QvThwvNE1bn+Ktmm4jv7NutwFpHEom8StkcJu P9sA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :dlp-product:dlp-version:dlp-reaction:content-language :accept-language:in-reply-to:references:message-id:date:thread-index :thread-topic:subject:cc:to:from:dkim-signature:ironport-sdr :ironport-sdr; bh=8QwE996iYUojjzuErdA89dNQTCBB+5Ok/2gVElc7wFI=; b=fDwlTJyvTqM1UzmFVEWrVcVhDH/1j0yI28z5sshdajc5wbvJ9o+letH63XDKIYtMjA o1USSX7G+/7JMfHvq1YTlwAE0YCNIg4rrSE25qtm9pPlxalbvVkIzLhfjuAz16S8Q5wL TnhpVTOcj0922/Qt9WVqjVnxbRKy6PNfbBbeZwITalnL00JVAWXRMWfRvrM0ie3+rsSo d8HQgmYODTGipm6o2xa69hPOMQqkxC39CggfslXJJ1kByxAdHhEWr54oYnaKEzeko1uG AeIGXSNnwaGQhOVnFj17LpuDjGK+1q4Y1Sydk4C8MREL1Jf+mXVI4SdXU/A6xIi9hTMG qH6w== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.onmicrosoft.com header.s=selector2-intel-onmicrosoft-com header.b=oSMwrXn5; arc=pass (i=1 spf=pass spfdomain=intel.com dkim=pass dkdomain=intel.com dmarc=pass fromdomain=intel.com); spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i20si6014346edy.277.2020.07.02.10.15.18; Thu, 02 Jul 2020 10:15:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.onmicrosoft.com header.s=selector2-intel-onmicrosoft-com header.b=oSMwrXn5; arc=pass (i=1 spf=pass spfdomain=intel.com dkim=pass dkdomain=intel.com dmarc=pass fromdomain=intel.com); spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727947AbgGBRMi (ORCPT + 99 others); Thu, 2 Jul 2020 13:12:38 -0400 Received: from mga14.intel.com ([192.55.52.115]:60985 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727817AbgGBRMb (ORCPT ); Thu, 2 Jul 2020 13:12:31 -0400 IronPort-SDR: TdWHlBp//X+yXbhPyvjtBYEUldZ0/t5UYGEbPGeA63TyljAfSghAqCNKFvW/JEXhOdGD/irLbD TgZmDKHjU+Zw== X-IronPort-AV: E=McAfee;i="6000,8403,9670"; a="146057739" X-IronPort-AV: E=Sophos;i="5.75,304,1589266800"; d="scan'208";a="146057739" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Jul 2020 10:12:28 -0700 IronPort-SDR: CRaXBcYpNSNnzALPYcDthxnoGUuqbnzsQ5mEbBVEz7t3/N+9GqF7JVgT/vwX/t2ckW1Mq/k+Km gzAcGy4Qx16w== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,304,1589266800"; d="scan'208";a="295961668" Received: from fmsmsx106.amr.corp.intel.com ([10.18.124.204]) by orsmga002.jf.intel.com with ESMTP; 02 Jul 2020 10:12:28 -0700 Received: from FMSEDG002.ED.cps.intel.com (10.1.192.134) by FMSMSX106.amr.corp.intel.com (10.18.124.204) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 2 Jul 2020 10:12:28 -0700 Received: from NAM11-DM6-obe.outbound.protection.outlook.com (104.47.57.176) by edgegateway.intel.com (192.55.55.69) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 2 Jul 2020 10:12:27 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=cIcDitTn7PObwoeAa7y1M8g+9hGa13VouXIVtpzteZIJ4qEX9wBp8bT21dgOMki/WyuWpngLbdUz6jjd8CIbQiY6ijwClQ0aX6heLjq1vzF72qn7lEtRQ2XgGR4Dzf5K8+4LHpK4nayvfZRKFPUu5wsHZj/nztumLwLCSl4qzS2V5m8AVVkHqtiFyVMrF1Ye55EVr/8asYmNipNuOTZKsdarfocWnXNipzhKg1mRCNKZTdsPCLqVfDHDZB3QVe1InfeVkAx6vRItEoyg4zJ2PwHAS/K8gOZDKDjMYySY1gExjklkcWPiC41Qi91o/Itb8h3+ddwJoCW0+hqLXg3XQw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=8QwE996iYUojjzuErdA89dNQTCBB+5Ok/2gVElc7wFI=; b=gTjmHtUK59/+Q5ke7blHaUlKYad3q1NFO/JEmMjzA5naR1wtS+7aer+B/jwyYpz1apQy8VdRZrZElJsw9/GEBWKGeTT/i+TdgaemkqdDBVCTdM3bLa6Xyhzfrz681sViZJo5IQ1EHyD8k0umh6a4mtoGQ4FAeIo4ZVzb+HFw0myeLvc9FfMnV2broQ2nRh99RA443IqcjZT5M7X2v+6tpxzyPkdHGH7eZD5Ni/IgYohJFP7BcuN1jKHSTf6S8KLDcPW7eK8GE1dCqLAcTOHP48krzwCHlG5u3vYi32FjdxmEfp5iRI2NPjz8mjkzw/Hor/d4+bqSjLmNPEuMKN+ECQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=8QwE996iYUojjzuErdA89dNQTCBB+5Ok/2gVElc7wFI=; b=oSMwrXn547Tft4W9FTGG2uNnBJujYGZNXK/wHskSaKwrdkSB6N4M9a8YyxL6CVAydAagsrw8TGkna3/PqwIFVsp9bZLJ/5DbUmHgxAoWirvmxi3ppZdqj1VOq8G1pL27JaDjKTXgGr1FF3yuagXjSk+rQd5BT44J4v49XjrYSuc= Received: from BYAPR11MB3141.namprd11.prod.outlook.com (2603:10b6:a03:8d::13) by BYAPR11MB3656.namprd11.prod.outlook.com (2603:10b6:a03:f8::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3153.20; Thu, 2 Jul 2020 17:12:23 +0000 Received: from BYAPR11MB3141.namprd11.prod.outlook.com ([fe80::9ce5:c8f4:581b:9d9f]) by BYAPR11MB3141.namprd11.prod.outlook.com ([fe80::9ce5:c8f4:581b:9d9f%5]) with mapi id 15.20.3131.028; Thu, 2 Jul 2020 17:12:23 +0000 From: "K, Kiran" To: Marcel Holtmann CC: linux-bluetooth , "Srivatsa, Ravishankar" , "Tumkur Narayan, Chethan" , "kiraank@gmail.com" , "Bag, Amit K" , Raghuram Hegde Subject: RE: [PATCH 2/5] Bluetooth: btintel: Refactor firmware header download sequence Thread-Topic: [PATCH 2/5] Bluetooth: btintel: Refactor firmware header download sequence Thread-Index: AQHWUGikJG8ZDOrkEUGU3i8Ku3Xo3Kj0R9GAgAA+jQA= Date: Thu, 2 Jul 2020 17:12:23 +0000 Message-ID: References: <20200702120315.26768-1-kiran.k@intel.com> <20200702120315.26768-3-kiran.k@intel.com> <8040CBA1-AF50-43A1-8314-4E44E4F27173@holtmann.org> In-Reply-To: <8040CBA1-AF50-43A1-8314-4E44E4F27173@holtmann.org> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-reaction: no-action dlp-version: 11.2.0.6 dlp-product: dlpe-windows authentication-results: holtmann.org; dkim=none (message not signed) header.d=none;holtmann.org; dmarc=none action=none header.from=intel.com; x-originating-ip: [192.55.79.96] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 6a4503c5-651c-4fd5-a2be-08d81eab162c x-ms-traffictypediagnostic: BYAPR11MB3656: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:7219; x-forefront-prvs: 0452022BE1 x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: RpJxg7ovTqggl6YV5ebnqPjOs1DhVcwjDUUXtnckoWUOOzSCp4A6emmmzrS8uJeIiTGZbL70OAGekPmqRscaHrl/7qNgmlvO6c48T7haMinqNTt0yv3odOtPixJL0u3nozhB63TL3ClxKW2cYP4J5+QOUGVYj8pZ2ddMDfRvwn0PB8aRelr5FY47jgh+Bmo+WDCAvCNK2X7xvlXMKCmq+wIB/TnwzwnymATGY7rCr30fLuwaDuOr0zdpy4lRHixhpCJ+nWpfz7TtSBCOZSduauykqm0h+RsS8tU30tptQUEWN4CFShZoFYn3Qsn9lxsLe1guCASw1q7rbDCR1UA5ZQ== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BYAPR11MB3141.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFTY:;SFS:(4636009)(366004)(39860400002)(396003)(136003)(376002)(346002)(8936002)(64756008)(76116006)(66556008)(4326008)(66446008)(66946007)(66476007)(83380400001)(8676002)(7696005)(33656002)(478600001)(55016002)(9686003)(54906003)(52536014)(316002)(107886003)(6506007)(71200400001)(86362001)(186003)(2906002)(26005)(6916009)(5660300002)(53546011);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata: usD3W7JwpOiFlwg4yjty0Xfq4tRxYlkjPKdyS3mnb/wKeqNZAEEImdW0S8KLSJm15IP4M5fkwEsfnMKiyveBCN3aoQsafTHqq1F5zo4t5IrVvIWVdpxtmhF31JIVtOeSVCeHv/9hxUzMolNjxn2pa5+nrdZw0t/eqK7t8wC1e8yVu+lvT9h6vT0y0BCsbEk9TqYwLzVrVajaHsAFFIffCcxHanPsaRpRvxIknyfNaDzkueXrZR9xSQx460lEK5y988aRBTZ2lz4Z3nseQ9VdMN4Poyq2RdFLR11PCfiE2sojCVMA1MkbFgjJHQAwBqWMY3+5ZY5vlR/zcZTWoTTGDXcpHducZbDVH4rjBYk4MsgdaSudUkHLJ9EHE2T8Bu/DhDeQBFKkrzBFNqj+U8Jx1xmV6AhZUMOq56QpY3XXfYojGV3a64YL4b+RyKz3325HyhCMjJyYX7XsMYq5Wijw9sWlftrt7fP3WShzpTlqtD4= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: BYAPR11MB3141.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6a4503c5-651c-4fd5-a2be-08d81eab162c X-MS-Exchange-CrossTenant-originalarrivaltime: 02 Jul 2020 17:12:23.1061 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: 1uT0wECCpVtHWiJxt8wlA+fqe5yLNE9npw4K7AUHr6TQVXS/DReA/TSo5HbbG9uGs2Aycov2KRP6vIDfkEpfwA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR11MB3656 X-OriginatorOrg: intel.com Sender: linux-bluetooth-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org Hi Marcel, > -----Original Message----- > From: linux-bluetooth-owner@vger.kernel.org owner@vger.kernel.org> On Behalf Of Marcel Holtmann > Sent: Thursday, July 2, 2020 6:56 PM > To: K, Kiran > Cc: linux-bluetooth ; Srivatsa, Ravishan= kar > ; Tumkur Narayan, Chethan > ; kiraank@gmail.com; Bag, Amit K > ; Raghuram Hegde > Subject: Re: [PATCH 2/5] Bluetooth: btintel: Refactor firmware header > download sequence >=20 > Hi Kiran, >=20 > > Move firmware header download code to a separate function to enhance > > readability and reusability > > > > Signed-off-by: Kiran K > > Signed-off-by: Amit K Bag > > Signed-off-by: Raghuram Hegde > > Reviewed-by: Chethan T N > > Reviewed-by: Sathish Narasimman > > Reviewed-by: Srivatsa Ravishankar > > --- > > drivers/bluetooth/btintel.c | 21 +++++++++++++++++---- > > 1 file changed, 17 insertions(+), 4 deletions(-) > > > > diff --git a/drivers/bluetooth/btintel.c b/drivers/bluetooth/btintel.c > > index dea96c585ecb..1c820c187421 100644 > > --- a/drivers/bluetooth/btintel.c > > +++ b/drivers/bluetooth/btintel.c > > @@ -646,12 +646,10 @@ int btintel_read_boot_params(struct hci_dev > > *hdev, } EXPORT_SYMBOL_GPL(btintel_read_boot_params); > > > > -int btintel_download_firmware(struct hci_dev *hdev, const struct firmw= are > *fw, > > - u32 *boot_param) > > +static int btintel_sfi_rsa_header_secure_send(struct hci_dev *hdev, > > + const struct firmware *fw) > > { > > int err; > > - const u8 *fw_ptr; > > - u32 frag_len; > > > > /* Start the firmware download transaction with the Init fragment > > * represented by the 128 bytes of CSS header. > > @@ -679,6 +677,21 @@ int btintel_download_firmware(struct hci_dev > *hdev, const struct firmware *fw, > > bt_dev_err(hdev, "Failed to send firmware signature (%d)", > err); > > goto done; > > } >=20 > Here should be an extra empty line before the label. Ack. I will fix it in v2. >=20 > > +done: > > + return err; > > +} > > + > > +int btintel_download_firmware(struct hci_dev *hdev, const struct firmw= are > *fw, > > + u32 *boot_param) > > +{ > > + int err; > > + const u8 *fw_ptr; > > + u32 frag_len; > > + > > + err =3D btintel_sfi_rsa_header_secure_send(hdev, fw); > > + if (err) > > + goto done; > > + >=20 > Scrap the extra empty line here. Ack. >=20 > > > > fw_ptr =3D fw->data + 644; > > frag_len =3D 0; >=20 > Regards >=20 > Marcel Thanks, Kiran