diff mbox

[V2,11/16] ata: Use 32-bit DMA in AHCI for Loongson-3.

Message ID 1340088624-25550-12-git-send-email-chenhc@lemote.com
State Not Applicable
Delegated to: David Miller
Headers show

Commit Message

Huacai Chen June 19, 2012, 6:50 a.m. UTC
This is a workaround because Loongson-3 has a hardware bug that it
doesn't support DMA address above 4GB.

Signed-off-by: Huacai Chen <chenhc@lemote.com>
Signed-off-by: Hongliang Tao <taohl@lemote.com>
Signed-off-by: Hua Yan <yanh@lemote.com>
Cc: linux-ide@vger.kernel.org
---
 drivers/ata/ahci.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

Comments

Jeff Garzik June 19, 2012, 12:32 p.m. UTC | #1
On 06/19/2012 02:50 AM, Huacai Chen wrote:
> diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c
> index ebaf67e..3e3cfd8 100644
> --- a/drivers/ata/ahci.c
> +++ b/drivers/ata/ahci.c
> @@ -183,7 +183,12 @@ static const struct ata_port_info ahci_port_info[] = {
>   	},
>   	[board_ahci_sb700] =	/* for SB700 and SB800 */
>   	{
> +#ifndef CONFIG_CPU_LOONGSON3
>   		AHCI_HFLAGS	(AHCI_HFLAG_IGN_SERR_INTERNAL),
> +#else
> +		AHCI_HFLAGS	(AHCI_HFLAG_IGN_SERR_INTERNAL |
> +						AHCI_HFLAG_32BIT_ONLY),
> +#endif
>   		.flags		= AHCI_FLAG_COMMON,


NAK -- the place to fix this up is ahci_init_one()

--
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Huacai Chen June 19, 2012, 12:36 p.m. UTC | #2
OK, thanks.

On Tue, Jun 19, 2012 at 8:32 PM, Jeff Garzik <jeff@garzik.org> wrote:
> On 06/19/2012 02:50 AM, Huacai Chen wrote:
>>
>> diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c
>> index ebaf67e..3e3cfd8 100644
>> --- a/drivers/ata/ahci.c
>> +++ b/drivers/ata/ahci.c
>> @@ -183,7 +183,12 @@ static const struct ata_port_info ahci_port_info[] =
>> {
>>        },
>>        [board_ahci_sb700] =    /* for SB700 and SB800 */
>>        {
>> +#ifndef CONFIG_CPU_LOONGSON3
>>                AHCI_HFLAGS     (AHCI_HFLAG_IGN_SERR_INTERNAL),
>> +#else
>> +               AHCI_HFLAGS     (AHCI_HFLAG_IGN_SERR_INTERNAL |
>> +                                               AHCI_HFLAG_32BIT_ONLY),
>> +#endif
>>                .flags          = AHCI_FLAG_COMMON,
>
>
>
> NAK -- the place to fix this up is ahci_init_one()
>
--
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c
index ebaf67e..3e3cfd8 100644
--- a/drivers/ata/ahci.c
+++ b/drivers/ata/ahci.c
@@ -183,7 +183,12 @@  static const struct ata_port_info ahci_port_info[] = {
 	},
 	[board_ahci_sb700] =	/* for SB700 and SB800 */
 	{
+#ifndef CONFIG_CPU_LOONGSON3
 		AHCI_HFLAGS	(AHCI_HFLAG_IGN_SERR_INTERNAL),
+#else
+		AHCI_HFLAGS	(AHCI_HFLAG_IGN_SERR_INTERNAL |
+						AHCI_HFLAG_32BIT_ONLY),
+#endif
 		.flags		= AHCI_FLAG_COMMON,
 		.pio_mask	= ATA_PIO4,
 		.udma_mask	= ATA_UDMA6,