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@xxxxxxxxx] 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 - To unsubscribe from this list: send the line "unsubscribe linux-ide" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html