All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jared Bents <jared.bents@rockwellcollins.com>
To: Kalle Valo <kvalo@codeaurora.org>
Cc: ath10k@lists.infradead.org, linux-wireless@vger.kernel.org
Subject: Re: [PATCH v1 1/1] ath10k: convert kmemdup to dma_alloc_coherent
Date: Mon, 23 Apr 2018 13:21:54 -0500	[thread overview]
Message-ID: <CAM=7fbeOBLMteeCxSVHzkwx5-MTiiHpudvHpiu5ydF=c33T1Fw@mail.gmail.com> (raw)
In-Reply-To: <87in8lf314.fsf@kamboji.qca.qualcomm.com>

Hi Kalle,

On Sat, Apr 21, 2018 at 2:10 AM, Kalle Valo <kvalo@codeaurora.org> wrote:
> Jared Bents <jared.bents@rockwellcollins.com> writes:
>
>> Update to convert the use of kmemdup to dma_alloc_coherent as
>> dma_alloc_coherent will consider DMA region limits such as
>> those seen with CONFIG_FSL_PCI && CONFIG_ZONE_DMA32 whereas
>> kmemdup does not take those limitations into account.
>>
>> Signed-off-by: Jared Bents <jared.bents@rockwellcollins.com>
>
> Does this fix a real bug or is it just a theoretical issue you noticed
> while looking at the code? If this fixes a real bug please give a
> description of it.

It fixes a real bug that I have experienced.  My processor is a qoriq
T1042 powerpc and I am running the fsl-sdk-v2.0-1703 kernel (mainline
v4.1.35-rt41).  In 32 bit, the ath10k and ath9k work without issue.
After migrating to 64 bit, we experienced dma mapping errors with both
devices.  This patch is the only one that applies to a driver, the
rest of the updates performed to fix the dma mapping issues deal with
the sk_buffs are handled in skbuff, mac80211, and netlink.  We worked
with NXP to resolve the issue and I believe they will be handling the
ones that don't apply to the ath10k driver through their process.  If
we don't see them after a while, we will be sending them to the kernel
as well.

Here is the output from the dma mapping problem:

ath10k_pci 0000:01:00.0: unable to get target info from device
ath10k_pci 0000:01:00.0: could not get target info (-5)
ath10k_pci 0000:01:00.0: could not probe fw (-5)
>
> https://wireless.wiki.kernel.org/en/users/drivers/ath10k/submittingpatches#guidelines
>
> --
> Kalle Valo

Jared Bents

WARNING: multiple messages have this Message-ID (diff)
From: Jared Bents <jared.bents@rockwellcollins.com>
To: Kalle Valo <kvalo@codeaurora.org>
Cc: linux-wireless@vger.kernel.org, ath10k@lists.infradead.org
Subject: Re: [PATCH v1 1/1] ath10k: convert kmemdup to dma_alloc_coherent
Date: Mon, 23 Apr 2018 13:21:54 -0500	[thread overview]
Message-ID: <CAM=7fbeOBLMteeCxSVHzkwx5-MTiiHpudvHpiu5ydF=c33T1Fw@mail.gmail.com> (raw)
In-Reply-To: <87in8lf314.fsf@kamboji.qca.qualcomm.com>

Hi Kalle,

On Sat, Apr 21, 2018 at 2:10 AM, Kalle Valo <kvalo@codeaurora.org> wrote:
> Jared Bents <jared.bents@rockwellcollins.com> writes:
>
>> Update to convert the use of kmemdup to dma_alloc_coherent as
>> dma_alloc_coherent will consider DMA region limits such as
>> those seen with CONFIG_FSL_PCI && CONFIG_ZONE_DMA32 whereas
>> kmemdup does not take those limitations into account.
>>
>> Signed-off-by: Jared Bents <jared.bents@rockwellcollins.com>
>
> Does this fix a real bug or is it just a theoretical issue you noticed
> while looking at the code? If this fixes a real bug please give a
> description of it.

It fixes a real bug that I have experienced.  My processor is a qoriq
T1042 powerpc and I am running the fsl-sdk-v2.0-1703 kernel (mainline
v4.1.35-rt41).  In 32 bit, the ath10k and ath9k work without issue.
After migrating to 64 bit, we experienced dma mapping errors with both
devices.  This patch is the only one that applies to a driver, the
rest of the updates performed to fix the dma mapping issues deal with
the sk_buffs are handled in skbuff, mac80211, and netlink.  We worked
with NXP to resolve the issue and I believe they will be handling the
ones that don't apply to the ath10k driver through their process.  If
we don't see them after a while, we will be sending them to the kernel
as well.

Here is the output from the dma mapping problem:

ath10k_pci 0000:01:00.0: unable to get target info from device
ath10k_pci 0000:01:00.0: could not get target info (-5)
ath10k_pci 0000:01:00.0: could not probe fw (-5)
>
> https://wireless.wiki.kernel.org/en/users/drivers/ath10k/submittingpatches#guidelines
>
> --
> Kalle Valo

Jared Bents

_______________________________________________
ath10k mailing list
ath10k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath10k

  reply	other threads:[~2018-04-23 18:21 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-20 15:39 [PATCH v1 1/1] ath10k: convert kmemdup to dma_alloc_coherent Jared Bents
2018-04-20 15:39 ` Jared Bents
2018-04-21  7:10 ` Kalle Valo
2018-04-21  7:10   ` Kalle Valo
2018-04-23 18:21   ` Jared Bents [this message]
2018-04-23 18:21     ` Jared Bents
2018-04-24  7:32     ` Kalle Valo
2018-04-24  7:32       ` Kalle Valo
  -- strict thread matches above, loose matches on Subject: below --
2018-03-26 15:12 Jared Bents
2018-04-13 11:35 ` Kalle Valo

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='CAM=7fbeOBLMteeCxSVHzkwx5-MTiiHpudvHpiu5ydF=c33T1Fw@mail.gmail.com' \
    --to=jared.bents@rockwellcollins.com \
    --cc=ath10k@lists.infradead.org \
    --cc=kvalo@codeaurora.org \
    --cc=linux-wireless@vger.kernel.org \
    /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.