linux-block.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Niklas Cassel <nks@flawful.org>
To: Christoph Hellwig <hch@lst.de>
Cc: Jens Axboe <axboe@kernel.dk>,
	"Martin K. Petersen" <martin.petersen@oracle.com>,
	"James E.J. Bottomley" <jejb@linux.ibm.com>,
	Bart Van Assche <bvanassche@acm.org>,
	Hannes Reinecke <hare@suse.de>,
	Damien Le Moal <damien.lemoal@opensource.wdc.com>,
	Damien Le Moal <dlemoal@fastmail.com>,
	linux-scsi@vger.kernel.org, linux-ide@vger.kernel.org,
	linux-block@vger.kernel.org,
	Niklas Cassel <niklas.cassel@wdc.com>
Subject: Re: [PATCH v6 09/19] scsi: allow enabling and disabling command duration limits
Date: Tue, 11 Apr 2023 10:15:46 +0200	[thread overview]
Message-ID: <ZDUXMl7HO8hEcMDv@x1-carbon> (raw)
In-Reply-To: <20230411061648.GD18719@lst.de>

On Tue, Apr 11, 2023 at 08:16:48AM +0200, Christoph Hellwig wrote:
> On Thu, Apr 06, 2023 at 01:32:38PM +0200, Niklas Cassel wrote:
> > +	/*
> > +	 * For ATA devices, CDL needs to be enabled with a SET FEATURES command.
> > +	 */
> > +	if (is_ata) {
> 
> I don't think these hacks have any business in the SCSI layer.  We should
> probbaly just do this unconditionally for CDL enabled ATA devices at
> probe time.

Hello Christoph,

While I agree that the pattern isn't especially beautiful,
the pattern is used in the SCSI layer already,
authored by none other than one of the SCSI maintainers themselves:
https://github.com/torvalds/linux/blame/v6.3-rc6/drivers/scsi/sd.c#L3066-L3074

I guess we could try to clean up all the occurrences of this pattern,
but considering that the pattern has existed in the SCSI layer for
10 years already, is it something that has to be addressed before this
series can be accepted?


Kind regards,
Niklas

  parent reply	other threads:[~2023-04-11  8:17 UTC|newest]

Thread overview: 49+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-06 11:32 [PATCH v6 00/19] Add Command Duration Limits support Niklas Cassel
2023-04-06 11:32 ` [PATCH v6 01/19] ioprio: cleanup interface definition Niklas Cassel
2023-04-11  6:14   ` Christoph Hellwig
2023-04-06 11:32 ` [PATCH v6 02/19] block: introduce ioprio hints Niklas Cassel
2023-04-11  6:14   ` Christoph Hellwig
2023-04-06 11:32 ` [PATCH v6 03/19] block: introduce BLK_STS_DURATION_LIMIT Niklas Cassel
2023-04-11  6:15   ` Christoph Hellwig
2023-04-06 11:32 ` [PATCH v6 04/19] scsi: core: allow libata to complete successful commands via EH Niklas Cassel
2023-04-06 11:32 ` [PATCH v6 05/19] scsi: rename and move get_scsi_ml_byte() Niklas Cassel
2023-04-06 11:32 ` [PATCH v6 06/19] scsi: support retrieving sub-pages of mode pages Niklas Cassel
2023-04-11  6:21   ` Christoph Hellwig
2023-04-06 11:32 ` [PATCH v6 07/19] scsi: support service action in scsi_report_opcode() Niklas Cassel
2023-04-06 11:32 ` [PATCH v6 08/19] scsi: detect support for command duration limits Niklas Cassel
2023-04-06 11:32 ` [PATCH v6 09/19] scsi: allow enabling and disabling " Niklas Cassel
2023-04-11  6:16   ` Christoph Hellwig
2023-04-11  7:09     ` Damien Le Moal
2023-04-11  7:23       ` Christoph Hellwig
2023-04-11  7:38         ` Damien Le Moal
2023-04-11 11:59           ` Niklas Cassel
2023-04-11 12:20             ` Niklas Cassel
2023-04-12  0:59             ` Damien Le Moal
2023-04-12  4:43               ` Christoph Hellwig
2023-04-12  5:32                 ` Damien Le Moal
2023-04-12  5:34                   ` Christoph Hellwig
2023-04-11  8:40         ` Damien Le Moal
2023-04-11  8:15     ` Niklas Cassel [this message]
2023-04-11  6:44   ` Hannes Reinecke
2023-04-06 11:32 ` [PATCH v6 10/19] scsi: sd: set read/write commands CDL index Niklas Cassel
2023-04-11  6:17   ` Christoph Hellwig
2023-04-06 11:32 ` [PATCH v6 11/19] scsi: sd: handle read/write CDL timeout failures Niklas Cassel
2023-04-06 11:32 ` [PATCH v6 12/19] ata: libata-scsi: remove unnecessary !cmd checks Niklas Cassel
2023-04-11  6:17   ` Christoph Hellwig
2023-04-06 11:32 ` [PATCH v6 13/19] ata: libata: change ata_eh_request_sense() to not set CHECK_CONDITION Niklas Cassel
2023-04-06 11:32 ` [PATCH v6 14/19] ata: libata: detect support for command duration limits Niklas Cassel
2023-04-11  6:17   ` Christoph Hellwig
2023-04-06 11:32 ` [PATCH v6 15/19] ata: libata-scsi: handle CDL bits in ata_scsiop_maint_in() Niklas Cassel
2023-04-11  6:18   ` Christoph Hellwig
2023-04-06 11:32 ` [PATCH v6 16/19] ata: libata-scsi: add support for CDL pages mode sense Niklas Cassel
2023-04-11  6:18   ` Christoph Hellwig
2023-04-06 11:32 ` [PATCH v6 17/19] ata: libata: add ATA feature control sub-page translation Niklas Cassel
2023-04-06 11:32 ` [PATCH v6 18/19] ata: libata: set read/write commands CDL index Niklas Cassel
2023-04-11  6:19   ` Christoph Hellwig
2023-04-11  6:46   ` Hannes Reinecke
2023-04-06 11:32 ` [PATCH v6 19/19] ata: libata: handle completion of CDL commands using policy 0xD Niklas Cassel
2023-04-11  6:20   ` Christoph Hellwig
2023-04-12 22:29 ` [PATCH v6 00/19] Add Command Duration Limits support Damien Le Moal
2023-04-13  1:17   ` Martin K. Petersen
2023-04-15  2:38     ` Damien Le Moal
2023-04-18  5:35     ` Damien Le Moal

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZDUXMl7HO8hEcMDv@x1-carbon \
    --to=nks@flawful.org \
    --cc=axboe@kernel.dk \
    --cc=bvanassche@acm.org \
    --cc=damien.lemoal@opensource.wdc.com \
    --cc=dlemoal@fastmail.com \
    --cc=hare@suse.de \
    --cc=hch@lst.de \
    --cc=jejb@linux.ibm.com \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=niklas.cassel@wdc.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).