From patchwork Sun Jan 27 07:07:45 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Avri Altman X-Patchwork-Id: 10782687 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 9E04413B4 for ; Sun, 27 Jan 2019 07:08:33 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 708B42ABE2 for ; Sun, 27 Jan 2019 07:08:33 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 603A92ABEC; Sun, 27 Jan 2019 07:08:33 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.7 required=2.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D5FD42966A for ; Sun, 27 Jan 2019 07:08:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726285AbfA0HID (ORCPT ); Sun, 27 Jan 2019 02:08:03 -0500 Received: from esa2.hgst.iphmx.com ([68.232.143.124]:16359 "EHLO esa2.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726146AbfA0HIC (ORCPT ); Sun, 27 Jan 2019 02:08:02 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1548572899; x=1580108899; h=from:to:cc:subject:date:message-id; bh=lP9cRze2DgvFbxqrm+VgPZIWiTRvEuPIbbzJrIMYERs=; b=eEByc9jsId6kSdYRJc9/QFFTo7aqxAjIUoin8cm4hAJwdDDCZAianMrK hWSNduwYh++kDraZV5RT0wbOnWgVUF1wNU9uWs1XJi4Tnl4rR9v4nf2Zb 2ny5VpVQWlLhnNybrg4vGGiXVWmLmKqfAgsNNR3tgzJODqgFt6Bei6myI GohDVCw4biw1usENpLuamg80A3drv+hXzz+Q4bm/5dY1aR4WqdwI98j2/ SDOh/69NbRT8cJcSR9hdkQOxgw0Trzd4pfMjtwQoZmjVD15k4rrlvzbCz R+aNhknJ2N1ezUHbzT5IJuhNXm4+TELOmT9rtKPqfZwU0qNT3rpv7mcpK g==; X-IronPort-AV: E=Sophos;i="5.56,529,1539619200"; d="scan'208";a="197974351" Received: from h199-255-45-15.hgst.com (HELO uls-op-cesaep02.wdc.com) ([199.255.45.15]) by ob1.hgst.iphmx.com with ESMTP; 27 Jan 2019 15:08:19 +0800 Received: from uls-op-cesaip02.wdc.com ([10.248.3.37]) by uls-op-cesaep02.wdc.com with ESMTP; 26 Jan 2019 22:49:05 -0800 Received: from kfae422988.sdcorp.global.sandisk.com ([10.0.230.227]) by uls-op-cesaip02.wdc.com with ESMTP; 26 Jan 2019 23:08:00 -0800 From: Avri Altman To: "James E.J. Bottomley" , "Martin K. Petersen" , linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org, Evan Green Cc: Avi Shchislowski , Alex Lemberg , Avri Altman Subject: [PATCH v4 0/3] scsi: ufs-bsg: Add read descriptor Date: Sun, 27 Jan 2019 09:07:45 +0200 Message-Id: <1548572868-12589-1-git-send-email-avri.altman@wdc.com> X-Mailer: git-send-email 1.9.1 Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP UFS Protocol Information Units (UPIU) are UFS packets that travel between the host and the device on the UniPro bus. Our previous series added the capability to send UPIUs to the ufs driver. It does not cover all the possible UPIU types - we are mainly focused on device management, provisioning, testing and validation, so it covers UPIUs that falls in that box. Our intension is to publish ufs-utils soon - an open source user space utility that relies on that infrastructure to perform those tasks. This short series is adding one last functionality needed by ufs-utils that was somehow left behind - allowing reading descriptors as well. V3->v4: Improve code readability in ufs-bsg: Allow reading descriptors Update Reviewed-by tag. V2->v3: Add a prep patch with write descriptor calling convention changes. Elaborate the commit log of ufs-bsg: Allow reading descriptors Add Reviewed-by tag. v1->v2: Withdraw from the attempt to change the reply buffer, instead place the descriptor being read in the actual data buffer in the bio. Avri Altman (3): scsi: ufs-bsg: Change the calling convention for write descriptor scsi: ufs: Allow reading descriptor via raw upiu scsi: ufs-bsg: Allow reading descriptors Documentation/scsi/ufs.txt | 11 ++++++++ drivers/scsi/ufs/ufs_bsg.c | 63 ++++++++++++++++++++++++++-------------------- drivers/scsi/ufs/ufshcd.c | 20 ++++++++++----- 3 files changed, 61 insertions(+), 33 deletions(-)