Skip to contentSkip to conversation

AHCI support Port Multiplier problem.

DISCUSSION Luo Dislo 4 participants 16 messages Jan 7, 2011 – Feb 15, 2011 libata

lore
Share & tools
lore

Luo Dislo

author
#0 lore raw

Dear Jeff Garzik,

I am using AHCI driver, when CONFIG_SATA_PMP is set and the ahci driver DOES NOT have AHCI_HFLAG_NO_PMP. Libata sends Software Reset with PMP=0xF, trying to detect if Port Multiplier connected to the port. Unfortunately, if I plugged in general Hard drive, my controller failed to identify the hard drive.

What I observed was that libata always sent Software Reset with PMP=0xF and I guessed expecting signature is 0x96690101. I think libata should give up if the device does not return the Port Multiplier signature at the first time and take the signature value from device as the real device connnecting to the port now.

What we said "support" PMP does not mean the port can only connnect to Port Multiplier. It might connect with hard drive or ATAPI device.

Thank you.

Regards,
Dislo

#1 lore raw

Hello,

Quoted 12 lines · Luo Dislo

I am using AHCI driver, when CONFIG_SATA_PMP is set and the ahci driver DOES NOT have AHCI_HFLAG_NO_PMP. Libata sends Software Reset with PMP=0xF, trying to detect if Port Multiplier connected to the port. Unfortunately, if I plugged in general Hard drive, my controller failed to identify the hard drive.

What I observed was that libata always sent Software Reset with PMP=0xF and I guessed expecting signature is 0x96690101. I think libata should give up if the device does not return the Port Multiplier signature at the first time and take the signature value from device as the real device connnecting to the port now.

Quoted 3 lines

What we said "support" PMP does not mean the port can only connnect to Port Multiplier. It might connect with hard drive or ATAPI 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.

Signature · 1 line
tejun
author
#2 lore raw

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 <[email protected]> 寫道:

Quoted 47 lines

寄件者: Tejun Heo <[email protected]>
主旨: Re: AHCI support Port Multiplier problem.
收件者: "Luo Dislo" <[email protected]>
副本: [email protected], [email protected]
日期: 2011年1月8日,六,上午5:25
Hello,

Quoted 1 line · Luo Dislo

I am using AHCI driver, when CONFIG_SATA_PMP is set

and the ahci

Quoted 1 line

driver DOES NOT have AHCI_HFLAG_NO_PMP. Libata sends

Software Reset

Quoted 1 line

with PMP=0xF, trying to detect if Port Multiplier

connected to the

Quoted 1 line

port. Unfortunately, if I plugged in general Hard

drive, my

Quoted 3 lines

controller failed to identify the hard drive.

What I observed was that libata always sent Software

Reset with

Quoted 1 line

PMP=0xF and I guessed expecting signature is

0x96690101. I think

Quoted 1 line

libata should give up if the device does not return

the Port

Quoted 1 line

Multiplier signature at the first time and take the

signature value

Quoted 1 line

from device as the real device connnecting to the port

now.

Quoted 2 lines

What we said "support" PMP does not mean the port can

only connnect

Quoted 1 line

to Port Multiplier. It might connect with hard drive

or ATAPI

Quoted 1 line

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.

Signature · 1 line
tejun
#3 lore raw
Quoted 10 lines · Luo Dislo <dislo_b_j <at> yahoo.com.tw> writes:

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

Quoted 5 lines

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

Quoted 1 line

controller. Meanwhile, when I want to connect the Port Muliplier to my

controller, I need to remove

Quoted 3 lines

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.

Quoted 1 line

We set CONFIG_SATA_PMP to 1 and inside the driver code DOES NOT have

AHCI_HFLAG_NO_PMP just means that

Quoted 1 line

controller support Port Multiplier but the device connecting to the port might

be others type.

We have a similar issue on cns3xxx
http://www.spinics.net/lists/linux-ide/msg39512.html
http://www.spinics.net/lists/linux-ide/msg39859.html

Could you try the following patch with CONFIG_SATA_PMP enabled and see if it fix the issue?
If so, then it would be the same issue.

---
 drivers/ata/libahci.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)
drivers/ata/libahci.c +0 -0
index ebc08d6..081548f 100644
@@ -1302,10 +1302,15 @@ static int ahci_softreset(struct ata_link *link,

unsigned int *class,
unsigned long deadline)

 {
        int pmp = sata_srst_pmp(link);

+ int ret;

        DPRINTK("ENTER\n");
-       return ahci_do_softreset(link, class, pmp, deadline, ahci_check_ready);
+       ret = ahci_do_softreset(link, class, pmp, deadline, ahci_check_ready);
+       if (ret && pmp)

+ return ahci_do_softreset(link, class, 0, deadline,
+ ahci_check_ready);
+ return ret;
}
EXPORT_SYMBOL_GPL(ahci_do_softreset);

Quoted 53 lines

Regards,

Dislo

--- 11/1/8 (六),Tejun Heo <tj <at> kernel.org> 寫道:

Quoted 46 lines

寄件者: Tejun Heo <tj <at> kernel.org>
主旨: Re: AHCI support Port Multiplier problem. 收件者: "Luo Dislo" <dislo_b_j <at> yahoo.com.tw> 副本: jgarzik <at> pobox.com, linux-ide <at> vger.kernel.org 日期: 2011年1月8日,六,上午5:25
Hello,

Quoted 1 line · Luo Dislo

I am using AHCI driver, when CONFIG_SATA_PMP is set

and the ahci

Quoted 1 line

driver DOES NOT have AHCI_HFLAG_NO_PMP. Libata sends

Software Reset

Quoted 1 line

with PMP=0xF, trying to detect if Port Multiplier

connected to the

Quoted 1 line

port. Unfortunately, if I plugged in general Hard

drive, my

Quoted 3 lines

controller failed to identify the hard drive.

What I observed was that libata always sent Software

Reset with

Quoted 1 line

PMP=0xF and I guessed expecting signature is

0x96690101. I think

Quoted 1 line

libata should give up if the device does not return

the Port

Quoted 1 line

Multiplier signature at the first time and take the

signature value

Quoted 1 line

from device as the real device connnecting to the port

now.

Quoted 2 lines

What we said "support" PMP does not mean the port can

only connnect

Quoted 1 line

to Port Multiplier. It might connect with hard drive

or ATAPI

Quoted 1 line

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.

Signature · 1 line
tejun

Best Regards,
Mac Lin

#4 lore raw
In reply to Luo Dislo
Quoted 5 lines · Luo Dislo

Hello,

This is my company(Faraday) implemented AHCI SATA controller. Our controller is not located at PCI bus, but AHB bus(ARM based platform).

Quoted 7 lines

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.

It shouldn't be expecting only a PMP signature in this case if there is no PMP connected. The PMP spec states:

"To determine if a Port Multiplier is present, the host performs the following procedure. The host will determine if communication is established on the host’s Serial ATA port by checking the host’s SStatus register. If a device is present, the host will issue a software reset with the PM Port field set to the control port. The host will check the signature value returned and if it corresponds to the Port Multiplier Signature, the host knows that a Port Multiplier is present. If the signature value does not correspond to a Port Multiplier, the host may proceed with the normal initialization sequence for that device type."

The code is doing this. However, I suspect the problem is that on some controllers, it won't fill in the signature as expected if the PMP field on the received D2H Register FIS doesn't match the one listed in the command 15, for the PMP control port), which it won't if there's no PMP connected. I'm not sure if this is the intent of the AHCI spec or not, but in any case it appears that a number of controllers have this issue. I suspect that retrying with PMP=0 if the softreset with PMP=15 failed to acquire a signature is likely the thing to do.

Quoted 71 lines

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<[email protected]> 寫道:

Quoted 42 lines

寄件者: Tejun Heo<[email protected]>
主旨: Re: AHCI support Port Multiplier problem.
收件者: "Luo Dislo"<[email protected]>
副本: [email protected], [email protected]
日期: 2011年1月8日,六,上午5:25
Hello,

Quoted 1 line · Luo Dislo

I am using AHCI driver, when CONFIG_SATA_PMP is set

and the ahci

Quoted 1 line

driver DOES NOT have AHCI_HFLAG_NO_PMP. Libata sends

Software Reset

Quoted 1 line

with PMP=0xF, trying to detect if Port Multiplier

connected to the

Quoted 1 line

port. Unfortunately, if I plugged in general Hard

drive, my

Quoted 3 lines

controller failed to identify the hard drive.

What I observed was that libata always sent Software

Reset with

Quoted 1 line

PMP=0xF and I guessed expecting signature is

0x96690101. I think

Quoted 1 line

libata should give up if the device does not return

the Port

Quoted 1 line

Multiplier signature at the first time and take the

signature value

Quoted 1 line

from device as the real device connnecting to the port

now.

Quoted 2 lines

What we said "support" PMP does not mean the port can

only connnect

Quoted 1 line

to Port Multiplier. It might connect with hard drive

or ATAPI

Quoted 1 line

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.

Quoted 5 lines

Thanks.

--
tejun

--
To unsubscribe from this list: send the line "unsubscribe linux-ide" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#5 lore raw

Hello,

Quoted 2 lines · Robert Hancock

I suspect that retrying with PMP=0 if the softreset with PMP=15 failed to acquire a signature is likely the thing to do.

Of the non-platform ones, sb600 is the only one with this problem and the workaround will unnecessarily lengthen response time for other controllers. I'd suggest implementing it as a quirk in libahci.c and applying it only to the broken controllers.

Thanks.

Signature · 1 line
tejun
#6 lore raw
In reply to Luo Dislo

Hi,

Quoted 16 lines · Luo Dislo

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.

Quoted 5 lines

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.

Please take a look at ahci_sb600_softreset() in ahci.c. The controller had the same problem. Preferably, please fix your controller but as there are more than one controller with this problem, we probably should implement it as a quirk in libahci.c.

Thanks.

Signature · 1 line
tejun
author
#7 lore raw

Thank you. I will take a look the code.

Regards,
Dislo
--- 11/1/11 (二),Tejun Heo <[email protected]> 寫道:

Quoted 57 lines

寄件者: Tejun Heo <[email protected]>
主旨: Re: AHCI support Port Multiplier problem.
收件者: "Luo Dislo" <[email protected]>
副本: [email protected], [email protected]
日期: 2011年1月11日,二,下午10:37
Hi,

Quoted 1 line · Luo Dislo

This is my company(Faraday) implemented AHCI SATA

controller. Our

Quoted 1 line

controller is not located at PCI bus, but AHB bus(ARM

based platform).

Quoted 2 lines

However, I modify Linux kernel builtin AHCI

driver(ahci.c) to replace

Quoted 1 line

the PCI related code by using platform bus. Just

pretty similar way

Quoted 3 lines

with drivers/ata/ahci_platform.c (Kernel 2.6.35).

I think the problem happens because libata does not

give up, keep on

Quoted 1 line

expecting the Port Multiplier Signature when we set

CONFIG_SATA_PMP

Quoted 3 lines

to 1.

I know how to fix this problem, just add

AHCI_HFLAG_NO_PMP to

Quoted 1 line

AHCI_HFLAGS when I connect hard drive to the

controller. Meanwhile,

Quoted 1 line

when I want to connect the Port Muliplier to my

controller, I need

Quoted 3 lines

to remove AHCI_HFLAG_NO_PMP from AHCI_HFLAGS.

I don't think this is a good solution because I have

to compile two

Quoted 1 line

version of my code. It does not make sense. We set

CONFIG_SATA_PMP

Quoted 1 line

to 1 and inside the driver code DOES NOT have

AHCI_HFLAG_NO_PMP just

Quoted 1 line

means that controller support Port Multiplier but the

device

Quoted 1 line

connecting to the port might be others type.

Please take a look at ahci_sb600_softreset() in ahci.c.  The
controller had the same problem.  Preferably, please fix your
controller but as there are more than one controller with this
problem, we probably should implement it as a quirk in libahci.c.

Thanks.

Signature · 1 line
tejun
author
#8 lore raw
In reply to Tejun Heo

Yes, refer to ahci_sb600_softreset() function solved my problem.

Thanks

--- 11/1/11 (二),Tejun Heo <[email protected]> 寫道:

Quoted 57 lines

寄件者: Tejun Heo <[email protected]>
主旨: Re: AHCI support Port Multiplier problem.
收件者: "Luo Dislo" <[email protected]>
副本: [email protected], [email protected]
日期: 2011年1月11日,二,下午10:37
Hi,

Quoted 1 line · Luo Dislo

This is my company(Faraday) implemented AHCI SATA

controller. Our

Quoted 1 line

controller is not located at PCI bus, but AHB bus(ARM

based platform).

Quoted 2 lines

However, I modify Linux kernel builtin AHCI

driver(ahci.c) to replace

Quoted 1 line

the PCI related code by using platform bus. Just

pretty similar way

Quoted 3 lines

with drivers/ata/ahci_platform.c (Kernel 2.6.35).

I think the problem happens because libata does not

give up, keep on

Quoted 1 line

expecting the Port Multiplier Signature when we set

CONFIG_SATA_PMP

Quoted 3 lines

to 1.

I know how to fix this problem, just add

AHCI_HFLAG_NO_PMP to

Quoted 1 line

AHCI_HFLAGS when I connect hard drive to the

controller. Meanwhile,

Quoted 1 line

when I want to connect the Port Muliplier to my

controller, I need

Quoted 3 lines

to remove AHCI_HFLAG_NO_PMP from AHCI_HFLAGS.

I don't think this is a good solution because I have

to compile two

Quoted 1 line

version of my code. It does not make sense. We set

CONFIG_SATA_PMP

Quoted 1 line

to 1 and inside the driver code DOES NOT have

AHCI_HFLAG_NO_PMP just

Quoted 1 line

means that controller support Port Multiplier but the

device

Quoted 1 line

connecting to the port might be others type.

Please take a look at ahci_sb600_softreset() in ahci.c.  The
controller had the same problem.  Preferably, please fix your
controller but as there are more than one controller with this
problem, we probably should implement it as a quirk in libahci.c.

Thanks.

Signature · 1 line
tejun
#9 lore raw

Question regarding PORT_IRQ_BAD_PMP (Re: AHCI support Port Multiplier problem.)

In reply to Tejun Heo

Tejun Heo <tj <at> kernel.org> writes:

[snip]

Quoted 4 lines

Please take a look at ahci_sb600_softreset() in ahci.c. The controller had the same problem. Preferably, please fix your controller but as there are more than one controller with this problem, we probably should implement it as a quirk in libahci.c.

I refer to the ahci_sb600_softreset and ahci_sb600_check_ready to make my patch, but I found that the following code changes in ahci_sb600_check_ready:

/*
* There is no need to check TFDATA if BAD PMP is found due to HW bug,

* which can save timeout delay.
*/
if (irq_status & PORT_IRQ_BAD_PMP)
return -EIO;

On my system (CNS3xxx) it result in:

ata2: softreset failed (device not ready)
ata2: applying PMP SRST workaround and retrying
ata2: softreset failed (device not ready)
ata2: reset failed (errno=-5), retrying in 9 secs
ata2: softreset failed (device not ready)
ata2: applying PMP SRST workaround and retrying
ata2: softreset failed (device not ready)
ata2: reset failed (errno=-5), retrying in 9 secs
ata2: softreset failed (device not ready)
ata2: applying PMP SRST workaround and retrying
ata2: softreset failed (device not ready)
ata2: reset failed (errno=-5), retrying in 34 secs
ata2: limiting SATA link speed to 1.5 Gbps
ata2: softreset failed (device not ready)
ata2: applying PMP SRST workaround and retrying
ata2: softreset failed (device not ready)
ata2: reset failed, giving up

It seems that the PORT_IRQ_BAD_PMP is not getting cleared, or, asserted every time when it "received a FIS from a device that did not have a command outstanding", which is the D2H FIS of softreset.

The sb600, which I assume the code work correctly, seems doesn't have this problem. So I am wondering that whether is this the right behavior on cns3xxx, or and just another issue of the chip?

Best Regards,
Mac Lin

#10 lore raw

Re: Question regarding PORT_IRQ_BAD_PMP (Re: AHCI support Port Multiplier problem.)

Hello,

(please always reply-to-all)

Quoted 7 lines · Mac Lin

It seems that the PORT_IRQ_BAD_PMP is not getting cleared, or, asserted every time when it "received a FIS from a device that did not have a command outstanding", which is the D2H FIS of softreset.

The sb600, which I assume the code work correctly, seems doesn't have this problem. So I am wondering that whether is this the right behavior on cns3xxx, or and just another issue of the chip?

You're already working around buggy hardware. It isn't surprising that both behave incorrectly in their own separate ways. Just do what's necessary to get the hardware working as long as the workaround is localized to the specific controller.

Good luck.

Signature · 1 line
tejun
#11 lore raw

Re: Question regarding PORT_IRQ_BAD_PMP (Re: AHCI support Port Multiplier problem.)

2011/2/15 Tejun Heo <[email protected]>:

Quoted 2 lines

Hello,
(please always reply-to-all)

I'm sorry about that. I was not subscribed to linux-ide, and replied by gmane.

Quoted 5 lines · Mac Lin
Quoted 4 lines

It seems that the PORT_IRQ_BAD_PMP is not getting cleared, or, asserted every time when it "received a FIS from a device that did not have a command outstanding", which is the D2H FIS of softreset.

Quoted 8 lines
Quoted 3 lines

The sb600, which I assume the code work correctly, seems doesn't have this problem. So I am wondering that whether is this the right behavior on cns3xxx, or  and just another issue of the chip?

You're already working around buggy hardware.  It isn't surprising that both behave incorrectly in their own separate ways.  Just do what's necessary to get the hardware working as long as the workaround is localized to the specific controller.

If I implement it as a quirk, would you prefer to add a new field quirk, or just use flags of ahci_host_priv and add a new AHCI_HFLAG*? I prefer the later, but afraid that it's not what it is for.

Best Regards,
Mac Lin

#12 lore raw

Re: Question regarding PORT_IRQ_BAD_PMP (Re: AHCI support Port Multiplier problem.)

Quoted 8 lines · Lin Mac
Quoted 4 lines

You're already working around buggy hardware.  It isn't surprising that both behave incorrectly in their own separate ways.  Just do what's necessary to get the hardware working as long as the workaround is localized to the specific controller.

If I implement it as a quirk, would you prefer to add a new field quirk, or just use flags of ahci_host_priv and add a new AHCI_HFLAG*? I prefer the later, but afraid that it's not what it is for.

Please implement it as a separate ata_port_operations like ahci_CONTROLLER_NAME_ops and use the customized reset methods.

Signature · 1 line
tejun
#13 lore raw

Re: Question regarding PORT_IRQ_BAD_PMP (Re: AHCI support Port Multiplier problem.)

2011/2/15 Tejun Heo <[email protected]>:

Quoted 6 lines · Lin Mac
Quoted 5 lines
Quoted 4 lines

You're already working around buggy hardware.  It isn't surprising that both behave incorrectly in their own separate ways.  Just do what's necessary to get the hardware working as long as the workaround is localized to the specific controller.

Quoted 6 lines
Quoted 3 lines

If I implement it as a quirk, would you prefer to add a new field quirk, or just use flags of ahci_host_priv and add a new AHCI_HFLAG*? I prefer the later, but afraid that it's not what it is for.

Please implement it as a separate ata_port_operations like ahci_CONTROLLER_NAME_ops and use the customized reset methods.

In fact, I did. But it doesn't get accepted.

[PATCH v5 0/3] add CNS3xxx AHCI support (Cavium Networks)
http://www.spinics.net/lists/linux-ide/msg39859.html

And given that there are many of them, shouldn't we implement it as quirk?

    AHCI support Port Multiplier problem. (Faraday)
    http://www.spinics.net/lists/linux-ide/msg39815.html

    Texas Instruments OMAP L138

    ATI SB600/SB700 (ahci_sb600_softreset)
    http://kerneltrap.org/mailarchive/git-commits-head/2008/6/14/2122314

Best Regards,
Mac Lin

#14 lore raw

Re: Question regarding PORT_IRQ_BAD_PMP (Re: AHCI support Port Multiplier problem.)

Quoted 14 lines · Lin Mac

2011/2/15 Tejun Heo <[email protected]>:

Quoted 6 lines · Lin Mac
Quoted 5 lines
Quoted 4 lines

You're already working around buggy hardware.  It isn't surprising that both behave incorrectly in their own separate ways.  Just do what's necessary to get the hardware working as long as the workaround is localized to the specific controller.

Quoted 6 lines
Quoted 3 lines

If I implement it as a quirk, would you prefer to add a new field quirk, or just use flags of ahci_host_priv and add a new AHCI_HFLAG*? I prefer the later, but afraid that it's not what it is for.

Please implement it as a separate ata_port_operations like ahci_CONTROLLER_NAME_ops and use the customized reset methods.

Quoted 6 lines

In fact, I did. But it doesn't get accepted.

[PATCH v5 0/3] add CNS3xxx AHCI support (Cavium Networks)
http://www.spinics.net/lists/linux-ide/msg39859.html

And given that there are many of them, shouldn't we implement it as quirk?

IIRC, the rejected part was the renaming of files and addition of a new driver, no?

Signature · 1 line
tejun
#15 lore raw

Re: Question regarding PORT_IRQ_BAD_PMP (Re: AHCI support Port Multiplier problem.)

2011/2/15 Tejun Heo <[email protected]>:

Quoted 17 lines · Lin Mac
Quoted 16 lines

2011/2/15 Tejun Heo <[email protected]>:

Quoted 6 lines · Lin Mac
Quoted 5 lines
Quoted 4 lines

You're already working around buggy hardware.  It isn't surprising that both behave incorrectly in their own separate ways.  Just do what's necessary to get the hardware working as long as the workaround is localized to the specific controller.

Quoted 6 lines
Quoted 3 lines

If I implement it as a quirk, would you prefer to add a new field quirk, or just use flags of ahci_host_priv and add a new AHCI_HFLAG*? I prefer the later, but afraid that it's not what it is for.

Please implement it as a separate ata_port_operations like ahci_CONTROLLER_NAME_ops and use the customized reset methods.

In fact, I did. But it doesn't get accepted.

Quoted 7 lines
Quoted 4 lines

    [PATCH v5 0/3] add CNS3xxx AHCI support (Cavium Networks)
    http://www.spinics.net/lists/linux-ide/msg39859.html

And given that there are many of them, shouldn't we implement it as quirk?

IIRC, the rejected part was the renaming of files and addition of a new driver, no?

Before v5,
Jeff's concern is the renaming of the ahci_platform.c. Therefore I fixed that part and rename the module name instead.

In v5, first I rename the module ahci_platform to ahci_platforms. Then switch the ahci platform driver to device table matching. And add cns3xxx change with a new entry in device table.

Basheer suggest that several platform have this issue, and can be implemented as quirk.

Hi guys, could you kindly provide some input on the patchset:
[PATCH v5 0/3] add CNS3xxx AHCI support (Cavium Networks)
http://www.spinics.net/lists/linux-ide/msg39859.html

Best Regards,
Mac Lin