linux/drivers/scsi/ufs
Akinobu Mita 7c48bfd038 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>
2014-11-20 17:01:31 +01:00
..
Kconfig ufs: Add support for clock scaling using devfreq framework 2014-10-01 13:11:25 +02:00
Makefile [SCSI] ufs: Add Platform glue driver for ufshcd 2013-05-02 16:16:50 -07:00
ufs.h ufs: add UFS power management support 2014-10-01 13:11:23 +02:00
ufshcd-pci.c ufs: add UFS power management support 2014-10-01 13:11:23 +02:00
ufshcd-pltfrm.c ufs: Add freq-table-hz property for UFS device 2014-10-01 13:11:25 +02:00
ufshcd.c ufs: fix reference counting of W-LUs 2014-11-20 17:01:31 +01:00
ufshcd.h ufs: fix reference counting of W-LUs 2014-11-20 17:01:31 +01:00
ufshci.h ufs: add UFS power management support 2014-10-01 13:11:23 +02:00
unipro.h ufs: definitions for phy interface 2014-10-01 13:11:26 +02:00