diff options
author | Yahu Gao <gaoyh12@lenovo.com> | 2023-05-15 10:36:58 +0800 |
---|---|---|
committer | Damien Le Moal <dlemoal@kernel.org> | 2023-05-16 20:08:05 +0900 |
commit | 12e2e17de2cd555f795d9f7cff049ecbc2b17cf8 (patch) | |
tree | ef244ba7ca907f55842ef90d90ca9ecf1f8931fd /drivers/ata | |
parent | a7eb54d44045d424624d3ac7d02feb8ef96744ec (diff) | |
download | linux-12e2e17de2cd555f795d9f7cff049ecbc2b17cf8.tar.gz linux-12e2e17de2cd555f795d9f7cff049ecbc2b17cf8.tar.bz2 linux-12e2e17de2cd555f795d9f7cff049ecbc2b17cf8.zip |
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 <gaoyh12@lenovo.com>
Signed-off-by: Damien Le Moal <dlemoal@kernel.org>
Diffstat (limited to 'drivers/ata')
-rw-r--r-- | drivers/ata/libata-core.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c index e9fc69fbe06b..8796ef51641c 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; |