Re: [PATCH v2 2/2] ata: libata-sata: Fix device queue depth control

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux