Changeset 59b3095 in mainline for uspace/drv/nic/rtl8169/driver.h


Ignore:
Timestamp:
2014-06-02T20:53:10Z (10 years ago)
Author:
Agnieszka Tabaka <nufcia@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
be971233
Parents:
0764cc8a
Message:

Implemented DMA buffers allocation and frame sending mechanism. Buffers reclaiming is not implemented yet.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/nic/rtl8169/driver.h

    r0764cc8a r59b3095  
    4040#define TX_BUFFERS_COUNT        16
    4141#define RX_BUFFERS_COUNT        16
     42#define BUFFER_SIZE             2048
    4243
    4344#define TX_RING_SIZE            (sizeof(rtl8169_descr_t) * TX_BUFFERS_COUNT)
    4445#define RX_RING_SIZE            (sizeof(rtl8169_descr_t) * RX_BUFFERS_COUNT)
     46#define TX_BUFFERS_SIZE         (BUFFER_SIZE * TX_BUFFERS_COUNT)
     47#define RX_BUFFERS_SIZE         (BUFFER_SIZE * RX_BUFFERS_COUNT)
    4548
    4649/** RTL8139 device data */
     
    5659        /** TX ring */
    5760        uintptr_t tx_ring_phys;
    58         void *tx_ring_virt;
     61        rtl8169_descr_t *tx_ring;
     62        unsigned int tx_head;
     63        unsigned int tx_tail;
    5964        /** RX ring */
    6065        uintptr_t rx_ring_phys;
    61         void *rx_ring_virt;
     66        rtl8169_descr_t *rx_ring;
     67        unsigned int rx_head;
     68        unsigned int rx_tail;
    6269        /** TX buffers */
    6370        uintptr_t tx_buff_phys;
    64         void *tx_buff_virt;
     71        void *tx_buff;
    6572        /** RX buffers */
    6673        uintptr_t rx_buff_phys;
     
    7683        size_t tx_used;
    7784
    78         /** Buffer for receiving frames */
    79         uintptr_t rx_buff_phys;
    80         void *rx_buff_virt;
    81 
    8285        /** Lock for receiver */
    8386        fibril_mutex_t rx_lock;
Note: See TracChangeset for help on using the changeset viewer.