Changeset 72d120e in mainline for uspace/drv/nic/e1k/e1k.c


Ignore:
Timestamp:
2014-06-16T20:17:44Z (10 years ago)
Author:
Agnieszka Tabaka <nufcia@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
5a78e4e
Parents:
9d653e3 (diff), 334bf28 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Integrate from mainline.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/nic/e1k/e1k.c

    r9d653e3 r72d120e  
    13751375        fibril_mutex_lock(&e1000->rx_lock);
    13761376       
     1377        e1000->rx_ring_virt = AS_AREA_ANY;
    13771378        int rc = dmamem_map_anonymous(
    13781379            E1000_RX_FRAME_COUNT * sizeof(e1000_rx_descriptor_t),
     
    13961397        }
    13971398       
    1398         size_t i;
    1399         uintptr_t frame_phys;
    1400         void *frame_virt;
    1401        
    1402         for (i = 0; i < E1000_RX_FRAME_COUNT; i++) {
     1399        for (size_t i = 0; i < E1000_RX_FRAME_COUNT; i++) {
     1400                uintptr_t frame_phys;
     1401                void *frame_virt = AS_AREA_ANY;
     1402               
    14031403                rc = dmamem_map_anonymous(E1000_MAX_SEND_FRAME_SIZE,
    14041404                    DMAMEM_4GiB, AS_AREA_READ | AS_AREA_WRITE, 0,
     
    14121412       
    14131413        /* Write descriptor */
    1414         for (i = 0; i < E1000_RX_FRAME_COUNT; i++)
     1414        for (size_t i = 0; i < E1000_RX_FRAME_COUNT; i++)
    14151415                e1000_fill_new_rx_descriptor(nic, i);
    14161416       
     
    14211421       
    14221422error:
    1423         for (i = 0; i < E1000_RX_FRAME_COUNT; i++) {
     1423        for (size_t i = 0; i < E1000_RX_FRAME_COUNT; i++) {
    14241424                if (e1000->rx_frame_virt[i] != NULL) {
    14251425                        dmamem_unmap_anonymous(e1000->rx_frame_virt[i]);
     
    15711571       
    15721572        e1000->tx_ring_phys = 0;
    1573         e1000->tx_ring_virt = NULL;
     1573        e1000->tx_ring_virt = AS_AREA_ANY;
    15741574       
    15751575        e1000->tx_frame_phys = NULL;
     
    15971597       
    15981598        for (i = 0; i < E1000_TX_FRAME_COUNT; i++) {
     1599                e1000->tx_frame_virt[i] = AS_AREA_ANY;
    15991600                rc = dmamem_map_anonymous(E1000_MAX_SEND_FRAME_SIZE,
    16001601                    DMAMEM_4GiB, AS_AREA_READ | AS_AREA_WRITE,
Note: See TracChangeset for help on using the changeset viewer.