From: David Henningsson <david.henningsson@canonical.com>
To: Mike Travis <travis@sgi.com>
Cc: Stephen Warren <swarren@nvidia.com>,
Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.de>,
Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>,
alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org,
Russ Anderson <rja@sgi.com>
Subject: Re: [PATCH]: x86_64, audio: Fix system panic when DMA > 40 bits
Date: Thu, 02 May 2013 10:29:33 +0200 [thread overview]
Message-ID: <518223ED.3000509@canonical.com> (raw)
In-Reply-To: <51820968.7080303@sgi.com>
On 05/02/2013 08:36 AM, Mike Travis wrote:
>
>
> On 5/1/2013 11:20 PM, David Henningsson wrote:
>> On 05/01/2013 09:04 PM, Mike Travis wrote:
>>> The audio driver mistakenly allows 64 bit addresses to be created for
>>> the audio driver on Nvidia GPUs. Unfortunately, the hardware normally
>>> only supports up to 40 bits of DMA. This can cause system panics as
>>> well as misdirected data when the address is > 40 bits as the upper
>>> part the address is truncated.
>>
>> Thanks for this patch. Stephen Warren, is this something you can
>> confirm/deny, and do you know what range of hardware this actually
>> applies to?
>
> The dma_mask can be read from the gpu device's pci entry. I know it's
> a stretch to try to link to that but past history has shown that it
> ranges from 36 to 40 bits.
Ok, so the below patch is some kind of workaround, as we don't currently
take the dma_mask into account correctly? Or put in another way, would
it be possible/better to actually read the dma_mask and use that instead
of just clamping at 32 bit?
>
>>
>>>
>>> Signed-off-by: Mike Travis <travis@sgi.com>
>>> Reviewed-by: Mike Habeck <habeck@sgi.com>
>>> ---
>>> sound/pci/hda/hda_intel.c | 2 +-
>>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c
>>> index bcd40ee..45eb165 100644
>>> --- a/sound/pci/hda/hda_intel.c
>>> +++ b/sound/pci/hda/hda_intel.c
>>> @@ -615,7 +615,7 @@ enum {
>>> /* quirks for Nvidia */
>>> #define AZX_DCAPS_PRESET_NVIDIA \
>>> (AZX_DCAPS_NVIDIA_SNOOP | AZX_DCAPS_RIRB_DELAY |
>>> AZX_DCAPS_NO_MSI |\
>>> - AZX_DCAPS_ALIGN_BUFSIZE)
>>> + AZX_DCAPS_ALIGN_BUFSIZE | AZX_DCAPS_NO_64BIT)
>>>
>>> #define AZX_DCAPS_PRESET_CTHDA \
>>> (AZX_DCAPS_NO_MSI | AZX_DCAPS_POSFIX_LPIB |
>>> AZX_DCAPS_4K_BDLE_BOUNDARY)
>>>
>>
>>
>>
>
--
David Henningsson, Canonical Ltd.
https://launchpad.net/~diwic
next prev parent reply other threads:[~2013-05-02 8:29 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-01 19:04 [PATCH]: x86_64, audio: Fix system panic when DMA > 40 bits Mike Travis
2013-05-02 6:20 ` David Henningsson
2013-05-02 6:36 ` Mike Travis
2013-05-02 8:29 ` David Henningsson [this message]
2013-05-02 16:19 ` Mike Travis
2013-05-03 9:55 ` Takashi Iwai
2013-05-02 18:20 ` Stephen Warren
2013-05-02 18:59 ` Mike Travis
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=518223ED.3000509@canonical.com \
--to=david.henningsson@canonical.com \
--cc=alsa-devel@alsa-project.org \
--cc=linux-kernel@vger.kernel.org \
--cc=perex@perex.cz \
--cc=pierre-louis.bossart@linux.intel.com \
--cc=rja@sgi.com \
--cc=swarren@nvidia.com \
--cc=tiwai@suse.de \
--cc=travis@sgi.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.