Skip to content
Commit 7c48bfd0 authored by Akinobu Mita's avatar Akinobu Mita Committed by Christoph Hellwig
Browse files

ufs: fix reference counting of W-LUs



UFS driver adds three well known LUs in the initialization, but those
reference counts are not decremented, so it makes ufshcd module
impossible to unload.

This fixes it by putting scsi_device_put() in the initalization, and in
order to protect concurrent access to hba->sdev_ufs_device (UFS Device
W-LU) from manual delete, increment the reference count while requesting
device power mode setting.

The rest of W-LUs (hba->sdev_boot and hba->sdev_rpmb) are not directly
used from driver, so these references in struct ufs_hba are removed.

Signed-off-by: default avatarAkinobu Mita <mita@fixstars.com>
Reviewed-by: default avatarMaya Erez <merez@codeaurora.org>
Reviewed-by: default avatarDolev Raviv <draviv@codeaurora.org>
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
parent 18990455
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment