08 Jun, 2017

1 commit


23 Feb, 2017

3 commits

  • This reverts commit 829b6962f7e3cfc06f7c5c26269fd47ad48cf503.

    Revert this change as it causes a sysfs path to change and therefore
    introduces and ABI regression. More precisely Android's vold is not being
    able to access /sys/module/mmcblk/parameters/perdev_minors any more, since
    the path becomes changed to: "/sys/module/mmc_block/..."

    Fixes: 829b6962f7e3 ("mmc: block: don't use parameter prefix if built as
    module")
    Reported-by: John Stultz
    Cc: Andy Shevchenko
    Signed-off-by: Ulf Hansson

    (cherry picked from commit a5ebb87db84392edfd3142c3a6a78431d820a789)

    Ulf Hansson
     
  • As with gpio, uart and others, allow specifying the name_idx via the
    aliases-node in the devicetree.

    On embedded devices, there is often a combination of removable (e.g.
    SD card) and non-removable mmc devices (e.g. eMMC).
    Therefore the name_idx might change depending on
    - host of removable device
    - removable card present or not

    This makes it difficult to hard code the root device, if it is on the
    non-removable device. E.g. if SD card is present eMMC will be mmcblk1,
    if SD card is not present at boot, eMMC will be mmcblk0.

    If the aliases-node is not found, the driver will act as before.

    The original patch is from here:
    https://www.mail-archive.com/linux-mmc@vger.kernel.org/msg26472.html

    The patch requires additional alias_id fix or it won't work.
    Because according to function definition the max_idx parameter of idx_alloc
    is exclusive, so need add 1 or it will be unable to find the proper idx
    within an invalid range.

    Signed-off-by: Sascha Hauer
    Signed-off-by: Dong Aisheng
    (cherry picked from commit 35928d6c6a76a24a16edfa636f4c08293614a1e0)

    Sascha Hauer
     
  • It's excessive to use prefix for the parameters when you do
    modprobe mmc-block mmcblk.perdev_minors=16

    Make this available only for built-in case.

    Signed-off-by: Andy Shevchenko
    Signed-off-by: Ulf Hansson
    (cherry picked from commit 5b67cd9c5ee0722022cba7d20552320325457434)

    Andy Shevchenko
     

12 Jan, 2017

1 commit

  • commit 16652a936e96f5dae53c3fbd38a570497baadaa8 upstream.

    We never set "ret" to RESULT_OK.

    Fixes: 9f9c4180f88d ("mmc: mmc_test: add test for non-blocking transfers")
    Signed-off-by: Dan Carpenter
    Signed-off-by: Ulf Hansson
    Signed-off-by: Greg Kroah-Hartman

    Dan Carpenter
     

07 Nov, 2016

1 commit

  • mmc_test_check_result_async() requires that struct mmc_async_req is
    contained within struct mmc_test_async_req. Fix the "Commands during
    non-blocking write" tests so that is the case.

    Fixes: 4bbb9aac9a9a ("mmc: mmc_test: Add tests for sending commands during transfer")
    Signed-off-by: Adrian Hunter
    Tested-by: Ritesh Harjani
    Signed-off-by: Ulf Hansson

    Adrian Hunter
     

10 Oct, 2016

2 commits

  • Commit f68381a70bb2 (mmc: block: fix packed command header endianness)
    correctly fixed endianness handling of packed_cmd_hdr in
    mmc_blk_packed_hdr_wrq_prep.

    But now, sparse complains about incorrect types:
    drivers/mmc/card/block.c:1613:27: sparse: incorrect type in assignment (different base types)
    drivers/mmc/card/block.c:1613:27: expected unsigned int [unsigned] [usertype]
    drivers/mmc/card/block.c:1613:27: got restricted __le32 [usertype]
    ...

    So annotate cmd_hdr properly using __le32 to make everyone happy.

    Signed-off-by: Jiri Slaby
    Fixes: f68381a70bb2 (mmc: block: fix packed command header endianness)
    Cc: stable@vger.kernel.org
    Signed-off-by: Ulf Hansson

    Jiri Slaby
     
  • We get 1 warning when building kernel with W=1:
    drivers/mmc/card/block.c:2147:5: warning: no previous prototype for
    'mmc_blk_issue_rq' [-Wmissing-prototypes]

    In fact, this function is declared in drivers/mmc/card/block.h, so this
    patch adds missing header dependencies.

    Signed-off-by: Baoyou Xie
    Signed-off-by: Ulf Hansson

    Baoyou Xie
     

27 Sep, 2016

4 commits

  • We have enough vtables in the kernel as it is, we don't need
    this one to create even more artificial separation of concerns.

    As is proved by the Makefile:

    obj-$(CONFIG_MMC_BLOCK) += mmc_block.o
    mmc_block-objs := block.o queue.o

    block.c and queue.c are baked into the same mmc_block.o object.
    So why would one of these objects access a function in the
    other object by dereferencing a pointer?

    Create a new block.h header file for the single shared function
    from block to queue and remove the function pointer and just
    call the queue request function.

    Apart from making the code more readable, this also makes link
    optimizations possible and probably speeds up the call as well.

    Signed-off-by: Linus Walleij
    Signed-off-by: Ulf Hansson

    Linus Walleij
     
  • Add 6 tests for sending commands during transfer. The tests are:
    * Commands during read - no Set Block Count (CMD23).
    * Commands during write - no Set Block Count (CMD23).
    * Commands during read - use Set Block Count (CMD23).
    * Commands during write - use Set Block Count (CMD23).
    * Commands during non-blocking read - use Set Block Count (CMD23).
    * Commands during non-blocking write - use Set Block Count (CMD23).

    For a range of transfer sizes, the tests start an ongoing data transfer and
    then repeatedly send the status command (CMD13) while the transfer
    continues. The tests pass if all requests complete with no errors. The host
    controller driver must support MMC_CAP_CMD_DURING_TFR.

    Signed-off-by: Adrian Hunter
    Signed-off-by: Ulf Hansson

    Adrian Hunter
     
  • CMD23 aka SET_BLOCK_COUNT was introduced with MMC v3.1.
    Older versions of the specification allowed to terminate
    multi-block transfers only with CMD12.

    The patch fixes the following problem:

    mmc0: new MMC card at address 0001
    mmcblk0: mmc0:0001 SDMB-16 15.3 MiB
    mmcblk0: timed out sending SET_BLOCK_COUNT command, card status 0x400900
    ...
    blk_update_request: I/O error, dev mmcblk0, sector 0
    Buffer I/O error on dev mmcblk0, logical block 0, async page read
    mmcblk0: unable to read partition table

    Signed-off-by: Daniel Glöckner
    Cc:
    Signed-off-by: Ulf Hansson

    Daniel Glöckner
     
  • packed should always exist without calling its cleanup function
    explicitly. Moreover, we have use it when preparing packed list.
    So I don't believe we should ever fall into this check again when
    doing mmc_blk_packed_hdr_wrq_prep or mmc_blk_end_packed_req,etc.
    And the code of mmc_blk_end_packed_req is trying to use packed before
    checking it which makes it quite weird. This patch is trying to
    remove these two checks and move it to the mmc_blk_prep_packed_list.
    If we find packed is null, then we should never use MMC_BLK_PACKED_CMD.
    By doing this, we could fall back to non-packed request if finding null
    packed, though it's impossible theoretically.

    After removing these two BUG_ONs, we also remove all other similar
    checks within the routine of mmc_blk_issue_rw_rq which checks the
    error handling of packed request.

    Signed-off-by: Shawn Lin
    Signed-off-by: Ulf Hansson

    Shawn Lin
     

26 Aug, 2016

1 commit

  • We call mmc_req_is_special() after having processed a request, but
    it could be freed after that. Check that ahead of time, and use
    the cached value.

    Reported-by: Hans de Goede
    Tested-by: Hans de Goede
    Fixes: c2df40dfb8c0 ("drivers: use req op accessor")

    Signed-off-by: Jens Axboe

    Adrian Hunter
     

16 Aug, 2016

1 commit

  • Commit 288dab8a35a0 ("block: add a separate operation type for secure
    erase") split REQ_OP_SECURE_ERASE from REQ_OP_DISCARD without considering
    all the places REQ_OP_DISCARD was being used to mean either. Fix those.

    Signed-off-by: Adrian Hunter
    Fixes: 288dab8a35a0 ("block: add a separate operation type for secure erase")
    Signed-off-by: Jens Axboe

    Adrian Hunter
     

01 Aug, 2016

1 commit

  • Pull MMC updates from Ulf Hansson:
    "MMC core:
    - A couple of changes to improve the support for erase/discard/trim cmds
    - Add eMMC HS400 enhanced strobe support
    - Show OCR and DSR registers in SYSFS for MMC/SD cards
    - Correct and improve busy detection logic for MMC switch (CMD6) cmds
    - Disable HPI cmds for certain broken Hynix eMMC cards
    - Allow MMC hosts to specify non-support for SD and MMC cmds
    - Some minor additional fixes

    MMC host:
    - sdhci: Re-works, fixes and clean-ups
    - sdhci: Add HW auto re-tuning support
    - sdhci: Re-factor code to prepare for adding support for eMMC CMDQ
    - sdhci-esdhc-imx: Fixes and clean-ups
    - sdhci-esdhc-imx: Update system PM support
    - sdhci-esdhc-imx: Enable HW auto re-tuning
    - sdhci-bcm2835: Remove driver as sdhci-iproc is used instead
    - sdhci-brcmstb: Add new driver for Broadcom BRCMSTB SoCs
    - sdhci-msm: Add support for UHS cards
    - sdhci-tegra: Improve support for UHS cards
    - sdhci-of-arasan: Update phy support for Rockchip SoCs
    - sdhci-of-arasan: Deploy enhanced strobe support
    - dw_mmc: Some fixes and clean-ups
    - dw_mmc: Enable support for erase/discard/trim cmds
    - dw_mmc: Enable CMD23 support
    - mediatek: Some fixes related to the eMMC HS400 support
    - sh_mmcif: Improve support for HW busy detection
    - rtsx_pci: Enable support for erase/discard/trim cmds"

    * tag 'mmc-v4.8' of git://git.linaro.org/people/ulf.hansson/mmc: (135 commits)
    mmc: rtsx_pci: Remove deprecated create_singlethread_workqueue
    mmc: rtsx_pci: Enable MMC_CAP_ERASE to allow erase/discard/trim requests
    mmc: rtsx_pci: Use the provided busy timeout from the mmc core
    mmc: sdhci-pltfm: Drop define for SDHCI_PLTFM_PMOPS
    mmc: sdhci-pltfm: Convert to use the SET_SYSTEM_SLEEP_PM_OPS
    mmc: sdhci-pltfm: Make sdhci_pltfm_suspend|resume() static
    mmc: sdhci-esdhc-imx: Use common sdhci_suspend|resume_host()
    mmc: sdhci-esdhc-imx: Assign system PM ops within #ifdef CONFIG_PM_SLEEP
    mmc: sdhci-sirf: Remove non needed #ifdef CONFIG_PM* for dev_pm_ops
    mmc: sdhci-s3c: Remove non needed #ifdef CONFIG_PM for dev_pm_ops
    mmc: sdhci-pxav3: Remove non needed #ifdef CONFIG_PM for dev_pm_ops
    mmc: sdhci-of-esdhc: Simplify code by using SIMPLE_DEV_PM_OPS
    mmc: sdhci-acpi: Simplify code by using SET_SYSTEM_SLEEP_PM_OPS
    mmc: sdhci-pci-core: Simplify code by using SET_SYSTEM_SLEEP_PM_OPS
    mmc: Change the max discard sectors and erase response when HW busy detect
    phy: rockchip-emmc: Wait even longer for the DLL to lock
    phy: rockchip-emmc: Be tolerant to card clock of 0 in power on
    mmc: sdhci-of-arasan: Revert: Always power the PHY off/on when clock changes
    mmc: sdhci-msm: Add support for UHS cards
    mmc: sdhci-msm: Add set_uhs_signaling() implementation
    ...

    Linus Torvalds
     

27 Jul, 2016

2 commits

  • Pull block driver updates from Jens Axboe:
    "This branch also contains core changes. I've come to the conclusion
    that from 4.9 and forward, I'll be doing just a single branch. We
    often have dependencies between core and drivers, and it's hard to
    always split them up appropriately without pulling core into drivers
    when that happens.

    That said, this contains:

    - separate secure erase type for the core block layer, from
    Christoph.

    - set of discard fixes, from Christoph.

    - bio shrinking fixes from Christoph, as a followup up to the
    op/flags change in the core branch.

    - map and append request fixes from Christoph.

    - NVMeF (NVMe over Fabrics) code from Christoph. This is pretty
    exciting!

    - nvme-loop fixes from Arnd.

    - removal of ->driverfs_dev from Dan, after providing a
    device_add_disk() helper.

    - bcache fixes from Bhaktipriya and Yijing.

    - cdrom subchannel read fix from Vchannaiah.

    - set of lightnvm updates from Wenwei, Matias, Johannes, and Javier.

    - set of drbd updates and fixes from Fabian, Lars, and Philipp.

    - mg_disk error path fix from Bart.

    - user notification for failed device add for loop, from Minfei.

    - NVMe in general:
    + NVMe delay quirk from Guilherme.
    + SR-IOV support and command retry limits from Keith.
    + fix for memory-less NUMA node from Masayoshi.
    + use UINT_MAX for discard sectors, from Minfei.
    + cancel IO fixes from Ming.
    + don't allocate unused major, from Neil.
    + error code fixup from Dan.
    + use constants for PSDT/FUSE from James.
    + variable init fix from Jay.
    + fabrics fixes from Ming, Sagi, and Wei.
    + various fixes"

    * 'for-4.8/drivers' of git://git.kernel.dk/linux-block: (115 commits)
    nvme/pci: Provide SR-IOV support
    nvme: initialize variable before logical OR'ing it
    block: unexport various bio mapping helpers
    scsi/osd: open code blk_make_request
    target: stop using blk_make_request
    block: simplify and export blk_rq_append_bio
    block: ensure bios return from blk_get_request are properly initialized
    virtio_blk: use blk_rq_map_kern
    memstick: don't allow REQ_TYPE_BLOCK_PC requests
    block: shrink bio size again
    block: simplify and cleanup bvec pool handling
    block: get rid of bio_rw and READA
    block: don't ignore -EOPNOTSUPP blkdev_issue_write_same
    block: introduce BLKDEV_DISCARD_ZERO to fix zeroout
    NVMe: don't allocate unused nvme_major
    nvme: avoid crashes when node 0 is memoryless node.
    nvme: Limit command retries
    loop: Make user notify for adding loop device failed
    nvme-loop: fix nvme-loop Kconfig dependencies
    nvmet: fix return value check in nvmet_subsys_alloc()
    ...

    Linus Torvalds
     
  • Pull core block updates from Jens Axboe:

    - the big change is the cleanup from Mike Christie, cleaning up our
    uses of command types and modified flags. This is what will throw
    some merge conflicts

    - regression fix for the above for btrfs, from Vincent

    - following up to the above, better packing of struct request from
    Christoph

    - a 2038 fix for blktrace from Arnd

    - a few trivial/spelling fixes from Bart Van Assche

    - a front merge check fix from Damien, which could cause issues on
    SMR drives

    - Atari partition fix from Gabriel

    - convert cfq to highres timers, since jiffies isn't granular enough
    for some devices these days. From Jan and Jeff

    - CFQ priority boost fix idle classes, from me

    - cleanup series from Ming, improving our bio/bvec iteration

    - a direct issue fix for blk-mq from Omar

    - fix for plug merging not involving the IO scheduler, like we do for
    other types of merges. From Tahsin

    - expose DAX type internally and through sysfs. From Toshi and Yigal

    * 'for-4.8/core' of git://git.kernel.dk/linux-block: (76 commits)
    block: Fix front merge check
    block: do not merge requests without consulting with io scheduler
    block: Fix spelling in a source code comment
    block: expose QUEUE_FLAG_DAX in sysfs
    block: add QUEUE_FLAG_DAX for devices to advertise their DAX support
    Btrfs: fix comparison in __btrfs_map_block()
    block: atari: Return early for unsupported sector size
    Doc: block: Fix a typo in queue-sysfs.txt
    cfq-iosched: Charge at least 1 jiffie instead of 1 ns
    cfq-iosched: Fix regression in bonnie++ rewrite performance
    cfq-iosched: Convert slice_resid from u64 to s64
    block: Convert fifo_time from ulong to u64
    blktrace: avoid using timespec
    block/blk-cgroup.c: Declare local symbols static
    block/bio-integrity.c: Add #include "blk.h"
    block/partition-generic.c: Remove a set-but-not-used variable
    block: bio: kill BIO_MAX_SIZE
    cfq-iosched: temporarily boost queue priority for idle classes
    block: drbd: avoid to use BIO_MAX_SIZE
    block: bio: remove BIO_MAX_SECTORS
    ...

    Linus Torvalds
     

25 Jul, 2016

3 commits

  • Apparently a cut-and-paste error, 'do_data_tag' is using 'brq' for data
    size even though 'brq' has not been set up. Instead use blk_rq_sectors().

    Signed-off-by: Adrian Hunter
    Reviewed-by: Shawn Lin
    Signed-off-by: Ulf Hansson

    Adrian Hunter
     
  • Certain Hynix eMMC 4.41 cards might get broken when HPI feature is used
    and hence this patch disables the HPI feature for such buggy cards.

    As some of the other features like BKOPs/Cache/Sanitize are dependent on
    HPI feature, those features would also get disabled if HPI is disabled.

    Signed-off-by: Pratibhasagar V
    Signed-off-by: Subhash Jadavani
    [gdavis: Forward port and cleanup]
    Signed-off-by: George G. Davis
    Signed-off-by: Ulf Hansson

    Pratibhasagar V
     
  • In sectors alignment check, brq->data.blocks means sectors of the
    previous mqrq since data.blocks for mqrq_cur hasn't been updated yet.
    data.blocks will be updated later in mmc_blk_packed_hdr_wrq_prep or
    mmc_blk_rw_rq_prep.

    static int mmc_blk_issue_rw_rq(struct mmc_queue *mq, ......
    ......
    struct mmc_blk_request *brq = &mq->mqrq_cur->brq;

    Signed-off-by: Yuan Juntao
    Signed-off-by: Ulf Hansson

    Yuan, Juntao
     

18 Jul, 2016

2 commits

  • The code that fills packed command header assumes that CPU runs in
    little-endian mode. Hence the header is malformed in big-endian mode
    and causes MMC data transfer errors:

    [ 563.200828] mmcblk0: error -110 transferring data, sector 2048, nr 8, cmd response 0x900, card status 0xc40
    [ 563.219647] mmcblk0: packed cmd failed, nr 2, sectors 16, failure index: -1

    Convert header data to LE.

    Signed-off-by: Taras Kondratiuk
    Fixes: ce39f9d17c14 ("mmc: support packed write command for eMMC4.5 devices")
    Cc:
    Signed-off-by: Ulf Hansson

    Taras Kondratiuk
     
  • Set 'idata->buf' to NULL so that it never gets returned without
    initialization. This fixes a bug where mmc_blk_ioctl_cmd() would
    free both 'idata' and 'idata->buf' but 'idata->buf' was returned
    uninitialized.

    Fixes: 1ff8950c0433 ("mmc: block: change to use kmalloc when copy data from userspace")
    Signed-off-by: Ville Viinikka
    Cc:
    Signed-off-by: Ulf Hansson

    Ville Viinikka
     

23 Jun, 2016

1 commit


09 Jun, 2016

1 commit


08 Jun, 2016

2 commits

  • This adds a REQ_OP_FLUSH operation that is sent to request_fn
    based drivers by the block layer's flush code, instead of
    sending requests with the request->cmd_flags REQ_FLUSH bit set.

    Signed-off-by: Mike Christie
    Reviewed-by: Christoph Hellwig
    Reviewed-by: Hannes Reinecke
    Signed-off-by: Jens Axboe

    Mike Christie
     
  • The req operation REQ_OP is separated from the rq_flag_bits
    definition. This converts the block layer drivers to
    use req_op to get the op from the request struct.

    Signed-off-by: Mike Christie
    Reviewed-by: Hannes Reinecke
    Signed-off-by: Jens Axboe

    Mike Christie
     

27 May, 2016

1 commit

  • Pull MMC fixes from Ulf Hansson:
    "Here are some mmc fixes intended for v4.7 rc1. They are based on a
    commit earlier in the merge window and have been tested in linux-next
    for a while.

    MMC core:
    - Prevent re-tuning while serving requests for RPMB partitions
    - Extend timeout for long read time quirk to support more eMMCs

    MMC host:
    - sdhci-acpi: Ensure connected devices are powered when probing
    - sdhci-pci|acpi: Remove unreliable MMC_CAP_BUS_WIDTH_TEST for Intel HWs
    - dw_mmc: Correct the assigning of max_blk_size
    - dw_mmc-rockchip: Allow RPMB partitions to be created
    - dw_mmc-rockchip: Set the drive phase properly"

    * tag 'mmc-v4.7-rc1' of git://git.linaro.org/people/ulf.hansson/mmc:
    mmc: sdhci-acpi: Remove MMC_CAP_BUS_WIDTH_TEST for Intel controllers
    mmc: sdhci-pci: Remove MMC_CAP_BUS_WIDTH_TEST for Intel controllers
    mmc: longer timeout for long read time quirk
    mmc: dw_mmc: rockchip: Set the drive phase properly
    mmc: dw_mmc: fix the wrong max_blk_size
    mmc: dw_mmc-rockchip: add MMC_CAP_CMD23 capabilities
    mmc: sdhci-acpi: Ensure connected devices are powered when probing
    ACPI / PM: Export acpi_device_fix_up_power()
    mmc: block: Pause re-tuning while switched to the RPMB partition
    mmc: block: Always switch back to main area after RPMB access
    mmc: core: Add a facility to "pause" re-tuning

    Linus Torvalds
     

23 May, 2016

1 commit

  • 008GE0 Toshiba mmc in some Intel Baytrail tablets responds to
    MMC_SEND_EXT_CSD in 450-600ms.

    This patch will...

    () Increase the long read time quirk timeout from 300ms to 600ms. Original
    author of that quirk says 300ms was only a guess and that the number
    may need to be raised in the future.

    () Add this specific MMC to the quirk

    Signed-off-by: Matt Gumbel
    Signed-off-by: Adrian Hunter
    Cc: stable@vger.kernel.org
    Signed-off-by: Ulf Hansson

    Matt Gumbel
     

21 May, 2016

1 commit

  • Pull tty and serial driver updates from Greg KH:
    "Here's the large TTY and Serial driver update for 4.7-rc1.

    A few new serial drivers are added here, and Peter has fixed a bunch
    of long-standing bugs in the tty layer and serial drivers as normal.
    Full details in the shortlog.

    All of these have been in linux-next for a while with no reported
    issues"

    * tag 'tty-4.7-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: (88 commits)
    MAINTAINERS: 8250: remove website reference
    serial: core: Fix port mutex assert if lockdep disabled
    serial: 8250_dw: fix wrong logic in dw8250_check_lcr()
    tty: vt, finish looping on duplicate
    tty: vt, return error when con_startup fails
    QE-UART: add "fsl,t1040-ucc-uart" to of_device_id
    serial: mctrl_gpio: Drop support for out1-gpios and out2-gpios
    serial: 8250dw: Add device HID for future AMD UART controller
    Fix OpenSSH pty regression on close
    serial: mctrl_gpio: add IRQ locking
    serial: 8250: Integrate Fintek into 8250_base
    serial: mps2-uart: add support for early console
    serial: mps2-uart: add MPS2 UART driver
    dt-bindings: document the MPS2 UART bindings
    serial: sirf: Use generic uart-has-rtscts DT property
    serial: sirf: Introduce helper variable struct device_node *np
    serial: mxs-auart: Use generic uart-has-rtscts DT property
    serial: imx: Use generic uart-has-rtscts DT property
    doc: DT: Add Generic Serial Device Tree Bindings
    serial: 8250: of: Make tegra_serial_handle_break() static
    ...

    Linus Torvalds
     

18 May, 2016

1 commit

  • Pull block driver updates from Jens Axboe:
    "On top of the core pull request, this is the drivers pull request for
    this merge window. This contains:

    - Switch drivers to the new write back cache API, and kill off the
    flush flags. From me.

    - Kill the discard support for the STEC pci-e flash driver. It's
    trivially broken, and apparently unmaintained, so it's safer to
    just remove it. From Jeff Moyer.

    - A set of lightnvm updates from the usual suspects (Matias/Javier,
    and Simon), and fixes from Arnd, Jeff Mahoney, Sagi, and Wenwei
    Tao.

    - A set of updates for NVMe:

    - Turn the controller state management into a proper state
    machine. From Christoph.

    - Shuffling of code in preparation for NVMe-over-fabrics, also
    from Christoph.

    - Cleanup of the command prep part from Ming Lin.

    - Rewrite of the discard support from Ming Lin.

    - Deadlock fix for namespace removal from Ming Lin.

    - Use the now exported blk-mq tag helper for IO termination.
    From Sagi.

    - Various little fixes from Christoph, Guilherme, Keith, Ming
    Lin, Wang Sheng-Hui.

    - Convert mtip32xx to use the now exported blk-mq tag iter function,
    from Keith"

    * 'for-4.7/drivers' of git://git.kernel.dk/linux-block: (74 commits)
    lightnvm: reserved space calculation incorrect
    lightnvm: rename nr_pages to nr_ppas on nvm_rq
    lightnvm: add is_cached entry to struct ppa_addr
    lightnvm: expose gennvm_mark_blk to targets
    lightnvm: remove mgt targets on mgt removal
    lightnvm: pass dma address to hardware rather than pointer
    lightnvm: do not assume sequential lun alloc.
    nvme/lightnvm: Log using the ctrl named device
    lightnvm: rename dma helper functions
    lightnvm: enable metadata to be sent to device
    lightnvm: do not free unused metadata on rrpc
    lightnvm: fix out of bound ppa lun id on bb tbl
    lightnvm: refactor set_bb_tbl for accepting ppa list
    lightnvm: move responsibility for bad blk mgmt to target
    lightnvm: make nvm_set_rqd_ppalist() aware of vblks
    lightnvm: remove struct factory_blks
    lightnvm: refactor device ops->get_bb_tbl()
    lightnvm: introduce nvm_for_each_lun_ppa() macro
    lightnvm: refactor dev->online_target to global nvm_targets
    lightnvm: rename nvm_targets to nvm_tgt_type
    ...

    Linus Torvalds
     

17 May, 2016

2 commits

  • Re-tuning is not possible when switched to the RPMB
    partition. However re-tuning should not be needed
    if re-tuning is done immediately before switching,
    a small set of operations is done, and then we
    immediately switch back to the main partition.

    A previous patch ensured that we immediately switch
    back to the main partition.

    This patch uses the new facility to "pause" re-tuning
    before switching to the RPMB partition, and to "unpause"
    it after switching from the RPMB partition.

    Signed-off-by: Adrian Hunter
    Signed-off-by: Ulf Hansson

    Adrian Hunter
     
  • In preparation to support the use of the RPMB partition with transfer
    modes that might require re-tuning, always switch back to the main
    area after RPMB access.

    RPMB is accessible only via IOCTL so only those paths are affected.

    Signed-off-by: Adrian Hunter
    Signed-off-by: Ulf Hansson

    Adrian Hunter
     

16 May, 2016

1 commit


02 May, 2016

2 commits


01 May, 2016

1 commit


14 Apr, 2016

1 commit

  • Commit 520bd7a8b415 ("mmc: core: Optimize boot time by detecting cards
    simultaneously") causes regressions for some platforms.

    These platforms relies on fixed mmcblk device indexes, instead of
    deploying the defacto standard with UUID/PARTUUID. In other words their
    rootfs needs to be available at hardcoded paths, like /dev/mmcblk0p2.

    Such guarantees have never been made by the kernel, but clearly the above
    commit changes the behaviour. More precisely, because of that the order
    changes of how cards becomes detected, so do their corresponding mmcblk
    device indexes.

    As the above commit significantly improves boot time for some platforms
    (magnitude of seconds), let's avoid reverting this change but instead
    restore the behaviour of how mmcblk device indexes becomes picked.

    By using the same index for the mmcblk device as for the corresponding mmc
    host device, the probe order of mmc host devices decides the index we get
    for the mmcblk device.

    For those platforms that suffers from a regression, one could expect that
    this updated behaviour should be sufficient to meet their expectations of
    "fixed" mmcblk device indexes.

    Another side effect from this change, is that the same index is used for
    the mmc host device, the mmcblk device and the mmc block queue. That
    should clarify their relationship.

    Reported-by: Peter Hurley
    Reported-by: Laszlo Fiat
    Cc: Linus Torvalds
    Fixes: 520bd7a8b415 ("mmc: core: Optimize boot time by detecting cards
    simultaneously")
    Cc:
    Signed-off-by: Ulf Hansson

    Ulf Hansson
     

13 Apr, 2016

1 commit


22 Mar, 2016

1 commit

  • Pull MMC updates from Ulf Hansson:
    "MMC core:
    - Fix ABI regression of MMC BLK ioctl
    - Remove the unused MMC_DATA_STREAM flag
    - Enable asynchronous system PM for the host device
    - Minor fixes and clean-ups

    SDHCI host:
    Throughout the years, the numbers of SDHCI variants have increased
    and so has also the numbers of SDHCI callbacks/quirks. The purpose
    of these callbacks/quirks were to enable SDHCI to deal with variant
    specific requirements, but unfortunate this method didn't scale.
    Instead we have ended up with a mess. Not only did the code become
    suboptimal but also highly fragile.

    Lately many discussions of how to move forward with SDHCI has taken
    place at the MMC mailing list. Step by step, we aim to turn
    SDHCI's common code into a set of library functions. This will
    enable for optimizations and allow some of the existing callbacks
    and quirks to be removed, which also should help to make the code
    less fragile.

    Therefore I am also really pleased to announce that Adrian Hunter
    (Intel) has volunteered to step in as the maintainer for SDHCI.

    Future wise, I hope the community around SDHCI will continue to
    grow and that this release cycle can be the starting point of
    moving SDHCI into a better shape. As a matter of fact, already in
    this cycle the re-factoring has begun, but of course there are also
    fixes and new features included. Some highlights:

    - sdhci-iproc: Add support for Broadcom's BCM2835 eMMC IP
    - sdhci-acpi: Add support for QCOM controllers
    - sdhci-pic32: Add new SDHCI variant for PIC32MZDA

    Other hosts:
    - atmel-mci: Fix a NULL pointer dereference
    - mediatek: Add SD write-protect support
    - mmc_spi: Fix card detect in GPIO case
    - tmio/sdhi: Add r8a7795 support
    - tmio/sdhi: Some fixes and clean-ups
    - dw_mmc: Add HW reset support
    - dw_mmc: Some fixes and clean-ups
    - sunxi: Add support for MMC DDR52 mode"

    * tag 'mmc-v4.6' of git://git.linaro.org/people/ulf.hansson/mmc: (123 commits)
    mmc: sdhci-of-at91: fix wake-up issue when using runtime pm
    mmc: sdhci-pci: Do not set DMA mask in enable_dma()
    mmc: sdhci-acpi: Remove enable_dma() hook
    mmc: sdhci: Set DMA mask when adding host
    mmc: block: fix ABI regression of mmc_blk_ioctl
    mmc: atmel-mci: Check pdata for NULL before dereferencing it at DMA config
    mmc: core: remove redundant memset of sdio_read_cccr
    mmc: core: remove redundant memset of mmc_decode_cid
    mmc: of_mmc_spi: fix unused warning
    mmc: sdhci-of-arasan: add phy support for sdhci-of-arasan
    mmc: sdhci-of-arasan: fix missing sdhci_pltfm_free for err handling
    mmc: sdhci-of-arasan: remove disable clk_ahb from sdhci_arasan_resume
    Documentation: bindings: add description of phy for sdhci-of-arasan
    mmc: sdhci: Fix override of timeout clk wrt max_busy_timeout
    mmc: mmci: Remove unnecessary header file
    mmc: sdhci-acpi: add QCOM controllers
    mmc: tegra: implement memcomp pad calibration
    mmc: mediatek: Use mmc_regulator_set_vqmmc in start_signal_voltage_switch
    mmc: mediatek: Change signal voltage error to dev_dbg()
    mmc: sh_mmcif, tmio: Use ARCH_RENESAS
    ...

    Linus Torvalds
     

17 Mar, 2016

1 commit

  • If mmc_blk_ioctl returns -EINVAL, blkdev_ioctl continues to
    work without returning err to user-space. But now we check
    CAP_SYS_RAWIO firstly, so we return -EPERM to blkdev_ioctl,
    which make blkdev_ioctl return -EPERM to user-space directly.
    So this will break all the ioctl with BLKROSET. Now we find
    Android-adb suffer it for the following log:

    remount of /system failed;
    couldn't make block device writable: Operation not permitted
    openat(AT_FDCWD, "/dev/block/platform/ff420000.dwmmc/by-name/system", O_RDONLY) = 3
    ioctl(3, BLKROSET, 0) = -1 EPERM (Operation not permitted)

    Fixes: a5f5774c55a2 ("mmc: block: Add new ioctl to send multi commands")
    Cc: stable@vger.kernel.org
    Signed-off-by: Shawn Lin
    Signed-off-by: Ulf Hansson

    Shawn Lin