Changeset a38d504 in mainline for uspace/lib/ata/src/ata.c


Ignore:
Timestamp:
2024-06-11T09:00:20Z (4 weeks ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
master
Children:
9739b5a
Parents:
645d3832
git-author:
Jiri Svoboda <jiri@…> (2024-06-10 17:59:56)
git-committer:
Jiri Svoboda <jiri@…> (2024-06-11 09:00:20)
Message:

Limit I/O operations not to exceed DMA buffer size

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/ata/src/ata.c

    r645d3832 ra38d504  
    14191419{
    14201420        size_t maxnb;
     1421        size_t dma_maxnb;
    14211422
    14221423        maxnb = 0;
     
    14411442         * exceed DMA buffer size.
    14421443         */
     1444        dma_maxnb = d->chan->params.max_dma_xfer / d->block_size;
     1445        if (dma_maxnb < maxnb)
     1446                maxnb = dma_maxnb;
     1447
    14431448        return maxnb;
    14441449}
Note: See TracChangeset for help on using the changeset viewer.