Re: [PATCH] mmc: mmci: Fixup error handling for dma

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Linus Walleij wrote:
On Wed, Nov 30, 2011 at 11:21 PM, Russell King - ARM Linux
<linux@xxxxxxxxxxxxxxxx> wrote:

      if (!cmd->data || cmd->error) {
-             if (host->data)
+             if (host->data) {
+                     /* Terminate the DMA transfer */
+                     if (dma_inprogress(host))
+                             mmci_dma_data_error(host);
Doesn't this leave the DMA buffers mapped?

Correct, but it will be handled in post_request function.


Yep it needs an mmci_dma_unmap() call too AFAICT,
Ulf will you update?

Actually it's needs only dma_unmap_sg, but as stated this should be handled in mmci_post_request.

By, the way - I spoke to Per Förlin who implemented the pre_request and post_request functions; we will soon push some clean-up patches for improved error handling and how to manage the cookie better. Right now it is kind of hard to follow the error path, I think. We hope this shall be improved then.

Although it should have nothing to do with this patch directly, since this is a bugfix only.

BR
Ulf Hansson
--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux