* [patch 2/2] drivers/block/umem.c: Use DMA_{32,64}BIT_MASK and correct call to pci_set_dma_mask()
@ 2005-07-14 22:20 domen
0 siblings, 0 replies; only message in thread
From: domen @ 2005-07-14 22:20 UTC (permalink / raw)
To: axboe; +Cc: linux-kernel, Tobias Klauser, domen
[-- Attachment #1: dma_mask-drivers_block_umem --]
[-- Type: text/plain, Size: 1504 bytes --]
From: Tobias Klauser <tklauser@nuerscht.ch>
Since nobody replied to Domen's request for clarification [1], here's a
patch to fix drivers/block/umem.c to correctly evaluate the return value
of pci_set_dma_mask() both times. The function returns non-null on
error, so this seems to be correct.
[1] http://lists.osdl.org/mailman/htdig/kernel-janitors/2005-May/004119.html
Use the DMA_{64,32}BIT_MASK constants from dma-mapping.h when calling
pci_set_dma_mask()
This patch includes dma-mapping.h explicitly because it caused errors
on some architectures otherwise.
See http://marc.theaimsgroup.com/?t=108001993000001&r=1&w=2 for details
Signed-off-by: Tobias Klauser <tklauser@nuerscht.ch>
Signed-off-by: Domen Puncer <domen@coderock.org>
---
umem.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
Index: quilt/drivers/block/umem.c
===================================================================
--- quilt.orig/drivers/block/umem.c
+++ quilt/drivers/block/umem.c
@@ -892,8 +892,8 @@ static int __devinit mm_pci_probe(struct
printk(KERN_INFO "Micro Memory(tm) controller #%d found at %02x:%02x (PCI Mem Module (Battery Backup))\n",
card->card_number, dev->bus->number, dev->devfn);
- if (pci_set_dma_mask(dev, 0xffffffffffffffffLL) &&
- !pci_set_dma_mask(dev, 0xffffffffLL)) {
+ if (pci_set_dma_mask(dev, DMA_64BIT_MASK) &&
+ pci_set_dma_mask(dev, DMA_32BIT_MASK)) {
printk(KERN_WARNING "MM%d: NO suitable DMA found\n",num_cards);
return -ENOMEM;
}
--
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2005-07-14 22:24 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-07-14 22:20 [patch 2/2] drivers/block/umem.c: Use DMA_{32,64}BIT_MASK and correct call to pci_set_dma_mask() domen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®