Re: [PATCH/RESEND V6 13/18] scsi: ufs: refactor configuring power mode

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



2014-09-25 21:32 GMT+09:00 Dolev Raviv <draviv@xxxxxxxxxxxxxx>:

> +int ufshcd_change_power_mode(struct ufs_hba *hba,
> +                            struct ufs_pa_layer_attr *pwr_mode)
> +{
> +       int ret;
> +
> +       /* if already configured to the requested pwr_mode */
> +       if (pwr_mode->gear_rx == hba->pwr_info.gear_rx &&
> +           pwr_mode->gear_tx == hba->pwr_info.gear_tx &&
> +           pwr_mode->lane_rx == hba->pwr_info.lane_rx &&
> +           pwr_mode->lane_tx == hba->pwr_info.lane_tx &&
> +           pwr_mode->pwr_rx == hba->pwr_info.pwr_rx &&
> +           pwr_mode->pwr_tx == hba->pwr_info.pwr_tx &&
> +           pwr_mode->hs_rate == hba->pwr_info.hs_rate) {
> +               dev_dbg(hba->dev, "%s: power already configured\n", __func__);
> +               return 0;
>         }

If the UFS Power management level 5 is chosen, the UIC link is down
during suspend.  And the power mode should be configured during resume
again.  Unfortunately, it will not be configured because the above
condition hits unintentionally.

I would like to propose a fix which changes the type of hba->pwr_info to
struct ufs_pwr_mode_info, and turn off hba->pwr_info.is_valid when UIC
link is down and add check for hba->pwr_info.is_valid in above condition.
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux