From 12e2e17de2cd555f795d9f7cff049ecbc2b17cf8 Mon Sep 17 00:00:00 2001 From: Yahu Gao Date: Mon, 15 May 2023 10:36:58 +0800 Subject: [PATCH] ata: libata-core: Simplify if condition in ata_dev_revalidate() Simplify the condition used in ata_dev_revalidate() to not issue identify commands to port multiplier devices. Signed-off-by: Yahu Gao Signed-off-by: Damien Le Moal --- drivers/ata/libata-core.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c index e9fc69fbe06bc..8796ef51641cb 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 (ata_class_enabled(new_class) && new_class == ATA_DEV_PMP) { ata_dev_info(dev, "class mismatch %u != %u\n", dev->class, new_class); rc = -ENODEV; -- 2.30.2