From: David Miller <davem@davemloft.net>
To: ard.biesheuvel@linaro.org
Cc: romieu@fr.zoreil.com, nic_swsd@realtek.com,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] r8169: set coherent DMA mask as well as streaming DMA mask
Date: Fri, 14 Oct 2016 09:34:03 -0400 (EDT) [thread overview]
Message-ID: <20161014.093403.1591217631213879011.davem@davemloft.net> (raw)
In-Reply-To: <CAKv+Gu_HEANqHNh5d_b=-3djA__8MkE7UE5ps8rTFuCuJURcVQ@mail.gmail.com>
From: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Date: Fri, 14 Oct 2016 14:32:24 +0100
> On 14 October 2016 at 14:31, David Miller <davem@davemloft.net> wrote:
>> From: Ard Biesheuvel <ard.biesheuvel@linaro.org>
>> Date: Fri, 14 Oct 2016 12:39:30 +0100
>>
>>> PCI devices that are 64-bit DMA capable should set the coherent
>>> DMA mask as well as the streaming DMA mask. On some architectures,
>>> these are managed separately, and so the coherent DMA mask will be
>>> left at its default value of 32 if it is not set explicitly. This
>>> results in errors such as
>>>
>>> r8169 Gigabit Ethernet driver 2.3LK-NAPI loaded
>>> hwdev DMA mask = 0x00000000ffffffff, dev_addr = 0x00000080fbfff000
>>> swiotlb: coherent allocation failed for device 0000:02:00.0 size=4096
>>> CPU: 0 PID: 1062 Comm: systemd-udevd Not tainted 4.8.0+ #35
>>> Hardware name: AMD Seattle/Seattle, BIOS 10:53:24 Oct 13 2016
>>>
>>> on systems without memory that is 32-bit addressable by PCI devices.
>>>
>>> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
>> ...
>>> @@ -8281,6 +8282,8 @@ static int rtl_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
>>> dev->features |= NETIF_F_HIGHDMA;
>>> } else {
>>> rc = pci_set_dma_mask(pdev, DMA_BIT_MASK(32));
>>> + if (!rc)
>>> + rc = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(32));
>>
>> As you state 32-bit is the default, therefore this part of your patch is unnecessary.
>
> Perhaps, but the original code did not assume that either. Should I
> remove the other call in a subsequent patch as well?
I simply want you to respin this with the above hunk removed.
Your code changes and your commit message must be consistent.
next prev parent reply other threads:[~2016-10-14 13:34 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-14 11:39 [PATCH] r8169: set coherent DMA mask as well as streaming DMA mask Ard Biesheuvel
2016-10-14 13:31 ` David Miller
2016-10-14 13:32 ` Ard Biesheuvel
2016-10-14 13:34 ` David Miller [this message]
2016-10-14 13:36 ` Ard Biesheuvel
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=20161014.093403.1591217631213879011.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=ard.biesheuvel@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=nic_swsd@realtek.com \
--cc=romieu@fr.zoreil.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox