[PATCH v6 08/11] mmc: move error code in mmc_block_issue_rw_rq to a separate function.

2011-06-19 Thread Per Forlin
Break out code without functional changes. This simplifies the code and makes way for handle two parallel request. Signed-off-by: Per Forlin --- drivers/mmc/card/block.c | 246 ++--- 1 files changed, 142 insertions(+), 104 deletions(-) diff --git a

[PATCH v6 07/11] mmc: add a block request prepare function

2011-06-19 Thread Per Forlin
Break out code from mmc_blk_issue_rw_rq to create a block request prepare function. This doesn't change any functionallity. This helps when handling more than one active block request. Signed-off-by: Per Forlin --- drivers/mmc/card/block.c | 224 ---

[PATCH v6 06/11] mmc: add member in mmc queue struct to hold request data

2011-06-19 Thread Per Forlin
. This lies the ground for using multiple active request for one mmc queue. Signed-off-by: Per Forlin --- drivers/mmc/card/block.c | 125 +--- drivers/mmc/card/queue.c | 129 -- drivers/mmc/card/queue.h | 31

[PATCH v6 05/11] mmc: mmc_test: add test for non-blocking transfers

2011-06-19 Thread Per Forlin
to run the non-blocking test cases. Signed-off-by: Per Forlin --- drivers/mmc/card/mmc_test.c | 322 +-- 1 files changed, 313 insertions(+), 9 deletions(-) diff --git a/drivers/mmc/card/mmc_test.c b/drivers/mmc/card/mmc_test.c index e8508e9..5325049

[PATCH v6 04/11] mmc: mmc_test: add debugfs file to list all tests

2011-06-19 Thread Per Forlin
Add a debugfs file "testlist" to print all available tests Signed-off-by: Per Forlin --- drivers/mmc/card/mmc_test.c | 39 ++- 1 files changed, 38 insertions(+), 1 deletions(-) diff --git a/drivers/mmc/card/mmc_test.c b/drivers/mmc/card/mmc_te

[PATCH v6 03/11] mmci: implement pre_req() and post_req()

2011-06-19 Thread Per Forlin
mmci. Signed-off-by: Per Forlin --- drivers/mmc/host/mmci.c | 146 ++ drivers/mmc/host/mmci.h |8 +++ 2 files changed, 141 insertions(+), 13 deletions(-) diff --git a/drivers/mmc/host/mmci.c b/drivers/mmc/host/mmci.c index b4a7e4f..985c77d 100644

[PATCH v6 02/11] omap_hsmmc: add support for pre_req and post_req

2011-06-19 Thread Per Forlin
pre_req() runs dma_map_sg(), post_req() runs dma_unmap_sg. If not calling pre_req() before omap_hsmmc_request() dma_map_sg will be issued before starting the transfer. It is optional to use pre_req(). If issuing pre_req() post_req() must be to be called as well. Signed-off-by: Per Forlin

[PATCH v6 01/11] mmc: add non-blocking mmc request function

2011-06-19 Thread Per Forlin
before ending the block request and handing over the buffer to the block layer. Add a host-private member in mmc_data to be used by pre_req to mark the data. The host driver will then check this mark to see if the data is prepared or not. Signed-off-by: Per Forlin --- drivers/mmc/core/core.c

[PATCH v6 00/11] mmc: use nonblock mmc requests to minimize latency

2011-06-19 Thread Per Forlin
measurements from IOZone and mmc_test: https://wiki.linaro.org/WorkingGroups/Kernel/Specs/StoragePerfMMC-async-req Changes since v5: * Fix spelling mistakes, replace "none blocking" with non-blocking. * excluded patch "omap_hsmmc: use original sg_len..." since it is being mer

[PATCH v5 02/12] omap_hsmmc: use original sg_len for dma_unmap_sg

2011-06-18 Thread Per Forlin
Don't use the returned sg_len from dma_map_sg() as inparameter to dma_unmap_sg(). Use the original sg_len for both dma_map_sg and dma_unmap_sg according to the documentation in DMA-API.txt. Signed-off-by: Per Forlin Reviewed-by: Venkatraman S --- drivers/mmc/host/omap_hsmmc.c |5 +++

[PATCH v5 05/12] mmc: mmc_test: add debugfs file to list all tests

2011-06-18 Thread Per Forlin
Add a debugfs file "testlist" to print all available tests Signed-off-by: Per Forlin --- drivers/mmc/card/mmc_test.c | 39 ++- 1 files changed, 38 insertions(+), 1 deletions(-) diff --git a/drivers/mmc/card/mmc_test.c b/drivers/mmc/card/mmc_te

[PATCH v5 09/12] mmc: move error code in mmc_block_issue_rw_rq to a separate function.

2011-06-18 Thread Per Forlin
Break out code without functional changes. This simplifies the code and makes way for handle two parallel request. Signed-off-by: Per Forlin --- drivers/mmc/card/block.c | 246 ++--- 1 files changed, 142 insertions(+), 104 deletions(-) diff --git a

[PATCH v5 12/12] mmc: add handling for two parallel block requests in issue_rw_rq

2011-06-18 Thread Per Forlin
isuue_rw_rq(), then it waits for the active request to complete before pushing it to the host. When to mmc-queue is empty it will call isuue_rw_rq() with req=NULL to finish off the active request without starting a new request. Signed-off-by: Per Forlin --- drivers/mmc/card/block.c | 121

[PATCH v5 11/12] mmc: test: add random fault injection in core.c

2011-06-18 Thread Per Forlin
This simple fault injection proved to be very useful to test the error handling in the block.c rw_rq(). It may still be useful to test if the host driver handle pre_req() and post_req() correctly in case of errors. Signed-off-by: Per Forlin --- drivers/mmc/core/core.c| 54

[PATCH v5 10/12] mmc: add a second mmc queue request member

2011-06-18 Thread Per Forlin
Add an additional mmc queue request instance to make way for two active block requests. One request may be active while the other request is being prepared. Signed-off-by: Per Forlin --- drivers/mmc/card/queue.c | 44 ++-- drivers/mmc/card/queue.h

[PATCH v5 08/12] mmc: add a block request prepare function

2011-06-18 Thread Per Forlin
Break out code from mmc_blk_issue_rw_rq to create a block request prepare function. This doesn't change any functionallity. This helps when handling more than one active block request. Signed-off-by: Per Forlin --- drivers/mmc/card/block.c | 224 ---

[PATCH v5 07/12] mmc: add member in mmc queue struct to hold request data

2011-06-18 Thread Per Forlin
. This lies the ground for using multiple active request for one mmc queue. Signed-off-by: Per Forlin --- drivers/mmc/card/block.c | 125 +--- drivers/mmc/card/queue.c | 129 -- drivers/mmc/card/queue.h | 31

[PATCH v5 06/12] mmc: mmc_test: add test for none blocking transfers

2011-06-18 Thread Per Forlin
order to run the none blocking test cases. Signed-off-by: Per Forlin --- drivers/mmc/card/mmc_test.c | 322 +-- 1 files changed, 313 insertions(+), 9 deletions(-) diff --git a/drivers/mmc/card/mmc_test.c b/drivers/mmc/card/mmc_test.c index e8508e9..19e1132

[PATCH v5 04/12] mmci: implement pre_req() and post_req()

2011-06-18 Thread Per Forlin
mmci. Signed-off-by: Per Forlin --- drivers/mmc/host/mmci.c | 146 ++ drivers/mmc/host/mmci.h |8 +++ 2 files changed, 141 insertions(+), 13 deletions(-) diff --git a/drivers/mmc/host/mmci.c b/drivers/mmc/host/mmci.c index 7721de9..8b21467 100644

[PATCH v5 03/12] omap_hsmmc: add support for pre_req and post_req

2011-06-18 Thread Per Forlin
pre_req() runs dma_map_sg(), post_req() runs dma_unmap_sg. If not calling pre_req() before omap_hsmmc_request() dma_map_sg will be issued before starting the transfer. It is optional to use pre_req(). If issuing pre_req() post_req() must be to be called as well. Signed-off-by: Per Forlin

[PATCH v5 01/12] mmc: add none blocking mmc request function

2011-06-18 Thread Per Forlin
before ending the block request and handing over the buffer to the block layer. Add a host-private member in mmc_data to be used by pre_req to mark the data. The host driver will then check this mark to see if the data is prepared or not. Signed-off-by: Per Forlin --- drivers/mmc/core/core.c

[PATCH v5 00/12] mmc: use nonblock mmc requests to minimize latency

2011-06-18 Thread Per Forlin
measurements from IOZone and mmc_test: https://wiki.linaro.org/WorkingGroups/Kernel/Specs/StoragePerfMMC-async-req Changes since v4: * rebase on top of linux 3.0 Per Forlin (12): mmc: add none blocking mmc request function omap_hsmmc: use original sg_len for dma_unmap_sg omap_hsmmc: add support

[PATCH RESEND] omap_hsmmc: use original sg_len for dma_unmap_sg

2011-06-17 Thread Per Forlin
Don't use the returned sg_len from dma_map_sg() as inparameter to dma_unmap_sg(). Use the original sg_len for both dma_map_sg and dma_unmap_sg according to the documentation in DMA-API.txt. Signed-off-by: Per Forlin Reviewed-by: Venkatraman S --- drivers/mmc/host/omap_hsmmc.c |5 +++

Re: [PATCH v3 RESEND] dma-mapping: add new API for max_segment_number

2011-06-17 Thread Per Forlin
On 17 June 2011 14:40, Matthew Wilcox wrote: > On Thu, Jun 16, 2011 at 08:30:53PM +0800, Shawn Guo wrote: >> Here is the user story that tells the need of the new api.  The >> mxs-mmc is the mmc host controller for Freescale MXS architecture. >> There are a pair of  mmc host specific parameters ma

Re: [PATCH v4 00/12] mmc: use nonblock mmc requests to minimize latency

2011-06-17 Thread Per Forlin
On 16 June 2011 15:39, S, Venkatraman wrote: > On Thu, May 26, 2011 at 3:27 AM, Per Forlin wrote: >> How significant is the cache maintenance over head? >> It depends, the eMMC are much faster now >> compared to a few years ago and cache maintenance cost more due to >>

Re: [PATCH v4 02/12] omap_hsmmc: use original sg_len for dma_unmap_sg

2011-06-17 Thread Per Forlin
On 16 June 2011 15:16, S, Venkatraman wrote: > On Thu, May 26, 2011 at 3:27 AM, Per Forlin wrote: >> Don't use the returned sg_len from dma_map_sg() as inparameter >> to dma_unmap_sg(). Use the original sg_len for both dma_map_sg >> and dma_unmap_sg. >&

Re: [PATCH v4 03/12] omap_hsmmc: add support for pre_req and post_req

2011-06-17 Thread Per Forlin
On 16 June 2011 15:14, S, Venkatraman wrote: > On Thu, May 26, 2011 at 3:27 AM, Per Forlin wrote: >> pre_req() runs dma_map_sg(), post_req() runs dma_unmap_sg. >> If not calling pre_req() before omap_hsmmc_request() >> dma_map_sg will be issued before starting the transfer.

Re: [PATCH v3] dmaengine: add new dma API for max_segment_number

2011-06-16 Thread Per Forlin
On Wed, Jun 15, 2011 at 2:08 PM, Shawn Guo wrote: > [PATCH v3] dmaengine: add new dma API for max_segment_number The subject "dmaengine:" in this case is a bit misleading since the patches doesn't touch any code inside drivers/dmaengine. For this patch I would prefer subject "dma-mapping:" There

Re: [PATCH 2/2] sdio: report error if pending IRQ but none function bits

2011-06-07 Thread Per Forlin
On 1 June 2011 16:30, Nicolas Pitre wrote: > On Tue, 31 May 2011, Per Forlin wrote: > >> Return error in case of pending IRQ but none functions bits >> in CCCR_INTx is set. >> >> Signed-off-by: Per Forlin >> --- >>  drivers/mmc/core/sdio_irq.c |    5 +++

Re: [PATCH v2 1/2] sdio: add quirk to handle pending IRQ in case of none CCCR_INTx bits

2011-06-06 Thread Per Forlin
On 1 June 2011 23:36, Troy Kisky wrote: > On 6/1/2011 1:48 AM, Per Forlin wrote: >> From: Per Forlin > >> diff --git a/include/linux/mmc/card.h b/include/linux/mmc/card.h >> index 7b4fd7b..852021c 100644 >> --- a/include/linux/mmc/card.h >> +++ b/include/

Re: [PATCH v2 0/2] sdio: add quirk for spurious SDIO IRQ

2011-06-06 Thread Per Forlin
On 1 June 2011 17:59, Nicolas Pitre wrote: > On Wed, 1 Jun 2011, Per Forlin wrote: > >> From: Per Forlin >> >> Daniel Drake reported an issue in the libertas sdio client that was >> triggered by the sdio_single_irq functionality. His SDIO device seems to >>

[PATCH v2 2/2] sdio: report error if pending IRQ but none CCCR_INTx bits

2011-06-01 Thread Per Forlin
From: Per Forlin Return error in case of pending IRQ but none functions bits in CCCR_INTx are set. Signed-off-by: Per Forlin --- drivers/mmc/core/sdio_irq.c |5 + 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/drivers/mmc/core/sdio_irq.c b/drivers/mmc/core/sdio_irq.c

[PATCH v2 0/2] sdio: add quirk for spurious SDIO IRQ

2011-06-01 Thread Per Forlin
From: Per Forlin Daniel Drake reported an issue in the libertas sdio client that was triggered by the sdio_single_irq functionality. His SDIO device seems to raise an interrupt even though there are no bits set in the CCCR_INTx register. This behaviour is not supported by the sdio_single_irq

[PATCH v2 1/2] sdio: add quirk to handle pending IRQ in case of none CCCR_INTx bits

2011-06-01 Thread Per Forlin
From: Per Forlin Add quirk MMC_QUIRK_SDIO_IRQ_CCCR_INTX_0 to handle SDIO device that may have pending IRQ when none bits are set in CCCR_INTx. This IRQ issue was identified in the libertas sdio driver where the SDIO device seems to raise an interrupt even if there were none function bits in

Re: [PATCH 1/2] sdio: add function to enable and disable sdio_single_irq optimization

2011-06-01 Thread Per Forlin
On 1 June 2011 09:30, Linus Walleij wrote: > 2011/5/31 Per Forlin : > >> +/** >> + *     sdio_single_irq_enable - enable or disable SDIO single IRQ function >> + *     @card: card to enable SDIO single irq >> + *     @value: true to enable SDIO single

[PATCH 2/2] sdio: report error if pending IRQ but none function bits

2011-05-31 Thread Per Forlin
Return error in case of pending IRQ but none functions bits in CCCR_INTx is set. Signed-off-by: Per Forlin --- drivers/mmc/core/sdio_irq.c |5 + 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/drivers/mmc/core/sdio_irq.c b/drivers/mmc/core/sdio_irq.c index 2f81ddc

[PATCH 1/2] sdio: add function to enable and disable sdio_single_irq optimization

2011-05-31 Thread Per Forlin
Make sdio single irq run time configurable, default is disable. This is due to an issue in libertas where the SDIO device seems to raise interrupt even if there are none function bits in CCCR_INTx set. This behaviour is not defined by the SDIO spec. Signed-off-by: Per Forlin --- drivers/mmc

[PATCH 0/2] sdio: make sdio_single_irq optional due to suprious IRQ

2011-05-31 Thread Per Forlin
configurable and also report a warning if an SDIO interrupt is raised but none CCCR_INTx bits are set. Per Forlin (2): sdio: add function to enable and disable sdio_single_irq optimization sdio: report error if pending IRQ but none function bits drivers/mmc/core/sdio_irq.c | 22

Re: SDIO single IRQ optimization breaks libertas

2011-05-31 Thread Per Forlin
On 30 May 2011 16:38, Nicolas Pitre wrote: > On Mon, 30 May 2011, Per Forlin wrote: > >> Hi Daniel, >> >> > >> > On 29 May 2011 15:26, Daniel Drake laptop.org> wrote: >> > > Hi, >> > > >> > > The following commit in 2.6.

Re: SDIO single IRQ optimization breaks libertas

2011-05-30 Thread Per Forlin
Hi Daniel, > > On 29 May 2011 15:26, Daniel Drake laptop.org> wrote: > > Hi, > > > > The following commit in 2.6.39 causes instant death for libertas_sdio > > when it receives its first interrupt during initialization: > > > > commit 06e8935febe687e2a561707d4c7ca4245d261dbe > > The crash happen

[PATCH v4 02/12] omap_hsmmc: use original sg_len for dma_unmap_sg

2011-05-25 Thread Per Forlin
Don't use the returned sg_len from dma_map_sg() as inparameter to dma_unmap_sg(). Use the original sg_len for both dma_map_sg and dma_unmap_sg. Signed-off-by: Per Forlin --- drivers/mmc/host/omap_hsmmc.c |5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/driver

[PATCH v4 03/12] omap_hsmmc: add support for pre_req and post_req

2011-05-25 Thread Per Forlin
pre_req() runs dma_map_sg(), post_req() runs dma_unmap_sg. If not calling pre_req() before omap_hsmmc_request() dma_map_sg will be issued before starting the transfer. It is optional to use pre_req(). If issuing pre_req() post_req() must be to be called as well. Signed-off-by: Per Forlin

[PATCH v4 05/12] mmc: mmc_test: add debugfs file to list all tests

2011-05-25 Thread Per Forlin
Add a debugfs file "testlist" to print all available tests Signed-off-by: Per Forlin --- drivers/mmc/card/mmc_test.c | 39 ++- 1 files changed, 38 insertions(+), 1 deletions(-) diff --git a/drivers/mmc/card/mmc_test.c b/drivers/mmc/card/mmc_te

[PATCH v4 08/12] mmc: add a block request prepare function

2011-05-25 Thread Per Forlin
Break out code from mmc_blk_issue_rw_rq to create a block request prepare function. This doesn't change any functionallity. This helps when handling more than one active block request. Signed-off-by: Per Forlin --- drivers/mmc/card/block.c | 170 ---

[PATCH v4 10/12] mmc: add a second mmc queue request member

2011-05-25 Thread Per Forlin
Add an additional mmc queue request instance to make way for two active block requests. One request may be active while the other request is being prepared. Signed-off-by: Per Forlin --- drivers/mmc/card/queue.c | 44 ++-- drivers/mmc/card/queue.h

[PATCH v4 12/12] mmc: add handling for two parallel block requests in issue_rw_rq

2011-05-25 Thread Per Forlin
isuue_rw_rq(), then it waits for the active request to complete before pushing it to the host. When to mmc-queue is empty it will call isuue_rw_rq() with req=NULL to finish off the active request without starting a new request. Signed-off-by: Per Forlin --- drivers/mmc/card/block.c | 118

[PATCH v4 11/12] mmc: test: add random fault injection in core.c

2011-05-25 Thread Per Forlin
This simple fault injection proved to be very useful to test the error handling in the block.c rw_rq(). It may still be useful to test if the host driver handle pre_req() and post_req() correctly in case of errors. Signed-off-by: Per Forlin --- drivers/mmc/core/core.c| 54

[PATCH v4 09/12] mmc: move error code in mmc_block_issue_rw_rq to a separate function.

2011-05-25 Thread Per Forlin
Break out code without functional changes. This simplifies the code and makes way for handle two parallel request. Signed-off-by: Per Forlin --- drivers/mmc/card/block.c | 226 +++--- 1 files changed, 132 insertions(+), 94 deletions(-) diff --git a

[PATCH v4 07/12] mmc: add member in mmc queue struct to hold request data

2011-05-25 Thread Per Forlin
. This lies the ground for using multiple active request for one mmc queue. Signed-off-by: Per Forlin --- drivers/mmc/card/block.c | 106 ++ drivers/mmc/card/queue.c | 129 -- drivers/mmc/card/queue.h | 30

[PATCH v4 06/12] mmc: mmc_test: add test for none blocking transfers

2011-05-25 Thread Per Forlin
order to run the none blocking test cases. Signed-off-by: Per Forlin --- drivers/mmc/card/mmc_test.c | 322 +-- 1 files changed, 313 insertions(+), 9 deletions(-) diff --git a/drivers/mmc/card/mmc_test.c b/drivers/mmc/card/mmc_test.c index 1853ebf..4b9cb5f

[PATCH v4 01/12] mmc: add none blocking mmc request function

2011-05-25 Thread Per Forlin
before ending the block request and handing over the buffer to the block layer. Add a host-private member in mmc_data to be used by pre_req to mark the data. The host driver will then check this mark to see if the data is prepared or not. Signed-off-by: Per Forlin --- drivers/mmc/core/core.c

[PATCH v4 04/12] mmci: implement pre_req() and post_req()

2011-05-25 Thread Per Forlin
mmci. Signed-off-by: Per Forlin --- drivers/mmc/host/mmci.c | 146 ++ drivers/mmc/host/mmci.h |8 +++ 2 files changed, 141 insertions(+), 13 deletions(-) diff --git a/drivers/mmc/host/mmci.c b/drivers/mmc/host/mmci.c index b4a7e4f..985c77d 100644

[PATCH v4 00/12] mmc: use nonblock mmc requests to minimize latency

2011-05-25 Thread Per Forlin
handling to core.c. This simplifies the interface from 4 public functions to 1. This also gives access for SDIO to use the same functionallity, even though the function is not tuned for the SDIO execution flow yet. Per Forlin (12): mmc: add none blocking mmc request function omap_hsmmc

[PATCH v4] sdio: optimized SDIO IRQ handling for single irq

2011-05-11 Thread Per Forlin
Optimize performance for single irq Changes since v2. * Rebase on mmc-next, change of line numbers no code changes. Stefan Nilsson XK (1): sdio: optimized SDIO IRQ handling for single irq drivers/mmc/core/sdio_irq.c | 33 - include/linux/mmc/card.h|1

[PATCH v4] sdio: optimized SDIO IRQ handling for single irq

2011-05-11 Thread Per Forlin
From: Stefan Nilsson XK If there is only 1 function interrupt registered it is possible to improve performance by directly calling the irq handler and avoiding the overhead of reading the CCCR registers. Signed-off-by: Per Forlin Acked-by: Ulf Hansson Reviewed-by: Nicolas Pitre --- drivers

[PATCH v5] sdio: optimized SDIO IRQ handling for single irq

2011-05-11 Thread Per Forlin
Optimize performance for single irq Changes since v4. * Proper rebase on mmc-next. In previous patch, a spelling-patch in sdio_irq was accidentally rebased on top as well causing merge conflict. Stefan Nilsson XK (1): sdio: optimized SDIO IRQ handling for single irq drivers/mmc/core/sdio_

[PATCH v5] sdio: optimized SDIO IRQ handling for single irq

2011-05-11 Thread Per Forlin
From: Stefan Nilsson XK If there is only 1 function interrupt registered it is possible to improve performance by directly calling the irq handler and avoiding the overhead of reading the CCCR registers. Signed-off-by: Per Forlin Acked-by: Ulf Hansson Reviewed-by: Nicolas Pitre --- drivers

Re: [PATCH v3 00/12] mmc: use nonblock mmc requests to minimize latency

2011-05-09 Thread Per Forlin
ht places. DMA iop-dma.c and imx-sdma.c, MMC: sdhci.c. > I believe ADMA will do large transfers.  Another data point. > > Philip Thanks, Per > > On May 7, 2011, at 12:14 PM, Per Forlin wrote: > >> How significant is the cache maintenance over head? >> It depends, the eMM

Re: mmc blkqueue is empty even if there are pending reads in do_generic_file_read()

2011-05-08 Thread Per Forlin
On 8 May 2011 17:09, Arnd Bergmann wrote: > On Saturday 07 May 2011, Per Forlin wrote: >> > The mmc queue never runs empty until end of transfer.. The requests >> > are 128 blocks (64k limit set in mmc host driver) compared to 256 >> > blocks before. This will not

Re: [PATCH v3 02/12] mmc: mmc_test: add debugfs file to list all tests

2011-05-08 Thread Per Forlin
On 8 May 2011 00:18, Andy Shevchenko wrote: > On Sat, May 7, 2011 at 10:14 PM, Per Forlin wrote: >> Add a debugfs file "testlist" to print all available tests >> >> Signed-off-by: Per Forlin >> --- >>  drivers/mmc/card/mmc_test.c |   30 +++

[PATCH v3 07/12] mmc: add a second mmc queue request member

2011-05-07 Thread Per Forlin
Add an additional mmc queue request instance to make way for two active block requests. One request may be active while the other request is being prepared. Signed-off-by: Per Forlin --- drivers/mmc/card/queue.c | 44 ++-- drivers/mmc/card/queue.h

[PATCH v3 06/12] mmc: move error code in mmc_block_issue_rw_rq to a separate function.

2011-05-07 Thread Per Forlin
Break out code without functional changes. This simplifies the code and makes way for handle two parallel request. Signed-off-by: Per Forlin --- drivers/mmc/card/block.c | 225 +++--- 1 files changed, 132 insertions(+), 93 deletions(-) diff --git a

[PATCH v3 05/12] mmc: add a block request prepare function

2011-05-07 Thread Per Forlin
Break out code from mmc_blk_issue_rw_rq to create a block request prepare function. This doesn't change any functionallity. This helps when handling more than one active block request. Signed-off-by: Per Forlin --- drivers/mmc/card/block.c | 170 ---

[PATCH v3 03/12] mmc: mmc_test: add test for none blocking transfers

2011-05-07 Thread Per Forlin
order to run the none blocking test cases. Signed-off-by: Per Forlin --- drivers/mmc/card/mmc_test.c | 310 +- 1 files changed, 302 insertions(+), 8 deletions(-) diff --git a/drivers/mmc/card/mmc_test.c b/drivers/mmc/card/mmc_test.c index c1c3c5a..a267253

[PATCH v3 02/12] mmc: mmc_test: add debugfs file to list all tests

2011-05-07 Thread Per Forlin
Add a debugfs file "testlist" to print all available tests Signed-off-by: Per Forlin --- drivers/mmc/card/mmc_test.c | 30 ++ 1 files changed, 30 insertions(+), 0 deletions(-) diff --git a/drivers/mmc/card/mmc_test.c b/drivers/mmc/card/mmc_test.c ind

[PATCH v3 01/12] mmc: add none blocking mmc request function

2011-05-07 Thread Per Forlin
check this mark to see if the data is prepared or not. Signed-off-by: Per Forlin --- drivers/mmc/core/core.c | 78 -- include/linux/mmc/core.h |9 +- include/linux/mmc/host.h |9 + 3 files changed, 85 insertions(+), 11 deletions(-) diff

[PATCH v3 08/12] mmc: add handling for two parallel block requests in issue_rw_rq

2011-05-07 Thread Per Forlin
isuue_rw_rq(), then it waits for the active request to complete before pushing it to the host. When to mmc-queue is empty it will call isuue_rw_rq() with req=NULL to finish off the active request without starting a new request. Signed-off-by: Per Forlin --- drivers/mmc/card/block.c | 157

[PATCH v3 10/12] omap_hsmmc: use original sg_len for dma_unmap_sg

2011-05-07 Thread Per Forlin
Don't use the returned sg_len from dma_map_sg() as inparameter to dma_unmap_sg(). Use the original sg_len for both dma_map_sg and dma_unmap_sg. Signed-off-by: Per Forlin --- drivers/mmc/host/omap_hsmmc.c |5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/driver

[PATCH v3 12/12] mmci: implement pre_req() and post_req()

2011-05-07 Thread Per Forlin
mmci. Signed-off-by: Per Forlin --- drivers/mmc/host/mmci.c | 146 ++ drivers/mmc/host/mmci.h |8 +++ 2 files changed, 141 insertions(+), 13 deletions(-) diff --git a/drivers/mmc/host/mmci.c b/drivers/mmc/host/mmci.c index b4a7e4f..985c77d 100644

[PATCH v3 11/12] omap_hsmmc: add support for pre_req and post_req

2011-05-07 Thread Per Forlin
pre_req() runs dma_map_sg() post_req() runs dma_unmap_sg. If not calling pre_req() before omap_hsmmc_request(), request() will prepare the cache just like it did it before. It is optional to use pre_req() and post_req(). Signed-off-by: Per Forlin --- drivers/mmc/host/omap_hsmmc.c | 87

[PATCH v3 09/12] mmc: test: add random fault injection in core.c

2011-05-07 Thread Per Forlin
This simple fault injection proved to be very useful to test the error handling in the block.c rw_rq(). It may still be useful to test if the host driver handle pre_req() and post_req() correctly in case of errors. Signed-off-by: Per Forlin --- drivers/mmc/core/core.c| 54

[PATCH v3 04/12] mmc: add member in mmc queue struct to hold request data

2011-05-07 Thread Per Forlin
. This lies the ground for using multiple active request for one mmc queue. Signed-off-by: Per Forlin --- drivers/mmc/card/block.c | 105 + drivers/mmc/card/queue.c | 129 -- drivers/mmc/card/queue.h | 30

[PATCH v3 00/12] mmc: use nonblock mmc requests to minimize latency

2011-05-07 Thread Per Forlin
and block.c * Simplify max transfer size in mmc_test * set TASK_RUNNING in queue.c before issue_req() Per Forlin (12): mmc: add none blocking mmc request function mmc: mmc_test: add debugfs file to list all tests mmc: mmc_test: add test for none blocking transfers mmc: add member in mmc

Re: mmc blkqueue is empty even if there are pending reads in do_generic_file_read()

2011-05-07 Thread Per Forlin
On 4 May 2011 21:13, Per Forlin wrote: > On 3 May 2011 22:02, Arnd Bergmann wrote: >> On Tuesday 03 May 2011 20:54:43 Per Forlin wrote: >>> >> page_not_up_to_date: >>> >> /* Get exclusive access to the page ... */ >>> >> error = l

[PATCH v3] sdio: optimized SDIO IRQ handling for single irq

2011-05-05 Thread Per Forlin
From: Stefan Nilsson XK If there is only 1 function interrupt registered it is possible to improve performance by directly calling the irq handler and avoiding the overhead of reading the CCCR registers. Signed-off-by: Per Forlin Acked-by: Ulf Hansson Reviewed-by: Nicolas Pitre --- drivers

[PATCH v3] sdio: optimized SDIO IRQ handling for single irq

2011-05-05 Thread Per Forlin
Optimize performance for single irq Changes since v2. * Clarify comment in process_sdio_pending_irqs * Simplify sdio_single_irq if-condition Stefan Nilsson XK (1): sdio: optimized SDIO IRQ handling for single irq drivers/mmc/core/sdio_irq.c | 33 - include/

Re: [PATCH v2 1/4]enable background operations for supported eMMC card

2011-05-05 Thread Per Forlin
On Mon, May 2, 2011 at 9:53 PM, Per Forlin wrote: > On Fri, Dec 3, 2010 at 1:13 PM, Chuanxiao Dong > wrote: >> From 984adc755cf2f7966a89e510a50f085e314fe347 Mon Sep 17 00:00:00 2001 >> From: Chuanxiao Dong >> Date: Mon, 22 Nov 2010 16:31:12 +0800 >> Subject: [PATC

Re: [PATCH v2] sdio: optimized SDIO IRQ handling for single irq

2011-05-04 Thread Per Forlin
On 4 May 2011 19:34, Nicolas Pitre wrote: > On Wed, 4 May 2011, Per Forlin wrote: > >> From: Stefan Nilsson XK >> >> If there is only 1 function registered it is possible to >> improve performance by directly calling the irq handler >> and avoiding the ov

Re: mmc blkqueue is empty even if there are pending reads in do_generic_file_read()

2011-05-04 Thread Per Forlin
On 3 May 2011 22:02, Arnd Bergmann wrote: > On Tuesday 03 May 2011 20:54:43 Per Forlin wrote: >> >> page_not_up_to_date: >> >> /* Get exclusive access to the page ... */ >> >> error = lock_page_killable(page); >> > I looked at the code in do_ge

Re: [PATCH v2] sdio: optimized SDIO IRQ handling for single irq

2011-05-04 Thread Per Forlin
2011/5/4 Michał Mirosław : > 2011/5/4 Per Forlin : >> From: Stefan Nilsson XK >> >> If there is only 1 function registered it is possible to >> improve performance by directly calling the irq handler >> and avoiding the overhead of reading the CCCR registers. >

[PATCH v2] sdio: optimized SDIO IRQ handling for single irq

2011-05-04 Thread Per Forlin
From: Stefan Nilsson XK If there is only 1 function registered it is possible to improve performance by directly calling the irq handler and avoiding the overhead of reading the CCCR registers. Signed-off-by: Per Forlin Acked-by: Ulf Hansson --- drivers/mmc/core/sdio_irq.c | 30

[PATCH v2] sdio: optimized SDIO IRQ handling for single irq

2011-05-04 Thread Per Forlin
Optimize performance for single irq Changes since v1. * Add member to hold sdio_single_irq function in mmc_card and minimize new code in process_sdio_pending_irqs * Clarify commit message Stefan Nilsson XK (1): sdio: optimized SDIO IRQ handling for single irq drivers/mmc/core/sdio_irq.c

Re: [PATCH] sdio: optimized SDIO IRQ handling for single function

2011-05-04 Thread Per Forlin
On 4 May 2011 17:20, Nicolas Pitre wrote: > On Wed, 4 May 2011, Per Forlin wrote: > >> On 4 May 2011 05:40, Nicolas Pitre wrote: >> > On Tue, 3 May 2011, Per Forlin wrote: >> > >> >> From: Stefan Nilsson XK >> >> >> >> I

Re: [PATCH] sdio: optimized SDIO IRQ handling for single function

2011-05-04 Thread Per Forlin
On 4 May 2011 05:40, Nicolas Pitre wrote: > On Tue, 3 May 2011, Per Forlin wrote: > >> From: Stefan Nilsson XK >> >> If there is only 1 function registered, and IRQ:s are supported and >> currently enabled, call the callback handler directly >> without check

[PATCH resend] sdio: optimized SDIO IRQ handling for single function

2011-05-03 Thread Per Forlin
From: Stefan Nilsson XK If there is only 1 function registered it is possible to improve performance by avoiding the overhead of reading the CCCR registers and directly call the function handler. Signed-off-by: Stefan Nilsson XK Signed-off-by: Per Forlin --- drivers/mmc/core/sdio_irq.c

Re: mmc blkqueue is empty even if there are pending reads in do_generic_file_read()

2011-05-03 Thread Per Forlin
On 3 May 2011 22:02, Arnd Bergmann wrote: > On Tuesday 03 May 2011 20:54:43 Per Forlin wrote: >> >> page_not_up_to_date: >> >> /* Get exclusive access to the page ... */ >> >> error = lock_page_killable(page); >> > I looked at the code in do_ge

[PATCH] sdio: optimized SDIO IRQ handling for single function

2011-05-03 Thread Per Forlin
From: Stefan Nilsson XK If there is only 1 function registered, and IRQ:s are supported and currently enabled, call the callback handler directly without checking the CCCR registers. Signed-off-by: Stefan Nilsson XK Signed-off-by: Per Forlin --- drivers/mmc/core/sdio_irq.c | 14

Re: mmc blkqueue is empty even if there are pending reads in do_generic_file_read()

2011-05-03 Thread Per Forlin
On 3 May 2011 15:16, Arnd Bergmann wrote: > On Thursday 28 April 2011, Per Forlin wrote: > >> For reads on the other hand it look like this >> root@(none):/ dd if=/dev/mmcblk0 of=/dev/null bs=4k count=256 >> 256+0 records in >> 256+0 records out >> root@(non

Re: [PATCH v2 1/4]enable background operations for supported eMMC card

2011-05-02 Thread Per Forlin
On Fri, Dec 3, 2010 at 1:13 PM, Chuanxiao Dong wrote: > From 984adc755cf2f7966a89e510a50f085e314fe347 Mon Sep 17 00:00:00 2001 > From: Chuanxiao Dong > Date: Mon, 22 Nov 2010 16:31:12 +0800 > Subject: [PATCH 1/4] mmc: Enabled background operations feature if eMMC card > supports > > Background o

mmc blkqueue is empty even if there are pending reads in do_generic_file_read()

2011-04-28 Thread Per Forlin
Hi, I am working on minimizing the latency between two block requests in the mmc framework. The approach is simple. If there are more than one request in the block queue the 2nd request will be prepared while the 1st request is being transfered. When the 1 st request is completed the 2nd request w

mmc blkqueue is empty even if there are pending reads in do_generic_file_read()

2011-04-28 Thread Per Forlin
Hi, I am working on minimizing the latency between two block requests in the mmc framework. The approach is simple. If there are more than one request in the block queue the 2nd request will be prepared while the 1st request is being transfered. When the 1 st request is completed the 2nd request w

Re: [PATCH] mmc: mxs-mmc: add support for pre_req and post_req

2011-04-28 Thread Per Forlin
On 21 April 2011 11:47, Per Forlin wrote: > On 21 April 2011 11:11, Shawn Guo wrote: >> On Thu, Apr 21, 2011 at 10:46:18AM +0200, Per Forlin wrote: >>> On 21 April 2011 08:29, Shawn Guo wrote: >>> > On Wed, Apr 20, 2011 at 05:30:22PM +0200, Per Forlin wrote: >

Re: [PATCH v2 01/12] mmc: add none blocking mmc request function

2011-04-26 Thread Per Forlin
On 26 April 2011 15:29, David Vrabel wrote: > On 20/04/11 08:17, Per Forlin wrote: >> >>> Using a MMC request queue has other benefits -- it allows multiple users >>> without having to claim/release the host.  This would be useful for >>> (especially multi-func

Re: [PATCH] mmc: sdhci: add support for pre_req and post_req

2011-04-26 Thread Per Forlin
e improvement of performance with SDMA) >> >> I want to know how you think about this.. >> > It's still an open question if pre_req and post_req were correctly > added, even you have seen improvement of SDMA case with IOzone.  I > would leave the question to Per Forlin.

Re: [PATCH] mmc: mxs-mmc: add support for pre_req and post_req

2011-04-21 Thread Per Forlin
On 21 April 2011 11:47, Per Forlin wrote: > On 21 April 2011 11:11, Shawn Guo wrote: >> On Thu, Apr 21, 2011 at 10:46:18AM +0200, Per Forlin wrote: >>> On 21 April 2011 08:29, Shawn Guo wrote: >>> > On Wed, Apr 20, 2011 at 05:30:22PM +0200, Per Forlin wrote: >

Re: [PATCH] mmc: mxs-mmc: add support for pre_req and post_req

2011-04-21 Thread Per Forlin
On 21 April 2011 11:11, Shawn Guo wrote: > On Thu, Apr 21, 2011 at 10:46:18AM +0200, Per Forlin wrote: >> On 21 April 2011 08:29, Shawn Guo wrote: >> > On Wed, Apr 20, 2011 at 05:30:22PM +0200, Per Forlin wrote: >> > [...] >> >> Remove dma_map and dma_

Re: [PATCH] mmc: mxs-mmc: add support for pre_req and post_req

2011-04-21 Thread Per Forlin
On 21 April 2011 08:25, Shawn Guo wrote: > On Wed, Apr 20, 2011 at 05:22:34PM +0200, Per Forlin wrote: > [...] >> > Do you have omap_hsmmc and mmci mmc_test result data to share? >> > >> I keep the here: >> https://wiki.linaro.org/WorkingGroups/Kernel/Specs/St

Re: [PATCH] mmc: mxs-mmc: add support for pre_req and post_req

2011-04-21 Thread Per Forlin
On 21 April 2011 08:29, Shawn Guo wrote: > On Wed, Apr 20, 2011 at 05:30:22PM +0200, Per Forlin wrote: > [...] >> Remove dma_map and dma_unmap from your host driver and run the tests >> (obviously nonblocking and blocking will have the same results). If >> there is still

Re: [PATCH] mmc: mxs-mmc: add support for pre_req and post_req

2011-04-20 Thread Per Forlin
On 20 April 2011 16:01, Shawn Guo wrote: > On Wed, Apr 20, 2011 at 10:01:22AM +0200, Per Forlin wrote: >> On 17 April 2011 18:48, Shawn Guo wrote: >> > On Mon, Apr 18, 2011 at 12:33:30AM +0800, Shawn Guo wrote: >> >> pre_req() runs dma_map_sg() post_req() runs dma_

Re: [PATCH] mmc: mxs-mmc: add support for pre_req and post_req

2011-04-20 Thread Per Forlin
On 20 April 2011 16:01, Shawn Guo wrote: > On Wed, Apr 20, 2011 at 10:01:22AM +0200, Per Forlin wrote: >> On 17 April 2011 18:48, Shawn Guo wrote: >> > On Mon, Apr 18, 2011 at 12:33:30AM +0800, Shawn Guo wrote: >> >> pre_req() runs dma_map_sg() post_req() runs dma_

<    1   2   3   4   >