ArchiveOrangemail archive

opensuse-kernel.opensuse.org


(List home) (Recent threads) (97 other OpenSUSE lists)

Subscription Options

  • RSS or Atom: Read-only subscription using a browser or aggregator. This is the recommended way if you don't need to send messages to the list. You can learn more about feed syndication and clients here.
  • Conventional: All messages are delivered to your mail address, and you can reply. To subscribe, send an email to the list's subscribe address with "subscribe" in the subject line, or visit the list's homepage here.
  • Low traffic list: less than 3 messages per day
  • This list contains about 4,659 messages, beginning Aug 2007
  • 2 messages added yesterday
Report the Spam
This button sends a spam report to the moderator. Please use it sparingly. For other removal requests, read this.
Are you sure? yes no

[PATCH] libata: skip old error history when counting probe trials

Ad
Lee, Chun-Yi 1336114978Fri, 04 May 2012 07:02:58 +0000 (UTC)
From: Lin Ming 

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  # 2.6.37+
Signed-off-by: Lin Ming 
Signed-off-by: Jeff Garzik 
Acked-by: Lee, Chun-Yi ---
 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)++;
Jeff Mahoney 1336142657Fri, 04 May 2012 14:44:17 +0000 (UTC)
On 05/04/2012 02:59 AM, Lee, Chun-Yi wrote:
> From: Lin Ming 
> 
> 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  # 2.6.37+ Signed-off-by: Lin
> Ming  Signed-off-by: Jeff Garzik
>  Acked-by: Lee, Chun-Yi  --- 
> 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
Home | About | Privacy