aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2023-02-02 16:44:07 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2023-02-02 16:44:07 -0800
commit66a87fff1a87c260452f5a57123891ca5258c449 (patch)
tree3e39f3d7ba18b3053f9f2e7f37bfbed80a175fa6
parentedb9b8f380c3413bf783475279b1a941c7e5cec1 (diff)
parent69f2c9346313ba3d3dfa4091ff99df26c67c9021 (diff)
downloadlinux-66a87fff1a87c260452f5a57123891ca5258c449.tar.gz
Merge tag 'ata-6.2-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/dlemoal/libata
Pull libata fix from Damien Le Moal: "Fix device probe issues with some combination of adapters & devices that do not report a current link speed, leading to device probe failures if a link speed was not previously reported and saved (me)" * tag 'ata-6.2-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/dlemoal/libata: ata: libata: Fix sata_down_spd_limit() when no link speed is reported
-rw-r--r--drivers/ata/libata-core.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
index 884ae73b11eac1..2ea572628b1c8e 100644
--- a/drivers/ata/libata-core.c
+++ b/drivers/ata/libata-core.c
@@ -3109,7 +3109,7 @@ int sata_down_spd_limit(struct ata_link *link, u32 spd_limit)
*/
if (spd > 1)
mask &= (1 << (spd - 1)) - 1;
- else
+ else if (link->sata_spd)
return -EINVAL;
/* were we already at the bottom? */