The original intent of the patch was not forcing a 6Gbs drive down to 1.5Gbs after hotplug.
Noting,
SSTATUS = 275 = 0x113 = 0001 0001 0011
That corresponds to ACTIVE PM STATE | GEN1 SPEED | DEVICE DETECTED
spd = 1 (corresponds to 1.5Gbps)
One question, the print for mask came after these 2 lines of code, right?
/* unconditionally mask off the highest bit */
bit = fls(mask) - 1;
mask &= ~(1 << bit);
In your debug kernel, would please remove the following 2 lines of code (so the code falls thru)
if (spd > 1) mask &= (1 << (spd - 1)) - 1;
else <===== return -EINVAL; <===== Remove these 2 lines of code.
And finally, at the end __sata_set_spd_needed(), would you please print out these values?
spd
target
*scontrol
The original patch didn't force changing mask, but, it does "return -EINVAL", I think it
may fix the problem just letting it fall thru to the end of sata_down_spd_limit(), but it would
still help to see the original debug values and these new ones with possible fix. Thank you.
Hi Joe,
The original intent of the patch was not forcing a 6Gbs drive down to 1.5Gbs after hotplug.
Noting,
SSTATUS = 275 = 0x113 = 0001 0001 0011
That corresponds to ACTIVE PM STATE | GEN1 SPEED | DEVICE DETECTED
spd = 1 (corresponds to 1.5Gbps)
One question, the print for mask came after these 2 lines of code, right?
/* unconditionally mask off the highest bit */
bit = fls(mask) - 1;
mask &= ~(1 << bit);
In your debug kernel, would please remove the following 2 lines of code (so the code falls thru)
if (spd > 1)
mask &= (1 << (spd - 1)) - 1;
return -EINVAL; <===== Remove these 2 lines of code.
else <=====
And finally, at the end __sata_ set_spd_ needed( ), would you please print out these values?
spd
target
*scontrol
The original patch didn't force changing mask, but, it does "return -EINVAL", I think it spd_limit( ), but it would
may fix the problem just letting it fall thru to the end of sata_down_
still help to see the original debug values and these new ones with possible fix. Thank you.