2002-06-24 03:55:09

by Frank Davis

[permalink] [raw]
Subject: [PATCH] 2.5.24 : drivers/scsi/inia100.c

Hello all,
This patch adds the DMA mapping check (1st step for
Documentation/DMA-mapping.txt compliance). Please review.

Regards,
Frank

--- drivers/scsi/inia100.c.old Wed Feb 13 21:27:00 2002
+++ drivers/scsi/inia100.c Sun Jun 23 23:30:10 2002
@@ -248,7 +248,10 @@
continue;
if (iAdapters >= MAX_SUPPORTED_ADAPTERS)
break; /* Never greater than maximum */
-
+ if(pci_set_dma_mask(pdev, 0xffffffff))
+ {
+ printk(KERN_WARNING "inia100 : No suitable DMA available.\n");
+ }
if (i == 0) {
/*
printk("inia100: The RAID controller is not supported by\n");


2002-06-24 06:30:59

by Francois Romieu

[permalink] [raw]
Subject: Re: [PATCH] 2.5.24 : drivers/scsi/inia100.c

Greetings,

Frank Davis <[email protected]> :
> Hello all,
> This patch adds the DMA mapping check (1st step for
> Documentation/DMA-mapping.txt compliance). Please review.

- please take a look at Documentation/CodingStyle
- if pci_set_dma_mask() fails, the driver shouldn't go on as if nothing
happened. See what other drivers do (net/acenic.c for example)
- the interesting part of DMA mapping conversion is more a matter of
memory descriptor handling (and phys_to_virt/friends removal)

--
Ueimor

2002-06-24 06:48:03

by Frank Davis

[permalink] [raw]
Subject: Re: [PATCH] 2.5.24 : drivers/scsi/inia100.c

Francois,
Yes, I'm aware of the DMA mapping and pci_set_dma_mask() options.
As I stated, this is just the 1st patch for the DMA code. The
"interesting" parts will be included in a future patch (possibly by the
driver developers), as well as appropriate option for pci_set_dma_mask()
such as returning an error code or jumping to some code to return. This
goes for all of my recent DMA patches.
Regards,
Frank

Francois Romieu wrote:
> Greetings,
>
> Frank Davis <[email protected]> :
>
>>Hello all,
>> This patch adds the DMA mapping check (1st step for
>>Documentation/DMA-mapping.txt compliance). Please review.
>
>
> - please take a look at Documentation/CodingStyle
> - if pci_set_dma_mask() fails, the driver shouldn't go on as if nothing
> happened. See what other drivers do (net/acenic.c for example)
> - the interesting part of DMA mapping conversion is more a matter of
> memory descriptor handling (and phys_to_virt/friends removal)
>