Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp1979388ybg; Thu, 24 Oct 2019 03:10:29 -0700 (PDT) X-Google-Smtp-Source: APXvYqzDUYFEkD3wy0w7vBIyGiP4XrP3fysKv1hyY82NAWbdI/qp6S4Dvy+ttEW9GZy0lrI3BUrE X-Received: by 2002:a50:e409:: with SMTP id d9mr41998121edm.254.1571911829679; Thu, 24 Oct 2019 03:10:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571911829; cv=none; d=google.com; s=arc-20160816; b=CNfJBR71MrXO1ZGL66KpfqfypVx9bLKoXjaknixu/hE3fot6vqWrm+2QsFhR6mAsOr 66Pyf0rDtSY7YbR0Ww7UdBO5W3BceJ9E9L+9ft8os8H7VBCaidR0jgV978jFLL5UxkMW LDoXluQ3xVzmp4BOvCSyOlno1YTesxebXjcCgBKN4LYeiHD7k2vUHvLuH/qYTCFpDqux BdSN7Cj3XpHHdCGahltoJ0vKyqmn5DO0qiDwuVyOkMQipHimEh7OfCpdcv4yxixjPaJ1 57ESd0sYyE8RoFtAWi6H6CoYkgTBTV5moti2MN3nnVqTpNsJwDtchVl26aR7RBDUNZ/s UcDg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=qzRZH0hXsDKxbO0YaVwr8H5R0IVfbwBHdri+2L64Lps=; b=oxLPzQMkwoLNWD1tizB4lmXWnN9WrFiok8KlNlCx/PAeI8oE78W1OA+w9t3Tgzu/zP +YnSTO+ObuJ4nZAREege64Vpxemtuv4LP2lku1J7hhsO8iA5AV1NCjCg/IEVWII/orQo IgzanRCCEdEOEalg4xZcYooaVFNI+JBw3X85hUKY8UtAolzrXi2QJjCoqKfTDDonCi6N I/XIM/P1l2W6HnEGhQzcrj9SSMNalXJSoItaW8TSQofKfcy5xRAIqiQrqHN28kCw10jh pL2S98/YqiHeDJm3W5wlbTGMOHP++N3xSvmXG8w1GXaIiSMeP/i7T7cfTuiQBBB25FYc escg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-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. [209.132.180.67]) by mx.google.com with ESMTP id i6si5039771ejr.430.2019.10.24.03.10.04; Thu, 24 Oct 2019 03:10:29 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-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-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-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 S2391860AbfJWVHH (ORCPT + 99 others); Wed, 23 Oct 2019 17:07:07 -0400 Received: from mga12.intel.com ([192.55.52.136]:7010 "EHLO mga12.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2391757AbfJWVHH (ORCPT ); Wed, 23 Oct 2019 17:07:07 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 23 Oct 2019 14:07:07 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.68,222,1569308400"; d="scan'208";a="201260293" Received: from ayamada-mobl1.gar.corp.intel.com (HELO pbossart-mobl3.intel.com) ([10.254.95.208]) by orsmga003.jf.intel.com with ESMTP; 23 Oct 2019 14:07:05 -0700 From: Pierre-Louis Bossart To: alsa-devel@alsa-project.org Cc: linux-kernel@vger.kernel.org, tiwai@suse.de, broonie@kernel.org, vkoul@kernel.org, gregkh@linuxfoundation.org, jank@cadence.com, srinivas.kandagatla@linaro.org, slawomir.blauciak@intel.com, Bard liao , Rander Wang , Ranjani Sridharan , Pierre-Louis Bossart , Sanyog Kale Subject: [PATCH 1/4] soundwire: sdw_slave: add new fields to track probe status Date: Wed, 23 Oct 2019 16:06:54 -0500 Message-Id: <20191023210657.32440-2-pierre-louis.bossart@linux.intel.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20191023210657.32440-1-pierre-louis.bossart@linux.intel.com> References: <20191023210657.32440-1-pierre-louis.bossart@linux.intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Changes to the sdw_slave structure needed to solve race conditions on driver probe. The functionality is added in the next patch. Signed-off-by: Pierre-Louis Bossart --- include/linux/soundwire/sdw.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/include/linux/soundwire/sdw.h b/include/linux/soundwire/sdw.h index 688b40e65c89..a381a596212b 100644 --- a/include/linux/soundwire/sdw.h +++ b/include/linux/soundwire/sdw.h @@ -545,6 +545,10 @@ struct sdw_slave_ops { * @node: node for bus list * @port_ready: Port ready completion flag for each Slave port * @dev_num: Device Number assigned by Bus + * @probed: boolean tracking driver state + * @probe_complete: completion utility to control potential races + * on startup between driver probe/initialization and SoundWire + * Slave state changes/imp-def interrupts */ struct sdw_slave { struct sdw_slave_id id; @@ -559,6 +563,8 @@ struct sdw_slave { struct list_head node; struct completion *port_ready; u16 dev_num; + bool probed; + struct completion probe_complete; }; #define dev_to_sdw_dev(_dev) container_of(_dev, struct sdw_slave, dev) -- 2.20.1