From patchwork Tue Dec 24 13:01:05 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stanley Chu X-Patchwork-Id: 11309299 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B37F2138D for ; Tue, 24 Dec 2019 13:01:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 9241B20706 for ; Tue, 24 Dec 2019 13:01:21 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=mediatek.com header.i=@mediatek.com header.b="gibLG20V" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726885AbfLXNBU (ORCPT ); Tue, 24 Dec 2019 08:01:20 -0500 Received: from mailgw01.mediatek.com ([210.61.82.183]:14063 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726261AbfLXNBU (ORCPT ); Tue, 24 Dec 2019 08:01:20 -0500 X-UUID: cdcd61322efe4b6fbf88309e0e278fe5-20191224 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Transfer-Encoding:Content-Type:MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:CC:To:From; bh=FeNUMJ8s8x/C/Z04IhD8459YxUbM45a3DYN6mu1093s=; b=gibLG20VPQWOe1ZAQKhWn7ODuwwrPIsuG9Z4ptmsElzAVfmTwBqIdMlOjzwblwsoogk141flQYxfv151RNuog86XPrc06Fv34kEXIui4wGhvFO9aqFroQqRW6umiFGH0JZjc6UI7jtXo7nOHEjXn4kXEEMKhhWGxz5wi2cbxefA=; X-UUID: cdcd61322efe4b6fbf88309e0e278fe5-20191224 Received: from mtkcas08.mediatek.inc [(172.21.101.126)] by mailgw01.mediatek.com (envelope-from ) (Cellopoint E-mail Firewall v4.1.10 Build 0809 with TLS) with ESMTP id 1783735769; Tue, 24 Dec 2019 21:01:15 +0800 Received: from MTKCAS06.mediatek.inc (172.21.101.30) by mtkmbs02n2.mediatek.inc (172.21.101.101) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Tue, 24 Dec 2019 21:00:36 +0800 Received: from mtkswgap22.mediatek.inc (172.21.77.33) by MTKCAS06.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1395.4 via Frontend Transport; Tue, 24 Dec 2019 21:00:06 +0800 From: Stanley Chu To: , , , , , , CC: , , , , , , , , , Stanley Chu Subject: [PATCH v1 1/2] scsi: ufs: unify scsi_block_requests usage Date: Tue, 24 Dec 2019 21:01:05 +0800 Message-ID: <1577192466-20762-2-git-send-email-stanley.chu@mediatek.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1577192466-20762-1-git-send-email-stanley.chu@mediatek.com> References: <1577192466-20762-1-git-send-email-stanley.chu@mediatek.com> MIME-Version: 1.0 X-TM-SNTS-SMTP: 672D92876DE5E1799BB940708AAC8AC0F29380FDFB330A264E2A27CA6C0D31B82000:8 X-MTK: N Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org Currently UFS driver has ufshcd_scsi_block_requests() with reference counter mechanism to avoid possible racing of blocking and unblocking requests flow. Unify all users in UFS driver to use the same function. Signed-off-by: Stanley Chu Reviewed-by: Can Guo Reviewed-by: Bart Van Assche --- drivers/scsi/ufs/ufshcd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c index ed02a70..b6b9665 100644 --- a/drivers/scsi/ufs/ufshcd.c +++ b/drivers/scsi/ufs/ufshcd.c @@ -5177,7 +5177,7 @@ static void ufshcd_exception_event_handler(struct work_struct *work) hba = container_of(work, struct ufs_hba, eeh_work); pm_runtime_get_sync(hba->dev); - scsi_block_requests(hba->host); + ufshcd_scsi_block_requests(hba); err = ufshcd_get_ee_status(hba, &status); if (err) { dev_err(hba->dev, "%s: failed to get exception status %d\n", @@ -5191,7 +5191,7 @@ static void ufshcd_exception_event_handler(struct work_struct *work) ufshcd_bkops_exception_event_handler(hba); out: - scsi_unblock_requests(hba->host); + ufshcd_scsi_unblock_requests(hba); pm_runtime_put_sync(hba->dev); return; }