Re: [PATCH V5 11/17] scsi: ufs: add UFS power management support

Dolev Raviv
2014-09-25T10:35:09Z

Thanks Mita,
You are right these are careless mistakes.
I will fix all of them and upload a new version shortly.

> __ufshcd_send_uic_cmd() is called with host_lock held here, but
> host_lock is acquired again in __ufshcd_send_uic_cmd(). So it causes
> recursive deadlock.

Correct I forgot to complete the fix.

>
> ufshcd_wait_for_uic_cmd() is already called in the previous
> __ufshcd_send_uic_cmd() call.
>
> These two issues don't exist in v3.

Same fix I forgot to complete from earlier comment.

>
> I was still seeing null pointer derefence with v4 which I was reported
> (http://marc.info/?l=linux-scsi&m=141087506802548) and nothing
> changed in v5. Could you check if the fix is needed?
>
Sure, my mistake. I'll defiantly add a null pointer check in
ufshcd_config_vreg_hpm & ufshcd_config_vreg_lpm, to reduce overhead when
vregs are not initialized.

Thanks,
Dolev