Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp881644ybg; Fri, 18 Oct 2019 08:44:20 -0700 (PDT) X-Google-Smtp-Source: APXvYqyssVeC7mryCkDK4tLuwNsRkPrdCetTt/06aL5MxxgEaK2KnVmkEbGv+K4AQme01YwMqIwC X-Received: by 2002:aa7:db43:: with SMTP id n3mr10386959edt.176.1571413460469; Fri, 18 Oct 2019 08:44:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571413460; cv=none; d=google.com; s=arc-20160816; b=Uz6DxIVh+mAxdVXoeTJ0owMaVxEaRFTx33z+LqWQfLOeSJop2R7nVcRPTISag56CZt wQT0e8HKppN/2DFXE2GwJl3iHB4qdrxHJL0T5jFUwYY9PxN7cbYDgtjh9EMUHT+DRDSd FZl4Jb7XrwgmfwHNDUOhLKLvyh51QxUNy7TDlKisUzXFnH8IHxTToK9trt9qkqZ9Tg8Y nFskyL5XUYTPZl5VsPjs4IhG8/s2MG0O0h3bJM06ZsIGY5hMQ5jdEECSg7nG6XFf+E1S 04EvI/ggcWpb63QioWWxvc/ezpdt3CZrqvxGcqSvNaHlztWWi5rAcm1EHW67640zXOz3 mxww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:to:references:message-id :content-transfer-encoding:cc:date:in-reply-to:from:subject :mime-version; bh=eeEkacKzkQH8BiUg1skakXJZ6GmgOELAat2dFZRvgLY=; b=DKHNMt6P+WA+2HKuM2wzw6tQ21OSlrI0GXIkdcvlq4aeUxHA0Kv4fbSIPPlKA2KuYs Fyh6nmn3GIUKN1gjOWY9uuRTQKXcagtJW9Nc7m0SiFuWwkvtYi0B6dCgOtdvDaLBZ7Ti VJDWn0kmemQDD27gwwaJ2e79kQuV0WqIUM71h2or+6uv4HZ/6UvQgXbgvOmBXC4IiTzZ jF9zTsQ6zra4pEExForrVr88PWMbWWtQyfUG0HBp7zdEehhZ6yzriqluY0QY/10OL17D 20fpI3MZeYmvyJuXgwF9kORpxXzoEcLmaI70bw8K15aewIVvkF0HvOdexrRKeigFXVrP Ugzg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-bluetooth-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f16si3999912edm.54.2019.10.18.08.43.56; Fri, 18 Oct 2019 08:44:20 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-bluetooth-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-bluetooth-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2502173AbfJQLvs convert rfc822-to-8bit (ORCPT + 99 others); Thu, 17 Oct 2019 07:51:48 -0400 Received: from coyote.holtmann.net ([212.227.132.17]:58072 "EHLO mail.holtmann.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727877AbfJQLvs (ORCPT ); Thu, 17 Oct 2019 07:51:48 -0400 Received: from surfer-172-29-2-69-hotspot.internet-for-guests.com (p2E5701B0.dip0.t-ipconnect.de [46.87.1.176]) by mail.holtmann.org (Postfix) with ESMTPSA id A519ACECE6; Thu, 17 Oct 2019 14:00:45 +0200 (CEST) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 13.0 \(3594.4.19\)) Subject: Re: [PATCH v6] Bluetooth: btusb: Trigger Intel FW download error recovery From: Marcel Holtmann In-Reply-To: <1571300549-27306-1-git-send-email-amit.k.bag@intel.com> Date: Thu, 17 Oct 2019 13:51:46 +0200 Cc: linux-bluetooth@vger.kernel.org, ravishankar.srivatsa@intel.com, chethan.tumkur.narayan@intel.com, Raghuram Hegde Content-Transfer-Encoding: 8BIT Message-Id: <113CA53A-9FB7-4793-B2C4-828B185C4853@holtmann.org> References: <1571300549-27306-1-git-send-email-amit.k.bag@intel.com> To: Amit K Bag X-Mailer: Apple Mail (2.3594.4.19) Sender: linux-bluetooth-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org Hi Amit, > Sometimes during FW data download stage, in case of an error is > encountered the controller device could not be recovered. To recover > from such failures send Intel hard Reset to re-trigger FW download in > following error scenarios: > > 1. Intel Read version command error > 2. Firmware download timeout > 3. Failure in Intel Soft Reset for switching to operational FW > 4. Boot timeout for switching to operaional FW > > Signed-off-by: Raghuram Hegde > Signed-off-by: Chethan T N > Signed-off-by: Amit K Bag > --- > drivers/bluetooth/btintel.c | 46 +++++++++++++++++++++++++++++++++++++++++++++ > drivers/bluetooth/btintel.h | 6 ++++++ > drivers/bluetooth/btusb.c | 20 ++++++++++++++++---- > 3 files changed, 68 insertions(+), 4 deletions(-) So this patch has a bunch of errors Applying: Bluetooth: btusb: Trigger Intel FW download error recovery .git/rebase-apply/patch:97: trailing whitespace. btintel_reset_to_bootloader(hdev); warning: 1 line adds whitespace errors. CC drivers/bluetooth/btintel.o drivers/bluetooth/btintel.c: In function ‘btintel_reset_to_bootloader’: drivers/bluetooth/btintel.c:733:20: error: assignment of member ‘reset_type’ in read-only object 733 | params.reset_type = 0x01; | ^ drivers/bluetooth/btintel.c:734:22: error: assignment of member ‘patch_enable’ in read-only object 734 | params.patch_enable = 0x01; | ^ drivers/bluetooth/btintel.c:735:20: error: assignment of member ‘ddc_reload’ in read-only object 735 | params.ddc_reload = 0x01; | ^ drivers/bluetooth/btintel.c:736:21: error: assignment of member ‘boot_option’ in read-only object 736 | params.boot_option = 0x00; | ^ drivers/bluetooth/btintel.c:737:20: error: assignment of member ‘boot_param’ in read-only object 737 | params.boot_param = cpu_to_le32(0x00000000); | ^ drivers/bluetooth/btintel.c:716:6: warning: unused variable ‘boot_param’ [-Wunused-variable] 716 | u32 boot_param; | ^~~~~~~~~~ I would really encourage to test the patch with git am and compile test it at least since these are obvious bugs. Anyway, I manually fixed this up and applied to patch to bluetooth-next tree. Regards Marcel