14 Jan, 2020

4 commits

  • Extra Boot Config (XBC) allows admin to pass a tree-structured
    boot configuration file when boot up the kernel. This extends
    the kernel command line in an efficient way.

    Boot config will contain some key-value commands, e.g.

    key.word = value1
    another.key.word = value2

    It can fold same keys with braces, also you can write array
    data. For example,

    key {
    word1 {
    setting1 = data
    setting2
    }
    word2.array = "val1", "val2"
    }

    User can access these key-value pair and tree structure via
    SKC APIs.

    Link: http://lkml.kernel.org/r/157867221257.17873.1775090991929862549.stgit@devnote2

    Signed-off-by: Masami Hiramatsu
    Signed-off-by: Steven Rostedt (VMware)

    Masami Hiramatsu
     
  • As there's two struct ring_buffers in the kernel, it causes some confusion.
    The other one being the perf ring buffer. It was agreed upon that as neither
    of the ring buffers are generic enough to be used globally, they should be
    renamed as:

    perf's ring_buffer -> perf_buffer
    ftrace's ring_buffer -> trace_buffer

    This implements the changes to the ring buffer that ftrace uses.

    Link: https://lore.kernel.org/r/20191213140531.116b3200@gandalf.local.home

    Signed-off-by: Steven Rostedt (VMware)

    Steven Rostedt (VMware)
     
  • As we are working to remove the generic "ring_buffer" name that is used by
    both tracing and perf, the ring_buffer name for tracing will be renamed to
    trace_buffer, and perf's ring buffer will be renamed to perf_buffer.

    As there already exists a trace_buffer that is used by the trace_arrays, it
    needs to be first renamed to array_buffer.

    Link: https://lore.kernel.org/r/20191213153553.GE20583@krava

    Signed-off-by: Steven Rostedt (VMware)

    Steven Rostedt (VMware)
     
  • eBPF requires needing to know the size of the perf ring buffer structure.
    But it unfortunately has the same name as the generic ring buffer used by
    tracing and oprofile. To make it less ambiguous, rename the perf ring buffer
    structure to "perf_buffer".

    As other parts of the ring buffer code has "perf_" as the prefix, it only
    makes sense to give the ring buffer the "perf_" prefix as well.

    Link: https://lore.kernel.org/r/20191213153553.GE20583@krava
    Acked-by: Peter Zijlstra
    Suggested-by: Alexei Starovoitov
    Signed-off-by: Steven Rostedt (VMware)

    Steven Rostedt (VMware)
     

13 Jan, 2020

5 commits

  • Linus Torvalds
     
  • Pull RISC-V fixes from Paul Walmsley:
    "Two fixes for RISC-V:

    - Clear FP registers during boot when FP support is present, rather
    than when they aren't present

    - Move the header files associated with the SiFive L2 cache
    controller to drivers/soc (where the code was recently moved)"

    * tag 'riscv/for-v5.5-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux:
    riscv: Fixup obvious bug for fp-regs reset
    riscv: move sifive_l2_cache.h to include/soc

    Linus Torvalds
     
  • CSR_MISA is defined in Privileged Architectures' spec: 3.1.1 Machine
    ISA Register misa. Every bit:1 indicate a feature, so we should beqz
    reset_done when there is no F/D bit in csr_misa register.

    Signed-off-by: Guo Ren
    [paul.walmsley@sifive.com: fix typo in commit message]
    Fixes: 9e80635619b51 ("riscv: clear the instruction cache and all registers when booting")
    Signed-off-by: Paul Walmsley

    Guo Ren
     
  • The commit 9209fb51896f ("riscv: move sifive_l2_cache.c to drivers/soc")
    moves the sifive L2 cache driver to driver/soc. It did not move the
    header file along with the driver. Therefore this patch moves the header
    file to driver/soc

    Signed-off-by: Yash Shah
    Reviewed-by: Anup Patel
    [paul.walmsley@sifive.com: updated to fix the include guard]
    Fixes: 9209fb51896f ("riscv: move sifive_l2_cache.c to drivers/soc")
    Signed-off-by: Paul Walmsley

    Yash Shah
     
  • Pull iommu fixes from Joerg Roedel:

    - Two fixes for VT-d and generic IOMMU code to fix teardown on error
    handling code paths.

    - Patch for the Intel VT-d driver to fix handling of non-PCI devices

    - Fix W=1 compile warning in dma-iommu code

    * tag 'iommu-fixes-v5.5-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu:
    iommu/dma: fix variable 'cookie' set but not used
    iommu/vt-d: Unlink device if failed to add to group
    iommu: Remove device link to group on failure
    iommu/vt-d: Fix adding non-PCI devices to Intel IOMMU

    Linus Torvalds
     

12 Jan, 2020

2 commits

  • Pull i2c fixes from Wolfram Sang:
    "Two driver bugfixes, a documentation fix, and a removal of a spec
    violation for the bus recovery algorithm in the core"

    * 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux:
    i2c: fix bus recovery stop mode timing
    i2c: bcm2835: Store pointer to bus clock
    dt-bindings: i2c: at91: fix i2c-sda-hold-time-ns documentation for sam9x60
    i2c: at91: fix clk_offset for sam9x60

    Linus Torvalds
     
  • Pull thread fixes from Christian Brauner:
    "This contains a series of patches to fix CLONE_SETTLS when used with
    clone3().

    The clone3() syscall passes the tls argument through struct clone_args
    instead of a register. This means, all architectures that do not
    implement copy_thread_tls() but still support CLONE_SETTLS via
    copy_thread() expecting the tls to be located in a register argument
    based on clone() are currently unfortunately broken. Their tls value
    will be garbage.

    The patch series fixes this on all architectures that currently define
    __ARCH_WANT_SYS_CLONE3. It also adds a compile-time check to ensure
    that any architecture that enables clone3() in the future is forced to
    also implement copy_thread_tls().

    My ultimate goal is to get rid of the copy_thread()/copy_thread_tls()
    split and just have copy_thread_tls() at some point in the not too
    distant future (Maybe even renaming copy_thread_tls() back to simply
    copy_thread() once the old function is ripped from all arches). This
    is dependent now on all arches supporting clone3().

    While all relevant arches do that now there are still four missing:
    ia64, m68k, sh and sparc. They have the system call reserved, but not
    implemented. Once they all implement clone3() we can get rid of
    ARCH_WANT_SYS_CLONE3 and HAVE_COPY_THREAD_TLS.

    This series also includes a minor fix for the arm64 uapi headers which
    caused __NR_clone3 to be missing from the exported user headers.

    Unfortunately the series came in a little late especially given that
    it touches a range of architectures. Due to the holidays not all arch
    maintainers responded in time probably due to their backlog. Will and
    Arnd have thankfully acked the arm specific changes.

    Given that the changes are straightforward and rather minimal combined
    with the fact the that clone3() with CLONE_SETTLS is broken I decided
    to send them post rc3 nonetheless"

    * tag 'clone3-tls-v5.5-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/brauner/linux:
    um: Implement copy_thread_tls
    clone3: ensure copy_thread_tls is implemented
    xtensa: Implement copy_thread_tls
    riscv: Implement copy_thread_tls
    parisc: Implement copy_thread_tls
    arm: Implement copy_thread_tls
    arm64: Implement copy_thread_tls
    arm64: Move __ARCH_WANT_SYS_CLONE3 definition to uapi headers

    Linus Torvalds
     

11 Jan, 2020

11 commits

  • Pull HID fix from Jiri Kosina:
    "A regression fix for EPOLLOUT handling in hidraw and uhid"

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid:
    HID: hidraw, uhid: Always report EPOLLOUT

    Linus Torvalds
     
  • Pull USB/PHY fixes from Greg KH:
    "Here are a number of USB and PHY driver fixes for 5.5-rc6

    Nothing all that unusual, just the a bunch of small fixes for a lot of
    different reported issues. The PHY driver fixes are in here as they
    interacted with the usb drivers.

    Full details of the patches are in the shortlog, and all of these have
    been in linux-next with no reported issues"

    * tag 'usb-5.5-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (24 commits)
    usb: missing parentheses in USE_NEW_SCHEME
    usb: ohci-da8xx: ensure error return on variable error is set
    usb: musb: Disable pullup at init
    usb: musb: fix idling for suspend after disconnect interrupt
    usb: typec: ucsi: Fix the notification bit offsets
    USB: Fix: Don't skip endpoint descriptors with maxpacket=0
    USB-PD tcpm: bad warning+size, PPS adapters
    phy/rockchip: inno-hdmi: round clock rate down to closest 1000 Hz
    usb: chipidea: host: Disable port power only if previously enabled
    usb: cdns3: should not use the same dev_id for shared interrupt handler
    usb: dwc3: gadget: Fix request complete check
    usb: musb: dma: Correct parameter passed to IRQ handler
    usb: musb: jz4740: Silence error if code is -EPROBE_DEFER
    usb: udc: tegra: select USB_ROLE_SWITCH
    USB: core: fix check for duplicate endpoints
    phy: cpcap-usb: Drop extra write to usb2 register
    phy: cpcap-usb: Improve host vs docked mode detection
    phy: cpcap-usb: Prevent USB line glitches from waking up modem
    phy: mapphone-mdm6600: Fix uninitialized status value regression
    phy: cpcap-usb: Fix flakey host idling and enumerating of devices
    ...

    Linus Torvalds
     
  • Pull char/misc fix from Greg KH:
    "Here is a single fix, for the chrdev core, for 5.5-rc6

    There's been a long-standing race condition triggered by syzbot, and
    occasionally real people, in the chrdev open() path. Will finally took
    the time to track it down and fix it for real before the holidays.

    Here's that one patch, it's been in linux-next for a while with no
    reported issues and it does fix the reported problem"

    * tag 'char-misc-5.5-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc:
    chardev: Avoid potential use-after-free in 'chrdev_open()'

    Linus Torvalds
     
  • Pull staging fixes from Greg KH:
    "Here are some small staging driver fixes for 5.5-rc6.

    Nothing major here, just some small fixes for a comedi driver, the
    vt6656 driver, and a new device id for the rtl8188eu driver.

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

    * tag 'staging-5.5-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging:
    staging: rtl8188eu: Add device code for TP-Link TL-WN727N v5.21
    staging: comedi: adv_pci1710: fix AI channels 16-31 for PCI-1713
    staging: vt6656: set usb_set_intfdata on driver fail.
    staging: vt6656: remove bool from vnt_radio_power_on ret
    staging: vt6656: limit reg output to block size
    staging: vt6656: correct return of vnt_init_registers.
    staging: vt6656: Fix non zero logical return of, usb_control_msg

    Linus Torvalds
     
  • Pull tty/serial fixes from Greg KH:
    "Here are two tty/serial driver fixes for 5.5-rc6.

    The first fixes a much much reported issue with a previous tty port
    link patch that is in your tree, and the second fixes a problem where
    the serdev driver would claim ACPI devices that it shouldn't be
    claiming.

    Both have been in linux-next for a while with no reported issues"

    * tag 'tty-5.5-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty:
    serdev: Don't claim unsupported ACPI serial devices
    tty: always relink the port

    Linus Torvalds
     
  • Pull block fixes from Jens Axboe:
    "A few fixes that should go into this round.

    This pull request contains two NVMe fixes via Keith, removal of a dead
    function, and a fix for the bio op for read truncates (Ming)"

    * tag 'block-5.5-2020-01-10' of git://git.kernel.dk/linux-block:
    nvmet: fix per feat data len for get_feature
    nvme: Translate more status codes to blk_status_t
    fs: move guard_bio_eod() after bio_set_op_attrs
    block: remove unused mp_bvec_last_segment

    Linus Torvalds
     
  • Pull io_uring fix from Jens Axboe:
    "Single fix for this series, fixing a regression with the short read
    handling.

    This just removes it, as it cannot safely be done for all cases"

    * tag 'io_uring-5.5-2020-01-10' of git://git.kernel.dk/linux-block:
    io_uring: remove punt of short reads to async context

    Linus Torvalds
     
  • Pull MTD fixes from Miquel Raynal:
    "MTD:
    - sm_ftl: Fix NULL pointer warning.

    Raw NAND:
    - Cadence: fix compile testing.
    - STM32: Avoid locking.

    Onenand:
    - Fix several sparse/build warnings.

    SPI-NOR:
    - Add a flag to fix interaction with Micron parts"

    * tag 'mtd/fixes-for-5.5-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux:
    mtd: spi-nor: Fix the writing of the Status Register on micron flashes
    mtd: sm_ftl: fix NULL pointer warning
    mtd: onenand: omap2: Pass correct flags for prep_dma_memcpy
    mtd: onenand: samsung: Fix iomem access with regular memcpy
    mtd: onenand: omap2: Fix errors in style
    mtd: cadence: Fix cast to pointer from integer of different size warning
    mtd: rawnand: stm32_fmc2: avoid to lock the CPU bus

    Linus Torvalds
     
  • Pull sound fixes from Takashi Iwai:
    "A few piled ASoC fixes and usual HD-audio and USB-audio fixups. Some
    of them are for ASoC core error-handling"

    * tag 'sound-5.5-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
    ALSA: hda: enable regmap internal locking
    ALSA: hda/realtek - Add quirk for the bass speaker on Lenovo Yoga X1 7th gen
    ALSA: hda/realtek - Set EAPD control to default for ALC222
    ALSA: usb-audio: Apply the sample rate quirk for Bose Companion 5
    ALSA: hda/realtek - Add new codec supported for ALCS1200A
    ASoC: Intel: boards: Fix compile-testing RT1011/RT5682
    ASoC: SOF: imx8: Fix dsp_box offset
    ASoC: topology: Prevent use-after-free in snd_soc_get_pcm_runtime()
    ASoC: fsl_audmix: add missed pm_runtime_disable
    ASoC: stm32: spdifrx: fix input pin state management
    ASoC: stm32: spdifrx: fix race condition in irq handler
    ASoC: stm32: spdifrx: fix inconsistent lock state
    ASoC: core: Fix access to uninitialized list heads
    ASoC: soc-core: Set dpcm_playback / dpcm_capture
    ASoC: SOF: imx8: fix memory allocation failure check on priv->pd_dev
    ASoC: SOF: Intel: hda: hda-dai: fix oops on hda_link .hw_free
    ASoC: SOF: fix fault at driver unload after failed probe

    Linus Torvalds
     
  • Pull thermal fix from Daniel Lezcano:
    "Fix backward compatibility with old DTBs on QCOM tsens (Amit
    Kucheria)"

    * tag 'thermal-v5.5-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/thermal/linux:
    drivers: thermal: tsens: Work with old DTBs

    Linus Torvalds
     
  • Pull power management fixes from Rafael Wysocki:
    "Prevent the cpufreq-dt driver from probing Tegra20/30 (Dmitry
    Osipenko) and prevent the Intel RAPL power capping driver from
    crashing during CPU initialization due to a NULL pointer dereference
    if the processor model in use is not known to it (Harry Pan)"

    * tag 'pm-5.5-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
    powercap: intel_rapl: add NULL pointer check to rapl_mmio_cpu_online()
    cpufreq: dt-platdev: Blacklist NVIDIA Tegra20 and Tegra30 SoCs

    Linus Torvalds
     

10 Jan, 2020

18 commits

  • The existing implementation for the get_feature admin-cmd does not
    use per-feature data len. This patch introduces a new helper function
    nvmet_feat_data_len(), which is used to calculate per feature data len.
    Right now we only set data len for fid 0x81 (NVME_FEAT_HOST_ID).

    Fixes: commit e9061c397839 ("nvmet: Remove the data_len field from the nvmet_req struct")

    Reviewed-by: Christoph Hellwig
    Signed-off-by: Amit Engel
    [endiness, naming, and kernel style fixes]
    Signed-off-by: Chaitanya Kulkarni
    Signed-off-by: Keith Busch
    Signed-off-by: Jens Axboe

    Amit Engel
     
  • Decode interrupted command and not ready namespace nvme status codes to
    BLK_STS_TARGET. These are not generic IO errors and should use a non-path
    specific error so that it can use the non-failover retry path.

    Reported-by: John Meneghini
    Cc: Hannes Reinecke
    Reviewed-by: Christoph Hellwig
    Signed-off-by: Keith Busch
    Signed-off-by: Jens Axboe

    Keith Busch
     
  • hidraw and uhid device nodes are always available for writing so we should
    always report EPOLLOUT and EPOLLWRNORM bits, not only in the cases when
    there is nothing to read.

    Reported-by: Linus Torvalds
    Fixes: be54e7461ffdc ("HID: uhid: Fix returning EPOLLOUT from uhid_char_poll")
    Fixes: 9f3b61dc1dd7b ("HID: hidraw: Fix returning EPOLLOUT from hidraw_poll")
    Signed-off-by: Jiri Kosina

    Jiri Kosina
     
  • * powercap:
    powercap: intel_rapl: add NULL pointer check to rapl_mmio_cpu_online()

    Rafael J. Wysocki
     
  • Pull pstore fix from Kees Cook:
    "Cengiz Can forwarded a Coverity report about more problems with a rare
    pstore initialization error path, so the allocation lifetime was
    rearranged to avoid needing to share the kfree() responsibilities
    between caller and callee"

    * tag 'pstore-v5.5-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux:
    pstore/ram: Regularize prz label allocation lifetime

    Linus Torvalds
     
  • Pull drm fixes from Dave Airlie:
    "Pre-LCA pull request I'm not sure how things will look next week,
    myself and Daniel are at LCA and I'm speaking quite late, so if I get
    my talk finished I'll probably process fixes.

    This week has a bunch of i915 fixes, some amdgpu fixes, one sun4i, one
    core MST, and one core fb_helper fix. More details below:

    core:
    - mst Fix NO_STOP_BIT bit offset (Wayne)

    fb_helper:
    - fb_helper: Fix bits_per_pixel param set behavior to round up
    (Geert)

    sun4i:
    - Fix RGB_DIV clock min divider on old hardware (Chen-Yu)

    amdgpu:
    - Stability fix for raven
    - Reduce pixel encoding to if max clock is exceeded on HDMI to allow
    additional high res modes
    - enable DRIVER_SYNCOBJ_TIMELINE for amdgpu

    i915:
    - Fix GitLab issue #446 causing GPU hangs: Do not restore invalid RS
    state
    - Fix GitLab issue #846: Restore coarse power gating that was
    disabled by initial RC66 context corruption security fixes.
    - Revert f6ec9483091f ("drm/i915: extend audio CDCLK>=2*BCLK
    constraint to more platforms") to avoid screen flicker
    - Fix to fill in unitialized uabi_instance in virtual engine uAPI
    - Add two missing W/As for ICL and EHL"

    * tag 'drm-fixes-2020-01-10' of git://anongit.freedesktop.org/drm/drm:
    drm/amdgpu: add DRIVER_SYNCOBJ_TIMELINE to amdgpu
    drm/amd/display: Reduce HDMI pixel encoding if max clock is exceeded
    Revert "drm/amdgpu: Set no-retry as default."
    drm/fb-helper: Round up bits_per_pixel if possible
    drm/sun4i: tcon: Set RGB DCLK min. divider based on hardware model
    drm/i915/dp: Disable Port sync mode correctly on teardown
    drm/i915: Add Wa_1407352427:icl,ehl
    drm/i915: Add Wa_1408615072 and Wa_1407596294 to icl,ehl
    drm/i915/gt: Restore coarse power gating
    drm/i915/gt: Do not restore invalid RS state
    drm/i915: Limit audio CDCLK>=2*BCLK constraint back to GLK only
    drm/i915/gt: Mark up virtual engine uabi_instance
    drm/dp_mst: correct the shifting in DP_REMOTE_I2C_READ

    Linus Torvalds
     
  • Pull rdma fixes from Jason Gunthorpe:
    "First RDMA subsystem updates for 5.5-rc. A very small set of fixes,
    most people seem to still be recovering from December!

    Five small driver fixes:

    - Fix error flow with MR allocation in bnxt_re

    - An errata work around for bnxt_re

    - Misuse of the workqueue API in hfi1

    - Protocol error in hfi1

    - Regression in 5.5 related to the mmap rework with i40iw"

    * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma:
    i40iw: Remove setting of VMA private data and use rdma_user_mmap_io
    IB/hfi1: Adjust flow PSN with the correct resync_psn
    IB/hfi1: Don't cancel unused work item
    RDMA/bnxt_re: Fix Send Work Entry state check while polling completions
    RDMA/bnxt_re: Avoid freeing MR resources if dereg fails

    Linus Torvalds
     
  • …m-intel into drm-fixes

    - Fix GitLab issue #446 causing GPU hangs: Do not restore invalid RS state
    - Fix GitLab issue #846: Restore coarse power gating that was disabled
    by initial RC66 context corruption security fixes.
    - Revert f6ec9483091f ("drm/i915: extend audio CDCLK>=2*BCLK constraint to more platforms")
    to avoid screen flicker
    - Fix to fill in unitialized uabi_instance in virtual engine uAPI
    - Add two missing W/As for ICL and EHL

    Signed-off-by: Dave Airlie <airlied@redhat.com>
    From: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
    Link: https://patchwork.freedesktop.org/patch/msgid/20200109133458.GA15558@jlahtine-desk.ger.corp.intel.com

    Dave Airlie
     
  • Pull GPIO fixes from Linus Walleij:
    "Here is a host of GPIO fixes for the v5.5 series. The ACPI fix is
    especially important, see summary below and in the commit for details:

    - Select GPIOLIB_IRQCHIP on the max77620 GPIO expander

    - Fix context restore in the Zynq driver

    - Create a new ACPI quirk handler for disabling wakeups on
    problematic hardware.

    - Fix a coding style issue on the mockup device"

    * tag 'gpio-v5.5-3' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio:
    gpiolib: acpi: Add honor_wakeup module-option + quirk mechanism
    gpiolib: acpi: Turn dmi_system_id table into a generic quirk table
    gpio: zynq: Fix for bug in zynq_gpio_restore_context API
    gpio: max77620: Add missing dependency on GPIOLIB_IRQCHIP
    gpio: mockup: fix coding style

    Linus Torvalds
     
  • Pull pin control fixes from Linus Walleij:
    "Two fixes for pin control, not much to say about it, it's just regular
    driver fixes:

    - Fix erroneous shift in the Meson driver

    - Make Lochnagar select the GPIOLIB Kconfig symbol"

    * tag 'pinctrl-v5.5-4' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl:
    pinctrl: meson: Fix wrong shift value when get drive-strength
    pinctrl: lochnagar: select GPIOLIB

    Linus Torvalds
     
  • Pull input fixes from Dmitry Torokhov:
    "Just a few small fixups here"

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
    Input: imx_sc_key - only take the valid data from SCU firmware as key state
    Input: add safety guards to input_set_keycode()
    Input: input_event - fix struct padding on sparc64
    Input: uinput - always report EPOLLOUT

    Linus Torvalds
     
  • The I2C specification states that tsu:sto for standard mode timing must
    be at minimum 4us. Pictographically, this is:

    SCL: ____/~~~~~~~~~
    SDA: _________/~~~~
    ->| |
    Signed-off-by: Wolfram Sang

    Russell King
     
  • Micron flashes do not support 16 bit writes on the Status Register.
    According to micron datasheets, when using the Write Status Register
    (01h) command, the chip select should be driven LOW and held LOW until
    the eighth bit of the last data byte has been latched in, after which
    it must be driven HIGH. If CS is not driven HIGH, the command is not
    executed, flag status register error bits are not set, and the write enable
    latch remains set to 1. This fixes the lock operations on micron flashes.

    Reported-by: John Garry
    Fixes: 39d1e3340c73 ("mtd: spi-nor: Fix clearing of QE bit on lock()/unlock()")
    Signed-off-by: Tudor Ambarus
    Tested-by: John Garry
    Signed-off-by: Miquel Raynal

    Tudor Ambarus
     
  • With gcc -O3, we get a new warning:

    In file included from arch/arm64/include/asm/processor.h:28,
    from drivers/mtd/sm_ftl.c:8:
    In function 'memset',
    inlined from 'sm_read_sector.constprop' at drivers/mtd/sm_ftl.c:250:3:
    include/linux/string.h:411:9: error: argument 1 null where non-null expected [-Werror=nonnull]
    return __builtin_memset(p, c, size);

    >From all I can tell, this cannot happen (the function is called
    either with a NULL buffer or with a -1 block number but not both),
    but adding a check makes it more robust and avoids the warning.

    Fixes: mmtom ("init/Kconfig: enable -O3 for all arches")
    Signed-off-by: Arnd Bergmann
    Signed-off-by: Miquel Raynal

    Arnd Bergmann
     
  • The commit converting the driver to DMAengine was missing the flags for
    the memcpy prepare call.
    It went unnoticed since the omap-dma driver was ignoring them.

    Fixes: 3ed6a4d1de2c5 (" mtd: onenand: omap2: Convert to use dmaengine for memcp")
    Reported-by: Aaro Koskinen
    Signed-off-by: Peter Ujfalusi
    Tested-by: H. Nikolaus Schaller
    Tested-by: Aaro Koskinen
    Signed-off-by: Miquel Raynal

    Peter Ujfalusi
     
  • The __iomem memory should be copied with memcpy_fromio. This fixes
    Sparse warnings like:

    drivers/mtd/nand/onenand/samsung_mtd.c:678:40: warning: incorrect type in argument 2 (different address spaces)
    drivers/mtd/nand/onenand/samsung_mtd.c:678:40: expected void const *from
    drivers/mtd/nand/onenand/samsung_mtd.c:678:40: got void [noderef] *[assigned] p
    drivers/mtd/nand/onenand/samsung_mtd.c:679:19: warning: incorrect type in assignment (different address spaces)
    drivers/mtd/nand/onenand/samsung_mtd.c:679:19: expected void [noderef] *[assigned] p
    drivers/mtd/nand/onenand/samsung_mtd.c:679:19: got unsigned char *

    Reported-by: kbuild test robot
    Signed-off-by: Krzysztof Kozlowski
    Signed-off-by: Miquel Raynal

    Krzysztof Kozlowski
     
  • Correct mispelling, spacing, and coding style flaws caught by
    checkpatch.pl script in the Omap2 Onenand driver .

    Signed-off-by: Amir Mahdi Ghorbanian
    Signed-off-by: Miquel Raynal

    Amir Mahdi Ghorbanian
     
  • Use dma_addr_t type to pass memory address and control data in
    DMA descriptor fields memory_pointer and ctrl_data_ptr
    To fix warning: cast to pointer from integer of different size

    Signed-off-by: Vasyl Gomonovych
    Acked-by: Olof Johansson
    Signed-off-by: Miquel Raynal

    Vasyl Gomonovych