Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp797271imm; Fri, 8 Jun 2018 05:32:55 -0700 (PDT) X-Google-Smtp-Source: ADUXVKKVSXU6fF6mmyArDCP1pZxabd63/TV17CQqGtvERrdYIDMK0PLEPQ+hK0O56ZaOxDr0oL7U X-Received: by 2002:a63:2dc2:: with SMTP id t185-v6mr5235105pgt.204.1528461175579; Fri, 08 Jun 2018 05:32:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528461175; cv=none; d=google.com; s=arc-20160816; b=Vi9Kop10o8H3xhPv350JvkFybMvQHBjkJN/ZJfOrhh3/m159gZ+Vc4fpWhkp3BN5J4 rT12TDLh2+GdwKFtFNiPF94lXH4a/oNuFyIfee5iZNIFZ2OMe2A+qkZwIFbYjaAIdbd/ XsEG6c9lKARtP911oVU2UO0PrB+CWoao9dBHYNWKHovf9Yx4NODlJhURWd+8ab3LjnWD P+53frfZqGxpYpcBjloGOEoB1qNPTIQ1ROkxhA/u4RozPA/uR+2aLYlwJhlegzPgB2lh Ylpx/bTP6RVYcikhZh6c+hZ0Ysu3mGlBGlgUG19j0omGFwOxHEMEL8pRJWaQk5C91st4 8fDA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:organization:from:references:cc:to:subject :arc-authentication-results; bh=I/zXgAHI95lnFAhlz8V35IkBxjTeuEvQZwgTVLFVoHE=; b=WA5UH6BJLM+aN7CmeRcqPzIN2q6jjO72jFyeB0SrxPbEoxU2heqFJ8KdfvoYQ4r9rm i8EL4xbUUyoWzDeWuWH4NRWcsFp/pGVkqNdhHBPmEIgVdxIjqg4t0ooHsH5N/VhHOL9x CNa5o/l+sabhryRUzw3gP8hQRI9U3Mb5x2qNZGa16dwqchjSRopZBzp5UkyH7KKZAJN/ Pxer6WlaAzzYzcxKRG07y4qn6ymW7+0WnFbIdCnRCEKJ1y0Bw3BzwuZcdU15WG4ocqBu 0dXdWVfxkM1u3vA8WVWf7NLI0ni6EegRldVj/Fn7Q/WpeP8GEd1oYZH+K1WwG3Kfb7GL d5WQ== ARC-Authentication-Results: i=1; mx.google.com; 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=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b7-v6si56645451pla.26.2018.06.08.05.32.41; Fri, 08 Jun 2018 05:32:55 -0700 (PDT) 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; 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=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752356AbeFHMcP (ORCPT + 99 others); Fri, 8 Jun 2018 08:32:15 -0400 Received: from mga03.intel.com ([134.134.136.65]:10821 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751251AbeFHMcO (ORCPT ); Fri, 8 Jun 2018 08:32:14 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 08 Jun 2018 05:32:13 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.49,490,1520924400"; d="scan'208";a="46253996" Received: from ahunter-desktop.fi.intel.com (HELO [10.237.72.168]) ([10.237.72.168]) by fmsmga008.fm.intel.com with ESMTP; 08 Jun 2018 05:32:10 -0700 Subject: Re: [PATCH 0/7] Enable UFS provisioning via Linux To: Evan Green , Stanislav.Nijnikov@wdc.com Cc: Vinayak Holikatti , jejb@linux.vnet.ibm.com, martin.petersen@oracle.com, linux-kernel@vger.kernel.org, linux-scsi@vger.kernel.org, Gwendal Grignou , Alex.Lemberg@wdc.com, Avri.Altman@wdc.com References: <20180529181740.195362-1-evgreen@chromium.org> From: Adrian Hunter Organization: Intel Finland Oy, Registered Address: PL 281, 00181 Helsinki, Business Identity Code: 0357606 - 4, Domiciled in Helsinki Message-ID: Date: Fri, 8 Jun 2018 15:30:52 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 04/06/18 17:59, Evan Green wrote: > On Sun, Jun 3, 2018 at 3:21 AM Stanislav Nijnikov > wrote: >> >> >> >>> -----Original Message----- >>> From: linux-scsi-owner@vger.kernel.org On Behalf Of Evan Green >>> Sent: Friday, June 1, 2018 5:44 PM >>> To: Stanislav Nijnikov >>> Cc: Vinayak Holikatti ; jejb@linux.vnet.ibm.com; martin.petersen@oracle.com; linux- >>> kernel@vger.kernel.org; linux-scsi@vger.kernel.org; Gwendal Grignou ; Alex Lemberg >>> ; Avri Altman >>> Subject: Re: [PATCH 0/7] Enable UFS provisioning via Linux >>> >>> Hi Stanislav. Thanks for taking a look. Responses below. >>> >>> On Thu, May 31, 2018 at 3:04 AM Stanislav Nijnikov >>> wrote: >>>> >>>> Hi Evan, >>>> I have some generic notes: >>>> - Why to create new sysfs entries for the configuration descriptor fields if they are just duplication of fields in the device and unit >>> descriptors? And the sysfs representation of the device and unit descriptors is existing already. >>> >>> Well, UFS describes them as different descriptors. I worry that if I >>> add a bunch of clever logic to hide the config descriptor behind other >>> descriptors, there might be trouble later if 1) there is a quirky >>> device that doesn't reflect the values between descriptors quite the >>> same way or at the same time, or 2) if a later UFS spec adds more >>> configuration descriptor fields that don't exactly reflect into other >>> non-config descriptors, the cleverness will look awkward. >> >> No additional logic will be required to attach write functionality to the >> existing entries instead of new defined ones. It will reduce the patch >> size significantly. And there will be no need for the unit selector >> mechanism which I'm not sure will be accepted by the SCSI community. >> > > So this would be modifying the existing sysfs entries so that reads > still come from the device and unit descriptors, but writes go to > equivalent fields in the config descriptor? I can explore that > approach. Alternatively, if the unit selector mechanism is not > desired, I could dynamically create sysfs directories for each unit in > the config descriptor, but still bring out the config descriptor > values as separate entries. (I still worry a bit about smashing the > descriptors together as the UFS spec called them out as different). If you use the unit attributes, how do you configure units that do not yet exist? Perhaps it is better to represent the configuration descriptors exactly as they are defined in the specification. Probably not worth exposing them at all if the configuration is locked (attribute bConfigDescrLock == 1). Note also that the 2.1 spec. defines bConfDescContinue which allows updates to be grouped and committed together.