mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-25 21:24:08 +08:00
scsi: ufs: core: Export ufshcd_schedule_eh_work()
Make it possible to call ufshcd_schedule_eh_work() from other source files than ufshcd.c. Additionally, convert a source code comment into a lockdep_assert_held() call. Link: https://lore.kernel.org/r/20211020214024.2007615-6-bvanassche@acm.org Acked-by: Avri Altman <Avri.Altman@wdc.com> Signed-off-by: Bart Van Assche <bvanassche@acm.org> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:
parent
4693fad7d6
commit
267a59f6a5
@ -244,7 +244,6 @@ static int ufshcd_scale_clks(struct ufs_hba *hba, bool scale_up);
|
||||
static irqreturn_t ufshcd_intr(int irq, void *__hba);
|
||||
static int ufshcd_change_power_mode(struct ufs_hba *hba,
|
||||
struct ufs_pa_layer_attr *pwr_mode);
|
||||
static void ufshcd_schedule_eh_work(struct ufs_hba *hba);
|
||||
static int ufshcd_setup_hba_vreg(struct ufs_hba *hba, bool on);
|
||||
static int ufshcd_setup_vreg(struct ufs_hba *hba, bool on);
|
||||
static inline int ufshcd_config_vreg_hpm(struct ufs_hba *hba,
|
||||
@ -5915,9 +5914,10 @@ static inline bool ufshcd_is_saved_err_fatal(struct ufs_hba *hba)
|
||||
(hba->saved_err & (INT_FATAL_ERRORS | UFSHCD_UIC_HIBERN8_MASK));
|
||||
}
|
||||
|
||||
/* host lock must be held before calling this func */
|
||||
static inline void ufshcd_schedule_eh_work(struct ufs_hba *hba)
|
||||
void ufshcd_schedule_eh_work(struct ufs_hba *hba)
|
||||
{
|
||||
lockdep_assert_held(hba->host->host_lock);
|
||||
|
||||
/* handle fatal errors only when link is not in error state */
|
||||
if (hba->ufshcd_state != UFSHCD_STATE_ERROR) {
|
||||
if (hba->force_reset || ufshcd_is_link_broken(hba) ||
|
||||
|
@ -1023,6 +1023,7 @@ int ufshcd_wait_for_register(struct ufs_hba *hba, u32 reg, u32 mask,
|
||||
void ufshcd_parse_dev_ref_clk_freq(struct ufs_hba *hba, struct clk *refclk);
|
||||
void ufshcd_update_evt_hist(struct ufs_hba *hba, u32 id, u32 val);
|
||||
void ufshcd_hba_stop(struct ufs_hba *hba);
|
||||
void ufshcd_schedule_eh_work(struct ufs_hba *hba);
|
||||
|
||||
static inline void check_upiu_size(void)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user