@@ -451,6 +451,9 @@ static int ufshcd_mcq_sq_stop(struct ufs_hba *hba, struct ufs_hw_queue *hwq)
451
451
u32 id = hwq -> id , val ;
452
452
int err ;
453
453
454
+ if (hba -> quirks & UFSHCD_QUIRK_MCQ_BROKEN_RTC )
455
+ return - ETIMEDOUT ;
456
+
454
457
writel (SQ_STOP , mcq_opr_base (hba , OPR_SQD , id ) + REG_SQRTC );
455
458
reg = mcq_opr_base (hba , OPR_SQD , id ) + REG_SQRTS ;
456
459
err = read_poll_timeout (readl , val , val & SQ_STS , 20 ,
@@ -467,6 +470,9 @@ static int ufshcd_mcq_sq_start(struct ufs_hba *hba, struct ufs_hw_queue *hwq)
467
470
u32 id = hwq -> id , val ;
468
471
int err ;
469
472
473
+ if (hba -> quirks & UFSHCD_QUIRK_MCQ_BROKEN_RTC )
474
+ return - ETIMEDOUT ;
475
+
470
476
writel (SQ_START , mcq_opr_base (hba , OPR_SQD , id ) + REG_SQRTC );
471
477
reg = mcq_opr_base (hba , OPR_SQD , id ) + REG_SQRTS ;
472
478
err = read_poll_timeout (readl , val , !(val & SQ_STS ), 20 ,
@@ -494,6 +500,9 @@ int ufshcd_mcq_sq_cleanup(struct ufs_hba *hba, int task_tag)
494
500
u32 nexus , id , val ;
495
501
int err ;
496
502
503
+ if (hba -> quirks & UFSHCD_QUIRK_MCQ_BROKEN_RTC )
504
+ return - ETIMEDOUT ;
505
+
497
506
if (task_tag != hba -> nutrs - UFSHCD_NUM_RESERVED ) {
498
507
if (!cmd )
499
508
return - EINVAL ;
@@ -576,6 +585,9 @@ static bool ufshcd_mcq_sqe_search(struct ufs_hba *hba,
576
585
u64 addr , match ;
577
586
u32 sq_head_slot ;
578
587
588
+ if (hba -> quirks & UFSHCD_QUIRK_MCQ_BROKEN_RTC )
589
+ return true;
590
+
579
591
mutex_lock (& hwq -> sq_mutex );
580
592
581
593
ufshcd_mcq_sq_stop (hba , hwq );
0 commit comments