fe100322c9f9ab6ad30f5f66b989765fd305da34
[openwrt.git] / target / linux / brcm2708 / patches-4.4 / 0032-Add-blk_pos-parameter-to-mmc-multi_io_quirk-callback.patch
1 From 462591cf98f15614620667e93b7f8bc0da6e86da Mon Sep 17 00:00:00 2001
2 From: Phil Elwell <phil@raspberrypi.org>
3 Date: Fri, 17 Apr 2015 19:30:22 +0100
4 Subject: [PATCH 032/170] Add blk_pos parameter to mmc multi_io_quirk callback
5
6 ---
7  drivers/mmc/card/block.c          | 1 +
8  drivers/mmc/host/omap_hsmmc.c     | 4 +++-
9  drivers/mmc/host/sh_mobile_sdhi.c | 4 +++-
10  drivers/mmc/host/tmio_mmc_pio.c   | 4 +++-
11  include/linux/mmc/host.h          | 4 +++-
12  5 files changed, 13 insertions(+), 4 deletions(-)
13
14 --- a/drivers/mmc/card/block.c
15 +++ b/drivers/mmc/card/block.c
16 @@ -1510,6 +1510,7 @@ static void mmc_blk_rw_rq_prep(struct mm
17                         brq->data.blocks = card->host->ops->multi_io_quirk(card,
18                                                 (rq_data_dir(req) == READ) ?
19                                                 MMC_DATA_READ : MMC_DATA_WRITE,
20 +                                               blk_rq_pos(req),
21                                                 brq->data.blocks);
22         }
23  
24 --- a/drivers/mmc/host/omap_hsmmc.c
25 +++ b/drivers/mmc/host/omap_hsmmc.c
26 @@ -1832,7 +1832,9 @@ static void omap_hsmmc_conf_bus_power(st
27  }
28  
29  static int omap_hsmmc_multi_io_quirk(struct mmc_card *card,
30 -                                    unsigned int direction, int blk_size)
31 +                                    unsigned int direction,
32 +                                    u32 blk_pos,
33 +                                    int blk_size)
34  {
35         /* This controller can't do multiblock reads due to hw bugs */
36         if (direction == MMC_DATA_READ)
37 --- a/drivers/mmc/host/sh_mobile_sdhi.c
38 +++ b/drivers/mmc/host/sh_mobile_sdhi.c
39 @@ -170,7 +170,9 @@ static int sh_mobile_sdhi_write16_hook(s
40  }
41  
42  static int sh_mobile_sdhi_multi_io_quirk(struct mmc_card *card,
43 -                                        unsigned int direction, int blk_size)
44 +                                        unsigned int direction,
45 +                                        u32 blk_pos,
46 +                                        int blk_size)
47  {
48         /*
49          * In Renesas controllers, when performing a
50 --- a/drivers/mmc/host/tmio_mmc_pio.c
51 +++ b/drivers/mmc/host/tmio_mmc_pio.c
52 @@ -1003,7 +1003,9 @@ static int tmio_mmc_get_ro(struct mmc_ho
53  }
54  
55  static int tmio_multi_io_quirk(struct mmc_card *card,
56 -                              unsigned int direction, int blk_size)
57 +                              unsigned int direction,
58 +                              u32 blk_pos,
59 +                              int blk_size)
60  {
61         struct tmio_mmc_host *host = mmc_priv(card->host);
62  
63 --- a/include/linux/mmc/host.h
64 +++ b/include/linux/mmc/host.h
65 @@ -143,7 +143,9 @@ struct mmc_host_ops {
66          * I/O. Returns the number of supported blocks for the request.
67          */
68         int     (*multi_io_quirk)(struct mmc_card *card,
69 -                                 unsigned int direction, int blk_size);
70 +                                 unsigned int direction,
71 +                                 u32 blk_pos,
72 +                                 int blk_size);
73  };
74  
75  struct mmc_card;