Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'mmc-v4.11-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc

Pull MMC fixes from Ulf Hansson:
"MMC core:

- kmalloc sdio scratch buffer to make it DMA-friendly

MMC host:

- dw_mmc: Fix behaviour for SDIO IRQs when runtime PM is used

- sdhci-esdhc-imx: Correct pad I/O drive strength for UHS-DDR50
cards"

* tag 'mmc-v4.11-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc:
mmc: sdhci-esdhc-imx: increase the pad I/O drive strength for DDR50 card
mmc: dw_mmc: Don't allow Runtime PM for SDIO cards
mmc: sdio: fix alignment issue in struct sdio_func

+22 -4
+11 -1
drivers/mmc/core/sdio_bus.c
··· 267 267 sdio_free_func_cis(func); 268 268 269 269 kfree(func->info); 270 - 270 + kfree(func->tmpbuf); 271 271 kfree(func); 272 272 } 273 273 ··· 281 281 func = kzalloc(sizeof(struct sdio_func), GFP_KERNEL); 282 282 if (!func) 283 283 return ERR_PTR(-ENOMEM); 284 + 285 + /* 286 + * allocate buffer separately to make sure it's properly aligned for 287 + * DMA usage (incl. 64 bit DMA) 288 + */ 289 + func->tmpbuf = kmalloc(4, GFP_KERNEL); 290 + if (!func->tmpbuf) { 291 + kfree(func); 292 + return ERR_PTR(-ENOMEM); 293 + } 284 294 285 295 func->card = card; 286 296
+9 -2
drivers/mmc/host/dw_mmc.c
··· 22 22 #include <linux/ioport.h> 23 23 #include <linux/module.h> 24 24 #include <linux/platform_device.h> 25 + #include <linux/pm_runtime.h> 25 26 #include <linux/seq_file.h> 26 27 #include <linux/slab.h> 27 28 #include <linux/stat.h> ··· 1622 1621 1623 1622 if (card->type == MMC_TYPE_SDIO || 1624 1623 card->type == MMC_TYPE_SD_COMBO) { 1625 - set_bit(DW_MMC_CARD_NO_LOW_PWR, &slot->flags); 1624 + if (!test_bit(DW_MMC_CARD_NO_LOW_PWR, &slot->flags)) { 1625 + pm_runtime_get_noresume(mmc->parent); 1626 + set_bit(DW_MMC_CARD_NO_LOW_PWR, &slot->flags); 1627 + } 1626 1628 clk_en_a = clk_en_a_old & ~clken_low_pwr; 1627 1629 } else { 1628 - clear_bit(DW_MMC_CARD_NO_LOW_PWR, &slot->flags); 1630 + if (test_bit(DW_MMC_CARD_NO_LOW_PWR, &slot->flags)) { 1631 + pm_runtime_put_noidle(mmc->parent); 1632 + clear_bit(DW_MMC_CARD_NO_LOW_PWR, &slot->flags); 1633 + } 1629 1634 clk_en_a = clk_en_a_old | clken_low_pwr; 1630 1635 } 1631 1636
+1
drivers/mmc/host/sdhci-esdhc-imx.c
··· 830 830 831 831 switch (uhs) { 832 832 case MMC_TIMING_UHS_SDR50: 833 + case MMC_TIMING_UHS_DDR50: 833 834 pinctrl = imx_data->pins_100mhz; 834 835 break; 835 836 case MMC_TIMING_UHS_SDR104:
+1 -1
include/linux/mmc/sdio_func.h
··· 53 53 unsigned int state; /* function state */ 54 54 #define SDIO_STATE_PRESENT (1<<0) /* present in sysfs */ 55 55 56 - u8 tmpbuf[4]; /* DMA:able scratch buffer */ 56 + u8 *tmpbuf; /* DMA:able scratch buffer */ 57 57 58 58 unsigned num_info; /* number of info strings */ 59 59 const char **info; /* info strings */