- Subject: DMA
- From: "jeyram jadenthradevan" <j.jeyram@xxxxxxxxx>
- Date: Thu, 24 Apr 2008 11:58:20 +0530
hi everyone,
i am a beginner level in driver programming. please help to solve this problem.
this is a part of the internal modem driver coding. this is for intel chip set internal modem.
-------------------------------------------------------------------------------------------------------------------------------------------------------------
// ZT_MAX_CHUNKSIZE = 8
wc->writechunk = (int *)pci_alloc_consistent(pdev, ZT_MAX_CHUNKSIZE * 2 * 2 * 2 * 4, &wc->writedma);
if (!wc->writechunk) {
printk("wcfxo: Unable to allocate DMA-able memory\n");
if (wc->freeregion)
release_region(wc->ioaddr, 0xff);
return -ENOMEM;
}
wc->readchunk = wc->writechunk + ZT_MAX_CHUNKSIZE * 4; /* in doublewords */
wc->readdma = wc->writedma + ZT_MAX_CHUNKSIZE * 16; /* in bytes */
---------------------------------------------------------------------------------------------------------------------------------------------------------------
here they are creating 2 chunks for writing and reading.
but i couldn't understand this line.
wc->readdma = wc->writedma + ZT_MAX_CHUNKSIZE * 16;
why are they using ZT_MAX_CHUNKSIZE * 16 for allocating read chunk?
-jeyram
[Newbies FAQ]
[Kernel List]
[Site Home]
[IETF Annouce]
[Git]
[Networking]
[Security]
[Bugtraq]
[Rubini]
[Photo]
[Yosemite]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux Networking]
[Linux RAID]
[Linux SCSI]
[Linux ACPI]
[DDR & Rambus]
[UNIX Filesystems]
[Linux Resources]