On 27/09/2022 10:28, Damien Le Moal wrote:
Sure, we can use sas_to_ata_dev() to get the ata_device.
I am just suggesting my way such that we can have a consistent method to
get the ata_device between all libata users and we don't need to change
the ata_change_queue_depth() interface. It would be something like:
struct ata_device *ata_scsi_find_dev(struct ata_port *ap, const struct
scsi_device *scsidev)
{
struct ata_link *link;
struct ata_device *dev;
ata_for_each_link(link, ap, EDGE) {
ata_for_each_dev(dev, link, ENABLED) {
if (scsidev == dev->sdev)
return dev;
}
}
// todo: check pmp
return NULL;
}
I see. Need to think about this one... This may also unify the pmp case.
Are you OK with the patch as is though ?
I'm ok with your patchset, but let me test it and get back to you later
today.
We can improve with something
like the above on top later. Really need to fix that qd setting as it is
causing problems for testing devices with/without ncq commands.
Out of curiosity, are you considering your patchset for 6.0?
Thanks,
John