Changeset 8442d10 in mainline for uspace/drv/nic/rtl8139


Ignore:
Timestamp:
2013-09-09T21:48:12Z (12 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
c67dbd6
Parents:
2e2c18a1
Message:

improve the API of physmem_map(), dmamem_map() and dmamem_map_anonymous()
the "constraint" argument of dmamem_map_anonymous() should be used to specify bits disallowed in the physical frame address

Location:
uspace/drv/nic/rtl8139
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/nic/rtl8139/driver.c

    r2e2c18a1 r8442d10  
    11441144        ddf_msg(LVL_DEBUG, "Creating buffers");
    11451145
    1146         rc = dmamem_map_anonymous(TX_PAGES * PAGE_SIZE, AS_AREA_WRITE, 0,
    1147             &rtl8139->tx_buff_phys, &rtl8139->tx_buff_virt);
     1146        rc = dmamem_map_anonymous(TX_PAGES * PAGE_SIZE, DMAMEM_4GiB,
     1147            AS_AREA_WRITE, 0, &rtl8139->tx_buff_phys, &rtl8139->tx_buff_virt);
    11481148        if (rc != EOK) {
    11491149                ddf_msg(LVL_ERROR, "Can not allocate transmitter buffers.");
     
    11641164            RxBUF_TOT_LENGTH);
    11651165
    1166         rc = dmamem_map_anonymous(RxBUF_TOT_LENGTH, AS_AREA_READ, 0,
    1167             &rtl8139->rx_buff_phys, &rtl8139->rx_buff_virt);
     1166        rc = dmamem_map_anonymous(RxBUF_TOT_LENGTH, DMAMEM_4GiB,
     1167            AS_AREA_READ, 0, &rtl8139->rx_buff_phys, &rtl8139->rx_buff_virt);
    11681168        if (rc != EOK) {
    11691169                ddf_msg(LVL_ERROR, "Can not allocate receive buffer.");
  • uspace/drv/nic/rtl8139/driver.h

    r2e2c18a1 r8442d10  
    100100         *  Each buffer takes 2kB
    101101         */
    102         void *tx_buff_phys;
     102        uintptr_t tx_buff_phys;
    103103        void *tx_buff_virt;
    104104
     
    117117
    118118        /** Buffer for receiving frames */
    119         void *rx_buff_phys;
     119        uintptr_t rx_buff_phys;
    120120        void *rx_buff_virt;
    121121
Note: See TracChangeset for help on using the changeset viewer.