提交 67af2b06 编写于 作者: M Miquel van Smoorenburg 提交者: James Bottomley

[SCSI] dpt_i2o: move from virt_to_bus/bus_to_virt to dma_alloc_coherent

Remove virt_to_bus/bus_to_virt code from dpt_i2o, and use
dma_alloc_coherent() / dma_free_coherent().

This is in preparation of 64-bit support, dma_alloc_coherent()
can allocate memory in the lower 32 bits of physical memory
which is needed because the HBA only supports message blocks under 4GB

This code is based in part on the unofficial adaptec 64-bit
dpt_i2o driver update that I got from Mark Salyzyn at Adaptec.
Signed-off-by: NMiquel van Smoorenburg <miquels@cistron.nl>
Acked-by: NMark Salyzyn <Mark_Salyzyn@adaptec.com>
Signed-off-by: NJames Bottomley <James.Bottomley@HansenPartnership.com>
上级 c864cb14
此差异已折叠。
...@@ -228,14 +228,18 @@ typedef struct _adpt_hba { ...@@ -228,14 +228,18 @@ typedef struct _adpt_hba {
u32 post_fifo_size; u32 post_fifo_size;
u32 reply_fifo_size; u32 reply_fifo_size;
u32* reply_pool; u32* reply_pool;
dma_addr_t reply_pool_pa;
u32 sg_tablesize; // Scatter/Gather List Size. u32 sg_tablesize; // Scatter/Gather List Size.
u8 top_scsi_channel; u8 top_scsi_channel;
u8 top_scsi_id; u8 top_scsi_id;
u8 top_scsi_lun; u8 top_scsi_lun;
i2o_status_block* status_block; i2o_status_block* status_block;
dma_addr_t status_block_pa;
i2o_hrt* hrt; i2o_hrt* hrt;
dma_addr_t hrt_pa;
i2o_lct* lct; i2o_lct* lct;
dma_addr_t lct_pa;
uint lct_size; uint lct_size;
struct i2o_device* devices; struct i2o_device* devices;
struct adpt_channel channel[MAX_CHANNEL]; struct adpt_channel channel[MAX_CHANNEL];
...@@ -271,7 +275,8 @@ static int adpt_i2o_query_scalar(adpt_hba* pHba, int tid, ...@@ -271,7 +275,8 @@ static int adpt_i2o_query_scalar(adpt_hba* pHba, int tid,
static const char *adpt_i2o_get_class_name(int class); static const char *adpt_i2o_get_class_name(int class);
#endif #endif
static int adpt_i2o_issue_params(int cmd, adpt_hba* pHba, int tid, static int adpt_i2o_issue_params(int cmd, adpt_hba* pHba, int tid,
void *opblk, int oplen, void *resblk, int reslen); void *opblk, dma_addr_t opblk_pa, int oplen,
void *resblk, dma_addr_t resblk_pa, int reslen);
static int adpt_i2o_post_wait(adpt_hba* pHba, u32* msg, int len, int timeout); static int adpt_i2o_post_wait(adpt_hba* pHba, u32* msg, int len, int timeout);
static int adpt_i2o_lct_get(adpt_hba* pHba); static int adpt_i2o_lct_get(adpt_hba* pHba);
static int adpt_i2o_parse_lct(adpt_hba* pHba); static int adpt_i2o_parse_lct(adpt_hba* pHba);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册