summaryrefslogtreecommitdiffstats
path: root/drivers/block/cciss.h
diff options
context:
space:
mode:
authorAlex Chiang <achiang@hp.com>2009-11-23 09:35:06 +0100
committerJens Axboe <jens.axboe@oracle.com>2009-11-23 09:35:06 +0100
commit32a87c0114f37871aefb12a30de3e0c3300e3646 (patch)
treed246240c07731a1f228a189ad373416997b496d3 /drivers/block/cciss.h
parentd61c42690c6e2ff093a3d01338dad49f35b1e27b (diff)
downloadlinux-32a87c0114f37871aefb12a30de3e0c3300e3646.tar.gz
linux-32a87c0114f37871aefb12a30de3e0c3300e3646.tar.bz2
linux-32a87c0114f37871aefb12a30de3e0c3300e3646.zip
cciss: change Cmd_sg_list.sg_chain_dma type to dma_addr_t
A recent commit broke the ia64 build: Author: Don Brace <brace@beardog.cce.hp.com> Date: Thu Nov 12 12:50:01 2009 -0600 cciss: Add enhanced scatter-gather support. because of this hunk: --- a/drivers/block/cciss.h +++ b/drivers/block/cciss.h +struct Cmd_sg_list { + SGDescriptor_struct *sgchain; + dma64_addr_t sg_chain_dma; + int chain_block_size; +}; The issue is that dma64_addr_t isn't #define'd on ia64. The way that we're using Cmd_sg_list.sg_chain_dma is to hold an address returned from pci_map_single(). + temp64.val = pci_map_single(h->pdev, + h->cmd_sg_list[c->cmdindex]->sgchain, + len, dir); + + h->cmd_sg_list[c->cmdindex]->sg_chain_dma = temp64.val; pci_map_single() returns a dma_addr_t too. This code will still work even on a 32-bit x86 build, where dma_addr_t is defined to be a u32 because it will simply be promoted to the __u64 that temp64.val is defined as. Thus, declaring Cmd_sg_list.sg_chain_dma as dma_addr_t is safe. Cc: Don Brace <brace@beardog.cce.hp.com> Cc: Stephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: Alex Chiang <achiang@hp.com> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'drivers/block/cciss.h')
-rw-r--r--drivers/block/cciss.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/block/cciss.h b/drivers/block/cciss.h
index e5c63e579ffc..1d95db254069 100644
--- a/drivers/block/cciss.h
+++ b/drivers/block/cciss.h
@@ -57,7 +57,7 @@ typedef struct _drive_info_struct
struct Cmd_sg_list {
SGDescriptor_struct *sgchain;
- dma64_addr_t sg_chain_dma;
+ dma_addr_t sg_chain_dma;
int chain_block_size;
};