Mailinglist Archive: opensuse-kernel (66 mails)

< Previous Next >
Re: [opensuse-kernel] [PATCH] libata: skip old error history when counting probe trials
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 05/04/2012 02:59 AM, Lee, Chun-Yi wrote:
From: Lin Ming <ming.m.lin@xxxxxxxxx>

Git-commit: 6868225e3e92399068be9a5f1635752d91012ad5
Patch-mainline: v3.4-rc5 Release-target: openSUSE 12.1

Commit d902747("[libata] Add ATA transport class") introduced
ATA_EFLAG_OLD_ER to mark entries in the error ring as cleared.

But ata_count_probe_trials_cb() didn't check this flag and it
still counts the old error history. So wrong probe trials count is
returned and it causes problem, for example, SATA link speed is
slowed down from 3.0Gbps to 1.5Gbps.

Fix it by checking ATA_EFLAG_OLD_ER in
ata_count_probe_trials_cb().

Cc: stable <stable@xxxxxxxxxxxxxxx> # 2.6.37+ Signed-off-by: Lin
Ming <ming.m.lin@xxxxxxxxx> Signed-off-by: Jeff Garzik
<jgarzik@xxxxxxxxxx> Acked-by: Lee, Chun-Yi <jlee@xxxxxxxx> ---
drivers/ata/libata-eh.c | 3 ++- 1 file changed, 2 insertions(+),
1 deletion(-)

--- a/drivers/ata/libata-eh.c +++ b/drivers/ata/libata-eh.c @@
-3487,7 +3487,8 @@ static int ata_count_probe_trials_cb(str u64 now
= get_jiffies_64(); int *trials = void_arg;

- if (ent->timestamp < now - min(now, interval)) + if ((ent->eflags
& ATA_EFLAG_OLD_ER) || + (ent->timestamp < now - min(now,
interval))) return -1;

(*trials)++;

Applied, thanks.

- -Jeff

- --
Jeff Mahoney
SUSE Labs
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.19 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQIcBAEBAgAGBQJPo+sxAAoJEB57S2MheeWyVscQAMFYrDS/cYkwOKPTL2qRgrXU
MFfb+4es5JfzsO9wlUzd0TxNarZjq6DrukTR5age9HaaIRLswPMPt2EkG74jjxwU
La8HOJqe9Sd9jE4qlX3Uw+MBV/iN+Q8itC8I2Tezf+LQmmiw/NZWo67U+0yWHyaa
tDbO6RcqiRNDUW/kX7u+/hRUb609760xp/v2PnagIpIZpJzlIWFfpmDrU9uS3zAH
PJZdxLjmVwarZgXBc+FeTkoCJQ9+uUtnajuGkrg99nghU4+14Pca24q7Jesc/Vy6
ODujVJ40gneiq78F1+DN7LDTmcPyXT/tcRe5cmLkqkjTSNINgvgPfBcHeuBE6tkC
kNtbK/SnQiLA/HyNHLPkCaMlnizrpJ2zu8ovAZRQGLc51oQdRTALnbb0Q/NIG69a
A3adw4w3cKzqpC6wYqQh/R06QRiGvtdUvgclgmFGBeVsUK+2KgrGRRp+6ESln46T
20HvJSh0asfF7+j65zmoFxSGdzXunfwFmLBNd/JLaFm9208NS5oNDO8w1KNKMFmn
r93SM/TrBquHULq6GPO+4Sw7PKlA+wWNqtJg/esUexFTrYuuckqnBLt8JvmMISLF
WNZ4iXUgHESP4ZMSSh9ERDo2AsVYKaConQFFBELgmfPI0uCgfEogqRaz/8u/oPhe
KhnvqtQdfClOBviP9hMh
=UvYF
-----END PGP SIGNATURE-----
--
To unsubscribe, e-mail: opensuse-kernel+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: opensuse-kernel+owner@xxxxxxxxxxxx

< Previous Next >
References