public inbox for linux-ide@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ahci: Add support for Cavium's fifth generation SATA controller
@ 2017-10-11  5:37 Radha Mohan Chintakuntla
  2017-10-11 14:09 ` Tejun Heo
  2017-10-17  6:58 ` Christoph Hellwig
  0 siblings, 2 replies; 4+ messages in thread
From: Radha Mohan Chintakuntla @ 2017-10-11  5:37 UTC (permalink / raw)
  To: tj, linux-ide, linux-kernel; +Cc: Radha Mohan Chintakuntla

From: Radha Mohan Chintakuntla <rchintakuntla@cavium.com>

This patch adds support for Cavium's fifth generation SATA controller.
It is an on-chip controller and complies with AHCI 1.3.1. As the
controller uses 64-bit addresses it cannot use the standard AHCI BAR5
and so uses BAR4.

Signed-off-by: Radha Mohan Chintakuntla <rchintakuntla@cavium.com>
---
 drivers/ata/ahci.c |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c
index 9f78bb0..5443cb7 100644
--- a/drivers/ata/ahci.c
+++ b/drivers/ata/ahci.c
@@ -57,6 +57,7 @@ enum {
 	AHCI_PCI_BAR_STA2X11	= 0,
 	AHCI_PCI_BAR_CAVIUM	= 0,
 	AHCI_PCI_BAR_ENMOTUS	= 2,
+	AHCI_PCI_BAR_CAVIUM_GEN5	= 4,
 	AHCI_PCI_BAR_STANDARD	= 5,
 };
 
@@ -1570,8 +1571,12 @@ static int ahci_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
 		ahci_pci_bar = AHCI_PCI_BAR_STA2X11;
 	else if (pdev->vendor == 0x1c44 && pdev->device == 0x8000)
 		ahci_pci_bar = AHCI_PCI_BAR_ENMOTUS;
-	else if (pdev->vendor == 0x177d && pdev->device == 0xa01c)
-		ahci_pci_bar = AHCI_PCI_BAR_CAVIUM;
+	else if (pdev->vendor == PCI_VENDOR_ID_CAVIUM) {
+		if (pdev->device == 0xa01c)
+			ahci_pci_bar = AHCI_PCI_BAR_CAVIUM;
+		if (pdev->device == 0xa084)
+			ahci_pci_bar = AHCI_PCI_BAR_CAVIUM_GEN5;
+	}
 
 	/* acquire resources */
 	rc = pcim_enable_device(pdev);
-- 
1.7.1

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

* Re: [PATCH] ahci: Add support for Cavium's fifth generation SATA controller
  2017-10-11  5:37 [PATCH] ahci: Add support for Cavium's fifth generation SATA controller Radha Mohan Chintakuntla
@ 2017-10-11 14:09 ` Tejun Heo
  2017-10-17  6:58 ` Christoph Hellwig
  1 sibling, 0 replies; 4+ messages in thread
From: Tejun Heo @ 2017-10-11 14:09 UTC (permalink / raw)
  To: Radha Mohan Chintakuntla
  Cc: linux-ide, linux-kernel, Radha Mohan Chintakuntla

On Tue, Oct 10, 2017 at 10:37:51PM -0700, Radha Mohan Chintakuntla wrote:
> From: Radha Mohan Chintakuntla <rchintakuntla@cavium.com>
> 
> This patch adds support for Cavium's fifth generation SATA controller.
> It is an on-chip controller and complies with AHCI 1.3.1. As the
> controller uses 64-bit addresses it cannot use the standard AHCI BAR5
> and so uses BAR4.
> 
> Signed-off-by: Radha Mohan Chintakuntla <rchintakuntla@cavium.com>

Applied to libata/for-4.15.

Thanks.

-- 
tejun

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

* Re: [PATCH] ahci: Add support for Cavium's fifth generation SATA controller
  2017-10-11  5:37 [PATCH] ahci: Add support for Cavium's fifth generation SATA controller Radha Mohan Chintakuntla
  2017-10-11 14:09 ` Tejun Heo
@ 2017-10-17  6:58 ` Christoph Hellwig
  2017-10-31 10:05   ` Jon Masters
  1 sibling, 1 reply; 4+ messages in thread
From: Christoph Hellwig @ 2017-10-17  6:58 UTC (permalink / raw)
  To: Radha Mohan Chintakuntla
  Cc: tj, linux-ide, linux-kernel, Radha Mohan Chintakuntla

On Tue, Oct 10, 2017 at 10:37:51PM -0700, Radha Mohan Chintakuntla wrote:
> From: Radha Mohan Chintakuntla <rchintakuntla@cavium.com>
> 
> This patch adds support for Cavium's fifth generation SATA controller.
> It is an on-chip controller and complies with AHCI 1.3.1. As the
> controller uses 64-bit addresses it cannot use the standard AHCI BAR5
> and so uses BAR4.

Looks like it isn't actually AHCI 1.3.1 compliant after all then :)

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

* Re: [PATCH] ahci: Add support for Cavium's fifth generation SATA controller
  2017-10-17  6:58 ` Christoph Hellwig
@ 2017-10-31 10:05   ` Jon Masters
  0 siblings, 0 replies; 4+ messages in thread
From: Jon Masters @ 2017-10-31 10:05 UTC (permalink / raw)
  To: Christoph Hellwig, Radha Mohan Chintakuntla
  Cc: tj, linux-ide, linux-kernel, Radha Mohan Chintakuntla

On 10/17/2017 02:58 AM, Christoph Hellwig wrote:
> On Tue, Oct 10, 2017 at 10:37:51PM -0700, Radha Mohan Chintakuntla wrote:
>> From: Radha Mohan Chintakuntla <rchintakuntla@cavium.com>
>>
>> This patch adds support for Cavium's fifth generation SATA controller.
>> It is an on-chip controller and complies with AHCI 1.3.1. As the
>> controller uses 64-bit addresses it cannot use the standard AHCI BAR5
>> and so uses BAR4.
> 
> Looks like it isn't actually AHCI 1.3.1 compliant after all then :)

I've asked various folks to followup with Intel to see if the AHCI
specification can be fixed to handle the case in which a 64-bit ABAR is
required. That should be something they'd be interested in for x86 too.

Jon.

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

end of thread, other threads:[~2017-10-31 10:05 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-10-11  5:37 [PATCH] ahci: Add support for Cavium's fifth generation SATA controller Radha Mohan Chintakuntla
2017-10-11 14:09 ` Tejun Heo
2017-10-17  6:58 ` Christoph Hellwig
2017-10-31 10:05   ` Jon Masters

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox