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 branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/cjb/mmc

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/cjb/mmc:
mmc: queue: bring discard_granularity/alignment into line with SCSI
mmc: queue: append partition subname to queue thread name
mmc: core: make erase timeout calculation allow for gated clock
mmc: block: switch card to User Data Area when removing the block driver
mmc: sdio: reset card during power_restore
mmc: cb710: fix #ifdef HAVE_EFFICIENT_UNALIGNED_ACCESS
mmc: sdhi: DMA slave ID 0 is invalid
mmc: tmio: fix regression in TMIO_MMC_WRPROTECT_DISABLE handling
mmc: omap_hsmmc: use original sg_len for dma_unmap_sg
mmc: omap_hsmmc: fix ocr mask usage
mmc: sdio: fix runtime PM path during driver removal
mmc: Add PCI fixup quirks for Ricoh 1180:e823 reader
mmc: sdhi: fix module unloading
mmc: of_mmc_spi: add NO_IRQ define to of_mmc_spi.c
mmc: vub300: fix null dereferences in error handling

+74 -28
+1 -1
drivers/misc/cb710/sgbuf2.c
··· 47 47 48 48 static inline bool needs_unaligned_copy(const void *ptr) 49 49 { 50 - #ifdef HAVE_EFFICIENT_UNALIGNED_ACCESS 50 + #ifdef CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS 51 51 return false; 52 52 #else 53 53 return ((ptr - NULL) & 3) != 0;
+4 -1
drivers/mmc/card/block.c
··· 1024 1024 INIT_LIST_HEAD(&md->part); 1025 1025 md->usage = 1; 1026 1026 1027 - ret = mmc_init_queue(&md->queue, card, &md->lock); 1027 + ret = mmc_init_queue(&md->queue, card, &md->lock, subname); 1028 1028 if (ret) 1029 1029 goto err_putdisk; 1030 1030 ··· 1297 1297 struct mmc_blk_data *md = mmc_get_drvdata(card); 1298 1298 1299 1299 mmc_blk_remove_parts(card, md); 1300 + mmc_claim_host(card->host); 1301 + mmc_blk_part_switch(card, md); 1302 + mmc_release_host(card->host); 1300 1303 mmc_blk_remove_req(md); 1301 1304 mmc_set_drvdata(card, NULL); 1302 1305 }
+6 -9
drivers/mmc/card/queue.c
··· 106 106 * @mq: mmc queue 107 107 * @card: mmc card to attach this queue 108 108 * @lock: queue lock 109 + * @subname: partition subname 109 110 * 110 111 * Initialise a MMC card request queue. 111 112 */ 112 - int mmc_init_queue(struct mmc_queue *mq, struct mmc_card *card, spinlock_t *lock) 113 + int mmc_init_queue(struct mmc_queue *mq, struct mmc_card *card, 114 + spinlock_t *lock, const char *subname) 113 115 { 114 116 struct mmc_host *host = card->host; 115 117 u64 limit = BLK_BOUNCE_HIGH; ··· 135 133 mq->queue->limits.max_discard_sectors = UINT_MAX; 136 134 if (card->erased_byte == 0) 137 135 mq->queue->limits.discard_zeroes_data = 1; 138 - if (!mmc_can_trim(card) && is_power_of_2(card->erase_size)) { 139 - mq->queue->limits.discard_granularity = 140 - card->erase_size << 9; 141 - mq->queue->limits.discard_alignment = 142 - card->erase_size << 9; 143 - } 136 + mq->queue->limits.discard_granularity = card->pref_erase << 9; 144 137 if (mmc_can_secure_erase_trim(card)) 145 138 queue_flag_set_unlocked(QUEUE_FLAG_SECDISCARD, 146 139 mq->queue); ··· 206 209 207 210 sema_init(&mq->thread_sem, 1); 208 211 209 - mq->thread = kthread_run(mmc_queue_thread, mq, "mmcqd/%d", 210 - host->index); 212 + mq->thread = kthread_run(mmc_queue_thread, mq, "mmcqd/%d%s", 213 + host->index, subname ? subname : ""); 211 214 212 215 if (IS_ERR(mq->thread)) { 213 216 ret = PTR_ERR(mq->thread);
+2 -1
drivers/mmc/card/queue.h
··· 19 19 unsigned int bounce_sg_len; 20 20 }; 21 21 22 - extern int mmc_init_queue(struct mmc_queue *, struct mmc_card *, spinlock_t *); 22 + extern int mmc_init_queue(struct mmc_queue *, struct mmc_card *, spinlock_t *, 23 + const char *); 23 24 extern void mmc_cleanup_queue(struct mmc_queue *); 24 25 extern void mmc_queue_suspend(struct mmc_queue *); 25 26 extern void mmc_queue_resume(struct mmc_queue *);
+1 -1
drivers/mmc/core/core.c
··· 1245 1245 */ 1246 1246 timeout_clks <<= 1; 1247 1247 timeout_us += (timeout_clks * 1000) / 1248 - (card->host->ios.clock / 1000); 1248 + (mmc_host_clk_rate(card->host) / 1000); 1249 1249 1250 1250 erase_timeout = timeout_us / 1000; 1251 1251
+39
drivers/mmc/core/sdio.c
··· 691 691 static int mmc_sdio_power_restore(struct mmc_host *host) 692 692 { 693 693 int ret; 694 + u32 ocr; 694 695 695 696 BUG_ON(!host); 696 697 BUG_ON(!host->card); 697 698 698 699 mmc_claim_host(host); 700 + 701 + /* 702 + * Reset the card by performing the same steps that are taken by 703 + * mmc_rescan_try_freq() and mmc_attach_sdio() during a "normal" probe. 704 + * 705 + * sdio_reset() is technically not needed. Having just powered up the 706 + * hardware, it should already be in reset state. However, some 707 + * platforms (such as SD8686 on OLPC) do not instantly cut power, 708 + * meaning that a reset is required when restoring power soon after 709 + * powering off. It is harmless in other cases. 710 + * 711 + * The CMD5 reset (mmc_send_io_op_cond()), according to the SDIO spec, 712 + * is not necessary for non-removable cards. However, it is required 713 + * for OLPC SD8686 (which expects a [CMD5,5,3,7] init sequence), and 714 + * harmless in other situations. 715 + * 716 + * With these steps taken, mmc_select_voltage() is also required to 717 + * restore the correct voltage setting of the card. 718 + */ 719 + sdio_reset(host); 720 + mmc_go_idle(host); 721 + mmc_send_if_cond(host, host->ocr_avail); 722 + 723 + ret = mmc_send_io_op_cond(host, 0, &ocr); 724 + if (ret) 725 + goto out; 726 + 727 + if (host->ocr_avail_sdio) 728 + host->ocr_avail = host->ocr_avail_sdio; 729 + 730 + host->ocr = mmc_select_voltage(host, ocr & ~0x7F); 731 + if (!host->ocr) { 732 + ret = -EINVAL; 733 + goto out; 734 + } 735 + 699 736 ret = mmc_sdio_init_card(host, host->ocr, host->card, 700 737 mmc_card_keep_power(host)); 701 738 if (!ret && host->sdio_irqs) 702 739 mmc_signal_sdio_irq(host); 740 + 741 + out: 703 742 mmc_release_host(host); 704 743 705 744 return ret;
+1 -1
drivers/mmc/core/sdio_bus.c
··· 189 189 190 190 /* Then undo the runtime PM settings in sdio_bus_probe() */ 191 191 if (func->card->host->caps & MMC_CAP_POWER_OFF_CARD) 192 - pm_runtime_put_noidle(dev); 192 + pm_runtime_put_sync(dev); 193 193 194 194 out: 195 195 return ret;
+5
drivers/mmc/host/of_mmc_spi.c
··· 25 25 #include <linux/mmc/core.h> 26 26 #include <linux/mmc/host.h> 27 27 28 + /* For archs that don't support NO_IRQ (such as mips), provide a dummy value */ 29 + #ifndef NO_IRQ 30 + #define NO_IRQ 0 31 + #endif 32 + 28 33 MODULE_LICENSE("GPL"); 29 34 30 35 enum {
+3 -3
drivers/mmc/host/omap_hsmmc.c
··· 429 429 return -EINVAL; 430 430 } 431 431 } 432 - mmc_slot(host).ocr_mask = mmc_regulator_get_ocrmask(reg); 433 432 434 433 /* Allow an aux regulator */ 435 434 reg = regulator_get(host->dev, "vmmc_aux"); ··· 961 962 spin_unlock(&host->irq_lock); 962 963 963 964 if (host->use_dma && dma_ch != -1) { 964 - dma_unmap_sg(mmc_dev(host->mmc), host->data->sg, host->dma_len, 965 + dma_unmap_sg(mmc_dev(host->mmc), host->data->sg, 966 + host->data->sg_len, 965 967 omap_hsmmc_get_dma_dir(host, host->data)); 966 968 omap_free_dma(dma_ch); 967 969 } ··· 1346 1346 return; 1347 1347 } 1348 1348 1349 - dma_unmap_sg(mmc_dev(host->mmc), data->sg, host->dma_len, 1349 + dma_unmap_sg(mmc_dev(host->mmc), data->sg, data->sg_len, 1350 1350 omap_hsmmc_get_dma_dir(host, data)); 1351 1351 1352 1352 req_in_progress = host->req_in_progress;
+3 -2
drivers/mmc/host/sh_mobile_sdhi.c
··· 92 92 mmc_data->ocr_mask = p->tmio_ocr_mask; 93 93 mmc_data->capabilities |= p->tmio_caps; 94 94 95 - if (p->dma_slave_tx >= 0 && p->dma_slave_rx >= 0) { 95 + if (p->dma_slave_tx > 0 && p->dma_slave_rx > 0) { 96 96 priv->param_tx.slave_id = p->dma_slave_tx; 97 97 priv->param_rx.slave_id = p->dma_slave_rx; 98 98 priv->dma_priv.chan_priv_tx = &priv->param_tx; ··· 165 165 166 166 p->pdata = NULL; 167 167 168 + tmio_mmc_host_remove(host); 169 + 168 170 for (i = 0; i < 3; i++) { 169 171 irq = platform_get_irq(pdev, i); 170 172 if (irq >= 0) 171 173 free_irq(irq, host); 172 174 } 173 175 174 - tmio_mmc_host_remove(host); 175 176 clk_disable(priv->clk); 176 177 clk_put(priv->clk); 177 178 kfree(priv);
+2 -2
drivers/mmc/host/tmio_mmc_pio.c
··· 824 824 struct tmio_mmc_host *host = mmc_priv(mmc); 825 825 struct tmio_mmc_data *pdata = host->pdata; 826 826 827 - return ((pdata->flags & TMIO_MMC_WRPROTECT_DISABLE) || 828 - !(sd_ctrl_read32(host, CTL_STATUS) & TMIO_STAT_WRPROTECT)); 827 + return !((pdata->flags & TMIO_MMC_WRPROTECT_DISABLE) || 828 + (sd_ctrl_read32(host, CTL_STATUS) & TMIO_STAT_WRPROTECT)); 829 829 } 830 830 831 831 static int tmio_mmc_get_cd(struct mmc_host *mmc)
+4 -7
drivers/mmc/host/vub300.c
··· 2096 2096 static int vub300_probe(struct usb_interface *interface, 2097 2097 const struct usb_device_id *id) 2098 2098 { /* NOT irq */ 2099 - struct vub300_mmc_host *vub300 = NULL; 2099 + struct vub300_mmc_host *vub300; 2100 2100 struct usb_host_interface *iface_desc; 2101 2101 struct usb_device *udev = usb_get_dev(interface_to_usbdev(interface)); 2102 2102 int i; ··· 2118 2118 command_out_urb = usb_alloc_urb(0, GFP_KERNEL); 2119 2119 if (!command_out_urb) { 2120 2120 retval = -ENOMEM; 2121 - dev_err(&vub300->udev->dev, 2122 - "not enough memory for the command_out_urb\n"); 2121 + dev_err(&udev->dev, "not enough memory for command_out_urb\n"); 2123 2122 goto error0; 2124 2123 } 2125 2124 command_res_urb = usb_alloc_urb(0, GFP_KERNEL); 2126 2125 if (!command_res_urb) { 2127 2126 retval = -ENOMEM; 2128 - dev_err(&vub300->udev->dev, 2129 - "not enough memory for the command_res_urb\n"); 2127 + dev_err(&udev->dev, "not enough memory for command_res_urb\n"); 2130 2128 goto error1; 2131 2129 } 2132 2130 /* this also allocates memory for our VUB300 mmc host device */ 2133 2131 mmc = mmc_alloc_host(sizeof(struct vub300_mmc_host), &udev->dev); 2134 2132 if (!mmc) { 2135 2133 retval = -ENOMEM; 2136 - dev_err(&vub300->udev->dev, 2137 - "not enough memory for the mmc_host\n"); 2134 + dev_err(&udev->dev, "not enough memory for the mmc_host\n"); 2138 2135 goto error4; 2139 2136 } 2140 2137 /* MMC core transfer sizes tunable parameters */
+2
drivers/pci/quirks.c
··· 2761 2761 } 2762 2762 DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_RICOH, PCI_DEVICE_ID_RICOH_R5C832, ricoh_mmc_fixup_r5c832); 2763 2763 DECLARE_PCI_FIXUP_RESUME_EARLY(PCI_VENDOR_ID_RICOH, PCI_DEVICE_ID_RICOH_R5C832, ricoh_mmc_fixup_r5c832); 2764 + DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_RICOH, PCI_DEVICE_ID_RICOH_R5CE823, ricoh_mmc_fixup_r5c832); 2765 + DECLARE_PCI_FIXUP_RESUME_EARLY(PCI_VENDOR_ID_RICOH, PCI_DEVICE_ID_RICOH_R5CE823, ricoh_mmc_fixup_r5c832); 2764 2766 #endif /*CONFIG_MMC_RICOH_MMC*/ 2765 2767 2766 2768 #if defined(CONFIG_DMAR) || defined(CONFIG_INTR_REMAP)
+1
include/linux/pci_ids.h
··· 1537 1537 #define PCI_DEVICE_ID_RICOH_RL5C476 0x0476 1538 1538 #define PCI_DEVICE_ID_RICOH_RL5C478 0x0478 1539 1539 #define PCI_DEVICE_ID_RICOH_R5C822 0x0822 1540 + #define PCI_DEVICE_ID_RICOH_R5CE823 0xe823 1540 1541 #define PCI_DEVICE_ID_RICOH_R5C832 0x0832 1541 1542 #define PCI_DEVICE_ID_RICOH_R5C843 0x0843 1542 1543