Commit 2c2905b5 authored by Bart Van Assche's avatar Bart Van Assche Committed by Treehugger Robot
Browse files

BACKPORT: scsi: ufs: core: Fix the polling implementation



Fix the following issues in ufshcd_poll():

 - If polling succeeds, return a positive value.

 - Do not complete polling requests from interrupt context because the
   block layer expects these requests to be completed from thread
   context. From block/bio.c:

     If REQ_ALLOC_CACHE is set, the final put of the bio MUST be done from
     process context, not hard/soft IRQ.

Bug: 254441685
Fixes: eaab9b57 ("scsi: ufs: Implement polling support")
Signed-off-by: default avatarBart Van Assche <bvanassche@acm.org>
Link: https://lore.kernel.org/r/20221118233717.441298-1-bvanassche@acm.org


Reviewed-by: default avatarAdrian Hunter <adrian.hunter@intel.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
(cherry picked from commit ee8c88ca)
[Lee: REQ_POLLED doesn't exist yet - using it's predecessor REQ_HIPRI instead]
Signed-off-by: default avatarLee Jones <joneslee@google.com>
Change-Id: I570234581262fd3781280c43d24b116518670f85
parent 8a4dff33
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment