From: Linus Torvalds Date: Thu, 24 Sep 2009 14:55:29 +0000 (-0700) Subject: Merge branch 'for-linus' of git://neil.brown.name/md X-Git-Tag: v2.6.32-rc1~60 X-Git-Url: https://git.kernel.dk/?p=linux-block.git;a=commitdiff_plain;h=a487b6705a811087c182c8cab7e3b5845dfa6ccb;hp=-c Merge branch 'for-linus' of git://neil.brown.name/md * 'for-linus' of git://neil.brown.name/md: (97 commits) md: raid-1/10: fix RW bits manipulation md: remove unnecessary memset from multipath. md: report device as congested when suspended md: Improve name of threads created by md_register_thread md: remove sparse warnings about lock context. md: remove sparse waring "symbol xxx shadows an earlier one" async_tx/raid6: add missing dma_unmap calls to the async fail case ioat3: fix uninitialized var warnings drivers/dma/ioat/dma_v2.c: fix warnings raid6test: fix stack overflow ioat2: clarify ring size limits md/raid6: cleanup ops_run_compute6_2 md/raid6: eliminate BUG_ON with side effect dca: module load should not be an error message ioat: driver version 4.0 dca: registering requesters in multiple dca domains async_tx: remove HIGHMEM64G restriction dmaengine: sh: Add Support SuperH DMA Engine driver dmaengine: Move all map_sg/unmap_sg for slave channel to its client fsldma: Add DMA_SLAVE support ... --- a487b6705a811087c182c8cab7e3b5845dfa6ccb diff --combined drivers/mmc/host/atmel-mci.c index 065fa818be57,5e10d3663ab5..fc25586b7ee1 --- a/drivers/mmc/host/atmel-mci.c +++ b/drivers/mmc/host/atmel-mci.c @@@ -30,7 -30,6 +30,7 @@@ #include #include +#include #include #include "atmel-mci-regs.h" @@@ -210,18 -209,6 +210,18 @@@ struct atmel_mci_slot #define atmci_set_pending(host, event) \ set_bit(event, &host->pending_events) +/* + * Enable or disable features/registers based on + * whether the processor supports them + */ +static bool mci_has_rwproof(void) +{ + if (cpu_is_at91sam9261() || cpu_is_at91rm9200()) + return false; + else + return true; +} + /* * The debugfs stuff below is mostly optimized away when * CONFIG_DEBUG_FS is not set. @@@ -289,13 -276,8 +289,13 @@@ static void atmci_show_status_reg(struc [3] = "BLKE", [4] = "DTIP", [5] = "NOTBUSY", + [6] = "ENDRX", + [7] = "ENDTX", [8] = "SDIOIRQA", [9] = "SDIOIRQB", + [12] = "SDIOWAIT", + [14] = "RXBUFF", + [15] = "TXBUFE", [16] = "RINDE", [17] = "RDIRE", [18] = "RCRCE", @@@ -303,11 -285,6 +303,11 @@@ [20] = "RTOE", [21] = "DCRCE", [22] = "DTOE", + [23] = "CSTOE", + [24] = "BLKOVRE", + [25] = "DMADONE", + [26] = "FIFOEMPTY", + [27] = "XFRDONE", [30] = "OVRE", [31] = "UNRE", }; @@@ -599,6 -576,7 +599,7 @@@ atmci_submit_data_dma(struct atmel_mci struct scatterlist *sg; unsigned int i; enum dma_data_direction direction; + unsigned int sglen; /* * We don't do DMA on "complex" transfers, i.e. with @@@ -628,11 -606,14 +629,14 @@@ else direction = DMA_TO_DEVICE; + sglen = dma_map_sg(&host->pdev->dev, data->sg, data->sg_len, direction); + if (sglen != data->sg_len) + goto unmap_exit; desc = chan->device->device_prep_slave_sg(chan, data->sg, data->sg_len, direction, DMA_PREP_INTERRUPT | DMA_CTRL_ACK); if (!desc) - return -ENOMEM; + goto unmap_exit; host->dma.data_desc = desc; desc->callback = atmci_dma_complete; @@@ -643,6 -624,9 +647,9 @@@ chan->device->device_issue_pending(chan); return 0; + unmap_exit: + dma_unmap_sg(&host->pdev->dev, data->sg, sglen, direction); + return -ENOMEM; } #else /* CONFIG_MMC_ATMELMCI_DMA */ @@@ -872,15 -856,13 +879,15 @@@ static void atmci_set_ios(struct mmc_ho clkdiv = 255; } + host->mode_reg = MCI_MR_CLKDIV(clkdiv); + /* * WRPROOF and RDPROOF prevent overruns/underruns by * stopping the clock when the FIFO is full/empty. * This state is not expected to last for long. */ - host->mode_reg = MCI_MR_CLKDIV(clkdiv) | MCI_MR_WRPROOF - | MCI_MR_RDPROOF; + if (mci_has_rwproof()) + host->mode_reg |= (MCI_MR_WRPROOF | MCI_MR_RDPROOF); if (list_empty(&host->queue)) mci_writel(host, MR, host->mode_reg); @@@ -1673,10 -1655,8 +1680,10 @@@ static int __init atmci_probe(struct pl nr_slots++; } - if (!nr_slots) + if (!nr_slots) { + dev_err(&pdev->dev, "init failed: no slot defined\n"); goto err_init_slot; + } dev_info(&pdev->dev, "Atmel MCI controller at 0x%08lx irq %d, %u slots\n", diff --combined include/linux/pci_ids.h index 7803565aa877,6f9623710f28..da1fda8623e0 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h @@@ -543,7 -543,6 +543,7 @@@ #define PCI_DEVICE_ID_AMD_8131_BRIDGE 0x7450 #define PCI_DEVICE_ID_AMD_8131_APIC 0x7451 #define PCI_DEVICE_ID_AMD_8132_BRIDGE 0x7458 +#define PCI_DEVICE_ID_AMD_SB900_SMBUS 0x780b #define PCI_DEVICE_ID_AMD_CS5535_IDE 0x208F #define PCI_DEVICE_ID_AMD_CS5536_ISA 0x2090 #define PCI_DEVICE_ID_AMD_CS5536_FLASH 0x2091 @@@ -2527,6 -2526,16 +2527,16 @@@ #define PCI_DEVICE_ID_INTEL_E7525_MCH 0x359e #define PCI_DEVICE_ID_INTEL_IOAT_CNB 0x360b #define PCI_DEVICE_ID_INTEL_FBD_CNB 0x360c + #define PCI_DEVICE_ID_INTEL_IOAT_JSF0 0x3710 + #define PCI_DEVICE_ID_INTEL_IOAT_JSF1 0x3711 + #define PCI_DEVICE_ID_INTEL_IOAT_JSF2 0x3712 + #define PCI_DEVICE_ID_INTEL_IOAT_JSF3 0x3713 + #define PCI_DEVICE_ID_INTEL_IOAT_JSF4 0x3714 + #define PCI_DEVICE_ID_INTEL_IOAT_JSF5 0x3715 + #define PCI_DEVICE_ID_INTEL_IOAT_JSF6 0x3716 + #define PCI_DEVICE_ID_INTEL_IOAT_JSF7 0x3717 + #define PCI_DEVICE_ID_INTEL_IOAT_JSF8 0x3718 + #define PCI_DEVICE_ID_INTEL_IOAT_JSF9 0x3719 #define PCI_DEVICE_ID_INTEL_ICH10_0 0x3a14 #define PCI_DEVICE_ID_INTEL_ICH10_1 0x3a16 #define PCI_DEVICE_ID_INTEL_ICH10_2 0x3a18