linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH AUTOSEL 4.18 01/58] soundwire: Fix duplicate stream state assignment
@ 2018-10-08 15:24 Sasha Levin
  2018-10-08 15:24 ` [PATCH AUTOSEL 4.18 02/58] soundwire: Fix incorrect exit after configuring stream Sasha Levin
                   ` (56 more replies)
  0 siblings, 57 replies; 76+ messages in thread
From: Sasha Levin @ 2018-10-08 15:24 UTC (permalink / raw)
  To: stable, linux-kernel; +Cc: Shreyas NC, Vinod Koul, Sasha Levin

From: Shreyas NC <shreyas.nc@intel.com>

[ Upstream commit 0aebe40bae6cf5652fdc3d05ecee15fbf5748194 ]

For a SoundWire stream it is expected that a Slave is added to the
stream before Master is added.

So, move the stream state to CONFIGURED after the first Slave is
added and remove the stream state assignment for Master add.
Along with these changes, add additional comments to explain the same.

Signed-off-by: Shreyas NC <shreyas.nc@intel.com>
Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
---
 drivers/soundwire/stream.c | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/drivers/soundwire/stream.c b/drivers/soundwire/stream.c
index 4b5e250e8615..7ba6d4d8cd03 100644
--- a/drivers/soundwire/stream.c
+++ b/drivers/soundwire/stream.c
@@ -1123,8 +1123,6 @@ int sdw_stream_add_master(struct sdw_bus *bus,
 	if (ret)
 		goto stream_error;
 
-	stream->state = SDW_STREAM_CONFIGURED;
-
 stream_error:
 	sdw_release_master_stream(stream);
 error:
@@ -1141,6 +1139,10 @@ EXPORT_SYMBOL(sdw_stream_add_master);
  * @stream: SoundWire stream
  * @port_config: Port configuration for audio stream
  * @num_ports: Number of ports
+ *
+ * It is expected that Slave is added before adding Master
+ * to the Stream.
+ *
  */
 int sdw_stream_add_slave(struct sdw_slave *slave,
 		struct sdw_stream_config *stream_config,
@@ -1186,6 +1188,12 @@ int sdw_stream_add_slave(struct sdw_slave *slave,
 	if (ret)
 		goto stream_error;
 
+	/*
+	 * Change stream state to CONFIGURED on first Slave add.
+	 * Bus is not aware of number of Slave(s) in a stream at this
+	 * point so cannot depend on all Slave(s) to be added in order to
+	 * change stream state to CONFIGURED.
+	 */
 	stream->state = SDW_STREAM_CONFIGURED;
 	goto error;
 
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 76+ messages in thread

end of thread, other threads:[~2018-10-12  0:03 UTC | newest]

Thread overview: 76+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-08 15:24 [PATCH AUTOSEL 4.18 01/58] soundwire: Fix duplicate stream state assignment Sasha Levin
2018-10-08 15:24 ` [PATCH AUTOSEL 4.18 02/58] soundwire: Fix incorrect exit after configuring stream Sasha Levin
2018-10-08 15:24 ` [PATCH AUTOSEL 4.18 03/58] soundwire: Fix acquiring bus lock twice during master release Sasha Levin
2018-10-08 15:24 ` [PATCH AUTOSEL 4.18 04/58] media: af9035: prevent buffer overflow on write Sasha Levin
2018-10-08 15:24 ` [PATCH AUTOSEL 4.18 05/58] spi: gpio: Fix copy-and-paste error Sasha Levin
2018-10-08 15:24 ` [PATCH AUTOSEL 4.18 06/58] batman-adv: Avoid probe ELP information leak Sasha Levin
2018-10-08 15:24 ` [PATCH AUTOSEL 4.18 07/58] batman-adv: Fix segfault when writing to throughput_override Sasha Levin
2018-10-08 15:24 ` [PATCH AUTOSEL 4.18 08/58] batman-adv: Fix segfault when writing to sysfs elp_interval Sasha Levin
2018-10-08 15:24 ` [PATCH AUTOSEL 4.18 09/58] batman-adv: Prevent duplicated gateway_node entry Sasha Levin
2018-10-08 15:24 ` [PATCH AUTOSEL 4.18 10/58] batman-adv: Prevent duplicated nc_node entry Sasha Levin
2018-10-08 15:24 ` [PATCH AUTOSEL 4.18 11/58] batman-adv: Prevent duplicated softif_vlan entry Sasha Levin
2018-10-08 15:24 ` [PATCH AUTOSEL 4.18 12/58] batman-adv: Prevent duplicated global TT entry Sasha Levin
2018-10-08 15:24 ` [PATCH AUTOSEL 4.18 13/58] batman-adv: Prevent duplicated tvlv handler Sasha Levin
2018-10-08 15:24 ` [PATCH AUTOSEL 4.18 14/58] batman-adv: fix backbone_gw refcount on queue_work() failure Sasha Levin
2018-10-08 15:24 ` [PATCH AUTOSEL 4.18 15/58] batman-adv: fix hardif_neigh " Sasha Levin
2018-10-08 15:24 ` [PATCH AUTOSEL 4.18 16/58] cxgb4: fix abort_req_rss6 struct Sasha Levin
2018-10-08 15:24 ` [PATCH AUTOSEL 4.18 17/58] clocksource/drivers/ti-32k: Add CLOCK_SOURCE_SUSPEND_NONSTOP flag for non-am43 SoCs Sasha Levin
2018-10-08 15:24 ` [PATCH AUTOSEL 4.18 18/58] ucma: fix a use-after-free in ucma_resolve_ip() Sasha Levin
2018-10-08 15:24 ` [PATCH AUTOSEL 4.18 19/58] scsi: ibmvscsis: Fix a stringop-overflow warning Sasha Levin
2018-10-08 15:24 ` [PATCH AUTOSEL 4.18 20/58] scsi: ibmvscsis: Ensure partition name is properly NUL terminated Sasha Levin
2018-10-08 15:24 ` [PATCH AUTOSEL 4.18 21/58] net/mlx5: Check for SQ and not RQ state when modifying hairpin SQ Sasha Levin
2018-10-08 15:24 ` [PATCH AUTOSEL 4.18 22/58] intel_th: pci: Add Ice Lake PCH support Sasha Levin
2018-10-08 15:24 ` [PATCH AUTOSEL 4.18 23/58] Input: atakbd - fix Atari keymap Sasha Levin
2018-10-08 15:24 ` [PATCH AUTOSEL 4.18 24/58] Input: atakbd - fix Atari CapsLock behaviour Sasha Levin
2018-10-08 17:11   ` Dmitry Torokhov
2018-10-08 19:09     ` Michael Schmitz
2018-10-08 19:20       ` Dmitry Torokhov
2018-10-09 22:05         ` Michael Schmitz
2018-10-10  6:59           ` Geert Uytterhoeven
2018-10-10 23:38             ` Michael Schmitz
2018-10-10 14:29         ` Sasha Levin
2018-10-10 17:02           ` Dmitry Torokhov
2018-10-10 18:11             ` Sasha Levin
2018-10-10 18:28               ` Greg KH
2018-10-10 18:40                 ` Dmitry Torokhov
2018-10-10 18:49                   ` Sasha Levin
2018-10-10 18:58                     ` Dmitry Torokhov
2018-10-10 19:02                       ` Sasha Levin
2018-10-10 18:36               ` Dmitry Torokhov
2018-10-10 19:00                 ` Sasha Levin
2018-10-10 19:04             ` Geert Uytterhoeven
2018-10-12  0:03               ` Dmitry Torokhov
2018-10-08 15:24 ` [PATCH AUTOSEL 4.18 25/58] net: stmmac: Rework coalesce timer and fix multi-queue races Sasha Levin
2018-10-08 15:24 ` [PATCH AUTOSEL 4.18 26/58] net: stmmac: Fixup the tail addr setting in xmit path Sasha Levin
2018-10-08 15:24 ` [PATCH AUTOSEL 4.18 27/58] selftests: pmtu: properly redirect stderr to /dev/null Sasha Levin
2018-10-08 15:24 ` [PATCH AUTOSEL 4.18 28/58] net: emac: fix fixed-link setup for the RTL8363SB switch Sasha Levin
2018-10-08 15:24 ` [PATCH AUTOSEL 4.18 29/58] ravb: do not write 1 to reserved bits Sasha Levin
2018-10-08 15:24 ` [PATCH AUTOSEL 4.18 30/58] net/smc: fix non-blocking connect problem Sasha Levin
2018-10-08 15:24 ` [PATCH AUTOSEL 4.18 31/58] net/smc: fix sizeof to int comparison Sasha Levin
2018-10-08 15:24 ` [PATCH AUTOSEL 4.18 32/58] net: mvpp2: fix a txq_done race condition Sasha Levin
2018-10-08 15:24 ` [PATCH AUTOSEL 4.18 33/58] sfp: fix oops with ethtool -m Sasha Levin
2018-10-08 15:24 ` [PATCH AUTOSEL 4.18 34/58] qed: Fix populating the invalid stag value in multi function mode Sasha Levin
2018-10-08 15:25 ` [PATCH AUTOSEL 4.18 35/58] qed: Do not add VLAN 0 tag to untagged frames in multi-function mode Sasha Levin
2018-10-08 15:25 ` [PATCH AUTOSEL 4.18 36/58] bnxt_en: don't try to offload VLAN 'modify' action Sasha Levin
2018-10-08 15:25 ` [PATCH AUTOSEL 4.18 37/58] PCI: dwc: Fix scheduling while atomic issues Sasha Levin
2018-10-08 15:25 ` [PATCH AUTOSEL 4.18 38/58] RDMA/uverbs: Fix validity check for modify QP Sasha Levin
2018-10-08 15:25 ` [PATCH AUTOSEL 4.18 39/58] scsi: lpfc: Synchronize access to remoteport via rport Sasha Levin
2018-10-08 15:25 ` [PATCH AUTOSEL 4.18 40/58] drm: mali-dp: Call drm_crtc_vblank_reset on device init Sasha Levin
2018-10-08 15:25 ` [PATCH AUTOSEL 4.18 41/58] net: mscc: fix the frame extraction into the skb Sasha Levin
2018-10-08 15:25 ` [PATCH AUTOSEL 4.18 42/58] scsi: ipr: System hung while dlpar adding primary ipr adapter back Sasha Levin
2018-10-08 15:25 ` [PATCH AUTOSEL 4.18 43/58] scsi: sd: don't crash the host on invalid commands Sasha Levin
2018-10-08 15:25 ` [PATCH AUTOSEL 4.18 44/58] bpf: sockmap only allow ESTABLISHED sock state Sasha Levin
2018-10-08 15:25 ` [PATCH AUTOSEL 4.18 45/58] bpf: sockmap, fix transition through disconnect without close Sasha Levin
2018-10-08 15:25 ` [PATCH AUTOSEL 4.18 46/58] bpf: test_maps, only support ESTABLISHED socks Sasha Levin
2018-10-08 15:25 ` [PATCH AUTOSEL 4.18 47/58] net/mlx4: Use cpumask_available for eq->affinity_mask Sasha Levin
2018-10-08 15:25 ` [PATCH AUTOSEL 4.18 48/58] clocksource/drivers/fttmr010: Fix set_next_event handler Sasha Levin
2018-10-08 15:25 ` [PATCH AUTOSEL 4.18 49/58] net: aquantia: memory corruption on jumbo frames Sasha Levin
2018-10-08 15:25 ` [PATCH AUTOSEL 4.18 50/58] RDMA/bnxt_re: Fix system crash during RDMA resource initialization Sasha Levin
2018-10-08 15:25 ` [PATCH AUTOSEL 4.18 51/58] RISC-V: include linux/ftrace.h in asm-prototypes.h Sasha Levin
2018-10-08 15:25 ` [PATCH AUTOSEL 4.18 52/58] iommu/rockchip: Free irqs in shutdown handler Sasha Levin
2018-10-08 15:25 ` [PATCH AUTOSEL 4.18 53/58] pinctrl/amd: poll InterruptEnable bits in amd_gpio_irq_set_type Sasha Levin
2018-10-08 15:25 ` [PATCH AUTOSEL 4.18 54/58] powerpc/tm: Fix userspace r13 corruption Sasha Levin
2018-10-08 15:25 ` [PATCH AUTOSEL 4.18 55/58] powerpc/tm: Avoid possible userspace r1 corruption on reclaim Sasha Levin
2018-10-08 15:25 ` [PATCH AUTOSEL 4.18 56/58] powerpc/numa: Use associativity if VPHN hcall is successful Sasha Levin
2018-10-08 15:25 ` [PATCH AUTOSEL 4.18 57/58] iommu/amd: Return devid as alias for ACPI HID devices Sasha Levin
2018-10-08 15:25 ` [PATCH AUTOSEL 4.18 58/58] x86/boot: Fix kexec booting failure in the SEV bit detection code Sasha Levin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).