From: Jesse Barnes <jbarnes@sgi.com>
To: linux-ia64@vger.kernel.org
Subject: [PATCH] implement dma_mapping_error
Date: Sat, 27 Mar 2004 00:00:52 +0000 [thread overview]
Message-ID: <200403261600.52088.jbarnes@sgi.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 194 bytes --]
On sn2, dma_mapping_error is trivial. pci_map_single was already returning 0
in case of failure (0 is an invalid DMA address on sn2), so make
dma_mapping_error check for that.
Thanks,
Jesse
[-- Attachment #2: pci-dma-mapping-error-2.patch --]
[-- Type: text/plain, Size: 878 bytes --]
===== arch/ia64/sn/io/machvec/pci_dma.c 1.29 vs edited =====
--- 1.29/arch/ia64/sn/io/machvec/pci_dma.c Mon Mar 22 06:34:46 2004
+++ edited/arch/ia64/sn/io/machvec/pci_dma.c Fri Mar 26 14:33:08 2004
@@ -391,11 +391,9 @@
dma_map = pcibr_dmamap_alloc(vhdl, NULL, size, PCIIO_DMA_DATA |
MINIMAL_ATE_FLAG(phys_addr, size));
- if (!dma_map) {
- printk(KERN_ERR "pci_map_single: Unable to allocate anymore "
- "32 bit page map entries.\n");
+ /* PMU out of entries */
+ if (!dma_map)
return 0;
- }
dma_addr = (dma_addr_t) pcibr_dmamap_addr(dma_map, phys_addr, size);
dma_map->bd_dma_addr = dma_addr;
@@ -655,6 +653,12 @@
int
sn_dma_mapping_error(dma_addr_t dma_addr)
{
+ /*
+ * We can only run out of page mapping entries, so if there's
+ * an error, tell the caller to try again later.
+ */
+ if (!dma_addr)
+ return -EAGAIN;
return 0;
}
reply other threads:[~2004-03-27 0:00 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=200403261600.52088.jbarnes@sgi.com \
--to=jbarnes@sgi.com \
--cc=linux-ia64@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox