linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tejun Heo <htejun@gmail.com>
To: Jeff Garzik <jeff@garzik.org>
Cc: Kalra Ashish-B00888 <ashish.kalra@freescale.com>,
	IDE/ATA development list <linux-ide@vger.kernel.org>
Subject: Re: PMP device port link speed issues
Date: Fri, 26 Oct 2007 11:45:51 +0900	[thread overview]
Message-ID: <472154DF.9050304@gmail.com> (raw)
In-Reply-To: <47206F2F.4020206@garzik.org>

Jeff Garzik wrote:
> Kalra Ashish-B00888 wrote:
>> While testing the "sata_fsl" driver with a Sil3726 based PMP, we had a
>> specific configuration where the host port to PMP link speed was
>> 1.5Gbps, while the PMP has configured it's device port(s) link speed to
>> 3Gbps. This configuration causes NCQ hangs on certain Seagate drives,
>> probably because of the link speed difference between host and PMP
>> device & PMP device ports and drives.
>>  
>> Does it makes sense to limit the PMP device port link speeds to the host
>> port link speed ?  
>> I believe currently sata_pmp_attach() is calling sata_link_init_spd()
>> for each PMP device port and thus causing PMP device port link speeds
>> being configured independent of host port link speed. Probably the PMP
>> device port links should be limited to the host link speed. 
> 
> Interesting question.  I'm sure Tejun will chime in, but I'm wondering
> if there is any real use -- even theoretical -- for running downstream
> links faster than the host<->PMP link?

[chiming in]

Probably not but it should also be okay.  The PMP chip is responsible
for matching link speed difference and it's pretty simple to do in SATA.

Kalra, does the following patch fix your NCQ problem?

diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
index 8ee56e5..6db2d1e 100644
--- a/drivers/ata/libata-core.c
+++ b/drivers/ata/libata-core.c
@@ -6517,6 +6517,7 @@ int sata_link_init_spd(struct ata_link *link)
        spd = (scontrol >> 4) & 0xf;
        if (spd)
                link->hw_sata_spd_limit &= (1 << spd) - 1;
+       link->hw_sata_spd_limit = 1;

        link->sata_spd_limit = link->hw_sata_spd_limit;

-- 
tejun

  reply	other threads:[~2007-10-26  2:46 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-25 10:18 PMP device port link speed issues Kalra Ashish-B00888
2007-10-25 10:25 ` Jeff Garzik
2007-10-26  2:45   ` Tejun Heo [this message]
2007-10-29 13:59     ` Kalra Ashish-B00888
2007-10-29 23:20       ` Tejun Heo
2007-10-30  3:58       ` 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=472154DF.9050304@gmail.com \
    --to=htejun@gmail.com \
    --cc=ashish.kalra@freescale.com \
    --cc=jeff@garzik.org \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).