Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp506686pxb; Thu, 12 Nov 2020 09:03:08 -0800 (PST) X-Google-Smtp-Source: ABdhPJy3NmmigVfzsYkCeG45MqBGvJDkA7NmZbP2++EHG7JwfDluJlx0gYrmSf93NYrYr/UzJ1sC X-Received: by 2002:a17:906:9458:: with SMTP id z24mr245541ejx.318.1605200588395; Thu, 12 Nov 2020 09:03:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605200588; cv=none; d=google.com; s=arc-20160816; b=x7TCkrfy5S+2zqMlwbv38r8FnusdQj/twQWdKn47uRocYyqOAZ/IUaNKc8pDdbbqUp 3o4HeKxLebTNcDEqgyDVYLFkRhUyWfPnAI7s8nxPaXI6mwu3BghWP72aRQXcqAnYkg0T ByuvPJfbsy512TUA0qrNzyJfWSDQnvSpbxqDUbXAY0G8u6TNJ7XbFgw6++bsw8fuTnMC Jv3So2xD0kRN+UEiJCncOBFFvd+cw4E9cWJqChGywi4Z6KX6aOk7palMPer/HMHw+v6u GQ25CJQLeDIZLnEba+ivIwPLToOE4RyUEPtiKzbTZAs5lmoo/msID591cO7EUcS9MSAq T86w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=nUjZHgCQyr+FMo0mEKAQWe/kK7v4pLX9X57Ev3SN1iQ=; b=AJIyjzQ94O6hXHu3+qC5dczJLtcMcriRj8QqnMCmaUzuMuLq/+yWQMvtODpVCDjzWc C8HXBkDsMT7uRlAS81B8MZ7zraLihW21088e7CY+/bXTOv68PurI/GgWndAbCR2R6lxe vahVl3upx6p8SpkaSWITygQh7gh51gA0IqU/APGF4eQHN7S+OiOzVu8hUzk3I8HCEOQP xAZIzOxG1d+cGnvS61fAJmMEDr4CYEMihLlDWZrAodgGNHeIyNcC529peySERfJeNKD1 Xdd0Dig+LTNTuA1J680vjgz/NQCvQEY/1jPCYD3vWfunqW+qtxsjNlrpVuwbCTLwfmey 3MNQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=ClZjiwrc; 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=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 18si4023787ejv.717.2020.11.12.09.02.34; Thu, 12 Nov 2020 09:03:08 -0800 (PST) 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=@kernel.org header.s=default header.b=ClZjiwrc; 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=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726176AbgKLQ76 (ORCPT + 99 others); Thu, 12 Nov 2020 11:59:58 -0500 Received: from mail.kernel.org ([198.145.29.99]:43104 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725965AbgKLQ74 (ORCPT ); Thu, 12 Nov 2020 11:59:56 -0500 Received: from localhost (unknown [104.132.1.66]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id BDDDB206FA; Thu, 12 Nov 2020 16:59:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1605200395; bh=HV0mNVfZW2IHT8Fak9dlxfmN7InMpLamOL6lcK/5ibo=; h=From:To:Cc:Subject:Date:From; b=ClZjiwrcfyJ2KG60k7orzDXQLYua4CCZMWQFqt9WqQTw2pHVoDUBPB65LxSt8chaA cmFb+Wg16wGvMnTTwlnr8eb11QbeeL45xNhg6JlSQrtSs9jnsHwdjEncMPNUyvoxOF SeK+DJp8a2mNnXHSzsgUZHg0osr8484fi5/tmRFY= From: Jaegeuk Kim To: linux-kernel@vger.kernel.org, linux-scsi@vger.kernel.org, kernel-team@android.com Cc: Leo Liou Subject: [PATCH] scsi: ufs: show lba and length for unmap commands Date: Thu, 12 Nov 2020 08:59:50 -0800 Message-Id: <20201112165950.518952-1-jaegeuk@kernel.org> X-Mailer: git-send-email 2.29.2.299.gdc1121823c-goog MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Leo Liou We have lba and length for unmap commands. Signed-off-by: Leo Liou --- drivers/scsi/ufs/ufshcd.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c index 86c8dee01ca9..dba3ee307307 100644 --- a/drivers/scsi/ufs/ufshcd.c +++ b/drivers/scsi/ufs/ufshcd.c @@ -376,6 +376,11 @@ static void ufshcd_add_command_trace(struct ufs_hba *hba, lrbp->ucd_req_ptr->sc.exp_data_transfer_len); if (opcode == WRITE_10) group_id = lrbp->cmd->cmnd[6]; + } else if (opcode == UNMAP) { + if (cmd->request) { + lba = scsi_get_lba(cmd); + transfer_len = blk_rq_bytes(cmd->request); + } } } -- 2.29.2.299.gdc1121823c-goog