mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-06 19:08:57 +09:00
UPSTREAM: 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>
Bug: 234653003
(cherry picked from commit 267a59f6a5)
Change-Id: I2dc128dcd441859bfb16873b8f18eac6376297fa
Signed-off-by: Bart Van Assche <bvanassche@google.com>
This commit is contained in:
committed by
Bart Van Assche
parent
87c2d22693
commit
c445bd8e69
@@ -253,7 +253,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,
|
||||
@@ -5990,9 +5989,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) ||
|
||||
|
||||
@@ -1079,6 +1079,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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user