10 Feb, 2016

1 commit

  • Compatible at93xx46 devices from both Microchip and Atmel expect a
    word-based address, regardless of whether the device is strapped for 8-
    or 16-bit operation. However, the offset parameter passed in when
    reading or writing at a specific location is always specified in terms
    of bytes.

    This commit fixes 16-bit read and write accesses by shifting the offset
    parameter to account for this difference between a byte offset and a
    word-based address.

    Signed-off-by: Cory Tusar
    Tested-by: Chris Healy
    Signed-off-by: Greg Kroah-Hartman

    Cory Tusar
     

09 Feb, 2016

11 commits

  • No need to use use continuous memory, it may be fail
    when memory deeply fragmented.

    Signed-off-by: Chen Feng
    Signed-off-by: Xia Qing
    Signed-off-by: Greg Kroah-Hartman

    Chen Feng
     
  • Compat ioctl is already introduced in drivers/char/ppdev.c in order to
    fix y2038 issue for PP[GS]ETTIME. There is no need to define these
    here.

    Suggested-by: Arnd Bergmann
    Tested-by: Sudip Mukherjee
    Signed-off-by: Bamvor Jian Zhang
    Signed-off-by: Greg Kroah-Hartman

    Bamvor Jian Zhang
     
  • The arg of ioctl in ppdev is the pointer of integer except the
    timeval in PPSETTIME, PPGETTIME. Different size of timeval
    is already supported by the previous patches. So, it is safe
    to add compat support.

    Signed-off-by: Bamvor Jian Zhang
    Reviewed-by: Arnd Bergmann
    Tested-by: Sudip Mukherjee
    Signed-off-by: Greg Kroah-Hartman

    Bamvor Jian Zhang
     
  • The y2038 issue for ppdev is changes of timeval in the ioctl
    (PPSETTIME and PPGETTIME). The size of struct timeval changes from
    8bytes to 16bytes due to the changes of time_t. It lead to the
    changes of the command of ioctl, e.g. for PPGETTIME, We have:

    on 32-bit (old): 0x80087095
    on 32-bit (new): 0x80107095
    on 64-bit : 0x80107095

    This patch define these two ioctl commands to support the 32bit
    and 64bit time_t application at the same time. And, introduce
    pp_set_timeout to remove some duplicated code.

    Signed-off-by: Bamvor Jian Zhang
    Reviewed-by: Arnd Bergmann
    Tested-by: Sudip Mukherjee
    Signed-off-by: Greg Kroah-Hartman

    Bamvor Jian Zhang
     
  • Simplify a few of the *generic* shared dev_warn() and dev_dbg()
    print messages for three reasons:

    0) Historically firmware_class code was added to help
    get device driver firmware binaries but these days
    request_firmware*() helpers are being repurposed for
    general *system data* needed by the kernel.

    1) This will also help generalize shared code as much as possible
    later in the future in consideration for a new extensible firmware
    API which will enable to separate usermode helper code out as much
    as possible.

    2) Kees Cook pointed out the the prints already have the device
    associated as dev_*() helpers are used, that should help identify
    the user and case in which the helpers are used. That should provide
    enough context and simplifies the messages further.

    v4: generalize debug/warn messages even further as suggested by
    Kees Cook.

    Cc: Rusty Russell
    Cc: Andrew Morton
    Cc: David Howells
    Cc: Casey Schaufler
    Cc: Ming Lei
    Cc: Takashi Iwai
    Cc: Vojtěch Pavlík
    Cc: Kyle McMartin
    Cc: Matthew Garrett
    Cc: linux-kernel@vger.kernel.org
    Signed-off-by: Luis R. Rodriguez
    Signed-off-by: Mimi Zohar
    Acked-by: Kees Cook
    Signed-off-by: Greg Kroah-Hartman

    Luis R. Rodriguez
     
  • Removed braces from single statement if condition.Fixed checkpatch.pl
    warning.

    Signed-off-by: Bhumika Goyal
    Signed-off-by: Greg Kroah-Hartman

    Bhumika Goyal
     
  • Some array of const char are not set as const.
    This patch fix that.

    Signed-off-by: LABBE Corentin
    Signed-off-by: Greg Kroah-Hartman

    LABBE Corentin
     
  • Add support for more than 128 peripherals by taking a lazy
    caching approach to the mapping tables. Instead of reading and
    caching the tables at boot given some fixed size, read them and
    cache them on an as needed basis. We still assume a max size of
    512 peripherals, trading off some space for simplicity.

    Based on a patch by Gilad Avidov and
    Sagar Dharia .

    Cc: Gilad Avidov
    Cc: Sagar Dharia
    Signed-off-by: Stephen Boyd
    Signed-off-by: Greg Kroah-Hartman

    Stephen Boyd
     
  • hdq_usecount was set to zero after a successful read, so
    omap_hdq_put could not properly free resources which leads
    e.g. to increasing usecounts in lsmod output

    Signed-off-by: Andreas Kemnade
    Acked-by: Evgeniy Polyakov
    Reviewed-by: Vignesh R
    Signed-off-by: Greg Kroah-Hartman

    Andreas Kemnade
     
  • Use kobj_to_dev() instead of open-coding it.

    Signed-off-by: Geliang Tang
    Signed-off-by: Greg Kroah-Hartman

    Geliang Tang
     
  • Use kobj_to_dev() instead of open-coding it.

    Signed-off-by: Geliang Tang
    Signed-off-by: Greg Kroah-Hartman

    Geliang Tang
     

08 Feb, 2016

28 commits

  • Use to_pci_dev() instead of open-coding it.

    Signed-off-by: Geliang Tang
    Acked-by: Tejun Heo
    Signed-off-by: Greg Kroah-Hartman

    Geliang Tang
     
  • Use to_pci_dev() instead of open-coding it.

    Signed-off-by: Geliang Tang
    Acked-by: Martyn Welch
    Signed-off-by: Greg Kroah-Hartman

    Geliang Tang
     
  • 1) Make the include file to sort from order
    2) clean up the driver to make more readability

    Let's clean up such trivial details.

    Signed-off-by: Caesar Wang
    Signed-off-by: Srinivas Kandagatla
    Signed-off-by: Greg Kroah-Hartman

    Caesar Wang
     
  • this pacthset try to fix the code style for sunxi.

    Signed-off-by: Caesar Wang
    Signed-off-by: Srinivas Kandagatla
    Signed-off-by: Greg Kroah-Hartman

    Caesar Wang
     
  • nvmem providers have restrictions on register strides, so return error
    when users attempt to read/write buffers with sizes which are less
    than word size.

    Without this patch the userspace would continue to try as it does not
    get any error from the nvmem core, resulting in a hang or endless loop
    in userspace.

    Reported-by: Ariel D'Alessandro
    Signed-off-by: Srinivas Kandagatla
    Signed-off-by: Greg Kroah-Hartman

    Srinivas Kandagatla
     
  • Add Mediatek EFUSE driver to access hardware data like
    thermal sensor calibration or HDMI impedance.

    Signed-off-by: Andrew-CT Chen
    Reviewed-by: Sascha Hauer
    Signed-off-by: Srinivas Kandagatla
    Signed-off-by: Greg Kroah-Hartman

    Andrew-CT Chen
     
  • Add Mediatek MT8173 EFUSE Devicetree binding file

    Signed-off-by: Andrew-CT Chen
    Reviewed-by: Sascha Hauer
    Signed-off-by: Srinivas Kandagatla
    Signed-off-by: Greg Kroah-Hartman

    Andrew-CT Chen
     
  • This commit adds support for NXP LPC18xx EEPROM memory found in NXP
    LPC185x/3x and LPC435x/3x/2x/1x devices.

    EEPROM size is 16384 bytes and it can be entirely read and
    written/erased with 1 word (4 bytes) granularity. The last page
    (128 bytes) contains the EEPROM initialization data and is not writable.

    Erase/program time is less than 3ms. The EEPROM device requires a
    ~1500 kHz clock (min 800 kHz, max 1600 kHz) that is generated dividing
    the system bus clock by the division factor, contained in the divider
    register (minus 1 encoded).

    EEPROM will be kept in Power Down mode except during read/write calls.

    Signed-off-by: Ariel D'Alessandro
    Acked-by: Stefan Wahren
    Signed-off-by: Srinivas Kandagatla
    Signed-off-by: Greg Kroah-Hartman

    Ariel D'Alessandro
     
  • Add the devicetree binding document for NXP LPC18xx EEPROM memory.

    Signed-off-by: Ariel D'Alessandro
    Acked-by: Stefan Wahren
    Acked-by: Rob Herring
    Signed-off-by: Srinivas Kandagatla
    Signed-off-by: Greg Kroah-Hartman

    Ariel D'Alessandro
     
  • Use kobj_to_dev() instead of open-coding it.

    Signed-off-by: Geliang Tang
    Reviewed-by: Viresh Kumar
    Signed-off-by: Greg Kroah-Hartman

    Geliang Tang
     
  • Use kobj_to_dev() instead of open-coding it.

    Signed-off-by: Geliang Tang
    Reviewed-by: Andrew Donnellan
    Acked-by: Michael Ellerman
    Signed-off-by: Greg Kroah-Hartman

    Geliang Tang
     
  • Use kobj_to_dev() instead of open-coding it.

    Signed-off-by: Geliang Tang
    Signed-off-by: Greg Kroah-Hartman

    Geliang Tang
     
  • Use to_i2c_client() instead of open-coding it.

    Signed-off-by: Geliang Tang
    Signed-off-by: Greg Kroah-Hartman

    Geliang Tang
     
  • Commit 985087dbcb02 'misc: add support for bmp18x chips to the bmp085
    driver' changed the BMP085 config symbol to a boolean. I see no
    reason why the shared code cannot be built as a module, so change it
    back to tristate.

    Fixes: 985087dbcb02 ("misc: add support for bmp18x chips to the bmp085 driver")
    Cc: Eric Andersson
    Signed-off-by: Ben Hutchings
    Acked-by: Arnd Bergmann
    Signed-off-by: Greg Kroah-Hartman

    Ben Hutchings
     
  • The Kconfig currently controlling compilation of this code is:

    drivers/misc/Kconfig:config ARM_CHARLCD
    drivers/misc/Kconfig: bool "ARM Ltd. Character LCD Driver"

    ...meaning that it currently is not being built as a module by anyone.

    Lets remove the modular code that is essentially orphaned, so that
    when reading the driver there is no doubt it is builtin-only.

    We explicitly disallow a driver unbind, since that doesn't have a
    sensible use case anyway, and this driver did not have a ".remove"
    function coded for non-modular drivers either.

    Since module_platform_driver() uses the same init level priority as
    builtin_platform_driver() the init ordering remains unchanged with
    this commit.

    We don't replace module.h with init.h since the file already has that.

    We also delete the MODULE_LICENSE tag etc. since all that information
    is already contained at the top of the file in the comments.

    Cc: Arnd Bergmann
    Cc: linux-arm-kernel@lists.infradead.org
    Signed-off-by: Paul Gortmaker
    Reviewed-by: Linus Walleij
    Signed-off-by: Greg Kroah-Hartman

    Paul Gortmaker
     
  • Allow the pch_phub driver to be build on MIPS platforms, in preparation
    for its use on the MIPS Boston board.

    Signed-off-by: Paul Burton
    Signed-off-by: Greg Kroah-Hartman

    Paul Burton
     
  • The pr_debug() will never be executed.

    Signed-off-by: Sudip Mukherjee
    Signed-off-by: Greg Kroah-Hartman

    Sudip Mukherjee
     
  • Signed-off-by: Matthias Lange
    Signed-off-by: Greg Kroah-Hartman

    Matthias Lange
     
  • Instead of calling release_firmware() on every error and then jumping
    lets have a common release_firmware() in the error path.
    This patch also fixes a memory leak where we missed release_firmware()
    if mic_x100_load_command_line() fails.

    Signed-off-by: Sudip Mukherjee
    Reviewed-by: Sudeep Dutt
    Signed-off-by: Greg Kroah-Hartman

    Sudip Mukherjee
     
  • Instead of jumping to a label and then returning from there lets return
    directly.

    Signed-off-by: Sudip Mukherjee
    Reviewed-by: Sudeep Dutt
    Signed-off-by: Greg Kroah-Hartman

    Sudip Mukherjee
     
  • If request_firmware() succeeds then rc becomes 0. After that if the test
    for strcmp() fails then we were jumping to label done: and returning rc.
    But rc being 0 we returned success whereas we have failed here and we
    were supposed to return an error.

    Signed-off-by: Sudip Mukherjee
    Reviewed-by: Sudeep Dutt
    Signed-off-by: Greg Kroah-Hartman

    Sudip Mukherjee
     
  • >From the error path we are printing an error message with dev_err(). No
    need to print almost same message with dev_dbg().

    Signed-off-by: Sudip Mukherjee
    Reviewed-by: Sudeep Dutt
    Signed-off-by: Greg Kroah-Hartman

    Sudip Mukherjee
     
  • After the loop we test "if (!retry)" to see if we timedout. The problem
    is "retry--" is a post-op so retry will be -1 at the end of the loop. I
    have fixed this by changing it to a pre-op instead.

    Signed-off-by: Dan Carpenter
    Signed-off-by: Greg Kroah-Hartman

    Dan Carpenter
     
  • This patch fixes the following crash seen when MIC reset is invoked in
    RESET_FAILED state due to device_del being called a second time on an
    already deleted device:

    [] device_del+0x45/0x1d0
    [] device_unregister+0x1e/0x60
    [] scif_unregister_device+0x12/0x20 [scif_bus]
    [] cosm_stop+0xaa/0xe0 [mic_cosm]
    [] cosm_reset_trigger_work+0x14/0x20 [mic_cosm]

    The fix consists in realizing that because cosm_reset changes the
    state to MIC_RESETTING, cosm_stop needs the previous state, before it
    changed to MIC_RESETTING, to decide whether a hw_ops->stop had
    previously been issued. This is now provided in a new cosm_device
    member cdev->prev_state.

    Reviewed-by: Sudeep Dutt
    Signed-off-by: Ashutosh Dixit
    Signed-off-by: Greg Kroah-Hartman

    Ashutosh Dixit
     
  • This adds Intel(R) Trace Hub PCI ID for Broxton SOC.

    Signed-off-by: Alexander Shishkin
    Signed-off-by: Greg Kroah-Hartman

    Alexander Shishkin
     
  • This adds Intel(R) Trace Hub PCI ID for Apollo Lake SOC.

    Signed-off-by: Alexander Shishkin
    Signed-off-by: Greg Kroah-Hartman

    Alexander Shishkin
     
  • Currently, the character device write method allocates a temporary buffer
    for user's data, but the user's data size is not sanitized and can cause
    arbitrarily large allocations via kzalloc() or an integer overflow that
    will then result in overwriting kernel memory.

    This patch trims the input buffer size to avoid these issues.

    Reported-by: Sasha Levin
    Signed-off-by: Alexander Shishkin
    Signed-off-by: Greg Kroah-Hartman

    Alexander Shishkin
     
  • Since both sw_start and sw_end are master indices, the size of array
    that holds them is sw_end - sw_start + 1, which the current code gets
    wrong, allocating one item less than required.

    This patch corrects the allocation size, avoiding potential slab
    corruption.

    Signed-off-by: Chunyan Zhang
    [alexander.shishkin@linux.intel.com: re-wrote the commit message]
    Signed-off-by: Alexander Shishkin
    Signed-off-by: Greg Kroah-Hartman

    Chunyan Zhang