Received: by 2002:ac0:a679:0:0:0:0:0 with SMTP id p54csp263510imp; Tue, 19 Feb 2019 23:12:24 -0800 (PST) X-Google-Smtp-Source: AHgI3IaxQkvIOx6apQj5OngJDUPMdJBHxBwXe9Mpac6KffC7R0Td9OYDJhndzyrLu6rmu84hJC6a X-Received: by 2002:a17:902:166:: with SMTP id 93mr35359636plb.20.1550646744084; Tue, 19 Feb 2019 23:12:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550646744; cv=none; d=google.com; s=arc-20160816; b=ivkE+Zn5iB0Q2P1WZLowUU4fETlVCqj0LMNgeZsV5yEy6Cpbj4a6GBrntfa4iosY/M lLpuZnOBvizwghEJept8l9Hkhw5mGF/tIj3JB6RRnT7kaa3eQxGY1RN+BjIDZzppRZEw 3OLhSqgacL+6N28OVt7EeRkGtozp4DsJT7/dnFvDfqB5hrJ5SCjF/5hVt/wmJ9Xb279k ELWyQe6zwomZKH+faWIKpPlZubPOwVYh1rfAGYzZv5aPN82lb+Aolw4lVUwyxb3uX0CX WY/+cHHI6Ly/+rhz0bD7pp5mL1A037tXUefFEIZ7HRVnpuYxqn7dJ36F2e96wyirFhGO ZR9A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature; bh=ehvfbdSmUDh4rAOuhQiVnXXl0qq3+5NW+eoWJUzJPBg=; b=Ijh2FRuqKTVwdJ1fzDzKkBj3awlYIZkAAeQ06FhXRujmZgE5vJI5vLMWBytDykWQOQ fuG+nFb0z+wp30diGU5CK809z8VMMhAOAF8SbW11gNm+3ZqIQfp+pzLn4ahYniQklfIH cugNXID4xCv1aAoG/3rEwlDMXf1/olSoUvO0Lw7z4YSO5Lmdl4isNXXuLzdx05G5/swY fesi1YU7YZRU+Js6GX5h59IaL4T0XWVPgGLgQJ2hB0pUzHB7rO/fQmMg3q3dkkjHErvF coFk8fPlc8PGpBHybzwWMukJD4d79Zqo5cqHF/JbzBBJNw/0Ba6+AKGaptjkQjE+FhJW 5fYQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@wdc.com header.s=dkim.wdc.com header.b=PUfbizJd; 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=fail (p=NONE sp=NONE dis=NONE) header.from=wdc.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l123si14851746pfc.187.2019.02.19.23.12.09; Tue, 19 Feb 2019 23:12:24 -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=fail header.i=@wdc.com header.s=dkim.wdc.com header.b=PUfbizJd; 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=fail (p=NONE sp=NONE dis=NONE) header.from=wdc.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727103AbfBTHLl (ORCPT + 99 others); Wed, 20 Feb 2019 02:11:41 -0500 Received: from esa6.hgst.iphmx.com ([216.71.154.45]:24860 "EHLO esa6.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725857AbfBTHLk (ORCPT ); Wed, 20 Feb 2019 02:11:40 -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=1550646701; x=1582182701; h=from:to:cc:subject:date:message-id; bh=7JyYpMoDn73bv1c500xLDbTt5+CQle1C649xKM1HwpU=; b=PUfbizJdNQuJ5+/2U3BrexJe0K70Z7UCLcTUmmy4TWrZtKtBqzUkoe6e UP0bcmrXopTbY8Vp0mKhlzpkwaiAWFau3LDAxhCytdBs9UNCXuG4AMkms 82xTXwxALtlP6DfDnWiTCvzRLBUuyUUnQbQVu6Xh+Z1gbrWcU1Wu5NK8d /72ZdKxfu3zcTWbKxTxThluMKDm5wvIhuhyi5QCsoG9rFRBs70PaKKqI2 OA3F16LkOBDU3xgZx9pGy5F+c9IivDYk/e66pUXP9VihRoehAgIKJQnvU LL62RyvkQx0fZqoIsxaMobv707pJNasu+frqGjo8+4yfJgKgXzgQ+SFH9 w==; X-IronPort-AV: E=Sophos;i="5.58,388,1544457600"; d="scan'208";a="103461487" Received: from h199-255-45-14.hgst.com (HELO uls-op-cesaep01.wdc.com) ([199.255.45.14]) by ob1.hgst.iphmx.com with ESMTP; 20 Feb 2019 15:11:40 +0800 Received: from uls-op-cesaip02.wdc.com ([10.248.3.37]) by uls-op-cesaep01.wdc.com with ESMTP; 19 Feb 2019 22:50:03 -0800 Received: from kfae422988.sdcorp.global.sandisk.com ([10.0.230.227]) by uls-op-cesaip02.wdc.com with ESMTP; 19 Feb 2019 23:11:37 -0800 From: Avri Altman To: "James E.J. Bottomley" , "Martin K. Petersen" , linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org, Evan Green , Bean Huo , Pedro Sousa , Alim Akhtar Cc: Avi Shchislowski , Alex Lemberg , Avri Altman Subject: [REPOST PATCH v4 0/3] scsi: ufs-bsg: Add read descriptor Date: Wed, 20 Feb 2019 09:11:11 +0200 Message-Id: <1550646674-15258-1-git-send-email-avri.altman@wdc.com> X-Mailer: git-send-email 1.9.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. Repost of v4 and adds tags already received. While at it, it turns out that quite a few people are waiting for ufs-utils, e.g. https://www.spinics.net/lists/linux-scsi/msg127807.html. So I expect that the small, but vibrant community of ufs users, will try to expand this infrastructure even further. 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(-) -- 1.9.1