From: willy@linux.intel.com (Matthew Wilcox)
Subject: [PATCH 1/2] Add support for 32 bit DMA for 32 bit machines
Date: Mon, 4 Mar 2013 07:46:52 -0500 [thread overview]
Message-ID: <20130304124652.GG4530@linux.intel.com> (raw)
In-Reply-To: <E821E2F372F08945977BD15EAE588D61097C5FF6@SACMBXIP02.sdcorp.global.sandisk.com>
On Fri, Mar 01, 2013@10:05:25PM +0000, Chayan Biswas wrote:
> > What problem are you solving here? If the system is 32-bit, setting the
> > DMA mask to 64-bit should be harmless. The DMA mask tells the system
> > what the device is capable of -- this doesn't change if the system
> > happens to be 32-bit.
>
> [CB] The current code does not check for the return value from dma_set_mask() which can fail. Checking for the return value and falling back to 32 bit DMA is consistent with most of the device drivers currently in the kernel using this function and setting 64 bit DMA. Am I missing something here?
I agree that dma_set_mask() can fail, but the only failure mode I
know of is when the architecture code can't handle masks that _small_.
Since we're setting it to the maximum value, I wasn't aware of a way it
could fail.
> Maybe checking for the sizeof(dma_addr_t) is superfluous and we can remove.
>
> Without this patch we have hit system hang on a 32 bit OS earlier. Adding this patch resolved the issue.
Was it 32-bit x86, or some other architecture?
next prev parent reply other threads:[~2013-03-04 12:46 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-28 19:49 [PATCH 1/2] Add support for 32 bit DMA for 32 bit machines Chayan Biswas
2013-03-01 15:12 ` Matthew Wilcox
2013-03-01 22:05 ` Chayan Biswas
2013-03-04 12:46 ` Matthew Wilcox [this message]
2013-03-05 21:57 ` Chayan Biswas
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=20130304124652.GG4530@linux.intel.com \
--to=willy@linux.intel.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;
as well as URLs for NNTP newsgroup(s).