lkml.org 
[lkml]   [2019]   [Dec]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 1/2] scsi: ufs: Put SCSI host after remove it
From
Date
On 12/16/19 6:31 AM, cang@codeaurora.org wrote:
> As SCSI host is allocated in ufshcd_platform_init() during platform
> drive probe, it is much more appropriate if platform driver calls
> ufshcd_dealloc_host() in their own drv->remove() path. How do you
> think if I change it as below? If it is OK to you, please ignore my
> previous mails.
>
> diff --git a/drivers/scsi/ufs/ufs-qcom.c b/drivers/scsi/ufs/ufs-qcom.c
> index 3d4582e..ea45756 100644
> --- a/drivers/scsi/ufs/ufs-qcom.c
> +++ b/drivers/scsi/ufs/ufs-qcom.c
> @@ -3239,6 +3239,7 @@ static int ufs_qcom_remove(struct platform_device
> *pdev)
>
>         pm_runtime_get_sync(&(pdev)->dev);
>         ufshcd_remove(hba);
> +       ufshcd_dealloc_host(hba);
>         return 0;
>  }

Hi Can,

Apparently some UFS drivers call ufshcd_remove() only and others (PCIe)
call both ufshcd_remove() and ufshcd_dealloc_host(). I think that the
above change will cause trouble for the PCIe driver unless the
ufshcd_dealloc_host() call is removed from ufshcd_pci_remove().

Thanks,

Bart.

\
 
 \ /
  Last update: 2019-12-16 18:41    [W:0.172 / U:0.296 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site