Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp2406688ybc; Wed, 13 Nov 2019 14:05:12 -0800 (PST) X-Google-Smtp-Source: APXvYqztTydRj6oIHmNKmzwA1BaY8VGlOpTFxLiedzBTL9n/cumS6sb7zhCzxqdrX1h2saf0LReo X-Received: by 2002:a17:906:948a:: with SMTP id t10mr5128317ejx.110.1573682712403; Wed, 13 Nov 2019 14:05:12 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1573682712; cv=pass; d=google.com; s=arc-20160816; b=uvVPZPHcvuXEN+g/rvTdC56F0OH0lLRtGSfau3f4CWj7EhhN1pr3RnFrlJN9DyCa8+ GrcJqAUVAERzk49k830V1qjFu5jlVzLjubIQMe9/gg05DEqHVDqkhHPtbcIQurQLwhYr t/YjIUSQc21JjHnfcw/Z1pVrNXDDbUK1yKJV+SdqvMGwOgwn4UrY01spXxlNSp20DB92 nnXmXyRRi7qm/J7wW58PNRKnPOR3WJb2GuCVMeH/Nur2knPwXFmFTWVLxzdbbRwzpDaS sM+z4T5qlZwhmimMx7VKfhwDPO3xCZY1LUY8Yi7RDEiuAN6qjkg+UCkhdglC4xlrikrC QoeQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :content-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:cc:to:from:dkim-signature; bh=5Omqvw/ODgVQaJfSk48IdNf+pV26D49dbIGG3elsLY0=; b=y1glnuY8YaKBBbzbgNWgDrGNX6GP8yWFZ19FC+n/8tpevb1eSoJREnL4eZqyPvaz5S q+nJWObB9uQj4lKgaP6HqZC7aadgDncCL+17LqlaEquw90fRWjRGnZRVYnj6281UP+KQ 6yQIqhkJ4ac81rcE8slyfcYnF4/RdJNy02/+rMDTDJ99Vw9DdN8YfPPJ4StNv3vWcMJe T3O3h5QhBxvMO4k4o9umRKVKxzzzhkBsAT9D8CRtfHn+EoT+IIic6yXMLkWDar8ip2TK b3JYGrNodF9mwQ8Z5NiMhnooRbgG+Qbi6og99PYDWf6asL2TGxpKM18S9kxcbGk8Up7H 5CcA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@micron.com header.s=selector2 header.b=JZQ3zLjL; arc=pass (i=1 spf=pass spfdomain=micron.com dkim=pass dkdomain=micron.com dmarc=pass fromdomain=micron.com); spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=micron.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e23si2521270eda.248.2019.11.13.14.04.48; Wed, 13 Nov 2019 14:05:12 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@micron.com header.s=selector2 header.b=JZQ3zLjL; arc=pass (i=1 spf=pass spfdomain=micron.com dkim=pass dkdomain=micron.com dmarc=pass fromdomain=micron.com); spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=micron.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726985AbfKMWEM (ORCPT + 99 others); Wed, 13 Nov 2019 17:04:12 -0500 Received: from mail-eopbgr820047.outbound.protection.outlook.com ([40.107.82.47]:42047 "EHLO NAM01-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726162AbfKMWEL (ORCPT ); Wed, 13 Nov 2019 17:04:11 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=mUlCm/QI5IDqIGNoouRhlKNFWlhFi2IwYXJbXQJvROpcvIgSQ3yb5llSa2M6Twi6jsAoBhfTqgE6HBop9qa52CpwMcDLcTpyFjFrC78oJobxjl5MMHB2n9B9AFGPB+FGHTl/4FH96evEjCT9Ta7Vk0BNMRZjcZ27rYjTUtn02NY7OW+5UHkFgv4cJaApbL2znYQ5SZkA4CYt1X6W1FO3WD1R6q07z4fOmzIXD6w+wCpx8UaS63NDfZ2OuDhRapHtZGoix6ulG9ujv1hVF7ICwvthX0HIM6Gi9mAn2yZJ8ryDrc58xWOCFc4ZNySDENSydkjYM4sRenVYIhsJ44Ml9g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=5Omqvw/ODgVQaJfSk48IdNf+pV26D49dbIGG3elsLY0=; b=C2UwZ9FPSDTs4+yWlkKkaz6KsJwGk1U4diF85RgINrHVqZu8d6CSu+1Y9pCzUmTADv90QMRYVu7CaBjfZma2pECmPo5M+YoODfEPJC0iIWgwYsT4G7fGKq2qBoeRgXnolucbJU6qrrf/w/i/+H3+ckHFAxyheXPREPRoAl09630AAJHcMmFnhz7MdqSlFRUJrl90oz37BEhCE1YlSyuRQi4FC6yoIt1rmunpYjQ7LbXDIwfOdIMSBFnPMs6ff9eyuJ4uCH5yJKaW5MIs4F0qSiGDyvqk9vxSM6Am56+v2W/t8BhNpvtPw9PKR3Ppra5RDIMylihnInj/PIYJTXsZGA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=micron.com; dmarc=pass action=none header.from=micron.com; dkim=pass header.d=micron.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=micron.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=5Omqvw/ODgVQaJfSk48IdNf+pV26D49dbIGG3elsLY0=; b=JZQ3zLjLdaZGc6Ki5zm4at0S2pbP4lAQIPm2scYNJjRWfV/ogE3X84nNtaHHTJRD4ZpO5sueXee4Ss7wjx3W8JY8V4FOpXMhML4xeKFe/wdI0cfHQNo+iJ9UQKeSI5Mbkz45AfnXD/8uwT1ws17lo4JBlzfLAAT9yl4JBnCRAOc= Received: from BN7PR08MB5684.namprd08.prod.outlook.com (20.176.179.87) by BN7PR08MB4403.namprd08.prod.outlook.com (52.133.220.18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2451.23; Wed, 13 Nov 2019 22:04:03 +0000 Received: from BN7PR08MB5684.namprd08.prod.outlook.com ([fe80::a91a:c2f5:c557:4285]) by BN7PR08MB5684.namprd08.prod.outlook.com ([fe80::a91a:c2f5:c557:4285%6]) with mapi id 15.20.2430.028; Wed, 13 Nov 2019 22:04:03 +0000 From: "Bean Huo (beanhuo)" To: Can Guo , "asutoshd@codeaurora.org" , "nguyenb@codeaurora.org" , "rnayak@codeaurora.org" , "linux-scsi@vger.kernel.org" , "kernel-team@android.com" , "saravanak@google.com" , "salyzyn@google.com" CC: Alim Akhtar , Avri Altman , Pedro Sousa , "James E.J. Bottomley" , "Martin K. Petersen" , Stanley Chu , Subhash Jadavani , Tomas Winkler , open list Subject: RE: [EXT] [PATCH v1 5/5] scsi: ufs: Complete pending requests in host reset and restore path Thread-Topic: [EXT] [PATCH v1 5/5] scsi: ufs: Complete pending requests in host reset and restore path Thread-Index: AQHVlgzPbiOALT34b0a4wX/4UETvQqeJrjpQ Date: Wed, 13 Nov 2019 22:04:03 +0000 Message-ID: References: <1573200932-384-1-git-send-email-cang@codeaurora.org> <1573200932-384-6-git-send-email-cang@codeaurora.org> In-Reply-To: <1573200932-384-6-git-send-email-cang@codeaurora.org> Accept-Language: en-150, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-dg-ref: PG1ldGE+PGF0IG5tPSJib2R5LnR4dCIgcD0iYzpcdXNlcnNcYmVhbmh1b1xhcHBkYXRhXHJvYW1pbmdcMDlkODQ5YjYtMzJkMy00YTQwLTg1ZWUtNmI4NGJhMjllMzViXG1zZ3NcbXNnLTdlOGE2NzVkLTA2NjEtMTFlYS04Yjg1LWRjNzE5NjFmOWRkM1xhbWUtdGVzdFw3ZThhNjc1Zi0wNjYxLTExZWEtOGI4NS1kYzcxOTYxZjlkZDNib2R5LnR4dCIgc3o9IjEyMjMiIHQ9IjEzMjE4MTU2MjQwMzE2Njg1MiIgaD0id2hybUw2UG14M1lIMnBPSmRiNkpUOXFqS01jPSIgaWQ9IiIgYmw9IjAiIGJvPSIxIi8+PC9tZXRhPg== x-dg-rorf: true authentication-results: spf=none (sender IP is ) smtp.mailfrom=beanhuo@micron.com; x-originating-ip: [165.225.81.26] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 6e166170-6832-458d-eeb6-08d768856510 x-ms-traffictypediagnostic: BN7PR08MB4403:|BN7PR08MB4403:|BN7PR08MB4403: x-microsoft-antispam-prvs: x-ms-exchange-transport-forked: True x-ms-oob-tlc-oobclassifiers: OLM:9508; x-forefront-prvs: 0220D4B98D x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(4636009)(136003)(346002)(39860400002)(376002)(396003)(366004)(189003)(199004)(66946007)(81166006)(66446008)(8936002)(81156014)(446003)(8676002)(66476007)(66556008)(64756008)(6246003)(14454004)(6116002)(316002)(76176011)(229853002)(478600001)(3846002)(7696005)(2906002)(71190400001)(7416002)(71200400001)(186003)(256004)(110136005)(26005)(25786009)(55016002)(54906003)(9686003)(55236004)(74316002)(6506007)(6436002)(14444005)(305945005)(7736002)(52536014)(2501003)(102836004)(486006)(476003)(66066001)(76116006)(2201001)(86362001)(5660300002)(4326008)(99286004)(11346002)(33656002);DIR:OUT;SFP:1101;SCL:1;SRVR:BN7PR08MB4403;H:BN7PR08MB5684.namprd08.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;MX:1;A:1; received-spf: None (protection.outlook.com: micron.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: NMyOs95vVpiBOpG6eI9A/87lxUzxO3pKUG8nDYyfuil9/PromukTL7VeZrEKLJJjo2BhauRiDOMXYvNYn+NQHdz0+26M9oE8SUfqQ+WYVJ/pZeTgAOnqA8t/uHwLyNlq0N75vpOxrnhDylewFYxb8H+JZLd8eChU+vsnJ+SEfXbwaiXis7fa0sKxbcu78/QalN5FavFqtjKCQliC9Xoql3PleRjJA0uqmuvO5LAnyFN7jeSMcfF415d5e/SOZSCw3WYLarrD/jGZk3K7dSzIoFZ3gPlNUg0F+VlUHh8ImmP5SilIjurMByOeL5nmY7CWL5/Kzx3EozINHpIh2lDXyUvwH8/KOMwJfHt42bj3Mou3XL5YwtPgkvS3bDmOjdFUIlG4T5fFT9U6xhbIztpe1YN72WIdyUHVyLl3zsc+FANg111Di0Eeu6gSVVyyfKVt Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: micron.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6e166170-6832-458d-eeb6-08d768856510 X-MS-Exchange-CrossTenant-originalarrivaltime: 13 Nov 2019 22:04:03.1093 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: f38a5ecd-2813-4862-b11b-ac1d563c806f X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: P0WAiTMAbKLrA1RiolEmKpFu3CTighF4eYWFWAwhgqN8Rf7bMnIP5pGU/DPzzya11A1DA1+FRkD9ovboK4qNSg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN7PR08MB4403 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org >=20 > In UFS host reset and restore path, before probe, we stop and start the h= ost > controller once. After host controller is stopped, the pending requests, = if any, > are cleared from the doorbell, but no completion IRQ would be raised due = to the > hba is stopped. > These pending requests shall be completed along with the first NOP_OUT > command(as it is the first command which can raise a transfer completion > IRQ) sent during probe. Hi, Can I am not sure for this point, because there is HW/SW device reset before or= after host reset/restore. Device HW/SW reset also will clear the pended tasks in device side. That wi= ll be better. I think Qcom platform already enabled HW reset. //Bean > Since the OCSs of these pending requests are not SUCCESS(because they are= not > yet literally finished), their UPIUs shall be dumped. When there are mult= iple > pending requests, the UPIU dump can be overwhelming and may lead to stabi= lity > issues because it is in atomic context. > Therefore, before probe, complete these pending requests right after host > controller is stopped.