On 4/28/23 10:53, Yahu Gao wrote: > ping ... > > 在 2023/4/22 20:14, Yahu Gao 写道: >> From: Yahu Gao <gaoyh12@xxxxxxxxxx> >> >> Replace conditions of avoid issuing [P]IDENTIFY to PMP. >> >> Reviewed-by: Jiwei Sun <sunjw10@xxxxxxxxxx> >> Signed-off-by: Yahu Gao <gaoyh12@xxxxxxxxxx> >> >> diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c >> index 14c17c3bda4e..53f65d751189 100644 >> --- a/drivers/ata/libata-core.c >> +++ b/drivers/ata/libata-core.c >> @@ -3802,11 +3802,7 @@ int ata_dev_revalidate(struct ata_device *dev, unsigned int new_class, >> return -ENODEV; >> >> /* fail early if !ATA && !ATAPI to avoid issuing [P]IDENTIFY to PMP */ >> - if (ata_class_enabled(new_class) && >> - new_class != ATA_DEV_ATA && >> - new_class != ATA_DEV_ATAPI && >> - new_class != ATA_DEV_ZAC && >> - new_class != ATA_DEV_SEMB) { >> + if (new_class == ATA_DEV_PMP) { >> ata_dev_info(dev, "class mismatch %u != %u\n", >> dev->class, new_class); >> rc = -ENODEV; Merge window is on-going, so I will not queue this right now. Also I need to check this as you remove the call to ata_class_enabled() and I am not 100% convinced that it is correct.