21 Mar, 2014

1 commit


20 Mar, 2014

1 commit

  • BLK_MQ_F_* flags are for hctx->flags, and are non-atomic and
    set at registration time. BLK_MQ_S_* flags are dynamic and
    atomic, and are accessed through hctx->state.

    Some of the BLK_MQ_S_STOPPED uses were wrong. Additionally,
    the header file should not use a bit shift for the _S_ flags,
    as they are done through the set/test_bit functions.

    Signed-off-by: Jens Axboe

    Jens Axboe
     

15 Mar, 2014

1 commit

  • If drivers do dynamic allocation in the hardware command init
    path, then we need to be able to handle and return failures.

    And if they do allocations or mappings in the init command path,
    then we need a cleanup function to free up that space at exit
    time. So add blk_mq_free_commands() as the cleanup function.

    This is required for the mtip32xx driver conversion to blk-mq.

    Signed-off-by: Jens Axboe

    Jens Axboe
     

13 Mar, 2014

1 commit

  • This was a debugging measure to toggle enabled/disabled
    when testing. But for real production setups, it's not
    safe to toggle this setting without either reloading
    drivers of quiescing IO first. Neither of which the toggle
    enforces.

    Additionally, it makes drivers deal with the conditional
    state.

    Remove it completely. It's up to the driver whether iopoll
    is enabled or not.

    Signed-off-by: Jens Axboe

    Jens Axboe
     

06 Mar, 2014

1 commit

  • trace_block_rq_complete does not take into account that request can
    be partially completed, so we can get the following incorrect output
    of blkparser:

    C R 232 + 240 [0]
    C R 240 + 232 [0]
    C R 248 + 224 [0]
    C R 256 + 216 [0]

    but should be:

    C R 232 + 8 [0]
    C R 240 + 8 [0]
    C R 248 + 8 [0]
    C R 256 + 8 [0]

    Also, the whole output summary statistics of completed requests and
    final throughput will be incorrect.

    This patch takes into account real completion size of the request and
    fixes wrong completion accounting.

    Signed-off-by: Roman Pen
    CC: Steven Rostedt
    CC: Frederic Weisbecker
    CC: Ingo Molnar
    CC: linux-kernel@vger.kernel.org
    Cc: stable@kernel.org
    Signed-off-by: Jens Axboe

    Roman Pen
     

25 Feb, 2014

11 commits

  • The name __smp_call_function_single() doesn't tell much about the
    properties of this function, especially when compared to
    smp_call_function_single().

    The comments above the implementation are also misleading. The main
    point of this function is actually not to be able to embed the csd
    in an object. This is actually a requirement that result from the
    purpose of this function which is to raise an IPI asynchronously.

    As such it can be called with interrupts disabled. And this feature
    comes at the cost of the caller who then needs to serialize the
    IPIs on this csd.

    Lets rename the function and enhance the comments so that they reflect
    these properties.

    Suggested-by: Christoph Hellwig
    Cc: Andrew Morton
    Cc: Christoph Hellwig
    Cc: Ingo Molnar
    Cc: Jan Kara
    Cc: Jens Axboe
    Signed-off-by: Frederic Weisbecker
    Signed-off-by: Jens Axboe

    Frederic Weisbecker
     
  • The main point of calling __smp_call_function_single() is to send
    an IPI in a pure asynchronous way. By embedding a csd in an object,
    a caller can send the IPI without waiting for a previous one to complete
    as is required by smp_call_function_single() for example. As such,
    sending this kind of IPI can be safe even when irqs are disabled.

    This flexibility comes at the expense of the caller who then needs to
    synchronize the csd lifecycle by himself and make sure that IPIs on a
    single csd are serialized.

    This is how __smp_call_function_single() works when wait = 0 and this
    usecase is relevant.

    Now there don't seem to be any usecase with wait = 1 that can't be
    covered by smp_call_function_single() instead, which is safer. Lets look
    at the two possible scenario:

    1) The user calls __smp_call_function_single(wait = 1) on a csd embedded
    in an object. It looks like a nice and convenient pattern at the first
    sight because we can then retrieve the object from the IPI handler easily.

    But actually it is a waste of memory space in the object since the csd
    can be allocated from the stack by smp_call_function_single(wait = 1)
    and the object can be passed an the IPI argument.

    Besides that, embedding the csd in an object is more error prone
    because the caller must take care of the serialization of the IPIs
    for this csd.

    2) The user calls __smp_call_function_single(wait = 1) on a csd that
    is allocated on the stack. It's ok but smp_call_function_single()
    can do it as well and it already takes care of the allocation on the
    stack. Again it's more simple and less error prone.

    Therefore, using the underscore prepend API version with wait = 1
    is a bad pattern and a sign that the caller can do safer and more
    simple.

    There was a single user of that which has just been converted.
    So lets remove this option to discourage further users.

    Cc: Andrew Morton
    Cc: Christoph Hellwig
    Cc: Ingo Molnar
    Cc: Jan Kara
    Cc: Jens Axboe
    Signed-off-by: Frederic Weisbecker
    Signed-off-by: Jens Axboe

    Frederic Weisbecker
     
  • In order to remotely restart the watchdog hrtimer, update_timers()
    allocates a csd on the stack and pass it to __smp_call_function_single().

    There is no partcular need, however, for a specific csd here. Lets
    simplify that a little by calling smp_call_function_single()
    which can already take care of the csd allocation by itself.

    Acked-by: Don Zickus
    Reviewed-by: Michal Hocko
    Cc: Andrew Morton
    Cc: Christoph Hellwig
    Cc: Don Zickus
    Cc: Ingo Molnar
    Cc: Jan Kara
    Cc: Jens Axboe
    Cc: Michal Hocko
    Cc: Srivatsa S. Bhat
    Signed-off-by: Frederic Weisbecker
    Signed-off-by: Jens Axboe

    Frederic Weisbecker
     
  • Move this function closer to __smp_call_function_single(). These functions
    have very similar behavior and should be displayed in the same block
    for clarity.

    Reviewed-by: Jan Kara
    Cc: Andrew Morton
    Cc: Christoph Hellwig
    Cc: Ingo Molnar
    Cc: Jan Kara
    Cc: Jens Axboe
    Signed-off-by: Frederic Weisbecker
    Signed-off-by: Jens Axboe

    Frederic Weisbecker
     
  • __smp_call_function_single() and smp_call_function_single() share some
    code that can be factorized: execute inline when the target is local,
    check if the target is online, lock the csd, call generic_exec_single().

    Lets move the common parts to generic_exec_single().

    Reviewed-by: Jan Kara
    Cc: Andrew Morton
    Cc: Christoph Hellwig
    Cc: Ingo Molnar
    Cc: Jan Kara
    Cc: Jens Axboe
    Signed-off-by: Frederic Weisbecker
    Signed-off-by: Jens Axboe

    Frederic Weisbecker
     
  • Align __smp_call_function_single() with smp_call_function_single() so
    that it also checks whether requested cpu is still online.

    Signed-off-by: Jan Kara
    Cc: Andrew Morton
    Cc: Christoph Hellwig
    Cc: Ingo Molnar
    Cc: Jens Axboe
    Signed-off-by: Frederic Weisbecker
    Signed-off-by: Jens Axboe

    Jan Kara
     
  • Now that we got rid of all the remaining code which fiddled with csd.list,
    lets remove it.

    Signed-off-by: Jan Kara
    Cc: Andrew Morton
    Cc: Christoph Hellwig
    Cc: Ingo Molnar
    Cc: Jens Axboe
    Signed-off-by: Frederic Weisbecker
    Signed-off-by: Jens Axboe

    Jan Kara
     
  • The IPI function llist iteration is open coded. Lets simplify this
    with using an llist iterator.

    Also we want to keep the iteration safe against possible
    csd.llist->next value reuse from the IPI handler. At least the block
    subsystem used to do such things so lets stay careful and use
    llist_for_each_entry_safe().

    Signed-off-by: Jan Kara
    Cc: Andrew Morton
    Cc: Christoph Hellwig
    Cc: Ingo Molnar
    Cc: Jens Axboe
    Signed-off-by: Frederic Weisbecker
    Signed-off-by: Jens Axboe

    Jan Kara
     
  • Abusing rq->csd.list for a list of requests to complete is rather ugly.
    We use rq->queuelist instead which is much cleaner. It is safe because
    queuelist is used by the block layer only for requests waiting to be
    submitted to a device. Thus it is unused when irq reports the request IO
    is finished.

    Signed-off-by: Jan Kara
    Cc: Andrew Morton
    Cc: Christoph Hellwig
    Cc: Ingo Molnar
    Cc: Jens Axboe
    Signed-off-by: Frederic Weisbecker
    Signed-off-by: Jens Axboe

    Jan Kara
     
  • rq_fifo_clear() reset the csd.list through INIT_LIST_HEAD for no clear
    purpose. The csd.list doesn't need to be initialized as a list head
    because it's only ever used as a list node.

    Lets remove this useless initialization.

    Reviewed-by: Jan Kara
    Cc: Andrew Morton
    Cc: Christoph Hellwig
    Cc: Ingo Molnar
    Cc: Jan Kara
    Cc: Jens Axboe
    Signed-off-by: Frederic Weisbecker
    Signed-off-by: Jens Axboe

    Frederic Weisbecker
     
  • Block layer currently abuses rq->csd.list.next for storing fifo_time.
    That is a terrible hack and completely unnecessary as well. Union
    achieves the same space saving in a cleaner way.

    Signed-off-by: Jan Kara
    Cc: Andrew Morton
    Cc: Christoph Hellwig
    Cc: Ingo Molnar
    Cc: Jens Axboe
    Signed-off-by: Frederic Weisbecker
    Signed-off-by: Jens Axboe

    Jan Kara
     

22 Feb, 2014

1 commit

  • Most code of function bio_integrity_verify and bio_integrity_generate
    is the same, so introduce a help function bio_integrity_generate_verify()
    to remove the duplicate code.

    Signed-off-by: Gu Zheng
    Signed-off-by: Jens Axboe

    Gu Zheng
     

19 Feb, 2014

3 commits

  • (Trivial patch.)

    If the code is looking at the RCU-protected pointer itself, but not
    dereferencing it, the rcu_dereference() functions can be downgraded to
    rcu_access_pointer(). This commit makes this downgrade in blkg_destroy()
    and ioc_destroy_icq(), both of which simply compare the RCU-protected
    pointer against another pointer with no dereferencing.

    Signed-off-by: Paul E. McKenney
    Cc: Jens Axboe
    Signed-off-by: Jens Axboe

    Paul E. McKenney
     
  • To increase compiler portability there are several macros defined
    in for various gcc __attribute((..)) constructs.
    I've made sure gcc these specific were replaced with the right
    macro and an #include was placed where needed.

    Signed-off-by: Gideon Israel Dsouza
    Signed-off-by: Jens Axboe

    Gideon Israel Dsouza
     
  • When using device mapper, there are many "bio: create slab" messages in
    the log. Device mapper targets have different front_pad, so each time when
    we load a target that wasn't loaded before, we allocate a slab with the
    appropriate front_pad and there is associated "bio: create slab" message.

    This patch removes these messages, there is no need for them.

    Signed-off-by: Mikulas Patocka
    Signed-off-by: Jens Axboe

    Mikulas Patocka
     

17 Feb, 2014

3 commits

  • Linus Torvalds
     
  • Pull btrfs fixes from Chris Mason:
    "We have a small collection of fixes in my for-linus branch.

    The big thing that stands out is a revert of a new ioctl. Users
    haven't shipped yet in btrfs-progs, and Dave Sterba found a better way
    to export the information"

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs:
    Btrfs: use right clone root offset for compressed extents
    btrfs: fix null pointer deference at btrfs_sysfs_add_one+0x105
    Btrfs: unset DCACHE_DISCONNECTED when mounting default subvol
    Btrfs: fix max_inline mount option
    Btrfs: fix a lockdep warning when cleaning up aborted transaction
    Revert "btrfs: add ioctl to export size of global metadata reservation"

    Linus Torvalds
     
  • Pull devicetree fixes from Rob Herring:
    "Fix booting on PPC boards. Changes to of_match_node matching caused
    the serial port on some PPC boards to stop working. Reverted the
    change and reimplement to split matching between new style compatible
    only matching and fallback to old matching algorithm"

    * tag 'dt-fixes-for-3.14' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux:
    of: search the best compatible match first in __of_match_node()
    Revert "OF: base: match each node compatible against all given matches first"

    Linus Torvalds
     

16 Feb, 2014

12 commits

  • Currently, of_match_node compares each given match against all node's
    compatible strings with of_device_is_compatible.

    To achieve multiple compatible strings per node with ordering from
    specific to generic, this requires given matches to be ordered from
    specific to generic. For most of the drivers this is not true and also
    an alphabetical ordering is more sane there.

    Therefore, this patch introduces a function to match each of the node's
    compatible strings against all given compatible matches without type and
    name first, before checking the next compatible string. This implies
    that node's compatibles are ordered from specific to generic while
    given matches can be in any order. If we fail to find such a match
    entry, then fall-back to the old method in order to keep compatibility.

    Cc: Sebastian Hesselbarth
    Signed-off-by: Kevin Hao
    Tested-by: Stephen Chivers
    Signed-off-by: Rob Herring

    Kevin Hao
     
  • Pull SCSI target fixes from Nicholas Bellinger:
    "Mostly minor fixes this time to v3.14-rc1 related changes. Also
    included is one fix for a free after use regression in persistent
    reservations UNREGISTER logic that is CC'ed to >= v3.11.y stable"

    * git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending:
    Target/sbc: Fix protection copy routine
    IB/srpt: replace strict_strtoul() with kstrtoul()
    target: Simplify command completion by removing CMD_T_FAILED flag
    iser-target: Fix leak on failure in isert_conn_create_fastreg_pool
    iscsi-target: Fix SNACK Type 1 + BegRun=0 handling
    target: Fix missing length check in spc_emulate_evpd_83()
    qla2xxx: Remove last vestiges of qla_tgt_cmd.cmd_list
    target: Fix 32-bit + CONFIG_LBDAF=n link error w/ sector_div
    target: Fix free-after-use regression in PR unregister

    Linus Torvalds
     
  • Pull i2c fixes from Wolfram Sang:
    "i2c has a bugfix and documentation improvements for you"

    * 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux:
    Documentation: i2c: mention ACPI method for instantiating devices
    Documentation: i2c: describe devicetree method for instantiating devices
    i2c: mv64xxx: refactor message start to ensure proper initialization

    Linus Torvalds
     
  • …el.org/pub/scm/linux/kernel/git/tip/tip

    Pull irq update from Thomas Gleixner:
    "Fix from the urgent branch: a trivial oneliner adding the missing
    Kconfig dependency curing build failures which have been discovered by
    several build robots.

    The update in the irq-core branch provides a new function in the
    irq/devres code, which is a prerequisite for driver developers to get
    rid of boilerplate code all over the place.

    Not a bugfix, but it has zero impact on the current kernel due to the
    lack of users. It's simpler to provide the infrastructure to
    interested parties via your tree than fulfilling the wishlist of
    driver maintainers on which particular commit or tag this should be
    based on"

    * 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    genirq: Add missing irq_to_desc export for CONFIG_SPARSE_IRQ=n

    * 'irq-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    genirq: Add devm_request_any_context_irq()

    Linus Torvalds
     
  • Pull timer fixes from Thomas Gleixner:
    "The following trilogy of patches brings you:

    - fix for a long standing math overflow issue with HZ < 60

    - an onliner fix for a corner case in the dreaded tick broadcast
    mechanism affecting a certain range of AMD machines which are
    infested with the infamous automagic C1E power control misfeature

    - a fix for one of the ARM platforms which allows the kernel to
    proceed and boot instead of stupidly panicing for no good reason.
    The patch is slightly larger than necessary, but it's less ugly
    than the alternative 5 liner"

    * 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    tick: Clear broadcast pending bit when switching to oneshot
    clocksource: Kona: Print warning rather than panic
    time: Fix overflow when HZ is smaller than 60

    Linus Torvalds
     
  • …it/rostedt/linux-trace

    Pull twi tracing fixes from Steven Rostedt:
    "Two urgent fixes in the tracing utility.

    The first is a fix for the way the ring buffer stores timestamps.
    After a restructure of the code was done, the ring buffer timestamp
    logic missed the fact that the first event on a sub buffer is to have
    a zero delta, as the full timestamp is stored on the sub buffer
    itself. But because the delta was not cleared to zero, the timestamp
    for that event will be calculated as the real timestamp + the delta
    from the last timestamp. This can skew the timestamps of the events
    and have them say they happened when they didn't really happen.
    That's bad.

    The second fix is for modifying the function graph caller site. When
    the stop machine was removed from updating the function tracing code,
    it missed updating the function graph call site location. It is still
    modified as if it is being done via stop machine. But it's not. This
    can lead to a GPF and kernel crash if the function graph call site
    happens to lie between cache lines and one CPU is executing it while
    another CPU is doing the update. It would be a very hard condition to
    hit, but the result is severe enough to have it fixed ASAP"

    * tag 'trace-fixes-v3.14-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace:
    ftrace/x86: Use breakpoints for converting function graph caller
    ring-buffer: Fix first commit on sub-buffer having non-zero delta

    Linus Torvalds
     
  • Pull x86 EFI fixes from Peter Anvin:
    "A few more EFI-related fixes"

    * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    x86/efi: Check status field to validate BGRT header
    x86/efi: Fix 32-bit fallout

    Linus Torvalds
     
  • Pull ARM SoC fixes from Kevin Hilman:
    "A collection of ARM SoC fixes for v3.14-rc1.

    Mostly a collection of Kconfig, device tree data and compilation fixes
    along with fix to drivers/phy that fixes a boot regression on some
    Marvell mvebu platforms"

    * tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc:
    dma: mv_xor: Silence a bunch of LPAE-related warnings
    ARM: ux500: disable msp2 device tree node
    ARM: zynq: Reserve not DMAable space in front of the kernel
    ARM: multi_v7_defconfig: Select CONFIG_SOC_DRA7XX
    ARM: imx6: Initialize low-power mode early again
    ARM: pxa: fix various compilation problems
    ARM: pxa: fix compilation problem on AM300EPD board
    ARM: at91: add Atmel's SAMA5D3 Xplained board
    spi/atmel: document clock properties
    mmc: atmel-mci: document clock properties
    ARM: at91: enable USB host on at91sam9n12ek board
    ARM: at91/dt: fix sama5d3 ohci hclk clock reference
    ARM: at91/dt: sam9263: fix compatibility string for the I2C
    ata: sata_mv: Fix probe failures with optional phys
    drivers: phy: Add support for optional phys
    drivers: phy: Make NULL a valid phy reference
    ARM: fix HAVE_ARM_TWD selection for OMAP and shmobile
    ARM: moxart: move DMA_OF selection to driver
    ARM: hisi: fix kconfig warning on HAVE_ARM_TWD

    Linus Torvalds
     
  • Signed-off-by: Wolfram Sang
    Acked-by: Guenter Roeck

    Wolfram Sang
     
  • Signed-off-by: Wolfram Sang

    Wolfram Sang
     
  • For non compressed extents, iterate_extent_inodes() gives us offsets
    that take into account the data offset from the file extent items, while
    for compressed extents it doesn't. Therefore we have to adjust them before
    placing them in a send clone instruction. Not doing this adjustment leads to
    the receiving end requesting for a wrong a file range to the clone ioctl,
    which results in different file content from the one in the original send
    root.

    Issue reproducible with the following excerpt from the test I made for
    xfstests:

    _scratch_mkfs
    _scratch_mount "-o compress-force=lzo"

    $XFS_IO_PROG -f -c "truncate 118811" $SCRATCH_MNT/foo
    $XFS_IO_PROG -c "pwrite -S 0x0d -b 39987 92267 39987" $SCRATCH_MNT/foo

    $BTRFS_UTIL_PROG subvolume snapshot -r $SCRATCH_MNT $SCRATCH_MNT/mysnap1

    $XFS_IO_PROG -c "pwrite -S 0x3e -b 80000 200000 80000" $SCRATCH_MNT/foo
    $BTRFS_UTIL_PROG filesystem sync $SCRATCH_MNT
    $XFS_IO_PROG -c "pwrite -S 0xdc -b 10000 250000 10000" $SCRATCH_MNT/foo
    $XFS_IO_PROG -c "pwrite -S 0xff -b 10000 300000 10000" $SCRATCH_MNT/foo

    # will be used for incremental send to be able to issue clone operations
    $BTRFS_UTIL_PROG subvolume snapshot -r $SCRATCH_MNT $SCRATCH_MNT/clones_snap

    $BTRFS_UTIL_PROG subvolume snapshot -r $SCRATCH_MNT $SCRATCH_MNT/mysnap2

    $FSSUM_PROG -A -f -w $tmp/1.fssum $SCRATCH_MNT/mysnap1
    $FSSUM_PROG -A -f -w $tmp/2.fssum -x $SCRATCH_MNT/mysnap2/mysnap1 \
    -x $SCRATCH_MNT/mysnap2/clones_snap $SCRATCH_MNT/mysnap2
    $FSSUM_PROG -A -f -w $tmp/clones.fssum $SCRATCH_MNT/clones_snap \
    -x $SCRATCH_MNT/clones_snap/mysnap1 -x $SCRATCH_MNT/clones_snap/mysnap2

    $BTRFS_UTIL_PROG send $SCRATCH_MNT/mysnap1 -f $tmp/1.snap
    $BTRFS_UTIL_PROG send $SCRATCH_MNT/clones_snap -f $tmp/clones.snap
    $BTRFS_UTIL_PROG send -p $SCRATCH_MNT/mysnap1 \
    -c $SCRATCH_MNT/clones_snap $SCRATCH_MNT/mysnap2 -f $tmp/2.snap

    _scratch_unmount
    _scratch_mkfs
    _scratch_mount

    $BTRFS_UTIL_PROG receive $SCRATCH_MNT -f $tmp/1.snap
    $FSSUM_PROG -r $tmp/1.fssum $SCRATCH_MNT/mysnap1 2>> $seqres.full

    $BTRFS_UTIL_PROG receive $SCRATCH_MNT -f $tmp/clones.snap
    $FSSUM_PROG -r $tmp/clones.fssum $SCRATCH_MNT/clones_snap 2>> $seqres.full

    $BTRFS_UTIL_PROG receive $SCRATCH_MNT -f $tmp/2.snap
    $FSSUM_PROG -r $tmp/2.fssum $SCRATCH_MNT/mysnap2 2>> $seqres.full

    Signed-off-by: Filipe David Borba Manana
    Signed-off-by: Chris Mason

    Filipe David Borba Manana
     
  • bdev is null when disk has disappeared and mounted with
    the degrade option

    stack trace
    ---------
    btrfs_sysfs_add_one+0x105/0x1c0 [btrfs]
    open_ctree+0x15f3/0x1fe0 [btrfs]
    btrfs_mount+0x5db/0x790 [btrfs]
    ? alloc_pages_current+0xa4/0x160
    mount_fs+0x34/0x1b0
    vfs_kern_mount+0x62/0xf0
    do_mount+0x22e/0xa80
    ? __get_free_pages+0x9/0x40
    ? copy_mount_options+0x31/0x170
    SyS_mount+0x7e/0xc0
    system_call_fastpath+0x16/0x1b
    ---------

    reproducer:
    -------
    mkfs.btrfs -draid1 -mraid1 /dev/sdc /dev/sdd
    (detach a disk)
    devmgt detach /dev/sdc [1]
    mount -o degrade /dev/sdd /btrfs
    -------

    [1] github.com/anajain/devmgt.git

    Signed-off-by: Anand Jain
    Tested-by: Hidetoshi Seto
    Signed-off-by: Chris Mason

    Anand Jain
     

15 Feb, 2014

5 commits

  • Because the offload mechanism can fall back to a standard transfer,
    having two seperate initialization states is unfortunate. Let's just
    have one state which does things consistently. This fixes a bug where
    some preparation was missing when the fallback happened. And it makes
    the code much easier to follow. To implement this, we put the check
    if offload is possible at the top of the offload setup function.

    Signed-off-by: Wolfram Sang
    Tested-by: Gregory CLEMENT
    Cc: stable@vger.kernel.org # v3.12+
    Fixes: 930ab3d403ae (i2c: mv64xxx: Add I2C Transaction Generator support)

    Wolfram Sang
     
  • Pull USB fixes from Greg KH:
    "Here is a bunch of USB fixes for 3.14-rc3. Most of these are xhci
    reverts, fixing a bunch of reported issues with USB 3 host controller
    issues that loads of people have been hitting (with the exception of
    kernel developers, all of our machines seem to be working fine, which
    is why these took so long to get resolved...)

    There are some other minor fixes and new device ids, as ususal. All
    have been in linux-next successfully"

    * tag 'usb-3.14-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (22 commits)
    usb: option: blacklist ZTE MF667 net interface
    Revert "usb: xhci: Link TRB must not occur within a USB payload burst"
    Revert "xhci: Avoid infinite loop when sg urb requires too many trbs"
    Revert "xhci: Set scatter-gather limit to avoid failed block writes."
    xhci 1.0: Limit arbitrarily-aligned scatter gather.
    Modpost: fixed USB alias generation for ranges including 0x9 and 0xA
    usb: core: Fix potential memory leak adding dyn USBdevice IDs
    USB: ftdi_sio: add Tagsys RFID Reader IDs
    usb: qcserial: add Netgear Aircard 340U
    usb-storage: enable multi-LUN scanning when needed
    USB: simple: add Dynastream ANT USB-m Stick device support
    usb-storage: add unusual-devs entry for BlackBerry 9000
    usb-storage: restrict bcdDevice range for Super Top in Cypress ATACB
    usb: phy: move some error messages to debug
    usb: ftdi_sio: add Mindstorms EV3 console adapter
    usb: dwc2: fix memory corruption in dwc2 driver
    usb: dwc2: fix role switch breakage
    usb: dwc2: bail out early when booting with "nousb"
    Revert "xhci: replace xhci_read_64() with readq()"
    Revert "xhci: replace xhci_write_64() with writeq()"
    ...

    Linus Torvalds
     
  • Pull tty/serial driver fixes from Greg KH:
    "Here are a small number of tty/serial driver fixes to resolve reported
    issues with 3.14-rc and earlier (in the case of the vt bugfix). Some
    of these have been tested and reported by a number of people as the
    tty bugfix was pretty commonly hit on some platforms.

    All have been in linux-next for a while"

    * tag 'tty-3.14-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty:
    vt: Fix secure clear screen
    serial: 8250: Support XR17V35x fraction divisor
    n_tty: Fix stale echo output
    serial: sirf: fix kernel panic caused by unpaired spinlock
    serial: 8250_pci: unbreak last serial ports on NetMos 9865 cards
    n_tty: Fix poll() when TIME_CHAR and MIN_CHAR == 0
    serial: omap: fix rs485 probe on defered pinctrl
    serial: 8250_dw: fix compilation warning when !CONFIG_PM_SLEEP
    serial: omap-serial: Move info message to probe function
    tty: Set correct tty name in 'active' sysfs attribute
    tty: n_gsm: Fix for modems with brk in modem status control
    drivers/tty/hvc: don't use module_init in non-modular hyp. console code

    Linus Torvalds
     
  • Pull staging driver fixes from Greg KH:
    "Here are a number (lots, I know) of fixes for staging drivers to
    resolve a bunch of reported issues.

    The largest patches here is one revert of a patch that is in 3.14-rc1
    to fix reported problems, and a sync of a usb host driver that
    required some ARM patches to go in before it could be accepted (which
    is why it missed -rc1)

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

    * tag 'staging-3.14-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (56 commits)
    staging/rtl8821ae: fix build, depends on MAC80211
    iio: max1363: Use devm_regulator_get_optional for optional regulator
    iio:accel:bma180: Use modifier instead of index in channel specification
    iio: adis16400: Set timestamp as the last element in chan_spec
    iio: ak8975: Fix calculation formula for convert micro tesla to gauss unit
    staging:iio:ad799x fix typo in ad799x_events[]
    iio: mxs-lradc: remove useless scale_available files
    iio: mxs-lradc: fix buffer overflow
    iio:magnetometer:mag3110: Fix output of decimal digits in show_int_plus_micros()
    iio:magnetometer:mag3110: Report busy in _read_raw() / write_raw() when buffer is enabled
    wlags49_h2: Fix overflow in wireless_set_essid()
    xlr_net: Fix missing trivial allocation check
    staging: r8188eu: overflow in rtw_p2p_get_go_device_address()
    staging: r8188eu: array overflow in rtw_mp_ioctl_hdl()
    staging: r8188eu: Fix typo in USB_DEVICE list
    usbip/userspace/libsrc/names.c: memory leak
    gpu: ion: dereferencing an ERR_PTR
    staging: comedi: usbduxsigma: fix unaligned dereferences
    staging: comedi: fix too early cleanup in comedi_auto_config()
    staging: android: ion: dummy: fix an error code
    ...

    Linus Torvalds
     
  • Pull driver core fix from Greg KH:
    "Here is a single driver core patch for 3.14-rc3 for the component code
    that Russell has found and fixed"

    * tag 'driver-core-3.14-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core:
    drivers/base: fix devres handling for master device

    Linus Torvalds