<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/spi, branch v5.8-rc3</title>
<subtitle>Linux Kernel (branches are rebased on master from time to time)</subtitle>
<id>https://sre.ring0.de/linux/atom?h=v5.8-rc3</id>
<link rel='self' href='https://sre.ring0.de/linux/atom?h=v5.8-rc3'/>
<link rel='alternate' type='text/html' href='https://sre.ring0.de/linux/'/>
<updated>2020-06-22T16:49:59Z</updated>
<entry>
<title>Merge tag 'spi-fix-v5.8-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi</title>
<updated>2020-06-22T16:49:59Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2020-06-22T16:49:59Z</published>
<link rel='alternate' type='text/html' href='https://sre.ring0.de/linux/commit/?id=dd0d718152e4c65b173070d48ea9dfc06894c3e5'/>
<id>urn:sha1:dd0d718152e4c65b173070d48ea9dfc06894c3e5</id>
<content type='text'>
Pull spi fixes from Mark Brown:
 "Quite a lot of fixes here for no single reason.

  There's a collection of the usual sort of device specific fixes and
  also a bunch of people have been working on spidev and the userspace
  test program spidev_test so they've got an unusually large collection
  of small fixes"

* tag 'spi-fix-v5.8-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi:
  spi: spidev: fix a potential use-after-free in spidev_release()
  spi: spidev: fix a race between spidev_release and spidev_remove
  spi: stm32-qspi: Fix error path in case of -EPROBE_DEFER
  spi: uapi: spidev: Use TABs for alignment
  spi: spi-fsl-dspi: Free DMA memory with matching function
  spi: tools: Add macro definitions to fix build errors
  spi: tools: Make default_tx/rx and input_tx static
  spi: dt-bindings: amlogic, meson-gx-spicc: Fix schema for meson-g12a
  spi: rspi: Use requested instead of maximum bit rate
  spi: spidev_test: Use %u to format unsigned numbers
  spi: sprd: switch the sequence of setting WDG_LOAD_LOW and _HIGH
</content>
</entry>
<entry>
<title>spi: spidev: fix a potential use-after-free in spidev_release()</title>
<updated>2020-06-18T16:47:00Z</updated>
<author>
<name>Zhenzhong Duan</name>
<email>zhenzhong.duan@gmail.com</email>
</author>
<published>2020-06-18T03:21:25Z</published>
<link rel='alternate' type='text/html' href='https://sre.ring0.de/linux/commit/?id=06096cc6c5a84ced929634b0d79376b94c65a4bd'/>
<id>urn:sha1:06096cc6c5a84ced929634b0d79376b94c65a4bd</id>
<content type='text'>
If an spi device is unbounded from the driver before the release
process, there will be an NULL pointer reference when it's
referenced in spi_slave_abort().

Fix it by checking it's already freed before reference.

Signed-off-by: Zhenzhong Duan &lt;zhenzhong.duan@gmail.com&gt;
Link: https://lore.kernel.org/r/20200618032125.4650-2-zhenzhong.duan@gmail.com
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>spi: spidev: fix a race between spidev_release and spidev_remove</title>
<updated>2020-06-18T16:46:59Z</updated>
<author>
<name>Zhenzhong Duan</name>
<email>zhenzhong.duan@gmail.com</email>
</author>
<published>2020-06-18T03:21:24Z</published>
<link rel='alternate' type='text/html' href='https://sre.ring0.de/linux/commit/?id=abd42781c3d2155868821f1b947ae45bbc33330d'/>
<id>urn:sha1:abd42781c3d2155868821f1b947ae45bbc33330d</id>
<content type='text'>
Imagine below scene, spidev is referenced after it's freed.

spidev_release()                spidev_remove()
...
                                spin_lock_irq(&amp;spidev-&gt;spi_lock);
                                    spidev-&gt;spi = NULL;
                                spin_unlock_irq(&amp;spidev-&gt;spi_lock);
mutex_lock(&amp;device_list_lock);
dofree = (spidev-&gt;spi == NULL);
if (dofree)
    kfree(spidev);
mutex_unlock(&amp;device_list_lock);
                                mutex_lock(&amp;device_list_lock);
                                list_del(&amp;spidev-&gt;device_entry);
                                device_destroy(spidev_class, spidev-&gt;devt);
                                clear_bit(MINOR(spidev-&gt;devt), minors);
                                if (spidev-&gt;users == 0)
                                    kfree(spidev);
                                mutex_unlock(&amp;device_list_lock);

Fix it by resetting spidev-&gt;spi in device_list_lock's protection.

Signed-off-by: Zhenzhong Duan &lt;zhenzhong.duan@gmail.com&gt;
Link: https://lore.kernel.org/r/20200618032125.4650-1-zhenzhong.duan@gmail.com
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>spi: stm32-qspi: Fix error path in case of -EPROBE_DEFER</title>
<updated>2020-06-17T12:26:41Z</updated>
<author>
<name>Patrice Chotard</name>
<email>patrice.chotard@st.com</email>
</author>
<published>2020-06-16T11:30:35Z</published>
<link rel='alternate' type='text/html' href='https://sre.ring0.de/linux/commit/?id=35700e221b18fa53401e5f315be90af9e0bbcdca'/>
<id>urn:sha1:35700e221b18fa53401e5f315be90af9e0bbcdca</id>
<content type='text'>
In case of -EPROBE_DEFER, stm32_qspi_release() was called
in any case which unregistered driver from pm_runtime framework
even if it has not been registered yet to it. This leads to:

stm32-qspi 58003000.spi: can't setup spi0.0, status -13
spi_master spi0: spi_device register error /soc/spi@58003000/mx66l51235l@0
spi_master spi0: Failed to create SPI device for /soc/spi@58003000/mx66l51235l@0
stm32-qspi 58003000.spi: can't setup spi0.1, status -13
spi_master spi0: spi_device register error /soc/spi@58003000/mx66l51235l@1
spi_master spi0: Failed to create SPI device for /soc/spi@58003000/mx66l51235l@1

On v5.7 kernel,this issue was not "visible", qspi driver was probed
successfully.

Fixes: 9d282c17b023 ("spi: stm32-qspi: Add pm_runtime support")

Signed-off-by: Patrice Chotard &lt;patrice.chotard@st.com&gt;
Link: https://lore.kernel.org/r/20200616113035.4514-1-patrice.chotard@st.com
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>spi: spi-fsl-dspi: Free DMA memory with matching function</title>
<updated>2020-06-11T15:27:26Z</updated>
<author>
<name>Krzysztof Kozlowski</name>
<email>krzk@kernel.org</email>
</author>
<published>2020-06-10T15:41:57Z</published>
<link rel='alternate' type='text/html' href='https://sre.ring0.de/linux/commit/?id=03fe7aaf0c3d40ef7feff2bdc7180c146989586a'/>
<id>urn:sha1:03fe7aaf0c3d40ef7feff2bdc7180c146989586a</id>
<content type='text'>
Driver allocates DMA memory with dma_alloc_coherent() but frees it with
dma_unmap_single().

This causes DMA warning during system shutdown (with DMA debugging) on
Toradex Colibri VF50 module:

    WARNING: CPU: 0 PID: 1 at ../kernel/dma/debug.c:1036 check_unmap+0x3fc/0xb04
    DMA-API: fsl-edma 40098000.dma-controller: device driver frees DMA memory with wrong function
      [device address=0x0000000087040000] [size=8 bytes] [mapped as coherent] [unmapped as single]
    Hardware name: Freescale Vybrid VF5xx/VF6xx (Device Tree)
      (unwind_backtrace) from [&lt;8010bb34&gt;] (show_stack+0x10/0x14)
      (show_stack) from [&lt;8011ced8&gt;] (__warn+0xf0/0x108)
      (__warn) from [&lt;8011cf64&gt;] (warn_slowpath_fmt+0x74/0xb8)
      (warn_slowpath_fmt) from [&lt;8017d170&gt;] (check_unmap+0x3fc/0xb04)
      (check_unmap) from [&lt;8017d900&gt;] (debug_dma_unmap_page+0x88/0x90)
      (debug_dma_unmap_page) from [&lt;80601d68&gt;] (dspi_release_dma+0x88/0x110)
      (dspi_release_dma) from [&lt;80601e4c&gt;] (dspi_shutdown+0x5c/0x80)
      (dspi_shutdown) from [&lt;805845f8&gt;] (device_shutdown+0x17c/0x220)
      (device_shutdown) from [&lt;80143ef8&gt;] (kernel_restart+0xc/0x50)
      (kernel_restart) from [&lt;801441cc&gt;] (__do_sys_reboot+0x18c/0x210)
      (__do_sys_reboot) from [&lt;80100060&gt;] (ret_fast_syscall+0x0/0x28)
    DMA-API: Mapped at:
     dma_alloc_attrs+0xa4/0x130
     dspi_probe+0x568/0x7b4
     platform_drv_probe+0x6c/0xa4
     really_probe+0x208/0x348
     driver_probe_device+0x5c/0xb4

Fixes: 90ba37033cb9 ("spi: spi-fsl-dspi: Add DMA support for Vybrid")
Signed-off-by: Krzysztof Kozlowski &lt;krzk@kernel.org&gt;
Acked-by: Vladimir Oltean &lt;vladimir.oltean@nxp.com&gt;
Cc: &lt;stable@vger.kernel.org&gt;
Link: https://lore.kernel.org/r/1591803717-11218-1-git-send-email-krzk@kernel.org
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>spi: rspi: Use requested instead of maximum bit rate</title>
<updated>2020-06-09T11:26:33Z</updated>
<author>
<name>Geert Uytterhoeven</name>
<email>geert+renesas@glider.be</email>
</author>
<published>2020-06-08T09:59:34Z</published>
<link rel='alternate' type='text/html' href='https://sre.ring0.de/linux/commit/?id=e0fe70051f12c25c4afb04cb10ca8648c6e761cf'/>
<id>urn:sha1:e0fe70051f12c25c4afb04cb10ca8648c6e761cf</id>
<content type='text'>
Currently, the RSPI driver always tries to use the maximum configured
bit rate for communicating with a slave device, even if the transfer(s)
in the current message specify a lower rate.

Use the mininum rate specified in the message instead.
Rename rspi_data.max_speed_hz accordingly.

Signed-off-by: Geert Uytterhoeven &lt;geert+renesas@glider.be&gt;
Link: https://lore.kernel.org/r/20200608095940.30516-3-geert+renesas@glider.be
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>Merge tag 'char-misc-5.8-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc</title>
<updated>2020-06-07T17:59:32Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2020-06-07T17:59:32Z</published>
<link rel='alternate' type='text/html' href='https://sre.ring0.de/linux/commit/?id=9aa900c8094dba7a60dc805ecec1e9f720744ba1'/>
<id>urn:sha1:9aa900c8094dba7a60dc805ecec1e9f720744ba1</id>
<content type='text'>
Pull char/misc driver updates from Greg KH:
 "Here is the large set of char/misc driver patches for 5.8-rc1

  Included in here are:

   - habanalabs driver updates, loads

   - mhi bus driver updates

   - extcon driver updates

   - clk driver updates (approved by the clock maintainer)

   - firmware driver updates

   - fpga driver updates

   - gnss driver updates

   - coresight driver updates

   - interconnect driver updates

   - parport driver updates (it's still alive!)

   - nvmem driver updates

   - soundwire driver updates

   - visorbus driver updates

   - w1 driver updates

   - various misc driver updates

  In short, loads of different driver subsystem updates along with the
  drivers as well.

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

* tag 'char-misc-5.8-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: (233 commits)
  habanalabs: correctly cast u64 to void*
  habanalabs: initialize variable to default value
  extcon: arizona: Fix runtime PM imbalance on error
  extcon: max14577: Add proper dt-compatible strings
  extcon: adc-jack: Fix an error handling path in 'adc_jack_probe()'
  extcon: remove redundant assignment to variable idx
  w1: omap-hdq: print dev_err if irq flags are not cleared
  w1: omap-hdq: fix interrupt handling which did show spurious timeouts
  w1: omap-hdq: fix return value to be -1 if there is a timeout
  w1: omap-hdq: cleanup to add missing newline for some dev_dbg
  /dev/mem: Revoke mappings when a driver claims the region
  misc: xilinx-sdfec: convert get_user_pages() --&gt; pin_user_pages()
  misc: xilinx-sdfec: cleanup return value in xsdfec_table_write()
  misc: xilinx-sdfec: improve get_user_pages_fast() error handling
  nvmem: qfprom: remove incorrect write support
  habanalabs: handle MMU cache invalidation timeout
  habanalabs: don't allow hard reset with open processes
  habanalabs: GAUDI does not support soft-reset
  habanalabs: add print for soft reset due to event
  habanalabs: improve MMU cache invalidation code
  ...
</content>
</entry>
<entry>
<title>spi: sprd: switch the sequence of setting WDG_LOAD_LOW and _HIGH</title>
<updated>2020-06-02T10:45:11Z</updated>
<author>
<name>Lingling Xu</name>
<email>ling_ling.xu@unisoc.com</email>
</author>
<published>2020-06-02T08:24:15Z</published>
<link rel='alternate' type='text/html' href='https://sre.ring0.de/linux/commit/?id=8bdd79dae1ff5397351b95e249abcae126572617'/>
<id>urn:sha1:8bdd79dae1ff5397351b95e249abcae126572617</id>
<content type='text'>
The watchdog counter consists of WDG_LOAD_LOW and WDG_LOAD_HIGH,
which would be loaded to watchdog counter once writing WDG_LOAD_LOW.

Fixes: ac1775012058 ("spi: sprd: Add the support of restarting the system")
Signed-off-by: Lingling Xu &lt;ling_ling.xu@unisoc.com&gt;
Signed-off-by: Chunyan Zhang &lt;chunyan.zhang@unisoc.com&gt;
Link: https://lore.kernel.org/r/20200602082415.5848-1-zhang.lyra@gmail.com
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>Merge remote-tracking branch 'spi/for-5.8' into spi-next</title>
<updated>2020-05-29T23:03:53Z</updated>
<author>
<name>Mark Brown</name>
<email>broonie@kernel.org</email>
</author>
<published>2020-05-29T23:03:53Z</published>
<link rel='alternate' type='text/html' href='https://sre.ring0.de/linux/commit/?id=fb02b9eb4e335f8965badd1e6ee24fdc284cb395'/>
<id>urn:sha1:fb02b9eb4e335f8965badd1e6ee24fdc284cb395</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Merge remote-tracking branch 'spi/for-5.7' into spi-linus</title>
<updated>2020-05-29T23:03:51Z</updated>
<author>
<name>Mark Brown</name>
<email>broonie@kernel.org</email>
</author>
<published>2020-05-29T23:03:51Z</published>
<link rel='alternate' type='text/html' href='https://sre.ring0.de/linux/commit/?id=0c0c5b8fabe596a7322f0b9b93b88f489b3f4bb3'/>
<id>urn:sha1:0c0c5b8fabe596a7322f0b9b93b88f489b3f4bb3</id>
<content type='text'>
</content>
</entry>
</feed>
