Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp6133430pxb; Tue, 16 Feb 2021 17:42:24 -0800 (PST) X-Google-Smtp-Source: ABdhPJxB/xOUQn+wPNSffkly9bbGRm6MTG5eW+axPQgtGR8iYOmMoClJmaN/vfSK9iNKfzb8VVIE X-Received: by 2002:a17:906:ca04:: with SMTP id jt4mr23955586ejb.548.1613526144561; Tue, 16 Feb 2021 17:42:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1613526144; cv=none; d=google.com; s=arc-20160816; b=bezUMa8cXO6H5cY8cvG19m3bHm5/A2WeGFU+R4XC0jS9htTzv/S+G3NdnBTla67r0w LW/5Hy5SkacanJzCtUc7BWySqQDr7wCuX8ftjkqPSePVdSsFNcVfWgUj1rOQOaAiJVEQ +hbzQ3xfv+mzH55N1o//LXzQqlx/7bIuEjYTr0y8HvivUEVg/UwpPgrAtoAXlM6bfs4+ /jIANKOa8elLE0qp4K0byMO3leOwnCS/xvFRX7RcJiyknA4WJctiK/9vcWsTayv0chIh a5w1G7CHlbp/1hoHwz54PdHulb+L4JrWKKKYxdSTpcmkYIOX+fHo+nCbpOzZQ6OzPxpX v7OQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=rjRUuZ6S9CazXw1JtrK9M/ukL9kp/i3skiRIFM9vCfU=; b=0CWxzhIeshf7Osaq8rliTiWedvKScwPSLD5znLy5cSdTjTmVjg/jHKv8l8puL7jYur 0M4SKdebDtKilbnKIQRb471C5Siy0AT9UpRAjBWqk62eUSy7MAdx8qyI3vX5iXzGnXCD HVyxSqUK4paNB6mKqevLx1i/nAA8bYL9iPwTGZ2cSZh0/qM8mY3rWjm2jvr7PstzTFoL z4PoJ6t2YJImeslXaHXN9+57GaXje/Ca1Tpv40v526xcCAN/ZYJZvjO0yhASMLdTzA2a 2hPIyMAOyrzpPQMrkNxkpXMrzlnUS7eYZGSgtpH6XuWpn3di2lQ0R5kw3QDbo5GyTljT beqw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=AIT3VFj1; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dc16si476723ejb.190.2021.02.16.17.41.40; Tue, 16 Feb 2021 17:42:24 -0800 (PST) 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=@gmail.com header.s=20161025 header.b=AIT3VFj1; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230210AbhBPXeW (ORCPT + 99 others); Tue, 16 Feb 2021 18:34:22 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55372 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230400AbhBPXeV (ORCPT ); Tue, 16 Feb 2021 18:34:21 -0500 Received: from mail-pl1-x635.google.com (mail-pl1-x635.google.com [IPv6:2607:f8b0:4864:20::635]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7E7CEC061756 for ; Tue, 16 Feb 2021 15:33:41 -0800 (PST) Received: by mail-pl1-x635.google.com with SMTP id s16so2464055plr.9 for ; Tue, 16 Feb 2021 15:33:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=rjRUuZ6S9CazXw1JtrK9M/ukL9kp/i3skiRIFM9vCfU=; b=AIT3VFj1IFDPqgAZ9uQK8XEHbfnCYptGNWBYVE5sNa8cbDfVc0mHDfUSxYBAwsVHLK b3ULuQlEBq468u7IvkxM+++Rs07c3HfdQDjIBfnZptG5U2Lg+I571JTbzNVyoT0UpzoO RNjdbEU9L+hd66O9RBRRCwE0GXEQz/AeFKm/qZ9dh5CTh6y8TbYO5YSxT7kMmztNaTSx 8L9sHC1YQaRfTsOGADt4bxGWI7T+DUdTgF0wkibjZamLvHDxIxR0qtg+9u6+4SAFbCMm AfVVyYiQA32f5VRqoOZmSynRMB4cjwUvkTbYEfQTGTGIj9v9G4kYPDah2wnhHtTzDBIN JF3w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=rjRUuZ6S9CazXw1JtrK9M/ukL9kp/i3skiRIFM9vCfU=; b=QMZftHYrWbkWCTx/RARLF/cTIPmsbzO6gVsPgCHQgHE2M6zgpWp8N4Q/tNZJI61ogw dKSqYm0+P1BVACzE6HD0fq+kvqYasxwHJCZshKYDsJ6qUkCW53cDZk2sH9gjuGb1ZcMe aX4xYiquTBAvDuVD6DQ7ZNB6A/pjufODIj0VgfneD4V4PS1h8ObWPgdk7BCWFvWhH/97 a8eIN19J+hrb/shsWawPEV5DM/v7dbJVo8qAfcOgJx9Up25lbmnPrwoGAlMxmdfTH1wp UB/lucus6WihwuYfPT7IkV0w8F6YWt00ApoyveiVW83yFhIWUNDwNZ3FV8hyQi/YVgHt KUgg== X-Gm-Message-State: AOAM53306bjyPRhGnpeHsiYvFdg9dsZxtCDAlmvAi96JijjApdaXc0qA 5nauuXnlCKmdP9M20oJ/iFUTM+ZG+2o1eg== X-Received: by 2002:a17:90a:9288:: with SMTP id n8mr6369904pjo.91.1613518420803; Tue, 16 Feb 2021 15:33:40 -0800 (PST) Received: from lvondent-mobl4.intel.com (c-71-56-157-77.hsd1.or.comcast.net. [71.56.157.77]) by smtp.gmail.com with ESMTPSA id h5sm99956pgv.87.2021.02.16.15.33.40 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Feb 2021 15:33:40 -0800 (PST) From: Luiz Augusto von Dentz To: linux-bluetooth@vger.kernel.org Subject: [PATCH BlueZ 3/3] avdtp: Remove use of G_PRIORITY_LOW Date: Tue, 16 Feb 2021 15:33:37 -0800 Message-Id: <20210216233337.859955-3-luiz.dentz@gmail.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210216233337.859955-1-luiz.dentz@gmail.com> References: <20210216233337.859955-1-luiz.dentz@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org From: Luiz Augusto von Dentz G_PRIORITY_LOW was used in order to prioritize the AVDTP media transport channel over the signalling channel but this has the side effect of delaying the dispatching of other conditions such as HUP/NVAL, so now that BtIO use G_PRIORITY_HIGH for its watches we no longer need to deprioritize session_cb. --- profiles/audio/avdtp.c | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/profiles/audio/avdtp.c b/profiles/audio/avdtp.c index 9ddcd6464..088ca58b3 100644 --- a/profiles/audio/avdtp.c +++ b/profiles/audio/avdtp.c @@ -2378,19 +2378,10 @@ static void avdtp_connect_cb(GIOChannel *chan, GError *err, gpointer user_data) if (session->io_id) g_source_remove(session->io_id); - /* This watch should be low priority since otherwise the - * connect callback might be dispatched before the session - * callback if the kernel wakes us up at the same time for - * them. This could happen if a headset is very quick in - * sending the Start command after connecting the stream - * transport channel. - */ - session->io_id = g_io_add_watch_full(chan, - G_PRIORITY_LOW, + session->io_id = g_io_add_watch(chan, G_IO_IN | G_IO_ERR | G_IO_HUP | G_IO_NVAL, - (GIOFunc) session_cb, session, - NULL); + (GIOFunc) session_cb, session); if (session->stream_setup) set_disconnect_timer(session); -- 2.29.2