Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp75896imm; Thu, 27 Sep 2018 16:19:28 -0700 (PDT) X-Google-Smtp-Source: ACcGV60HswqKs89iZsO+C3MSGQKhr0HAfuxEWp18w0sc3O+nY5ki+rewi9p6RpxQwppepKlwMwWw X-Received: by 2002:a17:902:5e3:: with SMTP id f90-v6mr13544072plf.286.1538090368307; Thu, 27 Sep 2018 16:19:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538090368; cv=none; d=google.com; s=arc-20160816; b=QKJTnng7ma+NXZBGW5562qRrJTc9Sfz7nYdrgyTDUgllwoUfDtkbs/WahIkdxUdsSl p5jUZFpI7XjfO9l0IareG8/Ng5M7uhJCDcD9b16iTOg6nx+coTB6/Bli6uoA8LXNG0kH 4/6wneuXntiY+DDMHItiDNqVlbuMjIS3Fx9UW7joNKN9C5BzMOdkJkuxlbmm5Kpkw3M4 I5X5rvczODFGVbU9/40XtEbLiqxWtIN5o6tzHdUWw4O/3iPvqzVYP+Q/t6heEzBLJZI2 GsR90J/bn7FwBdyspmq/k/lgT7oSo5+CyVNkRwNPvLJSJzL7UJVMzoNBwTtEfcZLq5i5 pzBA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=H2s5GCw1GT4ZrUyJaOfk7DOsbdebI1eX9q1IxtdMl58=; b=jB2Uir/fftswx4brcHQxlhpl9M+uz9uZJTXsAAh+TT5t+7BTnugkF/jzGOvDnwkCp6 TebbFUeQRMqvYO6nd5vkGUMUy04WdIyyVOniT/pp2QMcFCKWg3d837NawBepwKYoLAQ7 HTUHARUqTBF2kJyW6sxZKgRype/017zYIKuY1nMM9PfDuw1/ypG9QtXRRbjY8CSmG1g0 zi941RFOfBI93cM/pxhSKZxhZm8oe8EBW4Mvh9oe0tvXdnew01MDpFxailljT0kMhg3G ojj/IAo1w/CU0aD5OFRi9kcJ1OmvXNkxRCaizouurm9j5tIty8fRo/EZwb6G5WRQvPyo 0APQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=F1esG1jm; 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=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 31-v6si3296307plc.288.2018.09.27.16.19.10; Thu, 27 Sep 2018 16:19:28 -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; dkim=pass header.i=@chromium.org header.s=google header.b=F1esG1jm; 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=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728337AbeI1Fh6 (ORCPT + 99 others); Fri, 28 Sep 2018 01:37:58 -0400 Received: from mail-lj1-f196.google.com ([209.85.208.196]:34747 "EHLO mail-lj1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726665AbeI1Fh6 (ORCPT ); Fri, 28 Sep 2018 01:37:58 -0400 Received: by mail-lj1-f196.google.com with SMTP id f8-v6so4075938ljk.1 for ; Thu, 27 Sep 2018 16:17:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=H2s5GCw1GT4ZrUyJaOfk7DOsbdebI1eX9q1IxtdMl58=; b=F1esG1jmw0sPY5Qod+TJ+6hjY3rl7hYNUbZeXkNqanBKyw59Mq3gB2WEC3MdZB/K16 4e4i77sNNDZmJHrXrzpmtkoI6juTzhgCZflt1Zkuo/ScSg5swqCW/toEh0Nbd0UMIELg zgT24Q51pEuIXvExUJI4KzNphyxXDN8wcAlUA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=H2s5GCw1GT4ZrUyJaOfk7DOsbdebI1eX9q1IxtdMl58=; b=p8UQskgVFRka8RzDHzBloJB5gwK9IfemieGJw+nWW2d6MYV/aLV1tH+X28tEEXaEyC /HsFaZsZjGuoZDondxhqgHeDkzoHa5RYYbxyczkFrLtWzK7dEB+C+qPpwAu3LhDK6g13 s37EvhwQzN3hNbj3WNKqp7EOdBVhrR3ZnEyfO5U26ChSWecD79K6fTCZgf7D33bSxaLs UxHs2xq+4TPwhKfxVGIYPpdFDHsrbO49bAMD+SITtNHIkNeZ3JHdjiHplmK3XnWOHhS6 M6qeUs/KpUNciU64mLvURDu2Y3Ig4Wh4xdju1va1tdpi+KxyHGtJxyMGFjpVpDXyOyMH d/DQ== X-Gm-Message-State: ABuFfoh3kZ7eFhOqi1Xx3RmjiFDCavbRt1gOR9trkfvXIzv69PLXGdK8 8cUJldZMZ1PSiCvBjhy28EfaSR9C0js= X-Received: by 2002:a2e:810e:: with SMTP id d14-v6mr1872267ljg.170.1538090233183; Thu, 27 Sep 2018 16:17:13 -0700 (PDT) Received: from mail-lj1-f173.google.com (mail-lj1-f173.google.com. [209.85.208.173]) by smtp.gmail.com with ESMTPSA id a18-v6sm653427ljk.80.2018.09.27.16.17.10 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 27 Sep 2018 16:17:11 -0700 (PDT) Received: by mail-lj1-f173.google.com with SMTP id y17-v6so4031469ljy.8 for ; Thu, 27 Sep 2018 16:17:10 -0700 (PDT) X-Received: by 2002:a2e:9c89:: with SMTP id x9-v6mr9724169lji.110.1538090230315; Thu, 27 Sep 2018 16:17:10 -0700 (PDT) MIME-Version: 1.0 References: <20180808224454.243790-1-evgreen@chromium.org> <6dd8a547-7260-09b8-9096-8a1564b08e70@intel.com> <8fd05b2d-fa48-78af-6f1c-7e485c1008f6@intel.com> <20180927140133.GA22096@infradead.org> In-Reply-To: <20180927140133.GA22096@infradead.org> From: Evan Green Date: Thu, 27 Sep 2018 16:16:33 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v4] scsi: ufs: Make sysfs attributes writable To: hch@infradead.org Cc: Avri.Altman@wdc.com, Doug Anderson , martin.petersen@oracle.com, Vinayak Holikatti , jejb@linux.vnet.ibm.com, Stanislav.Nijnikov@wdc.com, linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org, Bart.VanAssche@wdc.com, adrian.hunter@intel.com, sayali Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Sep 27, 2018 at 7:01 AM Christoph Hellwig wrote: > > On Thu, Sep 27, 2018 at 06:32:47AM +0000, Avri Altman wrote: > > Also, in this context there is the series in > > https://www.spinics.net/lists/linux-scsi/msg123479.html > > which allows to send UPIUs via a bsg device. > > > > It's not a provisioning series per-se like Evan's and Sayali's. > > It covers the provisioning functionality, > > But also allow to send task management UPIU, and UIC commands, > > Which can be used for testing and validation. > > And as someone having been involved with review of a few different > UFS provisioning bits this is what I think we should be merging. > > Instead of being in a rat race of adding ever new sysfs or configfs > attributes for things that don't matter to normal driver operation > I'd rather have a relatively clean pass through interface and move > policy to userspace. Especially given that there are plenty of > vendor specific commands at these levels as well. There's no policy in my patches (nor Sayali's), nor are there any vendor-specific commands here. The sysfs interface has exposed knobs defined by the UFS specification, which to me seems like the kernel providing a sane abstraction of device functionality. I don't see there being a rat race, as these attributes and the config descriptor are all that's needed to provision a device, and any reasonable future versions of the UFS spec would likely be backwards compatible with respect to attributes and flags. The patches Avri linked to seem fine as well, but I don't see why there's not room for both the "roll your own driver completely in user mode" approach, and the "kernel provides a reasonable abstraction of device functionality" approach to co-exist. We do the same sort of thing for simple buses like I2C for example, where you can both write a kernel driver or do bus transactions directly from user mode. -Evan