* [U-Boot] [PATCH] dma: bcm6348: check if driver is enabled before send/recv
@ 2019-03-22 17:22 Álvaro Fernández Rojas
2019-03-29 19:09 ` Daniel Schwierzeck
0 siblings, 1 reply; 2+ messages in thread
From: Álvaro Fernández Rojas @ 2019-03-22 17:22 UTC (permalink / raw)
To: u-boot
This patch prevents errors when running tftpput.
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
---
drivers/dma/bcm6348-iudma.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/drivers/dma/bcm6348-iudma.c b/drivers/dma/bcm6348-iudma.c
index 1d3c192cfe..e7bd1b2350 100644
--- a/drivers/dma/bcm6348-iudma.c
+++ b/drivers/dma/bcm6348-iudma.c
@@ -324,6 +324,9 @@ static int bcm6348_iudma_receive(struct dma *dma, void **dst, void *metadata)
struct bcm6348_dma_desc *dma_desc = dma_desc = ch_priv->dma_ring;
int ret;
+ if (!ch_priv->running)
+ return -EINVAL;
+
/* get dma ring descriptor address */
dma_desc += ch_priv->desc_id;
@@ -369,6 +372,9 @@ static int bcm6348_iudma_send(struct dma *dma, void *src, size_t len,
struct bcm6348_dma_desc *dma_desc;
uint16_t status;
+ if (!ch_priv->running)
+ return -EINVAL;
+
/* flush cache */
bcm6348_iudma_fdc(src, len);
--
2.11.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [U-Boot] [PATCH] dma: bcm6348: check if driver is enabled before send/recv
2019-03-22 17:22 [U-Boot] [PATCH] dma: bcm6348: check if driver is enabled before send/recv Álvaro Fernández Rojas
@ 2019-03-29 19:09 ` Daniel Schwierzeck
0 siblings, 0 replies; 2+ messages in thread
From: Daniel Schwierzeck @ 2019-03-29 19:09 UTC (permalink / raw)
To: u-boot
Am 22.03.19 um 18:22 schrieb Álvaro Fernández Rojas:
> This patch prevents errors when running tftpput.
>
> Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
> ---
> drivers/dma/bcm6348-iudma.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
applied to u-boot-mips/next, thanks.
--
- Daniel
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-03-29 19:09 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-22 17:22 [U-Boot] [PATCH] dma: bcm6348: check if driver is enabled before send/recv Álvaro Fernández Rojas
2019-03-29 19:09 ` Daniel Schwierzeck
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.