From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
To: suravee.suthikulpanit@amd.com, tj@kernel.org, b.zolnierkie@samsung.com
Cc: hdegoede@redhat.com, lho@apm.com, tphan@apm.com,
stripathi@apm.com, linux-ide@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] ahci: Check and set 64-bit DMA mask for platform AHCI driver
Date: Thu, 12 Jun 2014 21:47:25 +0400 [thread overview]
Message-ID: <5399E7AD.8030901@cogentembedded.com> (raw)
In-Reply-To: <1402594824-4151-2-git-send-email-suravee.suthikulpanit@amd.com>
Hello.
On 06/12/2014 09:40 PM, suravee.suthikulpanit@amd.com wrote:
> From: Suravee Suthikulpanit <Suravee.Suthikulpanit@amd.com>
> The current platform AHCI driver does not set the dma_mask correctly
> for 64-bit DMA capable AHCI controller. This patch checks the AHCI
> capability bit and set the dma_mask and coherent_dma_mask accordingly.
> Signed-off-by: Suravee Suthikulpanit <Suravee.Suthikulpanit@amd.com>
> Reviewed-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
> Reviewed-by: Hans de Goede <hdegoede@redhat.com>
> ---
> drivers/ata/libahci_platform.c | 13 +++++++++++++
> 1 file changed, 13 insertions(+)
> diff --git a/drivers/ata/libahci_platform.c b/drivers/ata/libahci_platform.c
> index 3a5b4ed..a958a2b 100644
> --- a/drivers/ata/libahci_platform.c
> +++ b/drivers/ata/libahci_platform.c
> @@ -364,6 +364,19 @@ int ahci_platform_init_host(struct platform_device *pdev,
> ap->ops = &ata_dummy_port_ops;
> }
>
> + if (hpriv->cap & HOST_CAP_64) {
> + rc = dma_coerce_mask_and_coherent(dev, DMA_BIT_MASK(64));
> + if (rc) {
> + rc = dma_coerce_mask_and_coherent(dev,
> + DMA_BIT_MASK(32));
> + if (rc) {
> + dev_err(dev, "Failed to enable 64-bit DMA.\n");
Not 32-bit?
> + return rc;
> + }
> + dev_warn(dev, "Enable 32-bit DMA instead of 64-bit.\n");
> + }
> + }
> +
WBR, Sergei
next prev parent reply other threads:[~2014-06-12 17:47 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-12 17:40 [PATCH 0/2] ahci: Add support for 64-bit DMA mask driver suravee.suthikulpanit
2014-06-12 17:40 ` suravee.suthikulpanit
2014-06-12 17:40 ` [PATCH 1/2] ahci: Check and set 64-bit DMA mask for platform AHCI driver suravee.suthikulpanit
2014-06-12 17:40 ` suravee.suthikulpanit
2014-06-12 17:47 ` Sergei Shtylyov [this message]
2014-06-13 12:45 ` Suravee Suthikulanit
2014-06-13 12:45 ` Suravee Suthikulanit
2014-06-13 8:40 ` Hans de Goede
2014-06-13 20:21 ` Hans de Goede
2014-06-17 19:03 ` Tejun Heo
2014-06-12 17:40 ` [PATCH 2/2] ahci/xgene: Remove logic to set 64-bit DMA mask suravee.suthikulpanit
2014-06-12 17:40 ` suravee.suthikulpanit
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5399E7AD.8030901@cogentembedded.com \
--to=sergei.shtylyov@cogentembedded.com \
--cc=b.zolnierkie@samsung.com \
--cc=hdegoede@redhat.com \
--cc=lho@apm.com \
--cc=linux-ide@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=stripathi@apm.com \
--cc=suravee.suthikulpanit@amd.com \
--cc=tj@kernel.org \
--cc=tphan@apm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.