Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp541044iog; Thu, 30 Jun 2022 05:51:09 -0700 (PDT) X-Google-Smtp-Source: AGRyM1skEh7IRYi3iLF80l4QCvLA4huS8XoPaUkHBtQDg5X5u+k2PJTBUAFVjTxV6+OdLwQCpZch X-Received: by 2002:a17:906:6a11:b0:726:97b8:51e9 with SMTP id qw17-20020a1709066a1100b0072697b851e9mr8839732ejc.115.1656593469575; Thu, 30 Jun 2022 05:51:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656593469; cv=none; d=google.com; s=arc-20160816; b=qUgyErRhIcvNrTRnNV5Bm13ZZwJK+n305vxU6H7apL6/5qgkUe9DSIAaTwDU+JAw6P uCxDSdNyWl7VzuMhMHkHl8/So0UI5lvBB3TnQjxpDj4ihf1KorlqKcoL4mbhUe57bYnG H3yHHkSZ9IHN5swfAw8TZZCEdZe8r7XFvBY5VfIzTmNT7uwTE15qWI39BBQ1m8KmES+n uxcooewATUNfHmP0QWX+kv6yPBOHfYjcoO6n2oxJWdtfsO3ODJEAZAc4rT0Mne4uzN5K /G9tFRbTTmSRSPR7DfTimAONofh/npykRICRjYaCD3pIoRIrDwW1VYj+PnnFLb/xkpeD 1nlw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:to:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:from :dkim-signature; bh=DWzLFVD3rNctyl5CaJafNq/g6bssSRU1qOhM+O3g7yo=; b=luNzoqSvJY5jy7FQFuIucTwRGkZK4+gH3YJla7lRBBVXY3u+lCnivJ3MasnS2q2xh2 dh61G5NAo81r5MrQcHCUqmGhqAijBYrLYdDkK4CCadPeYOnumj9e/G7hDF5InIBhGYLS gLndfF14ylv5eZe6iWnFFtT9z+BgAOjb/+KW1xzJpSJfGpd+C2YMgy593m5OOGDGnXdd i7qIT18ssvfkX8rAgLJHB8LQ6mgEZblDEORtRrHb6ClirkuYJgHjr9iV0ZG4/CThmvX4 JPHfeQfttCEmUbu/LLamvgW/9gQLWjfGgsbDy3rAIvBQwqzo38+2u4NaU6laXEm5GkX1 5XlQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infineon.com header.s=IFXMAIL header.b=K9eMvdpR; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=infineon.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id qf17-20020a1709077f1100b007157c821ab7si1432341ejc.996.2022.06.30.05.50.35; Thu, 30 Jun 2022 05:51:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=fail header.i=@infineon.com header.s=IFXMAIL header.b=K9eMvdpR; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=infineon.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235051AbiF3MqS (ORCPT + 99 others); Thu, 30 Jun 2022 08:46:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53928 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235043AbiF3MqP (ORCPT ); Thu, 30 Jun 2022 08:46:15 -0400 Received: from smtp2.infineon.com (smtp2.infineon.com [IPv6:2a00:18f0:1e00:4::4]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9FB1D22508; Thu, 30 Jun 2022 05:46:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=infineon.com; i=@infineon.com; q=dns/txt; s=IFXMAIL; t=1656593174; x=1688129174; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=+S/i0os03fT4PDMmolQDm3D23GK/ZwuYZfdR8J4uDrE=; b=K9eMvdpR1j9KVuHduZd7t9BDwgGHotADx4kMXTtNqGCm1GRJW3DCac3e qGIFjtVAOXkEuzY/4/yg6yempXAgW04ez10VGK0N6VSr1Ks/xLzaj5OsI wgytUK/OP/SFZKSfPGmnC1VJK1pxIKB9uNmBYgMUUigadS2euVIn9xkJO Q=; X-SBRS: None X-IronPort-AV: E=McAfee;i="6400,9594,10393"; a="186455692" X-IronPort-AV: E=Sophos;i="5.92,234,1650924000"; d="scan'208";a="186455692" Received: from unknown (HELO mucxv001.muc.infineon.com) ([172.23.11.16]) by smtp2.infineon.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Jun 2022 14:46:13 +0200 Received: from MUCSE803.infineon.com (MUCSE803.infineon.com [172.23.29.29]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mucxv001.muc.infineon.com (Postfix) with ESMTPS; Thu, 30 Jun 2022 14:46:13 +0200 (CEST) Received: from MUCSE807.infineon.com (172.23.29.33) by MUCSE803.infineon.com (172.23.29.29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.26; Thu, 30 Jun 2022 14:46:13 +0200 Received: from ISCNPF0RJXQS.infineon.com (172.23.8.247) by MUCSE807.infineon.com (172.23.29.33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.26; Thu, 30 Jun 2022 14:46:11 +0200 From: Hakan Jansson CC: Hakan Jansson , Linus Walleij , "David S. Miller" , "Eric Dumazet" , Jakub Kicinski , Paolo Abeni , Rob Herring , Krzysztof Kozlowski , , , , Marcel Holtmann , Johan Hedberg , "Luiz Augusto von Dentz" , Subject: [PATCH v2 4/5] Bluetooth: hci_bcm: Prevent early baudrate setting in autobaud mode Date: Thu, 30 Jun 2022 14:45:23 +0200 Message-ID: X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [172.23.8.247] X-ClientProxiedBy: MUCSE824.infineon.com (172.23.29.55) To MUCSE807.infineon.com (172.23.29.33) X-Spam-Status: No, score=-6.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,RCVD_IN_DNSWL_HI,SPF_HELO_NONE,SPF_NONE, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org Always prevent trying to set device baudrate before calling setup() when using autobaud mode. This was previously happening for devices which had device specific data with member no_early_set_baudrate set to 0. Signed-off-by: Hakan Jansson Reviewed-by: Linus Walleij --- V1 -> V2: - No changes, submitted as part of updated patch series drivers/bluetooth/hci_bcm.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/bluetooth/hci_bcm.c b/drivers/bluetooth/hci_bcm.c index 9a129867a4c0..0ae627c293c5 100644 --- a/drivers/bluetooth/hci_bcm.c +++ b/drivers/bluetooth/hci_bcm.c @@ -484,7 +484,7 @@ static int bcm_open(struct hci_uart *hu) /* If oper_speed is set, ldisc/serdev will set the baudrate * before calling setup() */ - if (!bcm->dev->no_early_set_baudrate) + if (!bcm->dev->no_early_set_baudrate && !bcm->dev->use_autobaud_mode) hu->oper_speed = bcm->dev->oper_speed; err = bcm_gpio_set_power(bcm->dev, true); @@ -1204,9 +1204,6 @@ static int bcm_of_probe(struct bcm_device *bdev) { bdev->use_autobaud_mode = device_property_read_bool(bdev->dev, "brcm,requires-autobaud-mode"); - if (bdev->use_autobaud_mode) - bdev->no_early_set_baudrate = true; - device_property_read_u32(bdev->dev, "max-speed", &bdev->oper_speed); device_property_read_u8_array(bdev->dev, "brcm,bt-pcm-int-params", bdev->pcm_int_params, 5); -- 2.25.1