linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: linux-kernel@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	stable@vger.kernel.org,
	Srinivas Kandagatla <srinivas.kandagatla@linaro.org>,
	Sricharan R <sricharan@codeaurora.org>,
	Vinod Koul <vkoul@kernel.org>
Subject: [PATCH 5.1 92/96] dmaengine: qcom: bam_dma: Fix completed descriptors count
Date: Mon,  8 Jul 2019 17:14:04 +0200	[thread overview]
Message-ID: <20190708150531.411233629@linuxfoundation.org> (raw)
In-Reply-To: <20190708150526.234572443@linuxfoundation.org>

From: Sricharan R <sricharan@codeaurora.org>

commit f6034225442c4a87906d36e975fd9e99a8f95487 upstream.

One space is left unused in circular FIFO to differentiate
'full' and 'empty' cases. So take that in to account while
counting for the descriptors completed.

Fixes the issue reported here,
	https://lkml.org/lkml/2019/6/18/669

Cc: stable@vger.kernel.org
Reported-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Signed-off-by: Sricharan R <sricharan@codeaurora.org>
Tested-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/dma/qcom/bam_dma.c |    3 +++
 1 file changed, 3 insertions(+)

--- a/drivers/dma/qcom/bam_dma.c
+++ b/drivers/dma/qcom/bam_dma.c
@@ -808,6 +808,9 @@ static u32 process_channel_irqs(struct b
 		/* Number of bytes available to read */
 		avail = CIRC_CNT(offset, bchan->head, MAX_DESCRIPTORS + 1);
 
+		if (offset < bchan->head)
+			avail--;
+
 		list_for_each_entry_safe(async_desc, tmp,
 					 &bchan->desc_list, desc_node) {
 			/* Not enough data to read */



  parent reply	other threads:[~2019-07-08 15:35 UTC|newest]

Thread overview: 115+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-08 15:12 [PATCH 5.1 00/96] 5.1.17-stable review Greg Kroah-Hartman
2019-07-08 15:12 ` [PATCH 5.1 01/96] Bluetooth: Fix faulty expression for minimum encryption key size check Greg Kroah-Hartman
2019-07-08 15:12 ` [PATCH 5.1 02/96] signal: remove the wrong signal_pending() check in restore_user_sigmask() Greg Kroah-Hartman
2019-07-08 15:12 ` [PATCH 5.1 03/96] netfilter: nf_flow_table: ignore DF bit setting Greg Kroah-Hartman
2019-07-08 15:12 ` [PATCH 5.1 04/96] netfilter: nft_flow_offload: set liberal tracking mode for tcp Greg Kroah-Hartman
2019-07-08 15:12 ` [PATCH 5.1 05/96] netfilter: nft_flow_offload: dont offload when sequence numbers need adjustment Greg Kroah-Hartman
2019-07-08 15:12 ` [PATCH 5.1 06/96] netfilter: nft_flow_offload: IPCB is only valid for ipv4 family Greg Kroah-Hartman
2019-07-08 15:12 ` [PATCH 5.1 07/96] idr: Fix idr_get_next race with idr_remove Greg Kroah-Hartman
2019-07-08 15:12 ` [PATCH 5.1 08/96] HID: i2c-hid: add iBall Aer3 to descriptor override Greg Kroah-Hartman
2019-07-08 15:12 ` [PATCH 5.1 09/96] ASoC : cs4265 : readable register too low Greg Kroah-Hartman
2019-07-08 15:12 ` [PATCH 5.1 10/96] ASoC: ak4458: add return value for ak4458_probe Greg Kroah-Hartman
2019-07-08 15:12 ` [PATCH 5.1 11/96] ASoC: soc-pcm: BE dai needs prepare when pause release after resume Greg Kroah-Hartman
2019-07-08 15:12 ` [PATCH 5.1 12/96] ASoC: ak4458: rstn_control - return a non-zero on error only Greg Kroah-Hartman
2019-07-08 15:12 ` [PATCH 5.1 13/96] spi: bitbang: Fix NULL pointer dereference in spi_unregister_master Greg Kroah-Hartman
2019-07-08 15:12 ` [PATCH 5.1 14/96] ASoC: core: lock client_mutex while removing link components Greg Kroah-Hartman
2019-07-08 15:12 ` [PATCH 5.1 15/96] iommu/vt-d: Set the right field for Page Walk Snoop Greg Kroah-Hartman
2019-07-08 15:12 ` [PATCH 5.1 16/96] HID: a4tech: fix horizontal scrolling Greg Kroah-Hartman
2019-07-08 15:12 ` [PATCH 5.1 17/96] ASoC: Intel: Baytrail: add quirk for Aegex 10 (RU2) tablet Greg Kroah-Hartman
2019-07-08 15:12 ` [PATCH 5.1 18/96] ASoC: hda: fix unbalanced codec dev refcount for HDA_DEV_ASOC Greg Kroah-Hartman
2019-07-08 15:12 ` [PATCH 5.1 19/96] drm/mediatek: fix unbind functions Greg Kroah-Hartman
2019-07-08 15:12 ` [PATCH 5.1 20/96] drm/mediatek: unbind components in mtk_drm_unbind() Greg Kroah-Hartman
2019-07-08 15:12 ` [PATCH 5.1 21/96] drm/mediatek: call drm_atomic_helper_shutdown() when unbinding driver Greg Kroah-Hartman
2019-07-08 15:12 ` [PATCH 5.1 22/96] drm/mediatek: clear num_pipes when unbind driver Greg Kroah-Hartman
2019-07-08 15:12 ` [PATCH 5.1 23/96] drm/mediatek: call mtk_dsi_stop() after mtk_drm_crtc_atomic_disable() Greg Kroah-Hartman
2019-07-08 15:12 ` [PATCH 5.1 24/96] ASoC: max98090: remove 24-bit format support if RJ is 0 Greg Kroah-Hartman
2019-07-08 15:12 ` [PATCH 5.1 25/96] ASoC: sun4i-i2s: Fix sun8i tx channel offset mask Greg Kroah-Hartman
2019-07-08 15:12 ` [PATCH 5.1 26/96] ASoC: sun4i-i2s: Add offset to RX channel select Greg Kroah-Hartman
2019-07-08 15:12 ` [PATCH 5.1 27/96] x86/CPU: Add more Icelake model numbers Greg Kroah-Hartman
2019-07-08 15:13 ` [PATCH 5.1 28/96] usb: gadget: fusb300_udc: Fix memory leak of fusb300->ep[i] Greg Kroah-Hartman
2019-07-08 15:13 ` [PATCH 5.1 29/96] usb: gadget: udc: lpc32xx: allocate descriptor with GFP_ATOMIC Greg Kroah-Hartman
2019-07-10  9:59   ` Pavel Machek
2019-07-15 20:07     ` Alexandre Belloni
2019-07-08 15:13 ` [PATCH 5.1 30/96] usb: gadget: dwc2: fix zlp handling Greg Kroah-Hartman
2019-07-08 15:13 ` [PATCH 5.1 31/96] ASoC: Intel: cht_bsw_max98090: fix kernel oops with platform_name override Greg Kroah-Hartman
2019-07-08 15:13 ` [PATCH 5.1 32/96] ASoC: Intel: bytcht_es8316: " Greg Kroah-Hartman
2019-07-08 15:13 ` [PATCH 5.1 33/96] ASoC: Intel: cht_bsw_nau8824: " Greg Kroah-Hartman
2019-07-08 15:13 ` [PATCH 5.1 34/96] ASoC: Intel: cht_bsw_rt5672: " Greg Kroah-Hartman
2019-07-08 15:13 ` [PATCH 5.1 35/96] ASoC: core: move DAI pre-links initiation to snd_soc_instantiate_card Greg Kroah-Hartman
2019-07-08 15:13 ` [PATCH 5.1 36/96] ALSA: hdac: fix memory release for SST and SOF drivers Greg Kroah-Hartman
2019-07-08 15:13 ` [PATCH 5.1 37/96] SoC: rt274: Fix internal jack assignment in set_jack callback Greg Kroah-Hartman
2019-07-08 15:13 ` [PATCH 5.1 38/96] scsi: hpsa: correct ioaccel2 chaining Greg Kroah-Hartman
2019-07-08 15:13 ` [PATCH 5.1 39/96] gpio: pca953x: hack to fix 24 bit gpio expanders Greg Kroah-Hartman
2019-07-08 15:13 ` [PATCH 5.1 40/96] drm: panel-orientation-quirks: Add quirk for GPD pocket2 Greg Kroah-Hartman
2019-07-08 15:13 ` [PATCH 5.1 41/96] drm: panel-orientation-quirks: Add quirk for GPD MicroPC Greg Kroah-Hartman
2019-07-08 15:13 ` [PATCH 5.1 42/96] ASoC: core: Fix deadlock in snd_soc_instantiate_card() Greg Kroah-Hartman
2019-07-08 15:13 ` [PATCH 5.1 43/96] ASoC: Intel: sst: fix kmalloc call with wrong flags Greg Kroah-Hartman
2019-07-08 15:13 ` [PATCH 5.1 44/96] platform/x86: asus-wmi: Only Tell EC the OS will handle display hotkeys from asus_nb_wmi Greg Kroah-Hartman
2019-07-08 15:13 ` [PATCH 5.1 45/96] platform/x86: intel-vbtn: Report switch events when event wakes device Greg Kroah-Hartman
2019-07-08 15:13 ` [PATCH 5.1 46/96] platform/x86: mlx-platform: Fix parent device in i2c-mux-reg device registration Greg Kroah-Hartman
2019-07-08 15:13 ` [PATCH 5.1 47/96] platform/mellanox: mlxreg-hotplug: Add devm_free_irq call to remove flow Greg Kroah-Hartman
2019-07-08 15:13 ` [PATCH 5.1 48/96] i2c: pca-platform: Fix GPIO lookup code Greg Kroah-Hartman
2019-07-08 15:13 ` [PATCH 5.1 49/96] arm64: tlbflush: Ensure start/end of address range are aligned to stride Greg Kroah-Hartman
2019-07-08 15:13 ` [PATCH 5.1 50/96] cpuset: restore sanity to cpuset_cpus_allowed_fallback() Greg Kroah-Hartman
2019-07-08 15:13 ` [PATCH 5.1 51/96] scripts/decode_stacktrace.sh: prefix addr2line with $CROSS_COMPILE Greg Kroah-Hartman
2019-07-08 15:13 ` [PATCH 5.1 52/96] mm/mlock.c: change count_mm_mlocked_page_nr return type Greg Kroah-Hartman
2019-07-08 15:13 ` [PATCH 5.1 53/96] tracing: avoid build warning with HAVE_NOP_MCOUNT Greg Kroah-Hartman
2019-07-08 15:13 ` [PATCH 5.1 54/96] module: Fix livepatch/ftrace module text permissions race Greg Kroah-Hartman
2019-07-08 15:13 ` [PATCH 5.1 55/96] ftrace: Fix NULL pointer dereference in free_ftrace_func_mapper() Greg Kroah-Hartman
2019-07-08 15:13 ` [PATCH 5.1 56/96] ptrace: Fix ->ptracer_cred handling for PTRACE_TRACEME Greg Kroah-Hartman
2019-07-08 15:13 ` [PATCH 5.1 57/96] crypto: user - prevent operating on larval algorithms Greg Kroah-Hartman
2019-07-08 15:13 ` [PATCH 5.1 58/96] crypto: cryptd - Fix skcipher instance memory leak Greg Kroah-Hartman
2019-07-08 15:13 ` [PATCH 5.1 59/96] ALSA: seq: fix incorrect order of dest_client/dest_ports arguments Greg Kroah-Hartman
2019-07-08 15:13 ` [PATCH 5.1 60/96] ALSA: firewire-lib/fireworks: fix miss detection of received MIDI messages Greg Kroah-Hartman
2019-07-08 15:13 ` [PATCH 5.1 61/96] ALSA: line6: Fix write on zero-sized buffer Greg Kroah-Hartman
2019-07-08 15:13 ` [PATCH 5.1 62/96] ALSA: usb-audio: fix sign unintended sign extension on left shifts Greg Kroah-Hartman
2019-07-08 15:13 ` [PATCH 5.1 63/96] ALSA: hda/realtek: Add quirks for several Clevo notebook barebones Greg Kroah-Hartman
2019-07-08 15:13 ` [PATCH 5.1 64/96] ALSA: hda/realtek - Change front mic location for Lenovo M710q Greg Kroah-Hartman
2019-07-08 15:13 ` [PATCH 5.1 65/96] dax: Fix xarray entry association for mixed mappings Greg Kroah-Hartman
2019-07-08 15:13 ` [PATCH 5.1 66/96] lib/mpi: Fix karactx leak in mpi_powm Greg Kroah-Hartman
2019-07-08 15:13 ` [PATCH 5.1 67/96] fs/userfaultfd.c: disable irqs for fault_pending and event locks Greg Kroah-Hartman
2019-07-08 15:13 ` [PATCH 5.1 68/96] swap_readpage(): avoid blk_wake_io_task() if !synchronous Greg Kroah-Hartman
2019-07-08 15:13 ` [PATCH 5.1 69/96] tracing/snapshot: Resize spare buffer if size changed Greg Kroah-Hartman
2019-07-08 15:13 ` [PATCH 5.1 70/96] ARM: dts: armada-xp-98dx3236: Switch to armada-38x-uart serial node Greg Kroah-Hartman
2019-07-08 15:13 ` [PATCH 5.1 71/96] arm64: kaslr: keep modules inside module region when KASAN is enabled Greg Kroah-Hartman
2019-07-08 15:13 ` [PATCH 5.1 72/96] drm/i915/ringbuffer: EMIT_INVALIDATE *before* switch context Greg Kroah-Hartman
2019-07-08 15:13 ` [PATCH 5.1 73/96] drm/amd/powerplay: use hardware fan control if no powerplay fan table Greg Kroah-Hartman
2019-07-08 15:13 ` [PATCH 5.1 74/96] drm/amdgpu: Dont skip display settings in hwmgr_resume() Greg Kroah-Hartman
2019-07-08 15:13 ` [PATCH 5.1 75/96] drm/amdgpu/gfx9: use reset default for PA_SC_FIFO_SIZE Greg Kroah-Hartman
2019-07-08 15:13 ` [PATCH 5.1 76/96] drm/virtio: move drm_connector_update_edid_property() call Greg Kroah-Hartman
2019-07-08 15:13 ` [PATCH 5.1 77/96] drm/etnaviv: add missing failure path to destroy suballoc Greg Kroah-Hartman
2019-07-08 15:13 ` [PATCH 5.1 78/96] drm/imx: notify drm core before sending event during crtc disable Greg Kroah-Hartman
2019-07-08 15:13 ` [PATCH 5.1 79/96] drm/imx: only send event on crtc disable if kept disabled Greg Kroah-Hartman
2019-07-08 15:13 ` [PATCH 5.1 80/96] ftrace/x86: Remove possible deadlock between register_kprobe() and ftrace_run_update_code() Greg Kroah-Hartman
2019-07-08 15:13 ` [PATCH 5.1 81/96] mm/vmscan.c: prevent useless kswapd loops Greg Kroah-Hartman
2019-07-08 15:13 ` [PATCH 5.1 82/96] btrfs: Ensure replaced device doesnt have pending chunk allocation Greg Kroah-Hartman
2019-07-08 15:13 ` [PATCH 5.1 83/96] tty: rocket: fix incorrect forward declaration of rp_init() Greg Kroah-Hartman
2019-07-08 15:13 ` [PATCH 5.1 84/96] s390/mm: fix pxd_bad with folded page tables Greg Kroah-Hartman
2019-07-08 15:13 ` [PATCH 5.1 85/96] KVM: x86: degrade WARN to pr_warn_ratelimited Greg Kroah-Hartman
2019-07-08 15:13 ` [PATCH 5.1 86/96] KVM: LAPIC: Fix pending interrupt in IRR blocked by software disable LAPIC Greg Kroah-Hartman
2019-07-08 15:13 ` [PATCH 5.1 87/96] nfsd: Fix overflow causing non-working mounts on 1 TB machines Greg Kroah-Hartman
2019-07-08 15:14 ` [PATCH 5.1 88/96] svcrdma: Ignore source port when computing DRC hash Greg Kroah-Hartman
2019-07-08 15:14 ` [PATCH 5.1 89/96] MIPS: Fix bounds check virt_addr_valid Greg Kroah-Hartman
2019-07-08 15:14 ` [PATCH 5.1 90/96] MIPS: Add missing EHB in mtc0 -> mfc0 sequence Greg Kroah-Hartman
2019-07-08 15:14 ` [PATCH 5.1 91/96] MIPS: have "plain" make calls build dtbs for selected platforms Greg Kroah-Hartman
2019-07-08 15:14 ` Greg Kroah-Hartman [this message]
2019-07-08 15:14 ` [PATCH 5.1 93/96] dmaengine: imx-sdma: remove BD_INTR for channel0 Greg Kroah-Hartman
2019-07-08 15:14 ` [PATCH 5.1 94/96] dmaengine: jz4780: Fix an endian bug in IRQ handler Greg Kroah-Hartman
2019-07-08 15:14 ` [PATCH 5.1 95/96] fs: VALIDATE_FS_PARSER should default to n Greg Kroah-Hartman
2019-07-08 15:14 ` [PATCH 5.1 96/96] scsi: target/iblock: Fix overrun in WRITE SAME emulation Greg Kroah-Hartman
2019-07-08 17:09 ` [PATCH 5.1 00/96] 5.1.17-stable review Jiunn Chang
2019-07-08 17:49 ` Phong Tran
2019-07-10  7:50   ` Greg Kroah-Hartman
2019-07-08 19:12 ` kernelci.org bot
2019-07-08 19:29 ` Luke Nowakowski-Krijger
2019-07-10  7:49   ` Greg Kroah-Hartman
2019-07-09  0:52 ` shuah
2019-07-09  6:56   ` Greg Kroah-Hartman
2019-07-09  4:43 ` Naresh Kamboju
2019-07-09  6:56   ` Greg Kroah-Hartman
2019-07-09 13:12 ` Amol Surati
2019-07-10  7:50   ` Greg Kroah-Hartman
2019-07-09 18:41 ` Guenter Roeck
2019-07-09 19:54   ` Greg Kroah-Hartman
2019-07-10  6:14 ` Jon Hunter
2019-07-10  7:24   ` Greg Kroah-Hartman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190708150531.411233629@linuxfoundation.org \
    --to=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sricharan@codeaurora.org \
    --cc=srinivas.kandagatla@linaro.org \
    --cc=stable@vger.kernel.org \
    --cc=vkoul@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).