From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796354645; b=2E9l5b0QG9cN2HQZeVpMADP8ipfmo7TKcEWbynx/MEZnu4ssIncu8naCDDlvKQD3b66z Ic/6SPg9k98I0oxwG/AMbdg91CXCrGGDF7zcSmk2e+lFc03ElhS8jFbV9hy8d2LCXEA/I jZl9pduDHqvPzoNA9T/2fzx6i9bpRPZbYHvgzmfevwklPRI3Nvpkcu1GSjHjx+jRrGILj fwUfdTovqBFVJ0GxLSzJwr2nBEPwwe2m30jr5FigGbL9wRbNdPoXwMwf1BTzHNjrFqe5N C+wtdc4GUtLBvtknB9lILvRygTzXHIPQuWcR9dUjo5NHtCtB9hU9SvqotMXf99ch9MA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796354645; h=Received:DKIM-Signature:Date:From:To:Cc:Subject:Message-ID: References:MIME-Version:Content-Type:Content-Disposition: Content-Transfer-Encoding:In-Reply-To; bh=4f7H+p1QrQe/710BskK1tb0KJpxpwM+NOnW6BLvJhWM=; b=aInJNPVsgdMBQAcbv61Bcjo1PbPFJD38HXCCxDvdhIyct9t670uWg2kmY2+ldvLsUspT 7GPrlyKAqkVLmAvWpUpGAaR5MwlAwYNzdHDAwsWjNpCEG9dvTPx+9vkYNZLO0TEDQBHPF zrPE2C0ne/bMOJBkT98p0eUexW36FH3RhMvvA269DSSiDL0p3pTdgbUDh5KH+rrfS8emV T/SwxBuPmiHRrT7N69UOScwsjcTvZas7eOu1aSAOVTaO07BiJG+q2gq0Ov4AdQNPUo2f3 rZhCO1+zG0TV6dTL9aYUM/BT91GY09hofMTtuaeE8ubJv2gorSrMCntQQyNQexPouZA== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=kc8hCK8N; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9ABD8606A322; Fri, 4 Dec 2026 03:24:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=kc8hCK8N Received: by smtp.kernel.org (Postfix) with ESMTPSA id E66071F000C2; Fri, 4 Dec 2026 03:24:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1796354645; bh=4f7H+p1QrQe/710BskK1tb0KJpxpwM+NOnW6BLvJhWM=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=kc8hCK8NsuehXUKiWWSdUaoLoZVMwjALcdD12ahlMLC1KUGQohV11A0CrpNYT7vGP 8fTt3cU1PoEB0QQF0TnotVBVfrOvTHXymeebv7xfE4YT2L5C6B2YU2m0PEY6XfJ3PN GNeWgYN71Q5iLrULH2fjKx9yaaJSX+KpvpAoYh3g= Date: Thu, 3 Dec 2026 19:07:33 +0100 From: Greg Kroah-Hartman To: Mateusz =?utf-8?Q?Jo=C5=84czyk?= Cc: Oliver Neukum , Alan Stern , "James E.J. Bottomley" , "Martin K. Petersen" , linux-usb@vger.kernel.org, linux-scsi@vger.kernel.org, usb-storage@lists.one-eyed-alien.net, linux-kernel@vger.kernel.org Subject: Re: [PATCH 2/2] usb: mass storage: expose ata_passthrough_disabled in sysfs Message-ID: <2026120310-thirsting-alfalfa-95e6@gregkh> References: <20261121155253.4980-1-mat.jonczyk@o2.pl> <20261121155253.4980-2-mat.jonczyk@o2.pl> X-Mailing-List: linux-usb@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20261121155253.4980-2-mat.jonczyk@o2.pl> On Sat, Nov 21, 2026 at 04:52:53PM +0100, Mateusz Jończyk wrote: > The mass storage driver blocks access to ATA passthrough commands for some > devices it considers buggy. As in the case of the uas driver, indicate > this in sysfs. > > Signed-off-by: Mateusz Jończyk > > --- > > v2: > - add this patch to the series > --- > drivers/usb/storage/scsiglue.c | 13 +++++++++++++ > 1 file changed, 13 insertions(+) > > diff --git a/drivers/usb/storage/scsiglue.c b/drivers/usb/storage/scsiglue.c > index 97de28e85562..43198888449e 100644 > --- a/drivers/usb/storage/scsiglue.c > +++ b/drivers/usb/storage/scsiglue.c > @@ -572,6 +572,18 @@ US_DO_ALL_FLAGS > * Sysfs interface > ***********************************************************************/ > > +/* Output routine for the sysfs ata_passthrough_disabled file */ > +static ssize_t ata_passthrough_disabled_show(struct device *dev, struct device_attribute *attr, > + char *buf) > +{ > + struct scsi_device *sdev = to_scsi_device(dev); > + struct us_data *us = host_to_us(sdev->host); > + > + return sysfs_emit(buf, "%d\n", !!(us->fflags & US_FL_NO_ATA_1X)); > +} Random undocumented sysfs files are not a good idea :( Shouldn't this be part of the scsi core instead? thanks, greg k-h