Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp3661524ybz; Mon, 4 May 2020 07:22:55 -0700 (PDT) X-Google-Smtp-Source: APiQypJJi9BLLDn8jiki2PJm7Em8Ovqg5bAlD+NZd+3HM6TN/fkfdBLtQsyBh8+jh4mAVFs0LU+b X-Received: by 2002:a17:906:af94:: with SMTP id mj20mr14686687ejb.347.1588602175117; Mon, 04 May 2020 07:22:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588602175; cv=none; d=google.com; s=arc-20160816; b=W9KHTJUXjza1dNGp0vpzE979j9TJNjizJ9ac6ll90gLyjC8CGSjJY7VrxjTxqWMYY1 eC0wjAm/aP7q9BDFvhitmyOyyUynktHI6hG6hdHEWwZuH1uUlMLFETnsfVmkPuvizqQ7 Tm44r8yFTozutbduH04F3f/210u/c8v4iyKA+uhU3PjQ9rfpie+nIEgIVsvAfs+mEyqL WbObFuU//sR8+xmjlk2sYEbkNaSKSpLPVvfs7Xh/3SWOqYv+S41Osplw8s7o0upe9+MD 5/9M+whhr2fW8Qi94HbrUbTjCPXyTWhJOMpDrV3RTRwCbnq5EZvka7GBVKssky9V8YxA tgHA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=ErvFEMKqvUABuF+OXMSZ5E2o1lqXb+dXgSMBGHbqzAg=; b=CgNkNAoAv1pOFZ3FHLm/pZP4XCXk8EIY7zewi6Nt6ZLpQme5j6yatsHUzS+hmsC1Hc xTv98joLSxBxLx08ocbG6Uon75NU4uR5U6i1bcYIJUjEeSLnh/rE/IN13YpvL9kuOk3z +j3vajrSliIyMeotwUbYkH3YPjNO6gfYQRBM1bHNs855rQv4QBcAJPoTYevdb0VE9ENl 2N/D0+MBs807YS8HrYoeAX9MwjrdREU1G01GipANIJXqv9kLXc4zPY3C53iBuZcpAVQ4 Qjwhw4tBiltmzlr40lPX4LKVPWKmWl59lyvq9WaHPdqpR4b1f+NGVCm1mohLPvsEipWr 2tpg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Qgix53e3; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b24si6778768edr.338.2020.05.04.07.22.31; Mon, 04 May 2020 07:22:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Qgix53e3; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729028AbgEDOUz (ORCPT + 99 others); Mon, 4 May 2020 10:20:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50808 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729006AbgEDOUx (ORCPT ); Mon, 4 May 2020 10:20:53 -0400 Received: from mail-wm1-x344.google.com (mail-wm1-x344.google.com [IPv6:2a00:1450:4864:20::344]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 99C81C061A0F; Mon, 4 May 2020 07:20:52 -0700 (PDT) Received: by mail-wm1-x344.google.com with SMTP id z6so9296654wml.2; Mon, 04 May 2020 07:20:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=ErvFEMKqvUABuF+OXMSZ5E2o1lqXb+dXgSMBGHbqzAg=; b=Qgix53e3HeujOhrnlznsYKEK4vClo6IDxrfA1TV2FsvQ1IC6oNegc3jjMdUIFIbe+3 t7VX2JF+2VEz2tcBjQCC3jxE8j/m5PjLCmNINc7mFBXbtbovlW/r2iXj75af0d+M4Md3 czYp3jyPAvezsXMMSNYw7z+yBCg9+ox+Q0kX6LmjCy1dhJcNNtb0SpU1jUp02iq79Pq8 orEtUa4KcE9BfoHon/4D01Gf0YOVgteJhArE+1apKXu7gJKU0rd5oCfTxCe76m1cJDgg 93k837IF5NrIF1SVoIzXXUVVSCH9J1OTH30duBZ49vnT2W9PP6JwyJIIhzb1Tce9Wbph ao3A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=ErvFEMKqvUABuF+OXMSZ5E2o1lqXb+dXgSMBGHbqzAg=; b=t+gLTKG3kJFvqSE/Z3RIlaRgBCY6H57stJzH14pe/LE7pS1HJaiHvjh4TDSS82MuM9 H+SNiy0o1QG6yORgl3NUhAlQWB0dVbbYGxoEMKa5OfywN5Pq1U5AgtHX0n7yW8/0U0Wn wx99cAuTHlWSZcgsB/qW/MSk/i0KmmxFESHzHR9RgESMVUuRDTfnwHmAluCZlLyM0YnL EiIWG/wFQOrWLc7YBoDtGT5GTAmypdUz2pb6ONQaWT+criRpQwskI/aTl+KWCJO7rJ7G fdEs2t5wzV9ICvrBzZyNLoO5/4udvM5RCVhpgfno8yWzZO297D7fbdQnyjzUno8qBpUP wuGA== X-Gm-Message-State: AGi0PubzhATONIYWhqRndZlzTDiTSl+ZzhTWvdvj7hw239MQ93x4pPAH Qx3JsBftxs7qg6gd2oCKcrM= X-Received: by 2002:a1c:bd8b:: with SMTP id n133mr15932447wmf.175.1588602051377; Mon, 04 May 2020 07:20:51 -0700 (PDT) Received: from localhost.localdomain (ip5f5bfcc8.dynamic.kabel-deutschland.de. [95.91.252.200]) by smtp.gmail.com with ESMTPSA id p7sm19196140wrf.31.2020.05.04.07.20.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 May 2020 07:20:50 -0700 (PDT) From: huobean@gmail.com X-Google-Original-From: beanhuo@micron.com To: alim.akhtar@samsung.com, avri.altman@wdc.com, asutoshd@codeaurora.org, jejb@linux.ibm.com, martin.petersen@oracle.com, stanley.chu@mediatek.com, beanhuo@micron.com, bvanassche@acm.org, tomas.winkler@intel.com, cang@codeaurora.org, rdunlap@infradead.org Cc: linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org, hch@infradead.org Subject: [RESENT PATCH RFC v3 3/5] scsi: ufs: add ufs_features parameter in structure ufs_dev_info Date: Mon, 4 May 2020 16:20:30 +0200 Message-Id: <20200504142032.16619-4-beanhuo@micron.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200504142032.16619-1-beanhuo@micron.com> References: <20200504142032.16619-1-beanhuo@micron.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Bean Huo Make a copy of bUFSFeaturesSupport, name it ufs_features, add it to structure ufs_dev_info. Signed-off-by: Bean Huo --- drivers/scsi/ufs/ufs.h | 2 ++ drivers/scsi/ufs/ufshcd.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/drivers/scsi/ufs/ufs.h b/drivers/scsi/ufs/ufs.h index 53a5e263f7c8..1f2d4b4950b8 100644 --- a/drivers/scsi/ufs/ufs.h +++ b/drivers/scsi/ufs/ufs.h @@ -543,6 +543,8 @@ struct ufs_dev_info { u16 hpb_ver; /* bHPBControl */ u8 hpb_control_mode; + /* bUFSFeaturesSupport */ + u8 ufs_features; }; /** diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c index 83ed2879d930..1fe7ffc1a75a 100644 --- a/drivers/scsi/ufs/ufshcd.c +++ b/drivers/scsi/ufs/ufshcd.c @@ -6625,6 +6625,8 @@ static int ufs_get_device_desc(struct ufs_hba *hba) goto out; } + dev_info->ufs_features = desc_buf[DEVICE_DESC_PARAM_UFS_FEAT]; + if (desc_buf[DEVICE_DESC_PARAM_UFS_FEAT] & 0x80) { hba->dev_info.hpb_control_mode = desc_buf[DEVICE_DESC_PARAM_HPB_CTRL_MODE]; -- 2.17.1