All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tejun Heo <tj@kernel.org>
To: David Milburn <dmilburn@redhat.com>
Cc: linux-ide@vger.kernel.org
Subject: Re: [PATCH] libata: sata_down_spd_limit should return if driver has not recorded sstatus speed
Date: Mon, 27 Nov 2017 11:19:48 -0800	[thread overview]
Message-ID: <20171127191948.GH983427@devbig577.frc2.facebook.com> (raw)
In-Reply-To: <1510697845-58071-1-git-send-email-dmilburn@redhat.com>

Hello, David.

On Tue, Nov 14, 2017 at 04:17:25PM -0600, David Milburn wrote:
> During hotplug, it is possible for 6Gbps link speed to
> be limited all the way down to 1.5 Gbps which may lead
> to a slower link speed when drive is re-connected.

Can you please explain the scenario with more details?

>  	/* Mask off all speeds higher than or equal to the current
> -	 * one.  Force 1.5Gbps if current SPD is not available.
> +	 * one. At this point if current SPD is not available and we
> +	 * previously recorded the link speed from the Status register,
> +	 * the driver has already masked off the highest bit so mask
> +	 * should already be set to 1 or 0. Otherwise, we should
> +	 * not force 1.5Gbps on a link where we have not previously 
> +	 * recorded speed from Status register, just return in this case.
>  	 */
>  	if (spd > 1)
>  		mask &= (1 << (spd - 1)) - 1;
>  	else
> -		mask &= 1;
> +		return -EINVAL;

I get that the current behavior might not be ideal in certain
scenarios but the above seems weird, especially given the we have
link->sata_spd for cases where we can't access the spd value.

Thanks.

-- 
tejun

  reply	other threads:[~2017-11-27 19:19 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-14 22:17 [PATCH] libata: sata_down_spd_limit should return if driver has not recorded sstatus speed David Milburn
2017-11-27 19:19 ` Tejun Heo [this message]
2017-11-27 20:54   ` David Milburn
2017-12-04 21:57 ` Tejun Heo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20171127191948.GH983427@devbig577.frc2.facebook.com \
    --to=tj@kernel.org \
    --cc=dmilburn@redhat.com \
    --cc=linux-ide@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.