spi: s3c64xx: reject transfer request if suspended

Due to the changes of spi.c, spi controller is in danger
to lost its message by ->resume() callback.

[Resume path]
s3c64xx_spi_resume_operation
  pm_runtime_force_resume
  spi_master_resume
    spi_start_queue
      controller->cur_msg = NULL;

[Transfer path]
__spi_sync
  __spi_transfer_message_noqueue
    ctlr->cur_msg = msg
    __spi_pump_transfer_message
      s3c64xx_spi_transfer_one_message
        spi_finalize_current_message
          //access controller->cur_msg
    ctlr->cur_msg = NULL

As two paths could run in parallel, the cur_msg
can be NULL while doing transfer.

Reject request if the controller is in suspend,
and don't call the finalize function if we lost cur_msg already.

** change of spi.c **
https://lore.kernel.org/linux-spi/YrYfFiiYuvazKBtu@sirena.org.uk/T/

BUG: 319405160

Signed-off-by: Taeyang Choi <taeyang.choi@samsung.com>
(cherry picked from https://partner-android-review.googlesource.com/q/commit:43016e70f6cd49ea3a6ce78dc266a295ddaad06b)
(cherry picked from https://partner-android-review.googlesource.com/q/commit:daeeb90c4cbede5acd5f0e032a3ad6c9f982b4ae)
Merged-In: I4d5940b9ae789ed7b1b5f5656c078624df279f34
Change-Id: I4d5940b9ae789ed7b1b5f5656c078624df279f34
1 file changed
tree: df05f5d2f44a704a4776d6bc208dadf31b267f7c
  1. arch/
  2. Documentation/
  3. drivers/
  4. include/
  5. .checkpatch.conf
  6. .clang-format
  7. .gitignore
  8. abi_gki_aarch64_pixel
  9. BUILD.bazel
  10. build.config.cloudripper
  11. build.config.gs101
  12. build.config.gs201_emulator
  13. build.config.gs201_hybrid
  14. build.config.slider
  15. build.config.slider.blktest
  16. build.config.slider.debug_api
  17. build.config.slider.debug_kmemleak
  18. build.config.slider.debug_locking
  19. build.config.slider.debug_memory
  20. build.config.slider.debug_memory_accounting
  21. build.config.slider.kasan
  22. build.config.slider.khwasan
  23. build_cloudripper.sh
  24. build_gs201_zebu.sh
  25. build_mixed.sh
  26. build_slider.sh
  27. device.bazelrc
  28. Kbuild
  29. Kconfig.ext
  30. Kconfig.ext_modules
  31. Makefile
  32. Makefile.ext_modules.cloudripper
  33. Makefile.ext_modules.include
  34. Makefile.ext_modules.slider
  35. Makefile.include
  36. merge-from-mainline.sh
  37. merge-from-pixel-5.10.sh
  38. OWNERS
  39. OWNERS_core
  40. PREUPLOAD.cfg
  41. README.md
  42. slider.bzl
  43. tests.bzl
  44. vendor_boot_modules.gs101
  45. vendor_dlkm.blocklist.cloudripper
  46. vendor_dlkm.blocklist.slider
  47. vendor_dlkm.props.slider
  48. vendor_dlkm_modules.slider
  49. vendor_kernel_boot_modules.cloudripper
  50. vendor_kernel_boot_modules.gs201
README.md

Building with Bazel

# Files are copied to out/slider/dist
$ tools/bazel run --config=fast //private/google-modules/soc/gs:slider_dist

See build/kernel/kleaf/README.md for details.

ABI monitoring with Bazel (recommended)

Note: ABI monitoring is not supported on android-mainline branch.

# Update symbol list common/android/abi_gki_aarch64_pixel
$ tools/bazel run --config=fast //private/google-modules/soc/gs:slider_abi_update_symbol_list

# Update ABI common/android/abi_gki_aarch64.xml
$ tools/bazel run //common:kernel_aarch64_abi_update