diff options
-rw-r--r-- | drivers/misc/hpilo.c | 17 | ||||
-rw-r--r-- | drivers/misc/hpilo.h | 8 |
2 files changed, 13 insertions, 12 deletions
diff --git a/drivers/misc/hpilo.c b/drivers/misc/hpilo.c index 98ad0120aa9b..557a8c2a7336 100644 --- a/drivers/misc/hpilo.c +++ b/drivers/misc/hpilo.c | |||
@@ -256,7 +256,8 @@ static void ilo_ccb_close(struct pci_dev *pdev, struct ccb_data *data) | |||
256 | 256 | ||
257 | static int ilo_ccb_setup(struct ilo_hwinfo *hw, struct ccb_data *data, int slot) | 257 | static int ilo_ccb_setup(struct ilo_hwinfo *hw, struct ccb_data *data, int slot) |
258 | { | 258 | { |
259 | char *dma_va, *dma_pa; | 259 | char *dma_va; |
260 | dma_addr_t dma_pa; | ||
260 | struct ccb *driver_ccb, *ilo_ccb; | 261 | struct ccb *driver_ccb, *ilo_ccb; |
261 | 262 | ||
262 | driver_ccb = &data->driver_ccb; | 263 | driver_ccb = &data->driver_ccb; |
@@ -272,12 +273,12 @@ static int ilo_ccb_setup(struct ilo_hwinfo *hw, struct ccb_data *data, int slot) | |||
272 | return -ENOMEM; | 273 | return -ENOMEM; |
273 | 274 | ||
274 | dma_va = (char *)data->dma_va; | 275 | dma_va = (char *)data->dma_va; |
275 | dma_pa = (char *)data->dma_pa; | 276 | dma_pa = data->dma_pa; |
276 | 277 | ||
277 | memset(dma_va, 0, data->dma_size); | 278 | memset(dma_va, 0, data->dma_size); |
278 | 279 | ||
279 | dma_va = (char *)roundup((unsigned long)dma_va, ILO_START_ALIGN); | 280 | dma_va = (char *)roundup((unsigned long)dma_va, ILO_START_ALIGN); |
280 | dma_pa = (char *)roundup((unsigned long)dma_pa, ILO_START_ALIGN); | 281 | dma_pa = roundup(dma_pa, ILO_START_ALIGN); |
281 | 282 | ||
282 | /* | 283 | /* |
283 | * Create two ccb's, one with virt addrs, one with phys addrs. | 284 | * Create two ccb's, one with virt addrs, one with phys addrs. |
@@ -288,26 +289,26 @@ static int ilo_ccb_setup(struct ilo_hwinfo *hw, struct ccb_data *data, int slot) | |||
288 | 289 | ||
289 | fifo_setup(dma_va, NR_QENTRY); | 290 | fifo_setup(dma_va, NR_QENTRY); |
290 | driver_ccb->ccb_u1.send_fifobar = dma_va + FIFOHANDLESIZE; | 291 | driver_ccb->ccb_u1.send_fifobar = dma_va + FIFOHANDLESIZE; |
291 | ilo_ccb->ccb_u1.send_fifobar = dma_pa + FIFOHANDLESIZE; | 292 | ilo_ccb->ccb_u1.send_fifobar_pa = dma_pa + FIFOHANDLESIZE; |
292 | dma_va += fifo_sz(NR_QENTRY); | 293 | dma_va += fifo_sz(NR_QENTRY); |
293 | dma_pa += fifo_sz(NR_QENTRY); | 294 | dma_pa += fifo_sz(NR_QENTRY); |
294 | 295 | ||
295 | dma_va = (char *)roundup((unsigned long)dma_va, ILO_CACHE_SZ); | 296 | dma_va = (char *)roundup((unsigned long)dma_va, ILO_CACHE_SZ); |
296 | dma_pa = (char *)roundup((unsigned long)dma_pa, ILO_CACHE_SZ); | 297 | dma_pa = roundup(dma_pa, ILO_CACHE_SZ); |
297 | 298 | ||
298 | fifo_setup(dma_va, NR_QENTRY); | 299 | fifo_setup(dma_va, NR_QENTRY); |
299 | driver_ccb->ccb_u3.recv_fifobar = dma_va + FIFOHANDLESIZE; | 300 | driver_ccb->ccb_u3.recv_fifobar = dma_va + FIFOHANDLESIZE; |
300 | ilo_ccb->ccb_u3.recv_fifobar = dma_pa + FIFOHANDLESIZE; | 301 | ilo_ccb->ccb_u3.recv_fifobar_pa = dma_pa + FIFOHANDLESIZE; |
301 | dma_va += fifo_sz(NR_QENTRY); | 302 | dma_va += fifo_sz(NR_QENTRY); |
302 | dma_pa += fifo_sz(NR_QENTRY); | 303 | dma_pa += fifo_sz(NR_QENTRY); |
303 | 304 | ||
304 | driver_ccb->ccb_u2.send_desc = dma_va; | 305 | driver_ccb->ccb_u2.send_desc = dma_va; |
305 | ilo_ccb->ccb_u2.send_desc = dma_pa; | 306 | ilo_ccb->ccb_u2.send_desc_pa = dma_pa; |
306 | dma_pa += desc_mem_sz(NR_QENTRY); | 307 | dma_pa += desc_mem_sz(NR_QENTRY); |
307 | dma_va += desc_mem_sz(NR_QENTRY); | 308 | dma_va += desc_mem_sz(NR_QENTRY); |
308 | 309 | ||
309 | driver_ccb->ccb_u4.recv_desc = dma_va; | 310 | driver_ccb->ccb_u4.recv_desc = dma_va; |
310 | ilo_ccb->ccb_u4.recv_desc = dma_pa; | 311 | ilo_ccb->ccb_u4.recv_desc_pa = dma_pa; |
311 | 312 | ||
312 | driver_ccb->channel = slot; | 313 | driver_ccb->channel = slot; |
313 | ilo_ccb->channel = slot; | 314 | ilo_ccb->channel = slot; |
diff --git a/drivers/misc/hpilo.h b/drivers/misc/hpilo.h index 247eb386a973..54e43adbdea1 100644 --- a/drivers/misc/hpilo.h +++ b/drivers/misc/hpilo.h | |||
@@ -79,21 +79,21 @@ struct ilo_hwinfo { | |||
79 | struct ccb { | 79 | struct ccb { |
80 | union { | 80 | union { |
81 | char *send_fifobar; | 81 | char *send_fifobar; |
82 | u64 padding1; | 82 | u64 send_fifobar_pa; |
83 | } ccb_u1; | 83 | } ccb_u1; |
84 | union { | 84 | union { |
85 | char *send_desc; | 85 | char *send_desc; |
86 | u64 padding2; | 86 | u64 send_desc_pa; |
87 | } ccb_u2; | 87 | } ccb_u2; |
88 | u64 send_ctrl; | 88 | u64 send_ctrl; |
89 | 89 | ||
90 | union { | 90 | union { |
91 | char *recv_fifobar; | 91 | char *recv_fifobar; |
92 | u64 padding3; | 92 | u64 recv_fifobar_pa; |
93 | } ccb_u3; | 93 | } ccb_u3; |
94 | union { | 94 | union { |
95 | char *recv_desc; | 95 | char *recv_desc; |
96 | u64 padding4; | 96 | u64 recv_desc_pa; |
97 | } ccb_u4; | 97 | } ccb_u4; |
98 | u64 recv_ctrl; | 98 | u64 recv_ctrl; |
99 | 99 | ||