[Prism54-devel] Memory allocation question
Margit Schubert-While
margitsw at t-online.de
Mon Aug 16 13:32:09 UTC 2004
In islpci_dev.c :
/* perform the allocation */
priv->driver_mem_address = pci_alloc_consistent(priv->pdev,
HOST_MEM_BLOCK,
&priv->
device_host_address);
if (!priv->driver_mem_address) {
/* error allocating the block of PCI memory */
printk(KERN_ERR "%s: could not allocate DMA memory,
aborting!",
"prism54");
return -1;
}
/* assign the Control Block to the first address of the allocated
area */
priv->control_block =
(isl38xx_control_block *) priv->driver_mem_address;
/* set the Power Save Buffer pointer directly behind the CB */
priv->device_psm_buffer =
priv->device_host_address + CONTROL_BLOCK_SIZE;
Can somebody explain to my poor grey cells why we are using two
different pointers for the CB and PSM buffer ?
(Note driver_mem_address != device_host_address, one is
physical, one is virtual)
Margit
More information about the Prism54-devel
mailing list