From patchwork Mon Jun 30 05:55:01 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kiran Kumar Raparthy X-Patchwork-Id: 32681 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-pa0-f70.google.com (mail-pa0-f70.google.com [209.85.220.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 977B5203C0 for ; Mon, 30 Jun 2014 05:55:44 +0000 (UTC) Received: by mail-pa0-f70.google.com with SMTP id lj1sf41451555pab.5 for ; Sun, 29 Jun 2014 22:55:43 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:sender:precedence:list-id:x-original-sender :x-original-authentication-results:mailing-list:list-post:list-help :list-archive:list-unsubscribe; bh=3FJl2+E+0q0QNIgfyrvbDsv8HJmpZmmX4t76n4c8wUU=; b=DeKki2dyt9pDTxfPCBs9C5sbPEKkF6AbykjHTqiVjjrCYN+9tnDamro9+NVQ7K0P2t G2dPZYJMbjS9gbXVLT+pzzKm6W8tsXdZR/QQZJTg9yEan+ZMaUqPkGq3pW3tF+M6ccsQ DBZN3bG0hKUQnrPR9HhZ/Ji6Zk6UPorg0vypIS+mN/A8XVHEEjpNFDiulPp40XovxF00 uVAYdGUu57P7F/YOt30CClxx4aIxfnzvp5pocZNoayFHObUBBcbxDZj0t892fSjlBGkm saEJQPvnv8R92PaJe+LWU0PhDngmQ2LMlsiq0f710sgzOM+H4jeHLNp930NbX033Oqvo c6yQ== X-Gm-Message-State: ALoCoQm4M9ffoM0t+JNOpZJ3C/bDMhdpgGTyRlRV9efKoUf/aNiOhPnE5IU2+rzVlxMVyYvjA19R X-Received: by 10.66.66.35 with SMTP id c3mr21705010pat.7.1404107743338; Sun, 29 Jun 2014 22:55:43 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.93.166 with SMTP id d35ls1372010qge.3.gmail; Sun, 29 Jun 2014 22:55:43 -0700 (PDT) X-Received: by 10.52.84.162 with SMTP id a2mr3460917vdz.23.1404107743187; Sun, 29 Jun 2014 22:55:43 -0700 (PDT) Received: from mail-ve0-f176.google.com (mail-ve0-f176.google.com [209.85.128.176]) by mx.google.com with ESMTPS id s2si9615894vew.76.2014.06.29.22.55.43 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 29 Jun 2014 22:55:43 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.128.176 as permitted sender) client-ip=209.85.128.176; Received: by mail-ve0-f176.google.com with SMTP id db12so7647334veb.35 for ; Sun, 29 Jun 2014 22:55:43 -0700 (PDT) X-Received: by 10.220.81.194 with SMTP id y2mr1695015vck.29.1404107742984; Sun, 29 Jun 2014 22:55:42 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.221.37.5 with SMTP id tc5csp112765vcb; Sun, 29 Jun 2014 22:55:42 -0700 (PDT) X-Received: by 10.66.122.101 with SMTP id lr5mr49194208pab.130.1404107742255; Sun, 29 Jun 2014 22:55:42 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id xi3si21907888pab.111.2014.06.29.22.55.41; Sun, 29 Jun 2014 22:55:41 -0700 (PDT) Received-SPF: none (google.com: linux-bluetooth-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751356AbaF3Fzj (ORCPT ); Mon, 30 Jun 2014 01:55:39 -0400 Received: from mail-pd0-f179.google.com ([209.85.192.179]:43056 "EHLO mail-pd0-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751150AbaF3Fzj (ORCPT ); Mon, 30 Jun 2014 01:55:39 -0400 Received: by mail-pd0-f179.google.com with SMTP id w10so7633968pde.24 for ; Sun, 29 Jun 2014 22:55:38 -0700 (PDT) X-Received: by 10.69.31.193 with SMTP id ko1mr49466620pbd.40.1404107738531; Sun, 29 Jun 2014 22:55:38 -0700 (PDT) Received: from c-krapar-linux.qualcomm.com ([202.46.23.54]) by mx.google.com with ESMTPSA id pu5sm25841507pbb.4.2014.06.29.22.55.35 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Sun, 29 Jun 2014 22:55:37 -0700 (PDT) From: Kiran Kumar Raparthy To: linux-bluetooth@vger.kernel.org Cc: Nick Pelly , Marcel Holtmann , Gustavo Padovan , Johan Hedberg , "David S. Miller" , John Stultz , Kiran Kumar Raparthy Subject: [RFC] Bluetooth: Fallback to SCO on error code 0x10 (Connection Accept Timeout). Date: Mon, 30 Jun 2014 11:25:01 +0530 Message-Id: <1404107701-19096-1-git-send-email-kiran.kumar@linaro.org> X-Mailer: git-send-email 1.8.2.1 Sender: linux-bluetooth-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: kiran.kumar@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.128.176 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , From: Nick Pelly Fallback to SCO on error code 0x10 (Connection Accept Timeout). This is to support the Motorola HF850 carkit which reports the error code 0x10 for an eSCO attempt, even though it advertises eSCO support. With this patch we will retry with a SCO connection, which succeeds. This is one of the number of patches from the Android AOSP common.git tree, which is used on almost all Android devices. I wanted to submit it for review to see if it should go upstream. Cc: Marcel Holtmann Cc: Gustavo Padovan Cc: Johan Hedberg Cc: David S. Miller Cc: linux-bluetooth@vger.kernel.org Cc: John Stultz Signed-off-by: Nick Pelly [kiran: Added context to commit message] Signed-off-by: Kiran Kumar Raparthy --- net/bluetooth/hci_event.c | 1 + 1 file changed, 1 insertion(+) diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c index 15010a2..754a136 100644 --- a/net/bluetooth/hci_event.c +++ b/net/bluetooth/hci_event.c @@ -3223,6 +3223,7 @@ static void hci_sync_conn_complete_evt(struct hci_dev *hdev, hci_conn_add_sysfs(conn); break; + case 0x10: /* Connection Accept Timeout */ case 0x0d: /* Connection Rejected due to Limited Resources */ case 0x11: /* Unsupported Feature or Parameter Value */ case 0x1c: /* SCO interval rejected */