Re: [RFC PATCH 04/13] scsi: ufs: ufshpb: Init part II - Attach scsi device

From: Bart Van Assche
Date: Fri May 15 2020 - 21:52:05 EST


On 2020-05-15 03:30, Avri Altman wrote:
> @@ -4628,6 +4628,9 @@ static int ufshcd_slave_alloc(struct scsi_device *sdev)
>
> ufshcd_get_lu_power_on_wp_status(hba, sdev);
>
> + if (ufshcd_is_hpb_supported(hba))
> + ufshpb_attach_sdev(hba, sdev);
> +
> return 0;
> }

This approach is unusual because:
- Direct calls from the ufshcd module into the ufshpb module make it
impossible to unload the latter kernel module.
- No other SCSI LLD calls directly into a device handler.

Thanks,

Bart.