summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/ufs/ufshcd.h
diff options
context:
space:
mode:
authorAkinobu Mita <akinobu.mita@gmail.com>2014-10-23 13:25:12 +0300
committerChristoph Hellwig <hch@lst.de>2014-11-20 17:01:31 +0100
commit7c48bfd038e570cd12b33d6ab13316f3a0b0d1a7 (patch)
tree13ceab3cb6c1d3c607168d82ce5c5b235c5d8b7e /drivers/scsi/ufs/ufshcd.h
parent1899045510ff109980d9cc34e330fd8ca3631871 (diff)
downloadlinux-7c48bfd038e570cd12b33d6ab13316f3a0b0d1a7.tar.bz2
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: Akinobu Mita <mita@fixstars.com> Reviewed-by: Maya Erez <merez@codeaurora.org> Reviewed-by: Dolev Raviv <draviv@codeaurora.org> Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'drivers/scsi/ufs/ufshcd.h')
-rw-r--r--drivers/scsi/ufs/ufshcd.h2
1 files changed, 0 insertions, 2 deletions
diff --git a/drivers/scsi/ufs/ufshcd.h b/drivers/scsi/ufs/ufshcd.h
index 58ecdff5065c..4a574aa45855 100644
--- a/drivers/scsi/ufs/ufshcd.h
+++ b/drivers/scsi/ufs/ufshcd.h
@@ -392,8 +392,6 @@ struct ufs_hba {
* "UFS device" W-LU.
*/
struct scsi_device *sdev_ufs_device;
- struct scsi_device *sdev_rpmb;
- struct scsi_device *sdev_boot;
enum ufs_dev_pwr_mode curr_dev_pwr_mode;
enum uic_link_state uic_link_state;