Re: AHCI support Port Multiplier problem.
From: Luo Dislo <hidden>
Date: 2011-01-10 01:46:48
Hello, This is my company(Faraday) implemented AHCI SATA controller. Our controller is not located at PCI bus, but AHB bus(ARM based platform). However, I modify Linux kernel builtin AHCI driver(ahci.c) to replace the PCI related code by using platform bus. Just pretty similar way with drivers/ata/ahci_platform.c (Kernel 2.6.35). I think the problem happens because libata does not give up, keep on expecting the Port Multiplier Signature when we set CONFIG_SATA_PMP to 1. I know how to fix this problem, just add AHCI_HFLAG_NO_PMP to AHCI_HFLAGS when I connect hard drive to the controller. Meanwhile, when I want to connect the Port Muliplier to my controller, I need to remove AHCI_HFLAG_NO_PMP from AHCI_HFLAGS. I don't think this is a good solution because I have to compile two version of my code. It does not make sense. We set CONFIG_SATA_PMP to 1 and inside the driver code DOES NOT have AHCI_HFLAG_NO_PMP just means that controller support Port Multiplier but the device connecting to the port might be others type. Regards, Dislo
--- 11/1/8 (六),Tejun Heo <tj@kernel.org> 寫道:
寄件者: Tejun Heo [off-list ref] 主旨: Re: AHCI support Port Multiplier problem. 收件者: "Luo Dislo" [off-list ref] 副本: jgarzik@pobox.com, linux-ide@vger.kernel.org 日期: 2011年1月8日,六,上午5:25 Hello, On Fri, Jan 07, 2011 at 10:55:14AM +0800, Luo Dislo wrote:quoted
I am using AHCI driver, when CONFIG_SATA_PMP is setand the ahciquoted
driver DOES NOT have AHCI_HFLAG_NO_PMP. Libata sendsSoftware Resetquoted
with PMP=0xF, trying to detect if Port Multiplierconnected to thequoted
port. Unfortunately, if I plugged in general Harddrive, myquoted
controller failed to identify the hard drive. What I observed was that libata always sent SoftwareReset withquoted
PMP=0xF and I guessed expecting signature is0x96690101. I thinkquoted
libata should give up if the device does not returnthe Portquoted
Multiplier signature at the first time and take thesignature valuequoted
from device as the real device connnecting to the portnow.quoted
What we said "support" PMP does not mean the port canonly connnectquoted
to Port Multiplier. It might connect with hard driveor ATAPIquoted
device.Which controller is this? Can you please post the output of "lspci -nn"? SB600 had this problem and needed workaround but later SBs fixed it. Looks like someone else screwed up similarly. Thanks. -- tejun