All of lore.kernel.org
 help / color / mirror / Atom feed
From: Damien Le Moal <dlemoal@kernel.org>
To: Igor Pylypiv <ipylypiv@google.com>
Cc: "Martin K . Petersen" <martin.petersen@oracle.com>,
	linux-scsi@vger.kernel.org
Subject: Re: [PATCH] scsi: Remember if a device is an ATA device
Date: Sat, 7 Jun 2025 07:17:20 +0900	[thread overview]
Message-ID: <f8291028-3ff5-4c3b-a67f-dfb481ed6e2f@kernel.org> (raw)
In-Reply-To: <aENd_k2m9RN23VOE@google.com>

On 6/7/25 06:30, Igor Pylypiv wrote:
> On Fri, Jun 06, 2025 at 02:28:44PM +0900, Damien Le Moal wrote:
>> scsi_add_lun() tests the device vendor string of SCSI devices to detect
>> if a SCSI device is in fact an ATA device, in order to correctly handle
>> SATL power management. The function scsi_cdl_enable() also requires
>> knowing if a SCSI device is an ATA device to control the state of the
>> device CDL feature but this function does that by testing for the
>> presence of the VPD page 89h (ATA INFORMATION page).
>>
>> Simplify these different methods by adding the is_ata field to struct
>> scsi_device to remember that a SCSI device is in fact an ATA one based
>> on the device vendor name test. This filed can also allow low level
>> SCSI host adapter drivers to take special actions for ATA devices
>> (e.g. to better handle ATA NCQ errors).
> 
> It looks like we can also simplify the WRITE SAME disablement logic?
> 
> https://github.com/torvalds/linux/blob/master/drivers/scsi/sd.c#L3466-L3474

Indeed. Will add that in v2.


-- 
Damien Le Moal
Western Digital Research

      reply	other threads:[~2025-06-06 22:17 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-06  5:28 [PATCH] scsi: Remember if a device is an ATA device Damien Le Moal
2025-06-06  6:43 ` Johannes Thumshirn
2025-06-06 21:30 ` Igor Pylypiv
2025-06-06 22:17   ` Damien Le Moal [this message]

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=f8291028-3ff5-4c3b-a67f-dfb481ed6e2f@kernel.org \
    --to=dlemoal@kernel.org \
    --cc=ipylypiv@google.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.