Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1582982imu; Wed, 16 Jan 2019 23:19:40 -0800 (PST) X-Google-Smtp-Source: ALg8bN6PoVZ+25I7yaJJ/g8Kw7p659+f4vNg1E2whB5E6foUEOaVKCPSLUy4b0WJx0kt14Q52H22 X-Received: by 2002:a17:902:22f:: with SMTP id 44mr13788320plc.137.1547709579986; Wed, 16 Jan 2019 23:19:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547709579; cv=none; d=google.com; s=arc-20160816; b=KCsPBg611FJF7mBnYK/0s0gJvrv1mBpveF+I2dQ6IoQqsohoF16BXq5w6okGGqNnaj fuXhqJKq7Y80w/UkoY9mW3ekZnsv8VB8ow/AGgFdR35bFvVM29swlIqBfc02hKXObzkb mUeI7VSDqA0lOgexhKyA1aCElc3zjoswlMLVcFH9owEVEAaJ2c5ZL0v3EIKc7Rs/0z+O YOaLg8jnl4OiTfPWjJ1NkNEfl8QNkbT/KRmjRxlIlqdhrkspZ/kC22cIHg30sUXjFXNz FWiu3CsRaECTQ1ZJkeNxiKsrrCGWd8mWLWr94LN23oz1J2bHf66yEU9w7mSprUe1dqzV 3mUw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=TjmBWavRoT6NZg7djeTl9O5w8CKm06oyg1WxPg2yiOo=; b=WXu2W9Az1Pph7hBErVq4TVdCJfjsK53k1/oPGf0nVSmG4KVjbnhd0iYUU5jxDQSSPp 3NfxR4bNqIsNiM4cBLvEW7WX9y/FihZtyvhYP60qXbX+XhJGmmBF3jyg+j7wOkHkl2KC n3KzC+gCF+UNlcccoGyEsb8Qw4BjXatQwwOLvgt7NSd1Wd4hAxWbN22y6m6wdyu837ny UFY0kf5WE9gn0RUub5r3UkiAH0/IuiAG8Yh8c7kQwZsSSpA/9g7CPWtBJPphpevHBTLn XT6DfGMp3O0NXwVETivo4MhR17dBG8C/mrZauF/c+XGlCo62fdaqEBrlemSpE6nLn+iP L2jA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Crwq9fHq; 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=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k190si849171pgd.64.2019.01.16.23.19.24; Wed, 16 Jan 2019 23:19:39 -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=@linaro.org header.s=google header.b=Crwq9fHq; 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=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732928AbfAPWOY (ORCPT + 99 others); Wed, 16 Jan 2019 17:14:24 -0500 Received: from mail-wm1-f42.google.com ([209.85.128.42]:34531 "EHLO mail-wm1-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732666AbfAPWOX (ORCPT ); Wed, 16 Jan 2019 17:14:23 -0500 Received: by mail-wm1-f42.google.com with SMTP id y185so2115600wmd.1 for ; Wed, 16 Jan 2019 14:14:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=TjmBWavRoT6NZg7djeTl9O5w8CKm06oyg1WxPg2yiOo=; b=Crwq9fHqHOPNtZwjMsazILH00UR1mMaA14O82zFatjOs1v8cZ/TMMIy7nDC0O/3kMn XPKg4GhybgzXmuuLOyorpDNXzdj2w8NMdgAFK2I3AAFcsf81fMQ7R+YMrj0Ker/kzmhD 60lwzqnxF1DbhhVwlj6aSwlaRzsEhJfwBmmck= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=TjmBWavRoT6NZg7djeTl9O5w8CKm06oyg1WxPg2yiOo=; b=a2bIALV6CNBRj7knUpHD7rKo07CXHAwT+uVdtp2SzwNof5boyYqrZmizDhz/GBb60x f3Z69wu9itm7zQC27ZcS6HtaLPURzLLzzVqior9eJaaDutxsIVDbOvwsMq+POJbct9Pi hP1KNhvuiUaN8IXbcQwHvcB3LftILCCDI4fOAT5SMVRPuABmb/gep+HvSw4YOaq81W04 i4XeZ+R1jOJFhZtHRdhH8L7H/v0zrgtGOYvTtfHxK4KXbe5RFIi5rizQS9l5QDpoZPRP BWXYs9wZ0SjCyPNrNkGac8p6UCvUDuuzeJYfDEHJxBbe4C3SmD6Vg1MhRGDvFH4hob/2 ARnA== X-Gm-Message-State: AJcUukfzkgJkFisCEaMB5PJiKAs4zcDlTvOPyD2abHzlsvaFDMqZOz9j e5ZOM7iP5nXEFhNByeP+wtTYsuPwakwD12g5I+CQVQ== X-Received: by 2002:a1c:6657:: with SMTP id a84mr8645694wmc.23.1547676861165; Wed, 16 Jan 2019 14:14:21 -0800 (PST) MIME-Version: 1.0 References: <20190114032444.GA124121@hisi.inhuawei.com> In-Reply-To: <20190114032444.GA124121@hisi.inhuawei.com> From: John Stultz Date: Wed, 16 Jan 2019 14:14:09 -0800 Message-ID: Subject: Re: ufshcd_queuecommand() triggering after ufshcd_suspend()? To: Zang Leigang Cc: Avri Altman , Sahitya Tummala , Christoph Hellwig , Wei Li , "Martin K. Petersen" , Evan Green , Vijay Viswanath , lkml , "linux-scsi@vger.kernel.org" Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Jan 13, 2019 at 7:25 PM Zang Leigang wrote: > I think there are two different issues: > > 1. clk_gating's state(including state's trace event) and is_suspended is not > wrapped by ufshcd_is_clkgating_allowed which Hisilicon's kirin platoform > soc does not need but is set and checked in a regular path. > 2. I think SCSI is necessary to block queue to stop sending to ufs after > system suspend or, add a new state for ufs like UFSHCD_STATE_SUSPENDING > or what else. hba->is_sys_suspended is too late to stop ufshcd_queuecommand > Hey Zang, Thanks for the suggestions. I'm not sure I have enough context to try to come up with a patch. I'll try to take a stab at it, but I'd appreciate it if you have any more specific suggestions or patches for me to try. :) thanks -john