Shawn Lin 08d7544548 scsi: ufs: rockchip: Fix ufs_rockchip_remove
Modular test showed a bug in ufs_rockchip_remove which looks like:
[   23.132276][  T844] ufshcd-rockchip 2a2d0000.ufs: Unbalanced pm_runtime_enable!
[   23.133411][  T217] ueventd: restorecon_recursive: /sys/devices/platform/2a2d0000.ufs
[   23.141741][   T80] platform 2a2d0000.ufs: uic cmd 0x16 with arg3 0x0 completion timeout
[   23.141749][   T10] platform 2a2d0000.ufs: uic cmd 0x14 with arg3 0x0 completion timeout
[   23.141772][   T10] platform 2a2d0000.ufs: dme-reset: error code -110
[   23.141775][   T10] platform 2a2d0000.ufs: DME_RESET failed
[   23.141779][   T10] platform 2a2d0000.ufs: link startup failed -110
[   23.141782][   T10] platform 2a2d0000.ufs: UFS Host state=0
[   23.141785][   T10] platform 2a2d0000.ufs: outstanding reqs=0x0 tasks=0x0
[   23.141789][   T10] platform 2a2d0000.ufs: saved_err=0x0, saved_uic_err=0x0
[   23.141800][   T10] platform 2a2d0000.ufs: Device power mode=1, UIC link state=0
[   23.141801][   T80] Unable to handle kernel paging request at virtual address ffffffc00f170034
[   23.141804][   T80] Mem abort info:
[   23.147077][   T10] platform 2a2d0000.ufs: PM in progress=0, sys. suspended=0
[   23.147829][   T80]   ESR = 0x0000000096000007
[   23.148134][   T10] platform 2a2d0000.ufs: Auto BKOPS=0, Host self-block=0
[   23.148752][   T80]   EC = 0x25: DABT (current EL), IL = 32 bits

This can be triggered by:
while true
do
  echo "2a2d0000.ufs" > /sys/bus/platform/drivers/ufshcd-rockchip/unbind;
  sleep 2;
  echo "2a2d0000.ufs" > /sys/bus/platform/drivers/ufshcd-rockchip/bind;
  sleep 2;
done

Also we leave reference clk ungate if ufs is removed. Fix them all together.

Change-Id: I785a7c196ddacf2fb51eba441bcdb288441f9c30
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
2024-03-14 19:42:25 +08:00
2024-01-02 14:38:47 +08:00
2024-01-02 14:38:47 +08:00
2024-01-02 14:38:47 +08:00
2023-10-10 22:00:46 +02:00

Linux kernel
============

There are several guides for kernel developers and users. These guides can
be rendered in a number of formats, like HTML and PDF. Please read
Documentation/admin-guide/README.rst first.

In order to build the documentation, use ``make htmldocs`` or
``make pdfdocs``.  The formatted documentation can also be read online at:

    https://www.kernel.org/doc/html/latest/

There are various text files in the Documentation/ subdirectory,
several of them using the Restructured Text markup notation.

Please read the Documentation/process/changes.rst file, as it contains the
requirements for building and running the kernel, and information about
the problems which may result by upgrading your kernel.
Description
No description provided
Readme 7.9 GiB
Languages
C 97.7%
Assembly 1.6%
Makefile 0.3%
Perl 0.1%