All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 00/11] staging: most: fix issues of HDM DIM2
@ 2016-09-15 14:19 Christian Gromm
  2016-09-15 14:19 ` [PATCH 01/11] staging: most: hdm-dim2: fix channel configuration Christian Gromm
                   ` (10 more replies)
  0 siblings, 11 replies; 14+ messages in thread
From: Christian Gromm @ 2016-09-15 14:19 UTC (permalink / raw)
  To: gregkh; +Cc: Christian Gromm, driverdev-devel

This patch set is needed to fix the issues of the DIM2 module of the
MOST driver.

Andrey Shvetsov (11):
  staging: most: hdm-dim2: fix channel configuration
  staging: most: hdm-dim2: remove macro ENABLE_HDM_TEST
  staging: most: hdm-dim2: relocate variable declarations
  staging: most: hdm-dim2: double size of DBR buffer
  staging: most: hdm-dim2: round up DBR memory for async/ctrl
  staging: most: hdm-dim2: remove structure member
  staging: most: hdm-dim2: rename function
  staging: most: hdm-dim2: delete error code from logging message
  staging: most: hdm-dim2: remove clearance of pending MLB interrupt
  staging: most: hdm-dim2: fix dim2-ip interrupt names
  staging: most: hdm-dim2: monitor atx DBR space

 drivers/staging/most/hdm-dim2/dim2_hal.c | 114 +++++++++++++++++++++++++------
 drivers/staging/most/hdm-dim2/dim2_hal.h |   6 +-
 drivers/staging/most/hdm-dim2/dim2_hdm.c |  96 +++++++++++++-------------
 drivers/staging/most/hdm-dim2/dim2_reg.h |   3 +
 4 files changed, 150 insertions(+), 69 deletions(-)

-- 
1.9.1

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

* [PATCH 01/11] staging: most: hdm-dim2: fix channel configuration
  2016-09-15 14:19 [PATCH 00/11] staging: most: fix issues of HDM DIM2 Christian Gromm
@ 2016-09-15 14:19 ` Christian Gromm
  2016-09-16 11:44   ` Dan Carpenter
  2016-09-15 14:19 ` [PATCH 02/11] staging: most: hdm-dim2: remove macro ENABLE_HDM_TEST Christian Gromm
                   ` (9 subsequent siblings)
  10 siblings, 1 reply; 14+ messages in thread
From: Christian Gromm @ 2016-09-15 14:19 UTC (permalink / raw)
  To: gregkh; +Cc: Andrey Shvetsov, driverdev-devel, Christian Gromm

From: Andrey Shvetsov <andrey.shvetsov@k2l.de>

The DIM2 HDM checks the parameters passed to the function
configure_channel() and adapts the buffer sizes of the configuration
according to the hardware limitation. This patch is needed to init
the HAL layer with the correct values.

Signed-off-by: Andrey Shvetsov <andrey.shvetsov@k2l.de>
Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
---
 drivers/staging/most/hdm-dim2/dim2_hdm.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/most/hdm-dim2/dim2_hdm.c b/drivers/staging/most/hdm-dim2/dim2_hdm.c
index 87039d9..dc71dab 100644
--- a/drivers/staging/most/hdm-dim2/dim2_hdm.c
+++ b/drivers/staging/most/hdm-dim2/dim2_hdm.c
@@ -1,7 +1,7 @@
 /*
  * dim2_hdm.c - MediaLB DIM2 Hardware Dependent Module
  *
- * Copyright (C) 2015, Microchip Technology Germany II GmbH & Co. KG
+ * Copyright (C) 2015-2016, Microchip Technology Germany II GmbH & Co. KG
  *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -557,7 +557,7 @@ static int configure_channel(struct most_interface *most_iface, int ch_idx,
 				hdm_ch->name, buf_size, new_size);
 		spin_lock_irqsave(&dim_lock, flags);
 		hal_ret = dim_init_control(&hdm_ch->ch, is_tx, ch_addr,
-					   buf_size);
+					   new_size);
 		break;
 	case MOST_CH_ASYNC:
 		new_size = dim_norm_ctrl_async_buffer_size(buf_size);
@@ -570,7 +570,7 @@ static int configure_channel(struct most_interface *most_iface, int ch_idx,
 			pr_warn("%s: fixed buffer size (%d -> %d)\n",
 				hdm_ch->name, buf_size, new_size);
 		spin_lock_irqsave(&dim_lock, flags);
-		hal_ret = dim_init_async(&hdm_ch->ch, is_tx, ch_addr, buf_size);
+		hal_ret = dim_init_async(&hdm_ch->ch, is_tx, ch_addr, new_size);
 		break;
 	case MOST_CH_ISOC_AVP:
 		new_size = dim_norm_isoc_buffer_size(buf_size, sub_size);
-- 
1.9.1

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

* [PATCH 02/11] staging: most: hdm-dim2: remove macro ENABLE_HDM_TEST
  2016-09-15 14:19 [PATCH 00/11] staging: most: fix issues of HDM DIM2 Christian Gromm
  2016-09-15 14:19 ` [PATCH 01/11] staging: most: hdm-dim2: fix channel configuration Christian Gromm
@ 2016-09-15 14:19 ` Christian Gromm
  2016-09-15 14:19 ` [PATCH 03/11] staging: most: hdm-dim2: relocate variable declarations Christian Gromm
                   ` (8 subsequent siblings)
  10 siblings, 0 replies; 14+ messages in thread
From: Christian Gromm @ 2016-09-15 14:19 UTC (permalink / raw)
  To: gregkh; +Cc: Andrey Shvetsov, driverdev-devel, Christian Gromm

From: Andrey Shvetsov <andrey.shvetsov@k2l.de>

This patch removes the macro ENABLE_HDM_TEST, which was needed while
doing DIM2-HAL simulations. But these are not conducted anymore.

Signed-off-by: Andrey Shvetsov <andrey.shvetsov@k2l.de>
Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
---
 drivers/staging/most/hdm-dim2/dim2_hdm.c | 35 --------------------------------
 1 file changed, 35 deletions(-)

diff --git a/drivers/staging/most/hdm-dim2/dim2_hdm.c b/drivers/staging/most/hdm-dim2/dim2_hdm.c
index dc71dab..8bef73c 100644
--- a/drivers/staging/most/hdm-dim2/dim2_hdm.c
+++ b/drivers/staging/most/hdm-dim2/dim2_hdm.c
@@ -55,17 +55,6 @@ static u8 fcnt = 4;  /* (1 << fcnt) frames per subbuffer */
 module_param(fcnt, byte, 0);
 MODULE_PARM_DESC(fcnt, "Num of frames per sub-buffer for sync channels as a power of 2");
 
-/*
- * #############################################################################
- *
- * The define below activates an utility function used by HAL-simu
- * for calling DIM interrupt handler.
- * It is used only for TEST PURPOSE and shall be commented before release.
- *
- * #############################################################################
- */
-/* #define ENABLE_HDM_TEST */
-
 static DEFINE_SPINLOCK(dim_lock);
 
 static void dim2_tasklet_fn(unsigned long data);
@@ -129,10 +118,6 @@ struct dim2_hdm {
 	(((p)[1] == 0x18) && ((p)[2] == 0x05) && ((p)[3] == 0x0C) && \
 	 ((p)[13] == 0x3C) && ((p)[14] == 0x00) && ((p)[15] == 0x0A))
 
-#if defined(ENABLE_HDM_TEST)
-static struct dim2_hdm *test_dev;
-#endif
-
 bool dim2_sysfs_get_state_cb(void)
 {
 	bool state;
@@ -467,27 +452,11 @@ static irqreturn_t dim2_ahb_isr(int irq, void *_dev)
 	dim_service_irq(get_active_channels(dev, buffer));
 	spin_unlock_irqrestore(&dim_lock, flags);
 
-#if !defined(ENABLE_HDM_TEST)
 	dim2_tasklet.data = (unsigned long)dev;
 	tasklet_schedule(&dim2_tasklet);
-#else
-	dim2_tasklet_fn((unsigned long)dev);
-#endif
 	return IRQ_HANDLED;
 }
 
-#if defined(ENABLE_HDM_TEST)
-
-/*
- * Utility function used by HAL-simu for calling DIM interrupt handler.
- * It is used only for TEST PURPOSE.
- */
-void raise_dim_interrupt(void)
-{
-	(void)dim2_ahb_isr(0, test_dev);
-}
-#endif
-
 /**
  * complete_all_mbos - complete MBO's in a list
  * @head: list head
@@ -757,9 +726,6 @@ static int dim2_probe(struct platform_device *pdev)
 	dev->atx_idx = -1;
 
 	platform_set_drvdata(pdev, dev);
-#if defined(ENABLE_HDM_TEST)
-	test_dev = dev;
-#else
 	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
 	dev->io_base = devm_ioremap_resource(&pdev->dev, res);
 	if (IS_ERR(dev->io_base))
@@ -779,7 +745,6 @@ static int dim2_probe(struct platform_device *pdev)
 			dev->irq_ahb0, ret);
 		return ret;
 	}
-#endif
 	init_waitqueue_head(&dev->netinfo_waitq);
 	dev->deliver_netinfo = 0;
 	dev->netinfo_task = kthread_run(&deliver_netinfo_thread, (void *)dev,
-- 
1.9.1

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

* [PATCH 03/11] staging: most: hdm-dim2: relocate variable declarations
  2016-09-15 14:19 [PATCH 00/11] staging: most: fix issues of HDM DIM2 Christian Gromm
  2016-09-15 14:19 ` [PATCH 01/11] staging: most: hdm-dim2: fix channel configuration Christian Gromm
  2016-09-15 14:19 ` [PATCH 02/11] staging: most: hdm-dim2: remove macro ENABLE_HDM_TEST Christian Gromm
@ 2016-09-15 14:19 ` Christian Gromm
  2016-09-15 14:19 ` [PATCH 04/11] staging: most: hdm-dim2: double size of DBR buffer Christian Gromm
                   ` (7 subsequent siblings)
  10 siblings, 0 replies; 14+ messages in thread
From: Christian Gromm @ 2016-09-15 14:19 UTC (permalink / raw)
  To: gregkh; +Cc: Andrey Shvetsov, driverdev-devel, Christian Gromm

From: Andrey Shvetsov <andrey.shvetsov@k2l.de>

This patch eliminates nested variable declarations by putting them at
the beginning of the function in order to flatten the code.

Signed-off-by: Andrey Shvetsov <andrey.shvetsov@k2l.de>
Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
---
 drivers/staging/most/hdm-dim2/dim2_hal.c | 19 ++++++++-----------
 1 file changed, 8 insertions(+), 11 deletions(-)

diff --git a/drivers/staging/most/hdm-dim2/dim2_hal.c b/drivers/staging/most/hdm-dim2/dim2_hal.c
index 20b6970..0c58ab8 100644
--- a/drivers/staging/most/hdm-dim2/dim2_hal.c
+++ b/drivers/staging/most/hdm-dim2/dim2_hal.c
@@ -2,7 +2,7 @@
  * dim2_hal.c - DIM2 HAL implementation
  * (MediaLB, Device Interface Macro IP, OS62420)
  *
- * Copyright (C) 2015, Microchip Technology Germany II GmbH & Co. KG
+ * Copyright (C) 2015-2016, Microchip Technology Germany II GmbH & Co. KG
  *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -518,20 +518,17 @@ static inline bool service_channel(u8 ch_addr, u8 idx)
 {
 	u8 const shift = idx * 16;
 	u32 const adt1 = dim2_read_ctr(ADT + ch_addr, 1);
+	u32 mask[4] = { 0, 0, 0, 0 };
+	u32 adt_w[4] = { 0, 0, 0, 0 };
 
 	if (((adt1 >> (ADT1_DNE_BIT + shift)) & 1) == 0)
 		return false;
 
-	{
-		u32 mask[4] = { 0, 0, 0, 0 };
-		u32 adt_w[4] = { 0, 0, 0, 0 };
-
-		mask[1] =
-			bit_mask(ADT1_DNE_BIT + shift) |
-			bit_mask(ADT1_ERR_BIT + shift) |
-			bit_mask(ADT1_RDY_BIT + shift);
-		dim2_write_ctr_mask(ADT + ch_addr, mask, adt_w);
-	}
+	mask[1] =
+		bit_mask(ADT1_DNE_BIT + shift) |
+		bit_mask(ADT1_ERR_BIT + shift) |
+		bit_mask(ADT1_RDY_BIT + shift);
+	dim2_write_ctr_mask(ADT + ch_addr, mask, adt_w);
 
 	/* clear channel status bit */
 	dimcb_io_write(&g.dim2->ACSR0, bit_mask(ch_addr));
-- 
1.9.1

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

* [PATCH 04/11] staging: most: hdm-dim2: double size of DBR buffer
  2016-09-15 14:19 [PATCH 00/11] staging: most: fix issues of HDM DIM2 Christian Gromm
                   ` (2 preceding siblings ...)
  2016-09-15 14:19 ` [PATCH 03/11] staging: most: hdm-dim2: relocate variable declarations Christian Gromm
@ 2016-09-15 14:19 ` Christian Gromm
  2016-09-15 14:19 ` [PATCH 05/11] staging: most: hdm-dim2: round up DBR memory for async/ctrl Christian Gromm
                   ` (6 subsequent siblings)
  10 siblings, 0 replies; 14+ messages in thread
From: Christian Gromm @ 2016-09-15 14:19 UTC (permalink / raw)
  To: gregkh; +Cc: Andrey Shvetsov, driverdev-devel, Christian Gromm

From: Andrey Shvetsov <andrey.shvetsov@k2l.de>

This patch increases the size of the asynchronous and control DBR buffers
in the Tx path to twice the max. message size. This patch is needed to
increase the throughput for big messages.

Signed-off-by: Andrey Shvetsov <andrey.shvetsov@k2l.de>
Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
---
 drivers/staging/most/hdm-dim2/dim2_hdm.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/most/hdm-dim2/dim2_hdm.c b/drivers/staging/most/hdm-dim2/dim2_hdm.c
index 8bef73c..78ce747 100644
--- a/drivers/staging/most/hdm-dim2/dim2_hdm.c
+++ b/drivers/staging/most/hdm-dim2/dim2_hdm.c
@@ -526,7 +526,7 @@ static int configure_channel(struct most_interface *most_iface, int ch_idx,
 				hdm_ch->name, buf_size, new_size);
 		spin_lock_irqsave(&dim_lock, flags);
 		hal_ret = dim_init_control(&hdm_ch->ch, is_tx, ch_addr,
-					   new_size);
+					   is_tx ? new_size * 2 : new_size);
 		break;
 	case MOST_CH_ASYNC:
 		new_size = dim_norm_ctrl_async_buffer_size(buf_size);
@@ -539,7 +539,8 @@ static int configure_channel(struct most_interface *most_iface, int ch_idx,
 			pr_warn("%s: fixed buffer size (%d -> %d)\n",
 				hdm_ch->name, buf_size, new_size);
 		spin_lock_irqsave(&dim_lock, flags);
-		hal_ret = dim_init_async(&hdm_ch->ch, is_tx, ch_addr, new_size);
+		hal_ret = dim_init_async(&hdm_ch->ch, is_tx, ch_addr,
+					 is_tx ? new_size * 2 : new_size);
 		break;
 	case MOST_CH_ISOC_AVP:
 		new_size = dim_norm_isoc_buffer_size(buf_size, sub_size);
-- 
1.9.1

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

* [PATCH 05/11] staging: most: hdm-dim2: round up DBR memory for async/ctrl
  2016-09-15 14:19 [PATCH 00/11] staging: most: fix issues of HDM DIM2 Christian Gromm
                   ` (3 preceding siblings ...)
  2016-09-15 14:19 ` [PATCH 04/11] staging: most: hdm-dim2: double size of DBR buffer Christian Gromm
@ 2016-09-15 14:19 ` Christian Gromm
  2016-09-15 14:19 ` [PATCH 06/11] staging: most: hdm-dim2: remove structure member Christian Gromm
                   ` (5 subsequent siblings)
  10 siblings, 0 replies; 14+ messages in thread
From: Christian Gromm @ 2016-09-15 14:19 UTC (permalink / raw)
  To: gregkh; +Cc: Andrey Shvetsov, driverdev-devel, Christian Gromm

From: Andrey Shvetsov <andrey.shvetsov@k2l.de>

As the DBR memory is allocated in units of DBR_BLOCK_SIZE, it is more
efficient to configure the DIM2 IP to use whole blocks of the DBR memory.
This patch ceils the DBR memory size used by the DIM2 IP for async/ctrl
channels.

Signed-off-by: Andrey Shvetsov <andrey.shvetsov@k2l.de>
Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
---
 drivers/staging/most/hdm-dim2/dim2_hal.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/staging/most/hdm-dim2/dim2_hal.c b/drivers/staging/most/hdm-dim2/dim2_hal.c
index 0c58ab8..11abce7 100644
--- a/drivers/staging/most/hdm-dim2/dim2_hal.c
+++ b/drivers/staging/most/hdm-dim2/dim2_hal.c
@@ -49,6 +49,8 @@
 #define DBR_SIZE  (16 * 1024) /* specified by IP */
 #define DBR_BLOCK_SIZE  (DBR_SIZE / 32 / DBR_MAP_SIZE)
 
+#define ROUND_UP_TO(x, d)  (((x) + (d) - 1) / (d) * (d))
+
 /* -------------------------------------------------------------------------- */
 /* generic helper functions and macros */
 
@@ -698,7 +700,7 @@ static u8 init_ctrl_async(struct dim_channel *ch, u8 type, u8 is_tx,
 	if (!check_channel_address(ch_address))
 		return DIM_INIT_ERR_CHANNEL_ADDRESS;
 
-	ch->dbr_size = hw_buffer_size;
+	ch->dbr_size = ROUND_UP_TO(hw_buffer_size, DBR_BLOCK_SIZE);
 	ch->dbr_addr = alloc_dbr(ch->dbr_size);
 	if (ch->dbr_addr >= DBR_SIZE)
 		return DIM_INIT_ERR_OUT_OF_MEMORY;
-- 
1.9.1

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

* [PATCH 06/11] staging: most: hdm-dim2: remove structure member
  2016-09-15 14:19 [PATCH 00/11] staging: most: fix issues of HDM DIM2 Christian Gromm
                   ` (4 preceding siblings ...)
  2016-09-15 14:19 ` [PATCH 05/11] staging: most: hdm-dim2: round up DBR memory for async/ctrl Christian Gromm
@ 2016-09-15 14:19 ` Christian Gromm
  2016-09-15 14:19 ` [PATCH 07/11] staging: most: hdm-dim2: rename function Christian Gromm
                   ` (4 subsequent siblings)
  10 siblings, 0 replies; 14+ messages in thread
From: Christian Gromm @ 2016-09-15 14:19 UTC (permalink / raw)
  To: gregkh; +Cc: Andrey Shvetsov, driverdev-devel, Christian Gromm

From: Andrey Shvetsov <andrey.shvetsov@k2l.de>

This patch removes the member irq_ahb0 of the structure dim2_hdm, since
its job is suitably done by a simple auto variable.

Signed-off-by: Andrey Shvetsov <andrey.shvetsov@k2l.de>
Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
---
 drivers/staging/most/hdm-dim2/dim2_hdm.c | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)

diff --git a/drivers/staging/most/hdm-dim2/dim2_hdm.c b/drivers/staging/most/hdm-dim2/dim2_hdm.c
index 78ce747..1e5ac20 100644
--- a/drivers/staging/most/hdm-dim2/dim2_hdm.c
+++ b/drivers/staging/most/hdm-dim2/dim2_hdm.c
@@ -85,7 +85,6 @@ struct hdm_channel {
  * @most_iface: most interface structure
  * @capabilities: an array of channel capability data
  * @io_base: I/O register base address
- * @irq_ahb0: dim2 AHB0 irq number
  * @clk_speed: user selectable (through command line parameter) clock speed
  * @netinfo_task: thread to deliver network status
  * @netinfo_waitq: waitq for the thread to sleep
@@ -100,7 +99,6 @@ struct dim2_hdm {
 	struct most_interface most_iface;
 	char name[16 + sizeof "dim2-"];
 	void __iomem *io_base;
-	unsigned int irq_ahb0;
 	int clk_speed;
 	struct task_struct *netinfo_task;
 	wait_queue_head_t netinfo_waitq;
@@ -719,6 +717,7 @@ static int dim2_probe(struct platform_device *pdev)
 	struct resource *res;
 	int ret, i;
 	struct kobject *kobj;
+	int irq;
 
 	dev = devm_kzalloc(&pdev->dev, sizeof(*dev), GFP_KERNEL);
 	if (!dev)
@@ -732,18 +731,17 @@ static int dim2_probe(struct platform_device *pdev)
 	if (IS_ERR(dev->io_base))
 		return PTR_ERR(dev->io_base);
 
-	ret = platform_get_irq(pdev, 0);
-	if (ret < 0) {
+	irq = platform_get_irq(pdev, 0);
+	if (irq < 0) {
 		dev_err(&pdev->dev, "failed to get irq\n");
 		return -ENODEV;
 	}
-	dev->irq_ahb0 = ret;
 
-	ret = devm_request_irq(&pdev->dev, dev->irq_ahb0, dim2_ahb_isr, 0,
+	ret = devm_request_irq(&pdev->dev, irq, dim2_ahb_isr, 0,
 			       "mlb_ahb0", dev);
 	if (ret) {
 		dev_err(&pdev->dev, "failed to request IRQ: %d, err: %d\n",
-			dev->irq_ahb0, ret);
+			irq, ret);
 		return ret;
 	}
 	init_waitqueue_head(&dev->netinfo_waitq);
-- 
1.9.1

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

* [PATCH 07/11] staging: most: hdm-dim2: rename function
  2016-09-15 14:19 [PATCH 00/11] staging: most: fix issues of HDM DIM2 Christian Gromm
                   ` (5 preceding siblings ...)
  2016-09-15 14:19 ` [PATCH 06/11] staging: most: hdm-dim2: remove structure member Christian Gromm
@ 2016-09-15 14:19 ` Christian Gromm
  2016-09-15 14:19 ` [PATCH 08/11] staging: most: hdm-dim2: delete error code from logging message Christian Gromm
                   ` (3 subsequent siblings)
  10 siblings, 0 replies; 14+ messages in thread
From: Christian Gromm @ 2016-09-15 14:19 UTC (permalink / raw)
  To: gregkh; +Cc: Andrey Shvetsov, driverdev-devel, Christian Gromm

From: Andrey Shvetsov <andrey.shvetsov@k2l.de>

This patch renames the function dim_service_irq. It subsitutes the name
with the more suitable identifier dim_service_ahb_int_irq.

Signed-off-by: Andrey Shvetsov <andrey.shvetsov@k2l.de>
Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
---
 drivers/staging/most/hdm-dim2/dim2_hal.c | 2 +-
 drivers/staging/most/hdm-dim2/dim2_hal.h | 2 +-
 drivers/staging/most/hdm-dim2/dim2_hdm.c | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/most/hdm-dim2/dim2_hal.c b/drivers/staging/most/hdm-dim2/dim2_hal.c
index 11abce7..1382b78 100644
--- a/drivers/staging/most/hdm-dim2/dim2_hal.c
+++ b/drivers/staging/most/hdm-dim2/dim2_hal.c
@@ -826,7 +826,7 @@ u8 dim_destroy_channel(struct dim_channel *ch)
 	return DIM_NO_ERROR;
 }
 
-void dim_service_irq(struct dim_channel *const *channels)
+void dim_service_ahb_int_irq(struct dim_channel *const *channels)
 {
 	bool state_changed;
 
diff --git a/drivers/staging/most/hdm-dim2/dim2_hal.h b/drivers/staging/most/hdm-dim2/dim2_hal.h
index 62eb5e7..777a56e 100644
--- a/drivers/staging/most/hdm-dim2/dim2_hal.h
+++ b/drivers/staging/most/hdm-dim2/dim2_hal.h
@@ -87,7 +87,7 @@ u8 dim_init_sync(struct dim_channel *ch, u8 is_tx, u16 ch_address,
 
 u8 dim_destroy_channel(struct dim_channel *ch);
 
-void dim_service_irq(struct dim_channel *const *channels);
+void dim_service_ahb_int_irq(struct dim_channel *const *channels);
 
 u8 dim_service_channel(struct dim_channel *ch);
 
diff --git a/drivers/staging/most/hdm-dim2/dim2_hdm.c b/drivers/staging/most/hdm-dim2/dim2_hdm.c
index 1e5ac20..a20c9fd 100644
--- a/drivers/staging/most/hdm-dim2/dim2_hdm.c
+++ b/drivers/staging/most/hdm-dim2/dim2_hdm.c
@@ -447,7 +447,7 @@ static irqreturn_t dim2_ahb_isr(int irq, void *_dev)
 	unsigned long flags;
 
 	spin_lock_irqsave(&dim_lock, flags);
-	dim_service_irq(get_active_channels(dev, buffer));
+	dim_service_ahb_int_irq(get_active_channels(dev, buffer));
 	spin_unlock_irqrestore(&dim_lock, flags);
 
 	dim2_tasklet.data = (unsigned long)dev;
-- 
1.9.1

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

* [PATCH 08/11] staging: most: hdm-dim2: delete error code from logging message
  2016-09-15 14:19 [PATCH 00/11] staging: most: fix issues of HDM DIM2 Christian Gromm
                   ` (6 preceding siblings ...)
  2016-09-15 14:19 ` [PATCH 07/11] staging: most: hdm-dim2: rename function Christian Gromm
@ 2016-09-15 14:19 ` Christian Gromm
  2016-09-15 14:19 ` [PATCH 09/11] staging: most: hdm-dim2: remove clearance of pending MLB interrupt Christian Gromm
                   ` (2 subsequent siblings)
  10 siblings, 0 replies; 14+ messages in thread
From: Christian Gromm @ 2016-09-15 14:19 UTC (permalink / raw)
  To: gregkh; +Cc: Christian Gromm, driverdev-devel, Andrey Shvetsov

From: Andrey Shvetsov <andrey.shvetsov@k2l.de>

This patch removes the logging of the returned error code of function
dim2_probe as it is done by the calling function.

Signed-off-by: Andrey Shvetsov <andrey.shvetsov@k2l.de>
Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
---
 drivers/staging/most/hdm-dim2/dim2_hdm.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/staging/most/hdm-dim2/dim2_hdm.c b/drivers/staging/most/hdm-dim2/dim2_hdm.c
index a20c9fd..c7e9ca4 100644
--- a/drivers/staging/most/hdm-dim2/dim2_hdm.c
+++ b/drivers/staging/most/hdm-dim2/dim2_hdm.c
@@ -740,8 +740,7 @@ static int dim2_probe(struct platform_device *pdev)
 	ret = devm_request_irq(&pdev->dev, irq, dim2_ahb_isr, 0,
 			       "mlb_ahb0", dev);
 	if (ret) {
-		dev_err(&pdev->dev, "failed to request IRQ: %d, err: %d\n",
-			irq, ret);
+		dev_err(&pdev->dev, "failed to request IRQ: %d\n", irq);
 		return ret;
 	}
 	init_waitqueue_head(&dev->netinfo_waitq);
-- 
1.9.1

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

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

* [PATCH 09/11] staging: most: hdm-dim2: remove clearance of pending MLB interrupt
  2016-09-15 14:19 [PATCH 00/11] staging: most: fix issues of HDM DIM2 Christian Gromm
                   ` (7 preceding siblings ...)
  2016-09-15 14:19 ` [PATCH 08/11] staging: most: hdm-dim2: delete error code from logging message Christian Gromm
@ 2016-09-15 14:19 ` Christian Gromm
  2016-09-15 14:19 ` [PATCH 10/11] staging: most: hdm-dim2: fix dim2-ip interrupt names Christian Gromm
  2016-09-15 14:19 ` [PATCH 11/11] staging: most: hdm-dim2: monitor atx DBR space Christian Gromm
  10 siblings, 0 replies; 14+ messages in thread
From: Christian Gromm @ 2016-09-15 14:19 UTC (permalink / raw)
  To: gregkh; +Cc: Christian Gromm, driverdev-devel, Andrey Shvetsov

From: Andrey Shvetsov <andrey.shvetsov@k2l.de>

This patch removes unnecessary clearing of a pending mlb_int from the
service routine for ahb interrupt.

Signed-off-by: Andrey Shvetsov <andrey.shvetsov@k2l.de>
Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
---
 drivers/staging/most/hdm-dim2/dim2_hal.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/drivers/staging/most/hdm-dim2/dim2_hal.c b/drivers/staging/most/hdm-dim2/dim2_hal.c
index 1382b78..695f316 100644
--- a/drivers/staging/most/hdm-dim2/dim2_hal.c
+++ b/drivers/staging/most/hdm-dim2/dim2_hal.c
@@ -858,10 +858,6 @@ void dim_service_ahb_int_irq(struct dim_channel *const *channels)
 			++ch;
 		}
 	} while (state_changed);
-
-	/* clear pending Interrupts */
-	dimcb_io_write(&g.dim2->MS0, 0);
-	dimcb_io_write(&g.dim2->MS1, 0);
 }
 
 u8 dim_service_channel(struct dim_channel *ch)
-- 
1.9.1

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

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

* [PATCH 10/11] staging: most: hdm-dim2: fix dim2-ip interrupt names
  2016-09-15 14:19 [PATCH 00/11] staging: most: fix issues of HDM DIM2 Christian Gromm
                   ` (8 preceding siblings ...)
  2016-09-15 14:19 ` [PATCH 09/11] staging: most: hdm-dim2: remove clearance of pending MLB interrupt Christian Gromm
@ 2016-09-15 14:19 ` Christian Gromm
  2016-09-15 14:19 ` [PATCH 11/11] staging: most: hdm-dim2: monitor atx DBR space Christian Gromm
  10 siblings, 0 replies; 14+ messages in thread
From: Christian Gromm @ 2016-09-15 14:19 UTC (permalink / raw)
  To: gregkh; +Cc: Christian Gromm, driverdev-devel, Andrey Shvetsov

From: Andrey Shvetsov <andrey.shvetsov@k2l.de>

This patch fixes the DIM2 IP interrupt names.

Signed-off-by: Andrey Shvetsov <andrey.shvetsov@k2l.de>
Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
---
 drivers/staging/most/hdm-dim2/dim2_hdm.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/most/hdm-dim2/dim2_hdm.c b/drivers/staging/most/hdm-dim2/dim2_hdm.c
index c7e9ca4..0350798 100644
--- a/drivers/staging/most/hdm-dim2/dim2_hdm.c
+++ b/drivers/staging/most/hdm-dim2/dim2_hdm.c
@@ -733,14 +733,14 @@ static int dim2_probe(struct platform_device *pdev)
 
 	irq = platform_get_irq(pdev, 0);
 	if (irq < 0) {
-		dev_err(&pdev->dev, "failed to get irq\n");
+		dev_err(&pdev->dev, "failed to get ahb0_int irq\n");
 		return -ENODEV;
 	}
 
 	ret = devm_request_irq(&pdev->dev, irq, dim2_ahb_isr, 0,
-			       "mlb_ahb0", dev);
+			       "dim2_ahb0_int", dev);
 	if (ret) {
-		dev_err(&pdev->dev, "failed to request IRQ: %d\n", irq);
+		dev_err(&pdev->dev, "failed to request ahb0_int irq %d\n", irq);
 		return ret;
 	}
 	init_waitqueue_head(&dev->netinfo_waitq);
-- 
1.9.1

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

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

* [PATCH 11/11] staging: most: hdm-dim2: monitor atx DBR space
  2016-09-15 14:19 [PATCH 00/11] staging: most: fix issues of HDM DIM2 Christian Gromm
                   ` (9 preceding siblings ...)
  2016-09-15 14:19 ` [PATCH 10/11] staging: most: hdm-dim2: fix dim2-ip interrupt names Christian Gromm
@ 2016-09-15 14:19 ` Christian Gromm
  10 siblings, 0 replies; 14+ messages in thread
From: Christian Gromm @ 2016-09-15 14:19 UTC (permalink / raw)
  To: gregkh; +Cc: Christian Gromm, driverdev-devel, Andrey Shvetsov

From: Andrey Shvetsov <andrey.shvetsov@k2l.de>

This patch implements a workaround for a DIM2 issue where the device
macro, in case the asynchronous channel sends data (to MOST), sporadically
duplicates the synchronous blocks with a size of half the synchronous DBR
buffer.

The patch monitors the size of the unused asynchronous Tx DBR memory
(that includes the ping and pong sizes) to prevent the potential DBR
overflow for the asynchronous Tx DBR buffer.

The patched DIM2 HDM expects that the platform driver delivers the 2nd
platform irq (index 1) as the mlb_int of the DIM2 macro.

Signed-off-by: Andrey Shvetsov <andrey.shvetsov@k2l.de>
Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
---
 drivers/staging/most/hdm-dim2/dim2_hal.c | 85 +++++++++++++++++++++++++++++++-
 drivers/staging/most/hdm-dim2/dim2_hal.h |  4 ++
 drivers/staging/most/hdm-dim2/dim2_hdm.c | 35 +++++++++++++
 drivers/staging/most/hdm-dim2/dim2_reg.h |  3 ++
 4 files changed, 125 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/most/hdm-dim2/dim2_hal.c b/drivers/staging/most/hdm-dim2/dim2_hal.c
index 695f316..0b9816c 100644
--- a/drivers/staging/most/hdm-dim2/dim2_hal.c
+++ b/drivers/staging/most/hdm-dim2/dim2_hal.c
@@ -68,10 +68,19 @@ static inline bool dim_on_error(u8 error_id, const char *error_message)
 /* -------------------------------------------------------------------------- */
 /* types and local variables */
 
+struct async_tx_dbr {
+	u8 ch_addr;
+	u16 rpc;
+	u16 wpc;
+	u16 rest_size;
+	u16 sz_queue[CDT0_RPC_MASK + 1];
+};
+
 struct lld_global_vars_t {
 	bool dim_is_initialized;
 	bool mcm_is_initialized;
 	struct dim2_regs __iomem *dim2; /* DIM2 core base address */
+	struct async_tx_dbr atx_dbr;
 	u32 fcnt;
 	u32 dbr_map[DBR_MAP_SIZE];
 };
@@ -253,6 +262,13 @@ static void dim2_configure_cdt(u8 ch_addr, u16 dbr_address, u16 hw_buffer_size,
 	dim2_write_ctr(CDT + ch_addr, cdt);
 }
 
+static u16 dim2_rpc(u8 ch_addr)
+{
+	u32 cdt0 = dim2_read_ctr(CDT + ch_addr, 0);
+
+	return (cdt0 >> CDT0_RPC_SHIFT) & CDT0_RPC_MASK;
+}
+
 static void dim2_clear_cdt(u8 ch_addr)
 {
 	u32 cdt[4] = { 0, 0, 0, 0 };
@@ -363,6 +379,49 @@ static void dim2_clear_channel(u8 ch_addr)
 }
 
 /* -------------------------------------------------------------------------- */
+/* trace async tx dbr fill state */
+
+static inline u16 norm_pc(u16 pc)
+{
+	return pc & CDT0_RPC_MASK;
+}
+
+static void dbrcnt_init(u8 ch_addr, u16 dbr_size)
+{
+	g.atx_dbr.rest_size = dbr_size;
+	g.atx_dbr.rpc = dim2_rpc(ch_addr);
+	g.atx_dbr.wpc = g.atx_dbr.rpc;
+}
+
+static void dbrcnt_enq(int buf_sz)
+{
+	g.atx_dbr.rest_size -= buf_sz;
+	g.atx_dbr.sz_queue[norm_pc(g.atx_dbr.wpc)] = buf_sz;
+	g.atx_dbr.wpc++;
+}
+
+u16 dim_dbr_space(struct dim_channel *ch)
+{
+	u16 cur_rpc;
+	struct async_tx_dbr *dbr = &g.atx_dbr;
+
+	if (ch->addr != dbr->ch_addr)
+		return 0xFFFF;
+
+	cur_rpc = dim2_rpc(ch->addr);
+
+	while (norm_pc(dbr->rpc) != cur_rpc) {
+		dbr->rest_size += dbr->sz_queue[norm_pc(dbr->rpc)];
+		dbr->rpc++;
+	}
+
+	if ((u16)(dbr->wpc - dbr->rpc) >= CDT0_RPC_MASK)
+		return 0;
+
+	return dbr->rest_size;
+}
+
+/* -------------------------------------------------------------------------- */
 /* channel state helpers */
 
 static void state_init(struct int_ch_state *state)
@@ -614,6 +673,9 @@ static bool channel_start(struct dim_channel *ch, u32 buf_addr, u16 buf_size)
 
 	++state->level;
 
+	if (ch->addr == g.atx_dbr.ch_addr)
+		dbrcnt_enq(buf_size);
+
 	if (ch->packet_length || ch->bytes_per_frame)
 		dim2_start_isoc_sync(ch->addr, state->idx1, buf_addr, buf_size);
 	else
@@ -713,6 +775,12 @@ static u8 init_ctrl_async(struct dim_channel *ch, u8 type, u8 is_tx,
 	return DIM_NO_ERROR;
 }
 
+void dim_service_mlb_int_irq(void)
+{
+	dimcb_io_write(&g.dim2->MS0, 0);
+	dimcb_io_write(&g.dim2->MS1, 0);
+}
+
 u16 dim_norm_ctrl_async_buffer_size(u16 buf_size)
 {
 	return norm_ctrl_async_buffer_size(buf_size);
@@ -756,8 +824,16 @@ u8 dim_init_control(struct dim_channel *ch, u8 is_tx, u16 ch_address,
 u8 dim_init_async(struct dim_channel *ch, u8 is_tx, u16 ch_address,
 		  u16 max_buffer_size)
 {
-	return init_ctrl_async(ch, CAT_CT_VAL_ASYNC, is_tx, ch_address,
-			       max_buffer_size);
+	u8 ret = init_ctrl_async(ch, CAT_CT_VAL_ASYNC, is_tx, ch_address,
+				 max_buffer_size);
+
+	if (is_tx && !g.atx_dbr.ch_addr) {
+		g.atx_dbr.ch_addr = ch->addr;
+		dbrcnt_init(ch->addr, ch->dbr_size);
+		dimcb_io_write(&g.dim2->MIEN, bit_mask(20));
+	}
+
+	return ret;
 }
 
 u8 dim_init_isoc(struct dim_channel *ch, u8 is_tx, u16 ch_address,
@@ -818,6 +894,11 @@ u8 dim_destroy_channel(struct dim_channel *ch)
 	if (!g.dim_is_initialized || !ch)
 		return DIM_ERR_DRIVER_NOT_INITIALIZED;
 
+	if (ch->addr == g.atx_dbr.ch_addr) {
+		dimcb_io_write(&g.dim2->MIEN, 0);
+		g.atx_dbr.ch_addr = 0;
+	}
+
 	dim2_clear_channel(ch->addr);
 	if (ch->dbr_addr < DBR_SIZE)
 		free_dbr(ch->dbr_addr, ch->dbr_size);
diff --git a/drivers/staging/most/hdm-dim2/dim2_hal.h b/drivers/staging/most/hdm-dim2/dim2_hal.h
index 777a56e..6df6ea5 100644
--- a/drivers/staging/most/hdm-dim2/dim2_hal.h
+++ b/drivers/staging/most/hdm-dim2/dim2_hal.h
@@ -87,6 +87,8 @@ u8 dim_init_sync(struct dim_channel *ch, u8 is_tx, u16 ch_address,
 
 u8 dim_destroy_channel(struct dim_channel *ch);
 
+void dim_service_mlb_int_irq(void);
+
 void dim_service_ahb_int_irq(struct dim_channel *const *channels);
 
 u8 dim_service_channel(struct dim_channel *ch);
@@ -94,6 +96,8 @@ u8 dim_service_channel(struct dim_channel *ch);
 struct dim_ch_state_t *dim_get_channel_state(struct dim_channel *ch,
 					     struct dim_ch_state_t *state_ptr);
 
+u16 dim_dbr_space(struct dim_channel *ch);
+
 bool dim_enqueue_buffer(struct dim_channel *ch, u32 buffer_addr,
 			u16 buffer_size);
 
diff --git a/drivers/staging/most/hdm-dim2/dim2_hdm.c b/drivers/staging/most/hdm-dim2/dim2_hdm.c
index 0350798..71f4ae7 100644
--- a/drivers/staging/most/hdm-dim2/dim2_hdm.c
+++ b/drivers/staging/most/hdm-dim2/dim2_hdm.c
@@ -249,6 +249,11 @@ static int try_start_dim_transfer(struct hdm_channel *hdm_ch)
 	mbo = list_first_entry(head, struct mbo, list);
 	buf_size = mbo->buffer_length;
 
+	if (dim_dbr_space(&hdm_ch->ch) < buf_size) {
+		spin_unlock_irqrestore(&dim_lock, flags);
+		return -EAGAIN;
+	}
+
 	BUG_ON(mbo->bus_address == 0);
 	if (!dim_enqueue_buffer(&hdm_ch->ch, mbo->bus_address, buf_size)) {
 		list_del(head->next);
@@ -406,6 +411,22 @@ static struct dim_channel **get_active_channels(struct dim2_hdm *dev,
 	return buffer;
 }
 
+static irqreturn_t dim2_mlb_isr(int irq, void *_dev)
+{
+	struct dim2_hdm *dev = _dev;
+	unsigned long flags;
+
+	spin_lock_irqsave(&dim_lock, flags);
+	dim_service_mlb_int_irq();
+	spin_unlock_irqrestore(&dim_lock, flags);
+
+	if (dev->atx_idx >= 0 && dev->hch[dev->atx_idx].is_initialized)
+		while (!try_start_dim_transfer(dev->hch + dev->atx_idx))
+			continue;
+
+	return IRQ_HANDLED;
+}
+
 /**
  * dim2_tasklet_fn - tasklet function
  * @data: private data
@@ -743,6 +764,20 @@ static int dim2_probe(struct platform_device *pdev)
 		dev_err(&pdev->dev, "failed to request ahb0_int irq %d\n", irq);
 		return ret;
 	}
+
+	irq = platform_get_irq(pdev, 1);
+	if (irq < 0) {
+		dev_err(&pdev->dev, "failed to get mlb_int irq\n");
+		return -ENODEV;
+	}
+
+	ret = devm_request_irq(&pdev->dev, irq, dim2_mlb_isr, 0,
+			       "dim2_mlb_int", dev);
+	if (ret) {
+		dev_err(&pdev->dev, "failed to request mlb_int irq %d\n", irq);
+		return ret;
+	}
+
 	init_waitqueue_head(&dev->netinfo_waitq);
 	dev->deliver_netinfo = 0;
 	dev->netinfo_task = kthread_run(&deliver_netinfo_thread, (void *)dev,
diff --git a/drivers/staging/most/hdm-dim2/dim2_reg.h b/drivers/staging/most/hdm-dim2/dim2_reg.h
index 3b1c200..01fe499 100644
--- a/drivers/staging/most/hdm-dim2/dim2_reg.h
+++ b/drivers/staging/most/hdm-dim2/dim2_reg.h
@@ -117,6 +117,9 @@ enum {
 };
 
 enum {
+	CDT0_RPC_SHIFT = 16 + 11,
+	CDT0_RPC_MASK = DIM2_MASK(5),
+
 	CDT1_BS_ISOC_SHIFT = 0,
 	CDT1_BS_ISOC_MASK = DIM2_MASK(9),
 
-- 
1.9.1

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

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

* Re: [PATCH 01/11] staging: most: hdm-dim2: fix channel configuration
  2016-09-15 14:19 ` [PATCH 01/11] staging: most: hdm-dim2: fix channel configuration Christian Gromm
@ 2016-09-16 11:44   ` Dan Carpenter
  2016-09-20 12:59     ` Andrey Shvetsov
  0 siblings, 1 reply; 14+ messages in thread
From: Dan Carpenter @ 2016-09-16 11:44 UTC (permalink / raw)
  To: Christian Gromm; +Cc: gregkh, driverdev-devel, Andrey Shvetsov

On Thu, Sep 15, 2016 at 04:19:03PM +0200, Christian Gromm wrote:
> From: Andrey Shvetsov <andrey.shvetsov@k2l.de>
> 
> The DIM2 HDM checks the parameters passed to the function
> configure_channel() and adapts the buffer sizes of the configuration
> according to the hardware limitation. This patch is needed to init
> the HAL layer with the correct values.
> 

Correct values are good, but what are the user visible effects of this
bug?  I assume it's memory corruption.  How is it triggered?  Are there
security implications?

regards,
dan carpenter

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

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

* Re: [PATCH 01/11] staging: most: hdm-dim2: fix channel configuration
  2016-09-16 11:44   ` Dan Carpenter
@ 2016-09-20 12:59     ` Andrey Shvetsov
  0 siblings, 0 replies; 14+ messages in thread
From: Andrey Shvetsov @ 2016-09-20 12:59 UTC (permalink / raw)
  To: Dan Carpenter; +Cc: Christian Gromm, driverdev-devel, gregkh

On Fri, Sep 16, 2016 at 02:44:37PM +0300, Dan Carpenter wrote:
> On Thu, Sep 15, 2016 at 04:19:03PM +0200, Christian Gromm wrote:
> > From: Andrey Shvetsov <andrey.shvetsov@k2l.de>
> > 
> > The DIM2 HDM checks the parameters passed to the function
> > configure_channel() and adapts the buffer sizes of the configuration
> > according to the hardware limitation. This patch is needed to init
> > the HAL layer with the correct values.
> > 
> 
> Correct values are good, but what are the user visible effects of this
> bug?  I assume it's memory corruption.  How is it triggered?  Are there
> security implications?
> 
Independent of the patch in the case where the user space configures the
channel with the buffer size that is consistent to the rest of the
channel parameters, the function configure_channel just returns 0,
otherwise the HDM adapts the buffer size to the next apropriate smaller
value.  The corrected value is visible in the sysfs.

This patch does not fix/bring any security issues.

The MBOs in the case where the function configure_channel returns 0 will
be allocated with the appropriate size independent of the patch.

The enqueue path of the DIM2 HAL checks the size of the buffer to
prevent any corruptions independent of the patch. 

The user visible effect of the patch is the expected behavior of the HDM
where the HDM helps to find out the correct buffer size according to the
complex rules of the INIC interfaces.

regards,
andrey

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

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

end of thread, other threads:[~2016-09-20 12:59 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-15 14:19 [PATCH 00/11] staging: most: fix issues of HDM DIM2 Christian Gromm
2016-09-15 14:19 ` [PATCH 01/11] staging: most: hdm-dim2: fix channel configuration Christian Gromm
2016-09-16 11:44   ` Dan Carpenter
2016-09-20 12:59     ` Andrey Shvetsov
2016-09-15 14:19 ` [PATCH 02/11] staging: most: hdm-dim2: remove macro ENABLE_HDM_TEST Christian Gromm
2016-09-15 14:19 ` [PATCH 03/11] staging: most: hdm-dim2: relocate variable declarations Christian Gromm
2016-09-15 14:19 ` [PATCH 04/11] staging: most: hdm-dim2: double size of DBR buffer Christian Gromm
2016-09-15 14:19 ` [PATCH 05/11] staging: most: hdm-dim2: round up DBR memory for async/ctrl Christian Gromm
2016-09-15 14:19 ` [PATCH 06/11] staging: most: hdm-dim2: remove structure member Christian Gromm
2016-09-15 14:19 ` [PATCH 07/11] staging: most: hdm-dim2: rename function Christian Gromm
2016-09-15 14:19 ` [PATCH 08/11] staging: most: hdm-dim2: delete error code from logging message Christian Gromm
2016-09-15 14:19 ` [PATCH 09/11] staging: most: hdm-dim2: remove clearance of pending MLB interrupt Christian Gromm
2016-09-15 14:19 ` [PATCH 10/11] staging: most: hdm-dim2: fix dim2-ip interrupt names Christian Gromm
2016-09-15 14:19 ` [PATCH 11/11] staging: most: hdm-dim2: monitor atx DBR space Christian Gromm

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.