0146-bcm2835-sdhost-Restore-ATOMIC-flag-to-PIO-sg-mapping.patch 1009 B

1234567891011121314151617181920212223242526272829303132
  1. From 681233bfac9474a1defb720fddf90a3087cd1ef4 Mon Sep 17 00:00:00 2001
  2. From: Phil Elwell <phil@raspberrypi.org>
  3. Date: Mon, 15 Feb 2016 10:00:27 +0000
  4. Subject: [PATCH 146/381] bcm2835-sdhost: Restore ATOMIC flag to PIO sg mapping
  5. Allocation problems have been seen in a wireless driver, and
  6. this is the only change which might have been responsible.
  7. ---
  8. drivers/mmc/host/bcm2835-sdhost.c | 7 +++----
  9. 1 file changed, 3 insertions(+), 4 deletions(-)
  10. --- a/drivers/mmc/host/bcm2835-sdhost.c
  11. +++ b/drivers/mmc/host/bcm2835-sdhost.c
  12. @@ -874,15 +874,14 @@ static void bcm2835_sdhost_prepare_data(
  13. host->flush_fifo = 0;
  14. host->data->bytes_xfered = 0;
  15. -
  16. if (!host->dma_desc) {
  17. /* Use PIO */
  18. - int flags;
  19. + int flags = SG_MITER_ATOMIC;
  20. if (data->flags & MMC_DATA_READ)
  21. - flags = SG_MITER_TO_SG;
  22. + flags |= SG_MITER_TO_SG;
  23. else
  24. - flags = SG_MITER_FROM_SG;
  25. + flags |= SG_MITER_FROM_SG;
  26. sg_miter_start(&host->sg_miter, data->sg, data->sg_len, flags);
  27. host->blocks = data->blocks;
  28. }