linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* PMP device port link speed issues
@ 2007-10-25 10:18 Kalra Ashish-B00888
  2007-10-25 10:25 ` Jeff Garzik
  0 siblings, 1 reply; 6+ messages in thread
From: Kalra Ashish-B00888 @ 2007-10-25 10:18 UTC (permalink / raw)
  To: IDE/ATA development list; +Cc: Kalra Ashish-B00888

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. 
 
Thanks, 
 
Ashish Kalra.
Freescale Semiconductor.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: PMP device port link speed issues
  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
  0 siblings, 1 reply; 6+ messages in thread
From: Jeff Garzik @ 2007-10-25 10:25 UTC (permalink / raw)
  To: Kalra Ashish-B00888; +Cc: IDE/ATA development list

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?

	Jeff





^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: PMP device port link speed issues
  2007-10-25 10:25 ` Jeff Garzik
@ 2007-10-26  2:45   ` Tejun Heo
  2007-10-29 13:59     ` Kalra Ashish-B00888
  0 siblings, 1 reply; 6+ messages in thread
From: Tejun Heo @ 2007-10-26  2:45 UTC (permalink / raw)
  To: Jeff Garzik; +Cc: Kalra Ashish-B00888, IDE/ATA development list

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

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* RE: PMP device port link speed issues
  2007-10-26  2:45   ` Tejun Heo
@ 2007-10-29 13:59     ` Kalra Ashish-B00888
  2007-10-29 23:20       ` Tejun Heo
  2007-10-30  3:58       ` Tejun Heo
  0 siblings, 2 replies; 6+ messages in thread
From: Kalra Ashish-B00888 @ 2007-10-29 13:59 UTC (permalink / raw)
  To: Tejun Heo, Jeff Garzik; +Cc: IDE/ATA development list, Kalra Ashish-B00888

Hello Tejun,

This patch will surely fix my problem, but won't it be better to set
each PMP device port link speed directly to
the host<->PMP link speed, during SATA PMP device configuration in
sata_pmp_attach(), instead of calling 
sata_link_init_spd() for each link. 

The PMP chip should be responsible for matching link speed difference,
but probably there could be issues with
certain PMP chips, as it looks like in our case, where NCQ hangs are
probably caused due to link speed difference.
It should be simpler to handle it in S/W, by limiting PMP device port
link speeds to host<->PMP link speed.

Thanks,
Ashish

-----Original Message-----
From: Tejun Heo [mailto:htejun@gmail.com] 
Sent: Friday, October 26, 2007 8:16 AM
To: Jeff Garzik
Cc: Kalra Ashish-B00888; IDE/ATA development list
Subject: Re: PMP device port link speed issues

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: PMP device port link speed issues
  2007-10-29 13:59     ` Kalra Ashish-B00888
@ 2007-10-29 23:20       ` Tejun Heo
  2007-10-30  3:58       ` Tejun Heo
  1 sibling, 0 replies; 6+ messages in thread
From: Tejun Heo @ 2007-10-29 23:20 UTC (permalink / raw)
  To: Kalra Ashish-B00888; +Cc: Jeff Garzik, IDE/ATA development list

Kalra Ashish-B00888 wrote:
> Hello Tejun,
> 
> This patch will surely fix my problem, but won't it be better to set
> each PMP device port link speed directly to
> the host<->PMP link speed, during SATA PMP device configuration in
> sata_pmp_attach(), instead of calling 
> sata_link_init_spd() for each link. 
> 
> The PMP chip should be responsible for matching link speed difference,
> but probably there could be issues with
> certain PMP chips, as it looks like in our case, where NCQ hangs are
> probably caused due to link speed difference.
> It should be simpler to handle it in S/W, by limiting PMP device port
> link speeds to host<->PMP link speed.

Yeah, I agree.  There's nearly nothing to be gained by driving
downstream PHYs faster than the upstream PHY.  I'll submit a patch to
limit downstream port speed by upstream speed.

Thanks.

-- 
tejun

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: PMP device port link speed issues
  2007-10-29 13:59     ` Kalra Ashish-B00888
  2007-10-29 23:20       ` Tejun Heo
@ 2007-10-30  3:58       ` Tejun Heo
  1 sibling, 0 replies; 6+ messages in thread
From: Tejun Heo @ 2007-10-30  3:58 UTC (permalink / raw)
  To: Kalra Ashish-B00888; +Cc: Jeff Garzik, IDE/ATA development list

Kalra Ashish-B00888 wrote:
> Hello Tejun,
> 
> This patch will surely fix my problem, but won't it be better to set
> each PMP device port link speed directly to

Also, please verify it actually fixes the problem you're seeing.

Thanks.

-- 
tejun

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2007-10-30  3:58 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2007-10-29 13:59     ` Kalra Ashish-B00888
2007-10-29 23:20       ` Tejun Heo
2007-10-30  3:58       ` Tejun Heo

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).